Adding IDENTIFIER and STRING to NOT_SPACED_REGEX
This commit is contained in:
parent
841463da8e
commit
9a71bb17fd
|
@ -642,7 +642,7 @@
|
|||
RELATION = ['IN', 'OF', 'INSTANCEOF'];
|
||||
BOOL = ['TRUE', 'FALSE', 'NULL', 'UNDEFINED'];
|
||||
NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', '++', '--', ']'];
|
||||
NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS');
|
||||
NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING');
|
||||
CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER'];
|
||||
INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL');
|
||||
LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR'];
|
||||
|
|
|
@ -647,7 +647,7 @@ NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', '++', '--', ']']
|
|||
|
||||
# If the previous token is not spaced, there are more preceding tokens that
|
||||
# force a division parse:
|
||||
NOT_SPACED_REGEX = NOT_REGEX.concat ')', '}', 'THIS'
|
||||
NOT_SPACED_REGEX = NOT_REGEX.concat ')', '}', 'THIS', 'IDENTIFIER', 'STRING'
|
||||
|
||||
# Tokens which could legitimately be invoked or indexed. A opening
|
||||
# parentheses or bracket following these tokens will be recorded as the start
|
||||
|
|
|
@ -45,5 +45,7 @@ eq /0/['source'], ///#{0}///['source']
|
|||
i = 5
|
||||
eq (1000)/200/i, 1
|
||||
|
||||
eq i/i/i, 0.2
|
||||
|
||||
#584: Unescaped slashes in character classes.
|
||||
ok /:\/[/]goog/.test 'http://google.com'
|
||||
|
|
Loading…
Reference in New Issue