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())) {
while (input_pos != input_end) {
if (Symbol_("\r\n") || Char_('\n')) {
++line;
col = 1;
if (Symbol_("\r\n")) {
input_pos -= 2;
break;
}
else if (Char_('\n')) {
--input_pos;
break;
}
else {