diff --git a/lib/parse.js b/lib/parse.js index 78c1dd41..0e269ab7 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -187,8 +187,9 @@ function parse_js_number(num) { } }; -function JS_Parse_Error(message, line, col, pos) { +function JS_Parse_Error(message, filename, line, col, pos) { this.message = message; + this.filename = filename; this.line = line; this.col = col; this.pos = pos; @@ -200,7 +201,7 @@ JS_Parse_Error.prototype.toString = function() { }; function js_error(message, filename, line, col, pos) { - throw new JS_Parse_Error(message, line, col, pos); + throw new JS_Parse_Error(message, filename, line, col, pos); }; function is_token(token, type, val) {