fix: hanging parser on trailing comment

This commit is contained in:
Michael Hoffmann
2023-04-08 20:13:43 +02:00
parent 486488948b
commit 3cf33b40d4
16 changed files with 14076 additions and 14411 deletions

View File

@@ -5,17 +5,8 @@
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "body"
},
{
"type": "SYMBOL",
"name": "object"
}
]
"type": "SYMBOL",
"name": "body"
},
{
"type": "BLANK"

View File

@@ -202,10 +202,6 @@
{
"type": "body",
"named": true
},
{
"type": "object",
"named": true
}
]
}

27680
src/parser.c

File diff suppressed because it is too large Load Diff

View File

@@ -283,6 +283,9 @@ private:
skip(lexer);
while (lexer->lookahead != '\n') {
skip(lexer);
if (lexer->eof(lexer)) {
return false;
}
}
return true;
}