mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
bringing back half assignments, but just for 'a = or b' and 'a = and b'
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
return this.literalToken();
|
||||
};
|
||||
Lexer.prototype.identifierToken = function() {
|
||||
var close_index, forcedIdentifier, id, tag;
|
||||
var _d, close_index, forcedIdentifier, id, tag;
|
||||
if (!(id = this.match(IDENTIFIER, 1))) {
|
||||
return false;
|
||||
}
|
||||
@@ -86,6 +86,9 @@
|
||||
if (id === 'all' && this.tag() === 'FOR') {
|
||||
tag = 'ALL';
|
||||
}
|
||||
if (('AND' === (_d = this.tag() === '=' && tag) || 'OR' === _d)) {
|
||||
return this.tag(1, CONVERSIONS[id] + '=');
|
||||
}
|
||||
if (include(JS_FORBIDDEN, id)) {
|
||||
if (forcedIdentifier) {
|
||||
tag = 'STRING';
|
||||
|
||||
Reference in New Issue
Block a user