2014-04-24 13:22:54 -07:00
|
|
|
==========================================
|
|
|
|
|
recovers from errors in function calls
|
|
|
|
|
==========================================
|
|
|
|
|
stuff(|||);
|
|
|
|
|
---
|
|
|
|
|
(program (expression_statement (function_call (identifier) (ERROR))))
|
|
|
|
|
|
2014-03-26 23:02:57 -07:00
|
|
|
==========================================
|
|
|
|
|
recovers from errors in if statements
|
|
|
|
|
==========================================
|
|
|
|
|
stuff();
|
|
|
|
|
if (*nonsense*) {
|
|
|
|
|
*more-nonsense*;
|
|
|
|
|
}
|
|
|
|
|
moreStuff();
|
|
|
|
|
---
|
|
|
|
|
(program
|
2014-03-28 12:59:47 -07:00
|
|
|
(expression_statement (function_call (identifier)))
|
2014-03-26 23:02:57 -07:00
|
|
|
(if_statement (ERROR)
|
2014-03-28 13:11:12 -07:00
|
|
|
(statement_block (expression_statement (ERROR))))
|
2014-03-28 12:59:47 -07:00
|
|
|
(expression_statement (function_call (identifier))))
|
2014-03-28 13:11:12 -07:00
|
|
|
|
|
|
|
|
==========================================
|
|
|
|
|
recovers from errors in for loops
|
|
|
|
|
==========================================
|
|
|
|
|
stuff();
|
|
|
|
|
for (var i = 0; *nonsense*; *what*) {
|
|
|
|
|
*more-nonsense*;
|
|
|
|
|
}
|
|
|
|
|
moreStuff();
|
|
|
|
|
---
|
|
|
|
|
(program
|
|
|
|
|
(expression_statement (function_call (identifier)))
|
|
|
|
|
(for_statement
|
|
|
|
|
(var_declaration (assignment (identifier) (number)))
|
|
|
|
|
(expression_statement (ERROR))
|
|
|
|
|
(ERROR)
|
|
|
|
|
(statement_block (expression_statement (ERROR))))
|
|
|
|
|
(expression_statement (function_call (identifier))))
|
|
|
|
|
|