update tests
This commit is contained in:
parent
59a54f704d
commit
4bff3166bb
6 changed files with 202 additions and 198 deletions
|
|
@ -20,7 +20,9 @@
|
|||
["punctuation.operator","."],
|
||||
["identifier","WriteLine"],
|
||||
["paren.lparen","("],
|
||||
["string","\"Hello World\""],
|
||||
["string.start","\""],
|
||||
["string","Hello World"],
|
||||
["string.end","\""],
|
||||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"start",
|
||||
["comment","//test: tokenize 'standard' functions"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","string"],
|
||||
["punctuation.operator","."],
|
||||
["support.function","charCodeAt"],
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
["punctuation.operator",";"],
|
||||
["string","\";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","test"],
|
||||
["punctuation.operator",":"],
|
||||
["text"," "],
|
||||
|
|
@ -36,15 +36,15 @@
|
|||
["text"," "],
|
||||
["identifier","comment"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["comment.doc","/**tokenize doc comment with "],
|
||||
["comment.doc.tag","@tag"],
|
||||
["comment.doc"," {}*/"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["comment","//test: tokenize parens"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
|
|
@ -58,34 +58,34 @@
|
|||
"start",
|
||||
["comment","//test tokenize arithmetic expression which looks like a regexp"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","a"],
|
||||
["keyword.operator","/"],
|
||||
["identifier","b"],
|
||||
["keyword.operator","/"],
|
||||
["identifier","c"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","a"],
|
||||
["keyword.operator","/="],
|
||||
["identifier","b"],
|
||||
["keyword.operator","/"],
|
||||
["identifier","c"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["comment","//test tokenize reg exps"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","a"],
|
||||
["keyword.operator","="],
|
||||
["string.regexp","/b/g"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","a"],
|
||||
["keyword.operator","+"],
|
||||
["string.regexp","/b/g"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","a"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
["constant.language.escape","+"],
|
||||
["string.regexp"," 1/b"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","a"],
|
||||
["keyword.operator","="],
|
||||
["string.regexp","/a/"],
|
||||
|
|
@ -107,7 +107,7 @@
|
|||
["text"," "],
|
||||
["string.regexp","/a/"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["keyword","case"],
|
||||
["text"," "],
|
||||
["string.regexp","/a/"],
|
||||
|
|
@ -117,31 +117,31 @@
|
|||
["identifier","c"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["comment","//test tokenize multi-line comment containing a single line comment"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","noRegex"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["comment","/* foo // bar */"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["identifier","canBeRegex"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["comment","/* foo // bar */"]
|
||||
],[
|
||||
"start",
|
||||
["comment","// test tokenize identifier with umlauts"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","fu"],
|
||||
["punctuation.operator","?"],
|
||||
["identifier","e"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["comment","// test // is not a regexp"]
|
||||
],[
|
||||
"start",
|
||||
|
|
@ -152,12 +152,12 @@
|
|||
"start",
|
||||
["comment","//test skipping escaped chars"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["string","'Meh"],
|
||||
["constant.language.escape","\\\\"],
|
||||
["string","nNeh'"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["storage.type","console"],
|
||||
["punctuation.operator","."],
|
||||
["support.function.firebug","log"],
|
||||
|
|
@ -169,10 +169,10 @@
|
|||
"qqstring",
|
||||
["string","\"test multiline\\"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["string"," strings\""]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","a"],
|
||||
["keyword.operator","="],
|
||||
["text","'"]
|
||||
|
|
@ -182,16 +182,16 @@
|
|||
["keyword.operator","="],
|
||||
["string","\"\\"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["string","still a string"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "]
|
||||
],[
|
||||
"no_regex",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"regex_allowed",
|
||||
["storage.type","function"],
|
||||
["text"," "],
|
||||
["entity.name.function","foo"],
|
||||
|
|
@ -203,7 +203,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","for"],
|
||||
["text"," "],
|
||||
|
|
@ -228,7 +228,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.function","alert"],
|
||||
["paren.lparen","("],
|
||||
|
|
@ -245,18 +245,18 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"],
|
||||
["text","\t"],
|
||||
["comment","// Real Tab."]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","regexp"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
|
|
@ -267,9 +267,9 @@
|
|||
["text"," "],
|
||||
["comment","// ends here"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","r"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
|
|
@ -316,7 +316,7 @@
|
|||
["text"," "],
|
||||
["identifier","o"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","a"],
|
||||
["keyword.operator","="],
|
||||
["string.regexp","/a/"],
|
||||
|
|
@ -331,16 +331,16 @@
|
|||
["text"," "],
|
||||
["string.regexp","/ /"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["comment.doc","/************************************/"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["comment.doc","/** total mess, tricky to highlight**/"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["storage.type","function"],
|
||||
["text"," "],
|
||||
["paren.lparen","("],
|
||||
|
|
@ -355,10 +355,10 @@
|
|||
"doc-start",
|
||||
["comment.doc","\t * docComment"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["comment.doc","\t **/"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text","\t"],
|
||||
["identifier","r"],
|
||||
["text"," "],
|
||||
|
|
@ -369,7 +369,7 @@
|
|||
["constant.language.escape","*"],
|
||||
["string.regexp","/"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text","\t"],
|
||||
["identifier","g"],
|
||||
["text"," "],
|
||||
|
|
@ -401,7 +401,7 @@
|
|||
["text"," "],
|
||||
["constant.numeric","0x25"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text","\t"],
|
||||
["identifier","t"],
|
||||
["text"," "],
|
||||
|
|
@ -414,10 +414,10 @@
|
|||
["string","''"],
|
||||
["paren.rparen","]"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["storage.type","function"],
|
||||
["text"," "],
|
||||
["paren.lparen","("],
|
||||
|
|
@ -425,50 +425,50 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text","\t"],
|
||||
["comment","/* eee */"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"qqstring",
|
||||
["string","\"s\\"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["string","s"],
|
||||
["constant.language.escape","\\u7824"],
|
||||
["string","sss"],
|
||||
["constant.language.escape","\\u"],
|
||||
["string","1\""]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"qstring",
|
||||
["string","'\\"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["string","string'"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text","'"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","string"],
|
||||
["text","'"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["string","\"trailing space"],
|
||||
["constant.language.escape","\\ "],
|
||||
["string"," "]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["string","\" \""],
|
||||
["text"," "],
|
||||
["keyword.operator","/"],
|
||||
|
|
@ -480,7 +480,7 @@
|
|||
["keyword.operator","/"],
|
||||
["identifier","g"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"doc-start",
|
||||
["comment.doc","/**"]
|
||||
|
|
@ -488,19 +488,19 @@
|
|||
"doc-start",
|
||||
["comment.doc"," *doc"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["comment.doc"," */"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["identifier","a"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text","\t"],
|
||||
["string","'a'"],
|
||||
["punctuation.operator",":"],
|
||||
|
|
@ -508,7 +508,7 @@
|
|||
["identifier","b"],
|
||||
["punctuation.operator",","]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text","\t"],
|
||||
["string","'g'"],
|
||||
["text",":"],
|
||||
|
|
@ -518,7 +518,7 @@
|
|||
["variable.parameter","t"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text","\t"],
|
||||
["entity.name.function","gta"],
|
||||
["punctuation.operator",":"],
|
||||
|
|
@ -529,12 +529,12 @@
|
|||
["variable.parameter","b"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"function_arguments",
|
||||
["identifier","foo"],
|
||||
|
|
@ -552,14 +552,14 @@
|
|||
["variable.parameter","b"],
|
||||
["punctuation.operator",","]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["punctuation.operator"," "],
|
||||
["variable.parameter","c"],
|
||||
["punctuation.operator",", "],
|
||||
["variable.parameter","d"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["storage.type","foo"],
|
||||
["punctuation.operator","."],
|
||||
["entity.name.function","d"],
|
||||
|
|
@ -572,7 +572,7 @@
|
|||
["variable.parameter","b"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["storage.type","foo"],
|
||||
["punctuation.operator","."],
|
||||
["entity.name.function","d"],
|
||||
|
|
@ -588,5 +588,5 @@
|
|||
["string","\"string\""],
|
||||
["text"," "]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
]]
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
["meta.tag.tag-name.script","script"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
["string","\"abc\""],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","function"],
|
||||
["text"," "],
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
],[
|
||||
"start"
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","script"],
|
||||
|
|
@ -64,7 +64,7 @@
|
|||
["identifier","CDATA"],
|
||||
["paren.lparen","["]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
["constant.numeric","0"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
["constant.numeric","1"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
|
|
@ -97,28 +97,28 @@
|
|||
["constant.numeric","100"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
["identifier","hickory"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
["identifier","dickory"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
["identifier","dock"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
],[
|
||||
"js-start"
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","function"],
|
||||
["text"," "],
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","hickory"],
|
||||
["text"," "],
|
||||
|
|
@ -156,7 +156,7 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","dickory"],
|
||||
["text"," "],
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","dock"],
|
||||
["text"," "],
|
||||
|
|
@ -194,18 +194,18 @@
|
|||
],[
|
||||
"js-start"
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","ShowAndGrowElement"],
|
||||
["paren.lparen","("],
|
||||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["storage.type","function"],
|
||||
["text"," "],
|
||||
|
|
@ -215,7 +215,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","timevalue"],
|
||||
["text"," "],
|
||||
|
|
@ -228,7 +228,7 @@
|
|||
["identifier","timer_increment"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
["text"," "],
|
||||
|
|
@ -240,7 +240,7 @@
|
|||
["identifier","max_time"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["keyword","return"],
|
||||
["punctuation.operator",";"]
|
||||
|
|
@ -249,7 +249,7 @@
|
|||
["text"," "],
|
||||
["comment","// Scale the text string gradually until it is 20 times larger"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","scalefactor"],
|
||||
["text"," "],
|
||||
|
|
@ -270,7 +270,7 @@
|
|||
],[
|
||||
"js-start"
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
["text"," "],
|
||||
|
|
@ -284,7 +284,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","hickory"],
|
||||
["punctuation.operator","."],
|
||||
|
|
@ -297,7 +297,7 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","hickory"],
|
||||
["punctuation.operator","."],
|
||||
|
|
@ -327,13 +327,13 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"js-start"
|
||||
"js-no_regex"
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
["text"," "],
|
||||
|
|
@ -355,7 +355,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","dickory"],
|
||||
["punctuation.operator","."],
|
||||
|
|
@ -368,7 +368,7 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","dickory"],
|
||||
["punctuation.operator","."],
|
||||
|
|
@ -395,11 +395,11 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
["text"," "],
|
||||
|
|
@ -413,7 +413,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","dock"],
|
||||
["punctuation.operator","."],
|
||||
|
|
@ -426,7 +426,7 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-regex_allowed",
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["identifier","dock"],
|
||||
["punctuation.operator","."],
|
||||
|
|
@ -455,17 +455,17 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"js-start"
|
||||
"js-no_regex"
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["comment","// Call ShowAndGrowElement again <timer_increment> milliseconds later."]
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["identifier","setTimeout"],
|
||||
["paren.lparen","("],
|
||||
|
|
@ -475,11 +475,11 @@
|
|||
["identifier","timer_increment"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"js-start",
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["variable.language","window"],
|
||||
["punctuation.operator","."],
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
[[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["keyword.operator.ts","class"],
|
||||
["text"," "],
|
||||
["identifier","Greeter"],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text","\t"],
|
||||
["variable.parameter.function.ts","greeting"],
|
||||
["text",": "],
|
||||
["variable.parameter.function.ts","string"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.operator.ts","constructor"],
|
||||
["text"," "],
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["storage.type.variable.ts","this."],
|
||||
["identifier","greeting"],
|
||||
|
|
@ -35,19 +35,19 @@
|
|||
["identifier","message"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text","\t"],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text","\t"],
|
||||
["entity.name.function.ts","greet"],
|
||||
["identifier","greet"],
|
||||
["paren.lparen","("],
|
||||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["keyword","return"],
|
||||
["text"," "],
|
||||
|
|
@ -59,17 +59,17 @@
|
|||
["identifier","greeting"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text","\t"],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
["identifier","greeter"],
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
["identifier","button"],
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
["string","'button'"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["identifier","button"],
|
||||
["punctuation.operator","."],
|
||||
["identifier","innerText"],
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
["text"," "],
|
||||
["string","\"Say Hello\""]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["storage.type","button"],
|
||||
["punctuation.operator","."],
|
||||
["entity.name.function","onclick"],
|
||||
|
|
@ -122,7 +122,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text","\t"],
|
||||
["support.function","alert"],
|
||||
["paren.lparen","("],
|
||||
|
|
@ -131,12 +131,12 @@
|
|||
["paren.rparen",")"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["variable.language","document"],
|
||||
["punctuation.operator","."],
|
||||
["identifier","body"],
|
||||
|
|
@ -146,20 +146,20 @@
|
|||
["identifier","button"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"regex_allowed",
|
||||
["keyword.operator.ts","class"],
|
||||
"start",
|
||||
["keyword","class"],
|
||||
["text"," "],
|
||||
["identifier","Snake"],
|
||||
["text"," "],
|
||||
["keyword.operator.ts","extends"],
|
||||
["keyword","extends"],
|
||||
["text"," "],
|
||||
["identifier","Animal"],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["entity.name.function.ts","move"],
|
||||
["paren.lparen","("],
|
||||
|
|
@ -167,7 +167,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.function","alert"],
|
||||
["paren.lparen","("],
|
||||
|
|
@ -175,7 +175,7 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["storage.type.variable.ts","super"],
|
||||
["text","("],
|
||||
|
|
@ -183,27 +183,27 @@
|
|||
["text",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"regex_allowed",
|
||||
["keyword.operator.ts","class"],
|
||||
"start",
|
||||
["keyword","class"],
|
||||
["text"," "],
|
||||
["identifier","Horse"],
|
||||
["text"," "],
|
||||
["keyword.operator.ts","extends"],
|
||||
["keyword","extends"],
|
||||
["text"," "],
|
||||
["identifier","Animal"],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["entity.name.function.ts","move"],
|
||||
["paren.lparen","("],
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.function","alert"],
|
||||
["paren.lparen","("],
|
||||
|
|
@ -219,7 +219,7 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","super"],
|
||||
["punctuation.operator","."],
|
||||
|
|
@ -229,22 +229,23 @@
|
|||
["paren.rparen",")"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"start",
|
||||
["keyword.operator.ts","module"],
|
||||
["identifier","module"],
|
||||
["text"," "],
|
||||
["variable.parameter.function.ts","Sayings"],
|
||||
["text"," {"]
|
||||
["identifier","Sayings"],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","export"],
|
||||
["text"," "],
|
||||
|
|
@ -254,14 +255,14 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["variable.parameter.function.ts","greeting"],
|
||||
["text",": "],
|
||||
["variable.parameter.function.ts","string"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","constructor"],
|
||||
["text"," "],
|
||||
|
|
@ -273,7 +274,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["storage.type.variable.ts","this."],
|
||||
["identifier","greeting"],
|
||||
|
|
@ -283,19 +284,19 @@
|
|||
["identifier","message"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["entity.name.function.ts","greet"],
|
||||
["identifier","greet"],
|
||||
["paren.lparen","("],
|
||||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","return"],
|
||||
["text"," "],
|
||||
|
|
@ -307,24 +308,25 @@
|
|||
["identifier","greeting"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.operator.ts","module"],
|
||||
["identifier","module"],
|
||||
["text"," "],
|
||||
["variable.parameter.function.ts","Mankala"],
|
||||
["text"," {"]
|
||||
["identifier","Mankala"],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","export"],
|
||||
["text"," "],
|
||||
|
|
@ -334,7 +336,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","public"],
|
||||
["text"," "],
|
||||
|
|
@ -345,7 +347,7 @@
|
|||
["constant.language.boolean","false"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","public"],
|
||||
["text"," "],
|
||||
|
|
@ -356,7 +358,7 @@
|
|||
["constant.numeric","0"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","public"],
|
||||
["text"," "],
|
||||
|
|
@ -367,7 +369,7 @@
|
|||
["constant.numeric","0"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","public"],
|
||||
["text"," "],
|
||||
|
|
@ -380,7 +382,7 @@
|
|||
],[
|
||||
"start"
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","public"],
|
||||
["text"," "],
|
||||
|
|
@ -390,7 +392,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["storage.type.variable.ts","this."],
|
||||
["identifier","turnContinues"],
|
||||
|
|
@ -400,7 +402,7 @@
|
|||
["constant.language.boolean","false"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["storage.type.variable.ts","this."],
|
||||
["identifier","seedStoredCount"],
|
||||
|
|
@ -410,7 +412,7 @@
|
|||
["constant.numeric","0"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["storage.type.variable.ts","this."],
|
||||
["identifier","capturedCount"],
|
||||
|
|
@ -420,7 +422,7 @@
|
|||
["constant.numeric","0"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["storage.type.variable.ts","this."],
|
||||
["identifier","spaceCaptured"],
|
||||
|
|
@ -430,23 +432,23 @@
|
|||
["identifier","NoSpace"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start"
|
||||
"no_regex"
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.operator.ts","public"],
|
||||
["keyword","public"],
|
||||
["text"," "],
|
||||
["entity.name.function.ts","toString"],
|
||||
["identifier","toString"],
|
||||
["paren.lparen","("],
|
||||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["storage.type","var"],
|
||||
["text"," "],
|
||||
|
|
@ -457,7 +459,7 @@
|
|||
["string","\"\""],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
["text"," "],
|
||||
|
|
@ -468,7 +470,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["identifier","stringBuilder"],
|
||||
["text"," "],
|
||||
|
|
@ -477,11 +479,11 @@
|
|||
["string","\" turn continues,\""],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["identifier","stringBuilder"],
|
||||
["text"," "],
|
||||
|
|
@ -495,7 +497,7 @@
|
|||
["identifier","seedStoredCount"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
["text"," "],
|
||||
|
|
@ -510,7 +512,7 @@
|
|||
["text"," "],
|
||||
["paren.lparen","{"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["identifier","stringBuilder"],
|
||||
["text"," "],
|
||||
|
|
@ -533,25 +535,25 @@
|
|||
["identifier","spaceCaptured"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"regex_allowed",
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword","return"],
|
||||
["text"," "],
|
||||
["identifier","stringBuilder"],
|
||||
["punctuation.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["text"," "],
|
||||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
"no_regex",
|
||||
["paren.rparen","}"]
|
||||
]]
|
||||
|
|
@ -139,7 +139,7 @@ var Tokenizer = function(rules) {
|
|||
};
|
||||
|
||||
this.createSplitterRegexp = function(src, flag) {
|
||||
src = src.replace(/\(\?=([^()]|\\.|\(([^()]|\\.)*?\))*?\)$/, "");
|
||||
src = src.replace(/\(\?=([^()]|\\.|\(([^()]|\\.)*?\))*\)(?=\)*$)/, "");
|
||||
return new RegExp(src, flag);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue