bringing back half assignments, but just for 'a = or b' and 'a = and b'

This commit is contained in:
Jeremy Ashkenas
2010-07-26 23:53:03 -04:00
parent 89cd25ab15
commit 9be1453886
3 changed files with 23 additions and 4 deletions

View File

@@ -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';