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:
parent
7ef12f634d
commit
31feab6053
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user