{,5} isn't js regexp a quantifier
This commit is contained in:
parent
7960652010
commit
a0e1204ff1
5 changed files with 2340 additions and 2 deletions
1680
lib/ace/mode/_test/tokens_lsl.json
Normal file
1680
lib/ace/mode/_test/tokens_lsl.json
Normal file
File diff suppressed because it is too large
Load diff
297
lib/ace/mode/_test/tokens_pascal.json
Normal file
297
lib/ace/mode/_test/tokens_pascal.json
Normal file
|
|
@ -0,0 +1,297 @@
|
|||
[[
|
||||
"punctuation.definition.comment.pascal2",
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one","****************************************************************************"]
|
||||
],[
|
||||
"punctuation.definition.comment.pascal2",
|
||||
["comment.block.pascal.one"," * A simple bubble sort program. Reads integers, one per line, and prints *"]
|
||||
],[
|
||||
"punctuation.definition.comment.pascal2",
|
||||
["comment.block.pascal.one"," * them out in sorted order. Blows up if there are more than 49. *"]
|
||||
],[
|
||||
"start",
|
||||
["comment.block.pascal.one"," ****************************************************************************"],
|
||||
["punctuation.definition.comment.pascal","*)"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.pascal","PROGRAM"],
|
||||
["text"," Sort(input"],
|
||||
["keyword.operator",","],
|
||||
["text"," output)"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","CONST"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one"," Max array size. "],
|
||||
["punctuation.definition.comment.pascal","*)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," MaxElts "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["constant.numeric.pascal","50"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","TYPE"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one"," Type of the element array. "],
|
||||
["punctuation.definition.comment.pascal","*)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," IntArrType "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["keyword.control.pascal","ARRAY"],
|
||||
["text"," ["],
|
||||
["constant.numeric.pascal","1"],
|
||||
["text","..MaxElts] "],
|
||||
["keyword.control.pascal","OF"],
|
||||
["text"," Integer"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","VAR"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one"," Indexes, exchange temp, array size. "],
|
||||
["punctuation.definition.comment.pascal","*)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," i"],
|
||||
["keyword.operator",","],
|
||||
["text"," j"],
|
||||
["keyword.operator",","],
|
||||
["text"," tmp"],
|
||||
["keyword.operator",","],
|
||||
["text"," size: integer"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one"," Array of ints "],
|
||||
["punctuation.definition.comment.pascal","*)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," arr: IntArrType"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one"," Read in the integers. "],
|
||||
["punctuation.definition.comment.pascal","*)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["variable.pascal","PROCEDURE"],
|
||||
["text"," "],
|
||||
["storage.type.function.pascal","ReadArr"],
|
||||
["text","("],
|
||||
["keyword.control.pascal","VAR"],
|
||||
["text"," size: Integer"],
|
||||
["keyword.operator",";"],
|
||||
["text"," "],
|
||||
["keyword.control.pascal","VAR"],
|
||||
["text"," a: IntArrType)"],
|
||||
["keyword.operator",";"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","BEGIN"]
|
||||
],[
|
||||
"start",
|
||||
["text"," size "],
|
||||
["keyword.operator",":="],
|
||||
["text"," "],
|
||||
["constant.numeric.pascal","1"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","WHILE"],
|
||||
["text"," "],
|
||||
["keyword.control.pascal","NOT"],
|
||||
["text"," eof "],
|
||||
["keyword.control.pascal","DO"],
|
||||
["text"," "],
|
||||
["keyword.control.pascal","BEGIN"]
|
||||
],[
|
||||
"start",
|
||||
["text"," readln(a[size])"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","IF"],
|
||||
["text"," "],
|
||||
["keyword.control.pascal","NOT"],
|
||||
["text"," eof "],
|
||||
["keyword.control.pascal","THEN"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," size "],
|
||||
["keyword.operator",":="],
|
||||
["text"," size "],
|
||||
["keyword.operator","+"],
|
||||
["text"," "],
|
||||
["constant.numeric.pascal","1"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","END"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","END"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","BEGIN"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one"," Read "],
|
||||
["punctuation.definition.comment.pascal","*)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," ReadArr(size"],
|
||||
["keyword.operator",","],
|
||||
["text"," arr)"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one"," Sort using bubble sort. "],
|
||||
["punctuation.definition.comment.pascal","*)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","FOR"],
|
||||
["text"," i "],
|
||||
["keyword.operator",":="],
|
||||
["text"," size "],
|
||||
["keyword.operator","-"],
|
||||
["text"," "],
|
||||
["constant.numeric.pascal","1"],
|
||||
["text"," DOWNTO "],
|
||||
["constant.numeric.pascal","1"],
|
||||
["text"," "],
|
||||
["keyword.control.pascal","DO"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","FOR"],
|
||||
["text"," j "],
|
||||
["keyword.operator",":="],
|
||||
["text"," "],
|
||||
["constant.numeric.pascal","1"],
|
||||
["text"," "],
|
||||
["keyword.control.pascal","TO"],
|
||||
["text"," i "],
|
||||
["keyword.control.pascal","DO"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","IF"],
|
||||
["text"," arr[j] > arr[j "],
|
||||
["keyword.operator","+"],
|
||||
["text"," "],
|
||||
["constant.numeric.pascal","1"],
|
||||
["text","] "],
|
||||
["keyword.control.pascal","THEN"],
|
||||
["text"," "],
|
||||
["keyword.control.pascal","BEGIN"]
|
||||
],[
|
||||
"start",
|
||||
["text"," tmp "],
|
||||
["keyword.operator",":="],
|
||||
["text"," arr[j]"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," arr[j] "],
|
||||
["keyword.operator",":="],
|
||||
["text"," arr[j "],
|
||||
["keyword.operator","+"],
|
||||
["text"," "],
|
||||
["constant.numeric.pascal","1"],
|
||||
["text","]"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," arr[j "],
|
||||
["keyword.operator","+"],
|
||||
["text"," "],
|
||||
["constant.numeric.pascal","1"],
|
||||
["text","] "],
|
||||
["keyword.operator",":="],
|
||||
["text"," tmp"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","END"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one"," Print. "],
|
||||
["punctuation.definition.comment.pascal","*)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","FOR"],
|
||||
["text"," i "],
|
||||
["keyword.operator",":="],
|
||||
["text"," "],
|
||||
["constant.numeric.pascal","1"],
|
||||
["text"," "],
|
||||
["keyword.control.pascal","TO"],
|
||||
["text"," size "],
|
||||
["keyword.control.pascal","DO"]
|
||||
],[
|
||||
"start",
|
||||
["text"," writeln(arr[i])"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.pascal","END"],
|
||||
["text","."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
]]
|
||||
229
lib/ace/mode/_test/tokens_sass.json
Normal file
229
lib/ace/mode/_test/tokens_sass.json
Normal file
|
|
@ -0,0 +1,229 @@
|
|||
[[
|
||||
"start",
|
||||
["comment","// sass ace mode;"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword","@import"],
|
||||
["text"," "],
|
||||
["support.function","url("],
|
||||
["string","http://fonts.googleapis.com/css?family=Ace:700"],
|
||||
["support.function",")"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["variable.language","html"],
|
||||
["text",", "],
|
||||
["variable.language","body"]
|
||||
],[
|
||||
"start",
|
||||
["support.type"," :background-color "],
|
||||
["constant.numeric","#ace"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","text-align"],
|
||||
["text",": "],
|
||||
["constant.language","center"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","height"],
|
||||
["text",": "],
|
||||
["constant.numeric","100%"]
|
||||
],[
|
||||
["comment",-1,2,"start"],
|
||||
["comment"," /*;*********;"]
|
||||
],[
|
||||
["comment",3,2,"start"],
|
||||
["comment"," ;comment ;"]
|
||||
],[
|
||||
["comment",3,2,"start"],
|
||||
["comment"," ;*********;"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["variable.language",".toggle"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["variable","$size"],
|
||||
["text",": "],
|
||||
["constant.numeric","14px"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["support.type"," :background "],
|
||||
["support.function","url("],
|
||||
["string","http://subtlepatterns.com/patterns/dark_stripes.png"],
|
||||
["support.function",")"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","border-radius"],
|
||||
["text",": "],
|
||||
["constant.numeric","8px"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","height"],
|
||||
["text",": "],
|
||||
["variable","$size"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," &"],
|
||||
["variable.language",":before"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["variable","$radius"],
|
||||
["text",": "],
|
||||
["variable","$size"],
|
||||
["text"," "],
|
||||
["keyword.operator","*"],
|
||||
["text"," "],
|
||||
["constant.numeric","0.845"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["variable","$glow"],
|
||||
["text",": "],
|
||||
["variable","$size"],
|
||||
["text"," "],
|
||||
["keyword.operator","*"],
|
||||
["text"," "],
|
||||
["constant.numeric","0.125"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","box-shadow"],
|
||||
["text",": "],
|
||||
["constant.numeric","0"],
|
||||
["text"," "],
|
||||
["constant.numeric","0"],
|
||||
["text"," "],
|
||||
["variable","$glow"],
|
||||
["text"," "],
|
||||
["variable","$glow"],
|
||||
["text"," / "],
|
||||
["constant.numeric","2"],
|
||||
["text"," "],
|
||||
["constant.numeric","#fff"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","border-radius"],
|
||||
["text",": "],
|
||||
["variable","$radius"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," &"],
|
||||
["variable.language",":active"]
|
||||
],[
|
||||
"start",
|
||||
["text"," ~ "],
|
||||
["variable.language",".button"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","box-shadow"],
|
||||
["text",": "],
|
||||
["constant.numeric","0"],
|
||||
["text"," "],
|
||||
["constant.numeric","15px"],
|
||||
["text"," "],
|
||||
["constant.numeric","25px"],
|
||||
["text"," "],
|
||||
["constant.numeric","-4px"],
|
||||
["text"," "],
|
||||
["support.function","rgba"],
|
||||
["paren.lparen","("],
|
||||
["constant.numeric","0"],
|
||||
["text",","],
|
||||
["constant.numeric","0"],
|
||||
["text",","],
|
||||
["constant.numeric","0"],
|
||||
["text",","],
|
||||
["constant.numeric","0.4"],
|
||||
["paren.rparen",")"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," ~ "],
|
||||
["variable.language",".label"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","font-size"],
|
||||
["text",": "],
|
||||
["constant.numeric","40px"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","color"],
|
||||
["text",": "],
|
||||
["support.function","rgba"],
|
||||
["paren.lparen","("],
|
||||
["constant.numeric","0"],
|
||||
["text",","],
|
||||
["constant.numeric","0"],
|
||||
["text",","],
|
||||
["constant.numeric","0"],
|
||||
["text",","],
|
||||
["constant.numeric","0.45"],
|
||||
["paren.rparen",")"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," &"],
|
||||
["variable.language",":checked"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," ~ "],
|
||||
["variable.language",".button"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","box-shadow"],
|
||||
["text",": "],
|
||||
["constant.numeric","0"],
|
||||
["text"," "],
|
||||
["constant.numeric","15px"],
|
||||
["text"," "],
|
||||
["constant.numeric","25px"],
|
||||
["text"," "],
|
||||
["constant.numeric","-4px"],
|
||||
["text"," "],
|
||||
["constant.numeric","#ace"]
|
||||
],[
|
||||
"start",
|
||||
["text"," ~ "],
|
||||
["variable.language",".label"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","font-size"],
|
||||
["text",": "],
|
||||
["constant.numeric","40px"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.type","color"],
|
||||
["text",": "],
|
||||
["constant.numeric","#c9c9c9"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
132
lib/ace/mode/_test/tokens_tmsnippet.json
Normal file
132
lib/ace/mode/_test/tokens_tmsnippet.json
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
[[
|
||||
"start",
|
||||
["doc,comment","$$------------------------------------"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","tabTrigger: t"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","name: Heading 3"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","scope: language"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","content: -----------------------------"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","\\begin{"],
|
||||
["markup.list","${"],
|
||||
["constant.numeric","1"],
|
||||
["punctuation.operator",":"],
|
||||
["text","documnet"],
|
||||
["markup.list","}"],
|
||||
["text","}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["markup.list","${"],
|
||||
["constant.numeric","2"],
|
||||
["punctuation.operator",":"],
|
||||
["keyword","$TM_SELECTED_TEXT"],
|
||||
["text",":some latex"],
|
||||
["markup.list","}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["markup.list","${"],
|
||||
["constant.numeric","3"],
|
||||
["punctuation.operator",":"],
|
||||
["keyword","$TM_SELECTED_TEXT"],
|
||||
["text","/a/b/c"],
|
||||
["markup.list","}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["markup.list","${"],
|
||||
["constant.numeric","4"],
|
||||
["punctuation.operator",":"],
|
||||
["markup.list","${"],
|
||||
["keyword","TM_SELECTED_TEXT"],
|
||||
["string.regex","/(.)/"],
|
||||
["string","\\"],
|
||||
["keyword","\\u"],
|
||||
["variable","$1"],
|
||||
["string.regex","/g:"],
|
||||
["text","7"],
|
||||
["markup.list","}}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","\\end{"],
|
||||
["variable","$1"],
|
||||
["text","}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["variable","$0"],
|
||||
["constant.language.escape","\\\\"],
|
||||
["text","$$"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["doc,comment","$$------------------------------------"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","tabTrigger: ^3"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","name: Heading 3"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","scope: language"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","content: -----------------------------"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["markup.list","${"],
|
||||
["keyword","TM_CURRENT_LINE"],
|
||||
["string.regex","/./"],
|
||||
["string","^"],
|
||||
["string.regex","/g"],
|
||||
["markup.list","}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["doc,comment","$$------------------------------------"]
|
||||
]]
|
||||
|
|
@ -246,11 +246,11 @@ var JavaScriptHighlightRules = function() {
|
|||
}, {
|
||||
// invalid operators
|
||||
token : "invalid",
|
||||
regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
||||
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
||||
}, {
|
||||
// operators
|
||||
token : "constant.language.escape",
|
||||
regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[()$^+*?]/
|
||||
regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
|
||||
}, {
|
||||
token : "constant.language.delimiter",
|
||||
regex: /\|/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue