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

Using console.log and console.error in command.coffee (fixes #1798)

This commit is contained in:
Trevor Burnham 2011-10-24 14:39:55 -04:00
parent 913171f708
commit 41f2d2f789
3 changed files with 26 additions and 36 deletions

View file

@ -107,14 +107,15 @@
};
Lexer.prototype.numberToken = function() {
var is_binary, match, number, numlen;
var binaryLiteral, lexedLength, match, number;
if (!(match = NUMBER.exec(this.chunk))) return 0;
number = match[0];
numlen = number.length;
is_binary = /0b([01]+)/.exec(number);
if (is_binary) number = (parseInt(is_binary[1], 2)).toString();
lexedLength = number.length;
if (binaryLiteral = /0b([01]+)/.exec(number)) {
number = (parseInt(binaryLiteral[1], 2)).toString();
}
this.token('NUMBER', number);
return numlen;
return lexedLength;
};
Lexer.prototype.stringToken = function() {