Fix to parsing of single-line comments where the comment at the end of a line was merging statements separated by a single line comment

This commit is contained in:
Jason Turner 2010-08-28 22:14:09 +00:00
parent 7ef12f634d
commit 31feab6053

View File

@ -211,9 +211,12 @@ namespace chaiscript
} }
else if (Symbol_(singleline_comment.c_str())) { else if (Symbol_(singleline_comment.c_str())) {
while (input_pos != input_end) { while (input_pos != input_end) {
if (Symbol_("\r\n") || Char_('\n')) { if (Symbol_("\r\n")) {
++line; input_pos -= 2;
col = 1; break;
}
else if (Char_('\n')) {
--input_pos;
break; break;
} }
else { else {