lexer: removed unused UNARY tokens

This commit is contained in:
satyr
2010-10-26 09:29:13 +09:00
parent cb5642945a
commit 5a92b339a4
2 changed files with 5 additions and 3 deletions

View File

@@ -602,7 +602,7 @@
TRAILING_SPACES = /\s+$/;
NO_NEWLINE = /^(?:[-+*&|\/%=<>!.\\][<>=&|]*|and|or|is(?:nt)?|n(?:ot|ew)|delete|typeof|instanceof)$/;
COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='];
UNARY = ['UMINUS', 'UPLUS', '!', '!!', '~', 'NEW', 'TYPEOF', 'DELETE'];
UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE'];
LOGIC = ['&&', '||', '&', '|', '^'];
SHIFT = ['<<', '>>', '>>>'];
COMPARE = ['==', '!=', '<', '>', '<=', '>='];

View File

@@ -573,10 +573,12 @@ NO_NEWLINE = /// ^ (?: # non-capturing group
) $ ///
# Compound assignment tokens.
COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=']
COMPOUND_ASSIGN = [
'-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='
]
# Unary tokens.
UNARY = ['UMINUS', 'UPLUS', '!', '!!', '~', 'NEW', 'TYPEOF', 'DELETE']
UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE']
# Logical tokens.
LOGIC = ['&&', '||', '&', '|', '^']