reverting premature start of solution to #2306
This commit is contained in:
parent
caf3da2f66
commit
848d10594b
|
@ -43,7 +43,7 @@
|
|||
};
|
||||
|
||||
Lexer.prototype.identifierToken = function() {
|
||||
var colon, forcedIdentifier, id, input, match, originalId, prev, tag, _ref2, _ref3;
|
||||
var colon, forcedIdentifier, id, input, match, prev, tag, _ref2, _ref3;
|
||||
if (!(match = IDENTIFIER.exec(this.chunk))) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -87,7 +87,6 @@
|
|||
}
|
||||
}
|
||||
if (!forcedIdentifier) {
|
||||
originalId = id;
|
||||
if (__indexOf.call(COFFEE_ALIASES, id) >= 0) {
|
||||
id = COFFEE_ALIAS_MAP[id];
|
||||
}
|
||||
|
@ -103,7 +102,6 @@
|
|||
return 'LOGIC';
|
||||
case 'true':
|
||||
case 'false':
|
||||
id = originalId;
|
||||
return 'BOOL';
|
||||
case 'undefined':
|
||||
return 'UNDEFINED';
|
||||
|
|
|
@ -535,16 +535,7 @@
|
|||
Bool.prototype.isComplex = NO;
|
||||
|
||||
Bool.prototype.compileNode = function() {
|
||||
switch (this.val) {
|
||||
case 'yes':
|
||||
case 'on':
|
||||
return 'true';
|
||||
case 'no':
|
||||
case 'off':
|
||||
return 'false';
|
||||
default:
|
||||
return this.val;
|
||||
}
|
||||
return this.val;
|
||||
};
|
||||
|
||||
function Bool(val) {
|
||||
|
|
|
@ -115,15 +115,12 @@ exports.Lexer = class Lexer
|
|||
@error "reserved word \"#{id}\""
|
||||
|
||||
unless forcedIdentifier
|
||||
originalId = id
|
||||
id = COFFEE_ALIAS_MAP[id] if id in COFFEE_ALIASES
|
||||
tag = switch id
|
||||
when '!' then 'UNARY'
|
||||
when '==', '!=' then 'COMPARE'
|
||||
when '&&', '||' then 'LOGIC'
|
||||
when 'true', 'false'
|
||||
id = originalId
|
||||
'BOOL'
|
||||
when 'true', 'false' then 'BOOL'
|
||||
when 'undefined' then 'UNDEFINED'
|
||||
when 'null' then 'NULL'
|
||||
when 'break', 'continue' then 'STATEMENT'
|
||||
|
|
|
@ -350,11 +350,7 @@ class exports.Null extends Base
|
|||
class exports.Bool extends Base
|
||||
isAssignable: NO
|
||||
isComplex: NO
|
||||
compileNode: ->
|
||||
switch @val
|
||||
when 'yes', 'on' then 'true'
|
||||
when 'no', 'off' then 'false'
|
||||
else @val
|
||||
compileNode: -> @val
|
||||
constructor: (@val) ->
|
||||
|
||||
#### Return
|
||||
|
|
Loading…
Reference in New Issue