Skip to content

Commit

Permalink
Merge pull request #703 from sethkinast/peg-0.9
Browse files Browse the repository at this point in the history
Upgrade to peg.js 0.9
  • Loading branch information
sethkinast committed Sep 24, 2015
2 parents c1d9e21 + 2310047 commit 3fc12ef
Show file tree
Hide file tree
Showing 5 changed files with 678 additions and 654 deletions.
8 changes: 3 additions & 5 deletions lib/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
try {
var ast = filterAST(parse(source));
return compile(ast, name);
}
catch (err)
{
if (!err.line || !err.column) {
} catch (err) {
if (!err.location) {
throw err;
}
throw new SyntaxError(err.message + ' At line : ' + err.line + ', column : ' + err.column);
throw new SyntaxError(err.message + ' [' + name + ':' + err.location.start.line + ':' + err.location.start.column + ']');
}
};

Expand Down
Loading

0 comments on commit 3fc12ef

Please sign in to comment.