Issue #2060 cleanup

This commit is contained in:
Gerald Lewis 2012-01-21 11:21:03 -05:00
parent 34e517de09
commit a080bd40fb
2 changed files with 4 additions and 4 deletions

View File

@ -112,8 +112,8 @@
var binaryLiteral, lexedLength, match, number, octalLiteral;
if (!(match = NUMBER.exec(this.chunk))) return 0;
number = match[0];
if (/[E]/.test(number)) {
this.error("exponential notation must be indicated with a lowercase 'e'");
if (/E/.test(number)) {
this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'");
} else if (/[BOX]/.test(number)) {
this.error("radix prefixes must be lowercase '" + number + "'");
} else if (/^0[89]/.test(number)) {

View File

@ -133,8 +133,8 @@ exports.Lexer = class Lexer
numberToken: ->
return 0 unless match = NUMBER.exec @chunk
number = match[0]
if /[E]/.test number
@error "exponential notation must be indicated with a lowercase 'e'"
if /E/.test number
@error "exponential notation '#{number}' must be indicated with a lowercase 'e'"
else if /[BOX]/.test number
@error "radix prefixes must be lowercase '#{number}'"
else if /^0[89]/.test number