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:
commit
eb5c4057a1
2 changed files with 4 additions and 4 deletions
|
@ -112,8 +112,8 @@
|
||||||
var binaryLiteral, lexedLength, match, number, octalLiteral;
|
var binaryLiteral, lexedLength, match, number, octalLiteral;
|
||||||
if (!(match = NUMBER.exec(this.chunk))) return 0;
|
if (!(match = NUMBER.exec(this.chunk))) return 0;
|
||||||
number = match[0];
|
number = match[0];
|
||||||
if (/[E]/.test(number)) {
|
if (/E/.test(number)) {
|
||||||
this.error("exponential notation must be indicated with a lowercase 'e'");
|
this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'");
|
||||||
} else if (/[BOX]/.test(number)) {
|
} else if (/[BOX]/.test(number)) {
|
||||||
this.error("radix prefixes must be lowercase '" + number + "'");
|
this.error("radix prefixes must be lowercase '" + number + "'");
|
||||||
} else if (/^0[89]/.test(number)) {
|
} else if (/^0[89]/.test(number)) {
|
||||||
|
|
|
@ -133,8 +133,8 @@ exports.Lexer = class Lexer
|
||||||
numberToken: ->
|
numberToken: ->
|
||||||
return 0 unless match = NUMBER.exec @chunk
|
return 0 unless match = NUMBER.exec @chunk
|
||||||
number = match[0]
|
number = match[0]
|
||||||
if /[E]/.test number
|
if /E/.test number
|
||||||
@error "exponential notation must be indicated with a lowercase 'e'"
|
@error "exponential notation '#{number}' must be indicated with a lowercase 'e'"
|
||||||
else if /[BOX]/.test number
|
else if /[BOX]/.test number
|
||||||
@error "radix prefixes must be lowercase '#{number}'"
|
@error "radix prefixes must be lowercase '#{number}'"
|
||||||
else if /^0[89]/.test number
|
else if /^0[89]/.test number
|
||||||
|
|
Loading…
Reference in a new issue