fix: hanging parser on trailing comment
This commit is contained in:
@@ -5,17 +5,8 @@
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "body"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "object"
|
||||
}
|
||||
]
|
||||
"type": "SYMBOL",
|
||||
"name": "body"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
|
||||
@@ -202,10 +202,6 @@
|
||||
{
|
||||
"type": "body",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"named": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
27680
src/parser.c
27680
src/parser.c
File diff suppressed because it is too large
Load Diff
@@ -283,6 +283,9 @@ private:
|
||||
skip(lexer);
|
||||
while (lexer->lookahead != '\n') {
|
||||
skip(lexer);
|
||||
if (lexer->eof(lexer)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user