You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parser: tolerant mode with error recovery and error nodes #450
The parser stops at the first syntax error (ParseError, 21 throw sites via error()/expect()) and returns no AST. An editor tool needs the rest of the file: symbols, types and diagnostics must survive a half-typed line.
Scope
New entry point Parser::parseTolerant(source, file) returning Program plus a list of ParseError. Strict parseSource stays byte-for-byte unchanged.
Synchronisation at statement, class-member and argument/element level.
ErrorStmt / ErrorExpr nodes appended to the Stmt/Expr hierarchies (never produced in strict mode).
Lexer: record unknown bytes and unterminated strings/comments as errors in tolerant mode (today an unknown byte is silently skipped, Lexer.php:672).
Acceptance
Truncation fuzz over src/ and the corpus: no throw, no hang, at least one error, statements before the cut equal the strict parse of the prefix.
dump-ast output identical before/after on the corpus; AOT suite, difftest and self-host fixpoint unchanged; no compile-time regression.
analyze reports all parse errors of a file, not only the first.
Activity