the improved error messages are still-to-be-improved

This commit is contained in:
Jeremy Ashkenas 2010-02-13 16:28:07 -05:00
parent 844c756940
commit 97fd126a7f
2 changed files with 4 additions and 5 deletions

View File

@ -33,9 +33,8 @@
}
};
// Improved error messages.
parser.parseError = function parseError(message, hash) {
throw new Error('Unexpected ' + hash.token + ' on line ' + hash.line);
};
// parser.parseError: (message, hash) ->
// throw new Error 'Unexpected ' + parser.terminals_[hash.token] + ' on line ' + hash.line
exports.VERSION = '0.5.0';
// Compile CoffeeScript to JavaScript, using the Coffee/Jison compiler.
exports.compile = function compile(code, options) {

View File

@ -25,8 +25,8 @@ parser.lexer: {
}
# Improved error messages.
parser.parseError: (message, hash) ->
throw new Error 'Unexpected ' + hash.token + ' on line ' + hash.line
# parser.parseError: (message, hash) ->
# throw new Error 'Unexpected ' + parser.terminals_[hash.token] + ' on line ' + hash.line
exports.VERSION: '0.5.0'