Skip to content

Commit

Permalink
Prevent further parsing of file
Browse files Browse the repository at this point in the history
  • Loading branch information
nevadascout committed Apr 15, 2016
1 parent ec3fffb commit d69c544
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ module.exports = function(engine) {
}
var errorMessage = 'Parse Error : unexpected ' + token + msgExpect + ' at line ' + this.lexer.yylloc.first_line;
if (this.suppressErrors) {
// Prevent further parsing of the file
this.token = EOF;
// TODO -- Send errors back with the AST?
console.error(errorMessage)
} else {
Expand Down

0 comments on commit d69c544

Please sign in to comment.