Add error recovery to javascript if statements

This commit is contained in:
Max Brunsfeld 2014-03-26 23:02:57 -07:00
parent 6d84e71ceb
commit 2226234924
4 changed files with 823 additions and 785 deletions

View file

@ -0,0 +1,14 @@
==========================================
recovers from errors in if statements
==========================================
stuff();
if (*nonsense*) {
*more-nonsense*;
}
moreStuff();
---
(program
(statement (function_call (identifier)))
(if_statement (ERROR)
(statement_block (ERROR)))
(statement (function_call (identifier))))

View file

@ -18,8 +18,7 @@ if (isReady()) {
}
---
(program
(if_statement
(function_call (identifier))
(if_statement (function_call (identifier))
(statement_block (statement (function_call (property_access (identifier) (identifier)) (identifier))))))
==========================================