js grammar - recover from errors on semicolons but not line-breaks

This commit is contained in:
Max Brunsfeld 2015-09-22 21:12:28 -07:00
parent e7838d520a
commit d032114d7a
2 changed files with 1086 additions and 1171 deletions

View file

@ -55,7 +55,9 @@ extern const Grammar javascript = Grammar({
sym("throw_statement"),
sym("delete_statement") }) },
{ "expression_statement", terminated(err(sym("_expression"))) },
{ "expression_statement", choice({
terminated(sym("_expression")),
seq({ err(sym("_expression")), str(";") }) }) },
{ "var_declaration", terminated(seq({
str("var"),

File diff suppressed because it is too large Load diff