1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Merge branch 'uppercase_radix_prefixes' of git://github.com/geraldalewis/coffee-script

This commit is contained in:
Michael Ficarra 2012-01-21 11:40:20 -05:00
commit eb5c4057a1
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