From 60fd422da857da9a5bb422766cfe7cca73622b0d Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 9 Dec 2012 18:40:04 +0400 Subject: [PATCH 01/14] use relative paths --- lib/ace/mode/folding/latex.js | 2 +- lib/ace/mode/folding/lua.js | 2 +- lib/ace/mode/r.js | 17 +++++++---------- lib/ace/mode/r_highlight_rules.js | 7 +++---- lib/ace/mode/rdoc.js | 10 +++++----- lib/ace/mode/rdoc_highlight_rules.js | 4 ++-- lib/ace/mode/rhtml.js | 6 +++--- lib/ace/mode/rhtml_highlight_rules.js | 2 +- lib/ace/mode/tex.js | 6 +++--- lib/ace/mode/tex_highlight_rules.js | 4 ++-- 10 files changed, 28 insertions(+), 32 deletions(-) diff --git a/lib/ace/mode/folding/latex.js b/lib/ace/mode/folding/latex.js index 71d9c36e..a8c9db74 100644 --- a/lib/ace/mode/folding/latex.js +++ b/lib/ace/mode/folding/latex.js @@ -34,7 +34,7 @@ define(function(require, exports, module) { var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; -var TokenIterator = require("ace/token_iterator").TokenIterator; +var TokenIterator = require("../../token_iterator").TokenIterator; var FoldMode = exports.FoldMode = function() {}; diff --git a/lib/ace/mode/folding/lua.js b/lib/ace/mode/folding/lua.js index 2aa7d562..a7d3205c 100644 --- a/lib/ace/mode/folding/lua.js +++ b/lib/ace/mode/folding/lua.js @@ -34,7 +34,7 @@ define(function(require, exports, module) { var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; -var TokenIterator = require("ace/token_iterator").TokenIterator; +var TokenIterator = require("../../token_iterator").TokenIterator; var FoldMode = exports.FoldMode = function() {}; diff --git a/lib/ace/mode/r.js b/lib/ace/mode/r.js index 11cfe79c..0c60c120 100644 --- a/lib/ace/mode/r.js +++ b/lib/ace/mode/r.js @@ -18,17 +18,14 @@ define(function(require, exports, module) { "use strict"; - var Editor = require("ace/editor").Editor; - var EditSession = require("ace/edit_session").EditSession; - var Range = require("ace/range").Range; - var oop = require("ace/lib/oop"); - var TextMode = require("ace/mode/text").Mode; - var Tokenizer = require("ace/tokenizer").Tokenizer; - var TextHighlightRules = require("ace/mode/text_highlight_rules") - .TextHighlightRules; + var Range = require("../range").Range; + var oop = require("../lib/oop"); + var TextMode = require("./text").Mode; + var Tokenizer = require("../tokenizer").Tokenizer; + var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var RHighlightRules = require("./r_highlight_rules").RHighlightRules; - var MatchingBraceOutdent = require("ace/mode/matching_brace_outdent").MatchingBraceOutdent; - var unicode = require("ace/unicode"); + var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; + var unicode = require("../unicode"); var Mode = function() { diff --git a/lib/ace/mode/r_highlight_rules.js b/lib/ace/mode/r_highlight_rules.js index f59be4e9..106eeadf 100644 --- a/lib/ace/mode/r_highlight_rules.js +++ b/lib/ace/mode/r_highlight_rules.js @@ -18,10 +18,9 @@ define(function(require, exports, module) { - var oop = require("ace/lib/oop"); - var lang = require("ace/lib/lang"); - var TextHighlightRules = require("ace/mode/text_highlight_rules") - .TextHighlightRules; + var oop = require("../lib/oop"); + var lang = require("../lib/lang"); + var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; var RHighlightRules = function() diff --git a/lib/ace/mode/rdoc.js b/lib/ace/mode/rdoc.js index e095be08..1fb9e6e4 100644 --- a/lib/ace/mode/rdoc.js +++ b/lib/ace/mode/rdoc.js @@ -13,12 +13,12 @@ define(function(require, exports, module) { "use strict"; -var oop = require("ace/lib/oop"); -var TextMode = require("ace/mode/text").Mode; -var Tokenizer = require("ace/tokenizer").Tokenizer; -var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var Tokenizer = require("../tokenizer").Tokenizer; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules; -var MatchingBraceOutdent = require("ace/mode/matching_brace_outdent").MatchingBraceOutdent; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Mode = function(suppressHighlighting) { this.$tokenizer = new Tokenizer(new RDocHighlightRules().getRules()); diff --git a/lib/ace/mode/rdoc_highlight_rules.js b/lib/ace/mode/rdoc_highlight_rules.js index c5bbe145..df511b4a 100644 --- a/lib/ace/mode/rdoc_highlight_rules.js +++ b/lib/ace/mode/rdoc_highlight_rules.js @@ -13,8 +13,8 @@ define(function(require, exports, module) { "use strict"; -var oop = require("ace/lib/oop"); -var lang = require("ace/lib/lang"); +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var LaTeXHighlightRules = require("./latex_highlight_rules"); diff --git a/lib/ace/mode/rhtml.js b/lib/ace/mode/rhtml.js index c999cf22..c45f85ac 100644 --- a/lib/ace/mode/rhtml.js +++ b/lib/ace/mode/rhtml.js @@ -19,9 +19,9 @@ define(function(require, exports, module) { "use strict"; -var oop = require("ace/lib/oop"); -var HtmlMode = require("ace/mode/html").Mode; -var Tokenizer = require("ace/tokenizer").Tokenizer; +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var Tokenizer = require("../tokenizer").Tokenizer; var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules; /* Make life easier, don't do these right now diff --git a/lib/ace/mode/rhtml_highlight_rules.js b/lib/ace/mode/rhtml_highlight_rules.js index 08d8a720..20cd3bbc 100644 --- a/lib/ace/mode/rhtml_highlight_rules.js +++ b/lib/ace/mode/rhtml_highlight_rules.js @@ -18,7 +18,7 @@ define(function(require, exports, module) { "use strict"; -var oop = require("ace/lib/oop"); +var oop = require("../lib/oop"); var RHighlightRules = require("./r_highlight_rules").RHighlightRules; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; diff --git a/lib/ace/mode/tex.js b/lib/ace/mode/tex.js index 580f17e2..7d8f859d 100644 --- a/lib/ace/mode/tex.js +++ b/lib/ace/mode/tex.js @@ -18,9 +18,9 @@ define(function(require, exports, module) { "use strict"; -var oop = require("ace/lib/oop"); -var TextMode = require("ace/mode/text").Mode; -var Tokenizer = require("ace/tokenizer").Tokenizer; +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; diff --git a/lib/ace/mode/tex_highlight_rules.js b/lib/ace/mode/tex_highlight_rules.js index 6c5e34a9..c64d031f 100644 --- a/lib/ace/mode/tex_highlight_rules.js +++ b/lib/ace/mode/tex_highlight_rules.js @@ -18,8 +18,8 @@ define(function(require, exports, module) { "use strict"; -var oop = require("ace/lib/oop"); -var lang = require("ace/lib/lang"); +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TexHighlightRules = function(textClass) { From 63b80b21d2950d72eb1b5d4ac86f230d84a8ecc0 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 9 Dec 2012 18:46:34 +0400 Subject: [PATCH 02/14] update tokenization examples --- lib/ace/mode/_test/text_asciidoc.txt | 111 +++ lib/ace/mode/_test/tokens_abap.json | 294 ++++++ lib/ace/mode/_test/tokens_asciidoc.json | 730 ++++++++++++++ lib/ace/mode/_test/tokens_c_cpp.json | 2 +- lib/ace/mode/_test/tokens_coffee.json | 8 +- lib/ace/mode/_test/tokens_dart.json | 537 ++++++++++ lib/ace/mode/_test/tokens_glsl.json | 2 +- lib/ace/mode/_test/tokens_haml.json | 285 ++++++ lib/ace/mode/_test/tokens_jade.json | 309 ++++++ lib/ace/mode/_test/tokens_javascript.json | 5 +- lib/ace/mode/_test/tokens_jsp.json | 575 +++++++++++ lib/ace/mode/_test/tokens_lisp.json | 314 ++++++ lib/ace/mode/_test/tokens_lucene.json | 21 + lib/ace/mode/_test/tokens_objectivec.json | 1095 +++++++++++++++++++++ lib/ace/mode/_test/tokens_r.json | 305 ++++++ lib/ace/mode/_test/tokens_rdoc.json | 721 ++++++++++++++ lib/ace/mode/_test/tokens_rhtml.json | 168 ++++ lib/ace/mode/_test/tokens_ruby.json | 118 ++- lib/ace/mode/_test/tokens_sh.json | 26 +- lib/ace/mode/_test/tokens_stylus.json | 428 ++++++++ lib/ace/mode/_test/tokens_svg.json | 1 + lib/ace/mode/_test/tokens_tcl.json | 64 +- lib/ace/mode/_test/tokens_tex.json | 194 ++++ lib/ace/mode/_test/tokens_typescript.json | 769 +++++++++++++++ lib/ace/mode/_test/tokens_yaml.json | 113 +-- 25 files changed, 7082 insertions(+), 113 deletions(-) create mode 100644 lib/ace/mode/_test/text_asciidoc.txt create mode 100644 lib/ace/mode/_test/tokens_abap.json create mode 100644 lib/ace/mode/_test/tokens_asciidoc.json create mode 100644 lib/ace/mode/_test/tokens_dart.json create mode 100644 lib/ace/mode/_test/tokens_haml.json create mode 100644 lib/ace/mode/_test/tokens_jade.json create mode 100644 lib/ace/mode/_test/tokens_jsp.json create mode 100644 lib/ace/mode/_test/tokens_lisp.json create mode 100644 lib/ace/mode/_test/tokens_lucene.json create mode 100644 lib/ace/mode/_test/tokens_objectivec.json create mode 100644 lib/ace/mode/_test/tokens_r.json create mode 100644 lib/ace/mode/_test/tokens_rdoc.json create mode 100644 lib/ace/mode/_test/tokens_rhtml.json create mode 100644 lib/ace/mode/_test/tokens_stylus.json create mode 100644 lib/ace/mode/_test/tokens_tex.json create mode 100644 lib/ace/mode/_test/tokens_typescript.json diff --git a/lib/ace/mode/_test/text_asciidoc.txt b/lib/ace/mode/_test/text_asciidoc.txt new file mode 100644 index 00000000..af7eaecc --- /dev/null +++ b/lib/ace/mode/_test/text_asciidoc.txt @@ -0,0 +1,111 @@ +------------------------------------ +----------------------------------- +_ita_lic_, *bo*ld*, +mo+no+, normal. +``double quoted'', `single quoted'. + normal, ^super^, ~sub~. + +'''' +Escaped: +\_italic_, +++_italic_+++, +t\__e__st, +++t__e__st+++, ++++bold+++, $$normal$$ +\¶ ¶ +\`not single quoted' +\`\`not double quoted'' + + +[fffff] ++++++++++++++++++++++++++++++++++++++ +(C) {ss} ss ++++++++++++++++++++++++++++++++++++++ + +............. +callout <1> +.............. + +> 1 +1> 2 +<2> 3 + +Escaped: +\_italic_, +t\__e__st, o__ + +.optional title +............. +callout <1> +.............. + + +:macro: dddd + +.lists +. 1 +.. 2 +... d +..... big ++ +continue + +next line +xi) no ++la+tin++ + +xi) la++tin++ +2. num__ber__ [red]#red# +-- + 5. f <> {macro} +-- +image::path[beauty] ->--<= -- replacements + + image::s +sssss +sss +sssss + + +== 1 + heading +=== not a heading +==================================== + +================================== +====4 +NOTE: above + +NOTE: above + +[[x6]] +WARNING: + +[options[]] +--------------------------- +literal +--------------------------- + + += Tables +|==================================== +| _italic_ | *bold* | text | (R) + +|==================================== + + +[more, options] +/////////// +comment +/////////// +// one line comment + + + +[red]#red text# [yellow-background]#on yellow# +[big]#large# [red yellow-background big]*all bold* + + +https://site text callto:ace http://ace.ajaxorg.com[awesome] + .still normal text +.break out thoug should not +--------------------------- +/////////////////////////// +--------------------------- + + diff --git a/lib/ace/mode/_test/tokens_abap.json b/lib/ace/mode/_test/tokens_abap.json new file mode 100644 index 00000000..06a373dc --- /dev/null +++ b/lib/ace/mode/_test/tokens_abap.json @@ -0,0 +1,294 @@ +[ + { + "state": "start", + "data": [ + [ "doc.comment", "***************************************" ] + ] + }, + { + "state": "start", + "data": [ + [ "doc.comment", "** Program: EXAMPLE **" ] + ] + }, + { + "state": "start", + "data": [ + [ "doc.comment", "** Author: Joe Byte, 07-Jul-2007 **" ] + ] + }, + { + "state": "start", + "data": [ + [ "doc.comment", "***************************************" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "REPORT" ], + [ "text", " BOOKINGS" ], + [ "keyword.operator", "." ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "doc.comment", "* Read flight bookings from the database" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "SELECT" ], + [ "keyword.operator", " * " ], + [ "keyword", "FROM" ], + [ "text", " FLIGHTINFO" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "WHERE" ], + [ "text", " " ], + [ "keyword", "CLASS" ], + [ "keyword.operator", " = " ], + [ "string", "'Y'" ], + [ "text", " " ], + [ "comment", "\"Y = economy" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "OR" ], + [ "text", " " ], + [ "keyword", "CLASS" ], + [ "keyword.operator", " = " ], + [ "string", "'C'" ], + [ "keyword.operator", "." ], + [ "text", " " ], + [ "comment", "\"C = business" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.lparen", "(" ], + [ "invalid", "..." ], + [ "paren.rparen", ")" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "REPORT" ], + [ "text", " TEST" ], + [ "keyword.operator", "." ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "WRITE" ], + [ "text", " " ], + [ "string", "'Hello World'" ], + [ "keyword.operator", "." ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", "USERPROMPT" ], + [ "keyword.operator", " = " ], + [ "string", "'Please double-click on a line in the output list '" ], + [ "text", " " ], + [ "keyword.operator", "&" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "string", "'to see the complete details of the transaction.'" ], + [ "keyword.operator", "." ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "DATA" ], + [ "text", " LAST_EOM " ], + [ "keyword", "TYPE" ], + [ "text", " " ], + [ "support.type", "D" ], + [ "keyword.operator", "." ], + [ "text", " " ], + [ "comment", "\"last end-of-month date" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "doc.comment", "* Start from today's date" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " LAST_EOM" ], + [ "keyword.operator", " = " ], + [ "variable.parameter", "SY" ], + [ "keyword.operator", "-" ], + [ "text", "DATUM" ], + [ "keyword.operator", "." ] + ] + }, + { + "state": "start", + "data": [ + [ "doc.comment", "* Set characters 6 and 7 (0-relative) of the YYYYMMDD string to \"01\"," ] + ] + }, + { + "state": "start", + "data": [ + [ "doc.comment", "* giving the first day of the current month" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " LAST_EOM" ], + [ "constant.numeric", "+6" ], + [ "paren.lparen", "(" ], + [ "constant.numeric", "2" ], + [ "paren.rparen", ")" ], + [ "keyword.operator", " = " ], + [ "string", "'01'" ], + [ "keyword.operator", "." ] + ] + }, + { + "state": "start", + "data": [ + [ "doc.comment", "* Subtract one day" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " LAST_EOM" ], + [ "keyword.operator", " = " ], + [ "text", "LAST_EOM" ], + [ "keyword.operator", " - " ], + [ "constant.numeric", "1" ], + [ "keyword.operator", "." ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "WRITE" ], + [ "keyword.operator", ":" ], + [ "text", " " ], + [ "string", "'Last day of previous month was'" ], + [ "keyword.operator", "," ], + [ "text", " LAST_EOM" ], + [ "keyword.operator", "." ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "DATA" ], + [ "text", " " ], + [ "keyword.operator", ":" ], + [ "text", " " ], + [ "keyword", "BEGIN OF" ], + [ "text", " I_VBRK " ], + [ "keyword", "OCCURS" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "keyword.operator", "," ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " VBELN " ], + [ "keyword", "LIKE" ], + [ "text", " " ], + [ "variable.parameter", "VBRK-VBELN" ], + [ "keyword.operator", "," ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " ZUONR " ], + [ "keyword", "LIKE" ], + [ "text", " " ], + [ "variable.parameter", "VBRK-ZUONR" ], + [ "keyword.operator", "," ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "END OF" ], + [ "text", " I_VBRK" ], + [ "keyword.operator", "." ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_asciidoc.json b/lib/ace/mode/_test/tokens_asciidoc.json new file mode 100644 index 00000000..99c45dd3 --- /dev/null +++ b/lib/ace/mode/_test/tokens_asciidoc.json @@ -0,0 +1,730 @@ +[ + { + "state": "literalBlock", + "data": [ + [ "support.function", "------------------------------------" ] + ] + }, + { + "state": "dissallowDelimitedBlock", + "data": [ + [ "support.function", "-----------------------------------" ] + ] + }, + { + "state": "text", + "data": [ + [ "string.italic", "_ita_lic_" ], + [ "text", ", " ], + [ "keyword.bold", "*bo*ld*" ], + [ "text", ", " ], + [ "support.function", "+mo+no+" ], + [ "text", ", normal. " ] + ] + }, + { + "state": "text", + "data": [ + [ "keyword", "``" ], + [ "text", "double quoted" ], + [ "keyword", "''" ], + [ "text", ", `single quoted'." ] + ] + }, + { + "state": "text", + "data": [ + [ "text", " normal, ^super^, " ], + [ "keyword", "~sub~" ], + [ "text", "." ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "text", + "data": [ + [ "text", "''''" ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "Escaped:" ] + ] + }, + { + "state": "text", + "data": [ + [ "constant.language.escape", "\\_" ], + [ "text", "italic_, " ], + [ "support.function", "+++" ], + [ "text", "_italic_" ], + [ "support.function", "+++" ], + [ "text", "," ] + ] + }, + { + "state": "smallPassthrough", + "data": [ + [ "text", "t" ], + [ "constant.language.escape", "\\_" ], + [ "text", "_e" ], + [ "string.italic", "__st, +++t__" ], + [ "text", "e__st" ], + [ "support.function", "+++" ], + [ "text", "," ] + ] + }, + { + "state": "smallPassthrough", + "data": [ + [ "support.function", "+++" ], + [ "text", "bold" ], + [ "support.function", "+++" ], + [ "text", ", $$<" ], + [ "support.function", "b" ], + [ "text", ">" ], + [ "support.function", "normal" ], + [ "text", "$$" ] + ] + }, + { + "state": "smallPassthrough", + "data": [ + [ "text", "\\&#" ], + [ "support.function", "182" ], + [ "text", "; &#" ], + [ "support.function", "182" ], + [ "text", ";" ] + ] + }, + { + "state": "smallPassthrough", + "data": [ + [ "text", "\\`" ], + [ "support.function", "not" ], + [ "text", " " ], + [ "support.function", "single" ], + [ "text", " " ], + [ "support.function", "quoted" ], + [ "text", "'" ] + ] + }, + { + "state": "smallPassthrough", + "data": [ + [ "text", "\\`\\`" ], + [ "support.function", "not" ], + [ "text", " " ], + [ "support.function", "double" ], + [ "text", " " ], + [ "support.function", "quoted" ], + [ "text", "''" ] + ] + }, + { + "state": "dissallowDelimitedBlock", + "data": [] + }, + { + "state": "text", + "data": [] + }, + { + "state": "start", + "data": [ + [ "string.regexp", "[fffff]" ] + ] + }, + { + "state": "passthroughBlock", + "data": [ + [ "string", "+++++++++++++++++++++++++++++++++++++" ] + ] + }, + { + "state": "passthroughBlock", + "data": [ + [ "support.function", "(C) " ], + [ "constant.character", "{ss}" ], + [ "support.function", " ss" ] + ] + }, + { + "state": "dissallowDelimitedBlock", + "data": [ + [ "support.function", "+++++++++++++++++++++++++++++++++++++" ] + ] + }, + { + "state": "text", + "data": [] + }, + { + "state": "listingBlock", + "data": [ + [ "support.function", "............." ] + ] + }, + { + "state": "listingBlock", + "data": [ + [ "support.function", "callout " ], + [ "constant.numeric", "<1>" ] + ] + }, + { + "state": "dissallowDelimitedBlock", + "data": [ + [ "support.function", ".............." ] + ] + }, + { + "state": "text", + "data": [] + }, + { + "state": "text", + "data": [ + [ "text", "> 1" ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "1> 2" ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "<2> 3" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "text", + "data": [ + [ "text", "Escaped:" ] + ] + }, + { + "state": "text", + "data": [ + [ "constant.language.escape", "\\_" ], + [ "text", "italic_," ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "t" ], + [ "constant.language.escape", "\\_" ], + [ "text", "_e" ], + [ "string.italic", "__st, o__" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "constant.numeric", ".optional title" ] + ] + }, + { + "state": "listingBlock", + "data": [ + [ "support.function", "............." ] + ] + }, + { + "state": "listingBlock", + "data": [ + [ "support.function", "callout " ], + [ "constant.numeric", "<1>" ] + ] + }, + { + "state": "dissallowDelimitedBlock", + "data": [ + [ "support.function", ".............." ] + ] + }, + { + "state": "text", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "text", + "data": [ + [ "keyword", ":macro:" ], + [ "text", " dddd" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "constant.numeric", ".lists" ] + ] + }, + { + "state": "listText", + "data": [ + [ "keyword", ". " ], + [ "text", "1" ] + ] + }, + { + "state": "listText", + "data": [ + [ "keyword", ".. " ], + [ "text", "2" ] + ] + }, + { + "state": "listText", + "data": [ + [ "keyword", "... " ], + [ "text", "d" ] + ] + }, + { + "state": "listText", + "data": [ + [ "keyword", "..... " ], + [ "text", "big" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "+" ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "continue" ], + [ "keyword", " +" ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "next line" ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "xi) no " ], + [ "support.function", "++la+tin++" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "listText", + "data": [ + [ "keyword", "xi) " ], + [ "text", "la" ], + [ "support.function", "++tin++" ] + ] + }, + { + "state": "listText", + "data": [ + [ "keyword", "2. " ], + [ "text", "num" ], + [ "string.italic", "__ber__" ], + [ "text", " [red]" ], + [ "keyword", "#" ], + [ "text", "red" ], + [ "keyword", "#" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "--" ] + ] + }, + { + "state": "listText", + "data": [ + [ "keyword", " 5. " ], + [ "text", "f " ], + [ "keyword", "<>" ], + [ "text", " " ], + [ "constant.character", "{macro}" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "--" ] + ] + }, + { + "state": "text", + "data": [ + [ "markup.list.macro", "image::" ], + [ "keyword", "path" ], + [ "string", "[beauty]" ], + [ "text", " " ], + [ "constant.language.escape", "->" ], + [ "text", "--" ], + [ "constant.language.escape", "<=" ], + [ "constant.language.escape", " --" ], + [ "text", " replacements" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "indentedBlock", + "data": [ + [ "support.function", " image::s" ] + ] + }, + { + "state": "indentedBlock", + "data": [ + [ "support.function", "sssss" ] + ] + }, + { + "state": "indentedBlock", + "data": [ + [ "support.function", "sss " ] + ] + }, + { + "state": "indentedBlock", + "data": [ + [ "support.function", "sssss" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "markup.heading", "== 1" ] + ] + }, + { + "state": "indentedBlock", + "data": [ + [ "support.function", " heading" ] + ] + }, + { + "state": "start", + "data": [ + [ "markup.heading", "=== not a heading" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "====================================" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "==================================" ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "====4 " ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "NOTE: above" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "text", + "data": [ + [ "keyword", "NOTE:" ], + [ "text", " above" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "string.regexp", "[[x6]]" ] + ] + }, + { + "state": "text", + "data": [ + [ "keyword", "WARNING:" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "string.regexp", "[options[]]" ] + ] + }, + { + "state": "literalBlock", + "data": [ + [ "support.function", "---------------------------" ] + ] + }, + { + "state": "literalBlock", + "data": [ + [ "support.function", "literal" ] + ] + }, + { + "state": "dissallowDelimitedBlock", + "data": [ + [ "support.function", "---------------------------" ] + ] + }, + { + "state": "text", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "markup.heading", "= Tables" ] + ] + }, + { + "state": "tableBlock", + "data": [ + [ "doc.comment", "|====================================" ] + ] + }, + { + "state": "tableBlock", + "data": [ + [ "doc.comment", "|" ], + [ "text", " " ], + [ "string.italic", "_italic_" ], + [ "text", " " ], + [ "doc.comment", "|" ], + [ "text", " " ], + [ "keyword.bold", "*bold*" ], + [ "text", " " ], + [ "doc.comment", "|" ], + [ "text", " text " ], + [ "doc.comment", "|" ], + [ "text", " " ], + [ "constant.language.escape", "(R)" ] + ] + }, + { + "state": "tableBlock", + "data": [] + }, + { + "state": "dissallowDelimitedBlock", + "data": [ + [ "doc.comment", "|====================================" ] + ] + }, + { + "state": "text", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "string.regexp", "[more, options]" ] + ] + }, + { + "state": "commentBlock", + "data": [ + [ "doc.comment", "///////////" ] + ] + }, + { + "state": "commentBlock", + "data": [ + [ "doc.comment", "comment" ] + ] + }, + { + "state": "dissallowDelimitedBlock", + "data": [ + [ "doc.comment", "///////////" ] + ] + }, + { + "state": "text", + "data": [ + [ "comment", "// one line comment" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "text", + "data": [ + [ "text", "[red]" ], + [ "keyword", "#" ], + [ "text", "red text" ], + [ "keyword", "#" ], + [ "text", " [yellow-background]" ], + [ "keyword", "#" ], + [ "text", "on yellow" ], + [ "keyword", "#" ] + ] + }, + { + "state": "text", + "data": [ + [ "text", "[big]" ], + [ "keyword", "#" ], + [ "text", "large" ], + [ "keyword", "#" ], + [ "text", " [red yellow-background big]" ], + [ "keyword.bold", "*all bold*" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", "\t" ] + ] + }, + { + "state": "text", + "data": [ + [ "markup.underline.list", "https://site" ], + [ "text", " text <" ], + [ "markup.underline.list", "mail@i.am" ], + [ "text", "> " ], + [ "markup.underline.list", "callto:ace" ], + [ "text", " " ], + [ "link", "http://ace.ajaxorg.com" ], + [ "variable.language", "[awesome]" ] + ] + }, + { + "state": "text", + "data": [ + [ "text", " .still normal text" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.numeric", ".break out thoug should not" ] + ] + }, + { + "state": "literalBlock", + "data": [ + [ "support.function", "---------------------------" ] + ] + }, + { + "state": "literalBlock", + "data": [ + [ "support.function", "///////////////////////////" ] + ] + }, + { + "state": "dissallowDelimitedBlock", + "data": [ + [ "support.function", "---------------------------" ] + ] + }, + { + "state": "text", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_c_cpp.json b/lib/ace/mode/_test/tokens_c_cpp.json index c5725094..93b0d29b 100644 --- a/lib/ace/mode/_test/tokens_c_cpp.json +++ b/lib/ace/mode/_test/tokens_c_cpp.json @@ -37,7 +37,7 @@ "data": [ [ "storage.type", "int" ], [ "text", " " ], - [ "entity.name.function", "main" ], + [ "identifier", "main" ], [ "text", " " ], [ "paren.lparen", "(" ], [ "paren.rparen", ")" ] diff --git a/lib/ace/mode/_test/tokens_coffee.json b/lib/ace/mode/_test/tokens_coffee.json index e8c97baa..a47de57a 100644 --- a/lib/ace/mode/_test/tokens_coffee.json +++ b/lib/ace/mode/_test/tokens_coffee.json @@ -50,7 +50,8 @@ "data": [ [ "text", " " ], [ "identifier", "console" ], - [ "identifier", ".log" ], + [ "punctuation.operator", "." ], + [ "identifier", "log" ], [ "text", " " ], [ "string", "'qstring'" ], [ "text", " " ], @@ -100,7 +101,7 @@ "data": [ [ "keyword", "do" ], [ "text", " " ], - [ "keyword.operator", "->" ] + [ "storage.type", "->" ] ] }, { @@ -131,7 +132,8 @@ [ "keyword.operator", "=" ], [ "text", " " ], [ "string.regex", "/regex/imgy" ], - [ "identifier", ".test" ], + [ "punctuation.operator", "." ], + [ "identifier", "test" ], [ "text", " " ], [ "string.regex", "///" ] ] diff --git a/lib/ace/mode/_test/tokens_dart.json b/lib/ace/mode/_test/tokens_dart.json new file mode 100644 index 00000000..b741bdc1 --- /dev/null +++ b/lib/ace/mode/_test/tokens_dart.json @@ -0,0 +1,537 @@ +[ + { + "state": "start", + "data": [ + [ "identifier", "main" ], + [ "text", "() {" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "print" ], + [ "text", "(" ], + [ "string", "'Hello World!'" ], + [ "text", ");" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type.primitive.dart", "int" ], + [ "text", " " ], + [ "identifier", "fib" ], + [ "text", "(" ], + [ "storage.type.primitive.dart", "int" ], + [ "text", " " ], + [ "identifier", "n" ], + [ "text", ") " ], + [ "keyword.operator.assignment.dart", "=" ], + [ "keyword.operator.comparison.dart", ">" ], + [ "text", " (" ], + [ "identifier", "n" ], + [ "text", " " ], + [ "keyword.operator.comparison.dart", ">" ], + [ "text", " " ], + [ "constant.numeric", "1" ], + [ "text", ") " ], + [ "keyword.control.ternary.dart", "?" ], + [ "text", " (" ], + [ "identifier", "fib" ], + [ "text", "(" ], + [ "identifier", "n" ], + [ "text", " " ], + [ "keyword.operator.arithmetic.dart", "-" ], + [ "text", " " ], + [ "constant.numeric", "1" ], + [ "text", ") " ], + [ "keyword.operator.arithmetic.dart", "+" ], + [ "text", " " ], + [ "identifier", "fib" ], + [ "text", "(" ], + [ "identifier", "n" ], + [ "text", " " ], + [ "keyword.operator.arithmetic.dart", "-" ], + [ "text", " " ], + [ "constant.numeric", "2" ], + [ "text", ")) " ], + [ "keyword.control.ternary.dart", ":" ], + [ "text", " " ], + [ "identifier", "n" ], + [ "text", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "main" ], + [ "text", "() {" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "print" ], + [ "text", "(" ], + [ "string", "'fib(20) = ${fib(20)}'" ], + [ "text", ");" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", "}" ] + ] + }, + { + "state": "comment", + "data": [ + [ "comment", "/*asd" ] + ] + }, + { + "state": "comment", + "data": [ + [ "comment", "asdad" ] + ] + }, + { + "state": "start", + "data": [ + [ "comment", "*/" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.numeric", "0.67" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.numeric", "77" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", "." ], + [ "constant.numeric", "86" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword.other.import.dart", "#import" ], + [ "text", "(" ], + [ "string", "\"http://dartwatch.com/myOtherLibrary.dart\"" ], + [ "text", ");" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword.other.import.dart", "#import" ], + [ "text", "(" ], + [ "string", "\"myOtherLibrary.dart\"" ], + [ "text", ", " ], + [ "keyword.other.import.dart", "prefix" ], + [ "text", ":" ], + [ "string", "\"lib1\"" ], + [ "text", ");" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "qqdoc", + "data": [ + [ "string", "\"\"\"asdasdads" ] + ] + }, + { + "state": "qqdoc", + "data": [ + [ "string", "asdadsadsasd" ] + ] + }, + { + "state": "start", + "data": [ + [ "string", "asdasdasdad\"\"\"" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "string", "'23424'" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "constant.numeric", "0x234" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "identifier", "foo" ], + [ "text", " " ], + [ "keyword.operator.dart", "is" ], + [ "text", " " ], + [ "identifier", "bar" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type.primitive.dart", "int" ], + [ "text", " " ], + [ "identifier", "x" ], + [ "text", " " ], + [ "keyword.operator.assignment.dart", "=" ], + [ "text", " " ], + [ "constant.numeric", "4" ], + [ "text", " " ], + [ "keyword.operator.bitwise.dart", "<<" ], + [ "text", " " ], + [ "constant.numeric", "10" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "comment", "// Create a class for Point." ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword.declaration.dart", "class" ], + [ "text", " " ], + [ "identifier", "Point" ], + [ "text", " {" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// Final variables cannot be changed once they are assigned." ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// Create two instance variables." ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "storage.modifier.dart", "final" ], + [ "text", " " ], + [ "storage.type.primitive.dart", "num" ], + [ "text", " " ], + [ "identifier", "x" ], + [ "text", ", " ], + [ "identifier", "y" ], + [ "text", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// A constructor, with syntactic sugar for setting instance variables." ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "Point" ], + [ "text", "(" ], + [ "variable.language.dart", "this" ], + [ "text", "." ], + [ "identifier", "x" ], + [ "text", ", " ], + [ "variable.language.dart", "this" ], + [ "text", "." ], + [ "identifier", "y" ], + [ "text", ");" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// A named constructor with an initializer list." ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "Point" ], + [ "text", "." ], + [ "identifier", "origin" ], + [ "text", "() " ], + [ "keyword.control.ternary.dart", ":" ], + [ "text", " " ], + [ "identifier", "x" ], + [ "text", " " ], + [ "keyword.operator.assignment.dart", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "text", ", " ], + [ "identifier", "y" ], + [ "text", " " ], + [ "keyword.operator.assignment.dart", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "text", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// A method." ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "storage.type.primitive.dart", "num" ], + [ "text", " " ], + [ "identifier", "distanceTo" ], + [ "text", "(" ], + [ "identifier", "Point" ], + [ "text", " " ], + [ "identifier", "other" ], + [ "text", ") {" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "storage.type.primitive.dart", "var" ], + [ "text", " " ], + [ "identifier", "dx" ], + [ "text", " " ], + [ "keyword.operator.assignment.dart", "=" ], + [ "text", " " ], + [ "identifier", "x" ], + [ "text", " " ], + [ "keyword.operator.arithmetic.dart", "-" ], + [ "text", " " ], + [ "identifier", "other" ], + [ "text", "." ], + [ "identifier", "x" ], + [ "text", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "storage.type.primitive.dart", "var" ], + [ "text", " " ], + [ "identifier", "dy" ], + [ "text", " " ], + [ "keyword.operator.assignment.dart", "=" ], + [ "text", " " ], + [ "identifier", "y" ], + [ "text", " " ], + [ "keyword.operator.arithmetic.dart", "-" ], + [ "text", " " ], + [ "identifier", "other" ], + [ "text", "." ], + [ "identifier", "y" ], + [ "text", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.control.dart", "return" ], + [ "text", " " ], + [ "identifier", "sqrt" ], + [ "text", "(" ], + [ "identifier", "dx" ], + [ "text", " " ], + [ "keyword.operator.arithmetic.dart", "*" ], + [ "text", " " ], + [ "identifier", "dx" ], + [ "text", " " ], + [ "keyword.operator.arithmetic.dart", "+" ], + [ "text", " " ], + [ "identifier", "dy" ], + [ "text", " " ], + [ "keyword.operator.arithmetic.dart", "*" ], + [ "text", " " ], + [ "identifier", "dy" ], + [ "text", ");" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " }" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// Check for null." ] + ] + }, + { + "state": "start", + "data": [ + [ "storage.type.primitive.dart", "var" ], + [ "text", " " ], + [ "identifier", "unicorn" ], + [ "text", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "assert" ], + [ "text", "(" ], + [ "identifier", "unicorn" ], + [ "text", " " ], + [ "keyword.operator.comparison.dart", "==" ], + [ "text", " " ], + [ "constant.language.dart", "null" ], + [ "text", ");" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "comment", "// Check for NaN." ] + ] + }, + { + "state": "start", + "data": [ + [ "storage.type.primitive.dart", "var" ], + [ "text", " " ], + [ "identifier", "iMeantToDoThis" ], + [ "text", " " ], + [ "keyword.operator.assignment.dart", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "keyword.operator.arithmetic.dart", "/" ], + [ "constant.numeric", "0" ], + [ "text", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "assert" ], + [ "text", "(" ], + [ "identifier", "iMeantToDoThis" ], + [ "text", "." ], + [ "identifier", "isNaN" ], + [ "text", "());" ] + ] + }, + { + "state": "start", + "data": [] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_glsl.json b/lib/ace/mode/_test/tokens_glsl.json index 5d5668de..5f825707 100644 --- a/lib/ace/mode/_test/tokens_glsl.json +++ b/lib/ace/mode/_test/tokens_glsl.json @@ -41,7 +41,7 @@ "data": [ [ "keyword", "void" ], [ "text", " " ], - [ "entity.name.function", "main" ], + [ "identifier", "main" ], [ "paren.lparen", "(" ], [ "paren.rparen", ")" ], [ "text", " " ], diff --git a/lib/ace/mode/_test/tokens_haml.json b/lib/ace/mode/_test/tokens_haml.json new file mode 100644 index 00000000..78e4b858 --- /dev/null +++ b/lib/ace/mode/_test/tokens_haml.json @@ -0,0 +1,285 @@ +[ + { + "state": "start", + "data": [ + [ "keyword.other.doctype", "!!!5" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", "# " ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", "# " ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", "# " ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", "# " ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", "/adasdasdad" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", "%div" ], + [ "punctuation.section", "{" ], + [ "constant.other.symbol.ruby", ":id" ], + [ "text", " => " ], + [ "string", "\"#{@item.type}_#{@item.number}\"" ], + [ "text", ", " ], + [ "constant.other.symbol.ruby", ":class" ], + [ "text", " => " ], + [ "string", "'#{@item.type} #{@item.urgency}'" ], + [ "text", ", " ], + [ "constant.other.symbol.ruby", ":phoney" ], + [ "text", " => " ], + [ "string", "`asdasdasd`" ], + [ "punctuation.section", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", "/ file: app/views/movies/index.html.haml" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.escape.haml", "\\d" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", "%ads:" ], + [ "punctuation.section", "{" ], + [ "constant.other.symbol.ruby", ":bleh" ], + [ "text", " => " ], + [ "constant.numeric", "33" ], + [ "punctuation.section", "}" ] + ] + }, + { + "state": "embedded_ruby", + "data": [ + [ "entity.name.tag.haml", "%p" ], + [ "text", "==ddd==" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " Date/Time:" ] + ] + }, + { + "state": "embedded_ruby", + "data": [ + [ "text", " - " ], + [ "identifier", "now" ], + [ "text", " = " ], + [ "support.class", "DateTime" ], + [ "text", "." ], + [ "identifier", "now" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", " %strong" ], + [ "text", "= now" ] + ] + }, + { + "state": "embedded_ruby", + "data": [ + [ "text", " = " ], + [ "keyword", "if" ], + [ "text", " " ], + [ "identifier", "now" ], + [ "text", " " ], + [ "support.class", "DateTime" ], + [ "text", "." ], + [ "identifier", "parse" ], + [ "text", "(\"" ], + [ "support.class", "December" ], + [ "text", " " ], + [ "constant.numeric", "31" ], + [ "text", ", " ], + [ "constant.numeric", "2006" ], + [ "text", "\")" ] + ] + }, + { + "state": "embedded_ruby", + "data": [ + [ "text", " = \"" ], + [ "support.class", "Happy" ], + [ "text", " " ], + [ "identifier", "new" ], + [ "text", " \" + \"" ], + [ "identifier", "year" ], + [ "text", "!\"" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", "%sfd" ], + [ "entity.other.attribute-name.class.haml", ".dfdfg" ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", "#content" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " .title" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", " %h1" ], + [ "text", "= @title" ] + ] + }, + { + "state": "embedded_ruby", + "data": [ + [ "text", " = " ], + [ "support.function", "link_to" ], + [ "text", " '" ], + [ "support.class", "Home" ], + [ "text", "', " ], + [ "identifier", "home_url" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", " #contents" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", "%div" ], + [ "entity.other.attribute-name.id.haml", "#content" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", " %div" ], + [ "entity.other.attribute-name.class.haml", ".articles" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", " %div" ], + [ "entity.other.attribute-name.class.haml", ".article" ], + [ "entity.other.attribute-name.class.haml", ".title" ], + [ "text", " Blah" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", " %div" ], + [ "entity.other.attribute-name.class.haml", ".article" ], + [ "entity.other.attribute-name.class.haml", ".date" ], + [ "text", " " ], + [ "constant.numeric", "2006" ], + [ "constant.numeric", "-11" ], + [ "constant.numeric", "-05" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", " %div" ], + [ "entity.other.attribute-name.class.haml", ".article" ], + [ "entity.other.attribute-name.class.haml", ".entry" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " Neil Patrick Harris " ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", "%div" ], + [ "text", "[@user, " ], + [ "constant.other.symbol.ruby", ":greeting" ], + [ "text", "]" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.tag.haml", " %bar" ], + [ "text", "[" ], + [ "constant.numeric", "290" ], + [ "text", "]/" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "string.quoted.double", "==Hello!==" ] + ] + }, + { + "state": "start", + "data": [] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_jade.json b/lib/ace/mode/_test/tokens_jade.json new file mode 100644 index 00000000..0d9f8c96 --- /dev/null +++ b/lib/ace/mode/_test/tokens_jade.json @@ -0,0 +1,309 @@ +[ + { + "state": "start", + "data": [ + [ "keyword.other.doctype.jade", "!!!doctype" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword.other.doctype.jade", "!!!5" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword.other.doctype.jade", "!!!" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword.control.import.include.jade", "include" ], + [ "text", " something" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword.control.import.include.jade", " include" ], + [ "text", " another_thing" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", " // let's talk about it" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "comment_block", + "data": [ + [ "punctuation.section.comment", "//" ] + ] + }, + { + "state": "comment_block", + "data": [ + [ "comment.block.jade", " here it is. a block comment!" ] + ] + }, + { + "state": "comment_block", + "data": [ + [ "comment.block.jade", " and another row!" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", "but not here." ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "comment_block", + "data": [ + [ "punctuation.section.comment", " // " ] + ] + }, + { + "state": "comment_block", + "data": [ + [ "comment.block.jade", " a far spaced" ] + ] + }, + { + "state": "comment_block", + "data": [ + [ "comment.block.jade", " should be lack of block" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.comment", " // also not a comment" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag.any.jade", " div" ], + [ "entity.other.attribute-name.class.jade", ".attemptAtBlock" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag.any.jade", " span" ], + [ "entity.other.attribute-name.id.jade", "#myName" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "string.interpolated.jade", "#{implicit}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "string.interpolated.jade", "!{more_explicit}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "suport.type.attribute.id.jade", "#idDiv" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "suport.type.attribute.class.jade", ".idDiv" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "meta.tag.any.jade", " test" ], + [ "punctuation", "(" ], + [ "entity.other.attribute-name.jade", "id" ], + [ "text", "=" ], + [ "string", "\"tag\"" ], + [ "punctuation", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag.any.jade", " header" ], + [ "punctuation", "(" ], + [ "entity.other.attribute-name.jade", "id" ], + [ "text", "=" ], + [ "string", "\"tag\"" ], + [ "text", ", " ], + [ "entity.other.attribute-name.jade", "blah" ], + [ "text", "=" ], + [ "string", "\"foo\"" ], + [ "text", ", " ], + [ "entity.other.attribute-name.jade", "meh" ], + [ "text", "=" ], + [ "string", "\"aads\"" ], + [ "punctuation", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "storage.type.function.jade", "mixin" ], + [ "entity.name.function.jade", " article" ], + [ "punctuation.definition.parameters.begin.jade", "(" ], + [ "variable.parameter.function.jade", "obj, parents" ], + [ "punctuation.definition.parameters.end.jade", ")" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type.function.jade", " mixin" ], + [ "entity.name.function.jade", " bleh" ], + [ "punctuation.definition.parameters.begin.jade", "(" ], + [ "punctuation.definition.parameters.end.jade", ")" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type.function.jade", " mixin" ], + [ "entity.name.function.jade", " clever-name" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "source.js.embedded.jade", " -" ], + [ "storage.type", "var" ], + [ "text", " " ], + [ "identifier", "x" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "string", "\"0\"" ], + [ "text", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "source.js.embedded.jade", " -" ], + [ "text", " " ], + [ "identifier", "y" ], + [ "text", " " ], + [ "identifier", "each" ], + [ "text", " z" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "source.js.embedded.jade", " -" ], + [ "text", " " ], + [ "storage.type", "var" ], + [ "text", " " ], + [ "identifier", "items" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "paren.lparen", "[" ], + [ "string", "\"one\"" ], + [ "punctuation.operator", "," ], + [ "text", " " ], + [ "string", "\"two\"" ], + [ "punctuation.operator", "," ], + [ "text", " " ], + [ "string", "\"three\"" ], + [ "text", "]" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag.any.jade", " each" ], + [ "text", " item in items" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag.any.jade", " li" ], + [ "text", "= item" ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_javascript.json b/lib/ace/mode/_test/tokens_javascript.json index b27744c1..12057d81 100644 --- a/lib/ace/mode/_test/tokens_javascript.json +++ b/lib/ace/mode/_test/tokens_javascript.json @@ -46,7 +46,7 @@ "state": "regex_allowed", "data": [ [ "text", " " ], - [ "identifier", "alert" ], + [ "support.function", "alert" ], [ "paren.lparen", "(" ], [ "identifier", "items" ], [ "paren.lparen", "[" ], @@ -148,8 +148,7 @@ [ "string.regexp", "y" ], [ "constant.language.escape", ")[]" ], [ "constant.language.escape", "|" ], - [ "constant.language.escape", "$" ], - [ "constant.language.escape", "?" ], + [ "invalid", "$?" ], [ "constant.language.escape", "|" ], [ "invalid", "^*" ], [ "string.regexp", "/" ], diff --git a/lib/ace/mode/_test/tokens_jsp.json b/lib/ace/mode/_test/tokens_jsp.json new file mode 100644 index 00000000..4f5e9e46 --- /dev/null +++ b/lib/ace/mode/_test/tokens_jsp.json @@ -0,0 +1,575 @@ +[ + { + "state": "start", + "data": [ + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "html" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "body" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "js-start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name.script", "script" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "js-regex_allowed", + "data": [ + [ "text", " " ], + [ "storage.type", "var" ], + [ "text", " " ], + [ "identifier", "x" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "string", "\"abc\"" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "js-regex_allowed", + "data": [ + [ "text", " " ], + [ "storage.type", "function" ], + [ "text", " " ], + [ "identifier", "y" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "js-start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "" ] + ] + }, + { + "state": "css-start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name.style", "style" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "css-ruleset", + "data": [ + [ "text", " " ], + [ "variable", ".class" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "css-ruleset", + "data": [ + [ "text", " " ], + [ "support.type", "background" ], + [ "text", ": " ], + [ "constant.numeric", "#124356" ], + [ "text", ";" ] + ] + }, + { + "state": "css-start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "p" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " Today's date: " ], + [ "meta.tag", "<%" ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "lparen", "(" ], + [ "keyword", "new" ], + [ "text", " " ], + [ "identifier", "java" ], + [ "text", "." ], + [ "identifier", "util" ], + [ "text", "." ], + [ "identifier", "Date" ], + [ "lparen", "(" ], + [ "rparen", ")" ], + [ "rparen", ")" ], + [ "text", "." ], + [ "identifier", "toLocaleString" ], + [ "lparen", "(" ], + [ "rparen", ")" ], + [ "meta.tag", "%>" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<%" ], + [ "keyword.operator", "!" ], + [ "text", " " ], + [ "keyword", "int" ], + [ "text", " " ], + [ "identifier", "i" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "text", "; " ], + [ "meta.tag", "%>" ] + ] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "meta.tag", "" ] + ] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "keyword", "int" ], + [ "text", " " ], + [ "identifier", "j" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "10" ], + [ "text", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "<%--" ], + [ "comment", " This is JSP comment --%>" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<%@" ], + [ "text", " " ], + [ "identifier", "directive" ], + [ "text", " " ], + [ "identifier", "attribute" ], + [ "keyword.operator", "=" ], + [ "string", "\"value\"" ], + [ "text", " " ], + [ "meta.tag", "%>" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "h2" ], + [ "meta.tag", ">" ], + [ "text", "Select Languages:" ], + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name.form", "form" ], + [ "text", " " ], + [ "entity.other.attribute-name", "ACTION" ], + [ "keyword.operator", "=" ], + [ "string", "\"jspCheckBox.jsp\"" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name.form", "input" ], + [ "text", " " ], + [ "entity.other.attribute-name", "type" ], + [ "keyword.operator", "=" ], + [ "string", "\"checkbox\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "name" ], + [ "keyword.operator", "=" ], + [ "string", "\"id\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "value" ], + [ "keyword.operator", "=" ], + [ "string", "\"Java\"" ], + [ "meta.tag", ">" ], + [ "text", " Java" ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "BR" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name.form", "input" ], + [ "text", " " ], + [ "entity.other.attribute-name", "type" ], + [ "keyword.operator", "=" ], + [ "string", "\"checkbox\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "name" ], + [ "keyword.operator", "=" ], + [ "string", "\"id\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "value" ], + [ "keyword.operator", "=" ], + [ "string", "\".NET\"" ], + [ "meta.tag", ">" ], + [ "text", " .NET" ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "BR" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name.form", "input" ], + [ "text", " " ], + [ "entity.other.attribute-name", "type" ], + [ "keyword.operator", "=" ], + [ "string", "\"checkbox\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "name" ], + [ "keyword.operator", "=" ], + [ "string", "\"id\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "value" ], + [ "keyword.operator", "=" ], + [ "string", "\"PHP\"" ], + [ "meta.tag", ">" ], + [ "text", " PHP" ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "BR" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name.form", "input" ], + [ "text", " " ], + [ "entity.other.attribute-name", "type" ], + [ "keyword.operator", "=" ], + [ "string", "\"checkbox\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "name" ], + [ "keyword.operator", "=" ], + [ "string", "\"id\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "value" ], + [ "keyword.operator", "=" ], + [ "string", "\"C/C++\"" ], + [ "meta.tag", ">" ], + [ "text", " C/C++" ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "BR" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name.form", "input" ], + [ "text", " " ], + [ "entity.other.attribute-name", "type" ], + [ "keyword.operator", "=" ], + [ "string", "\"checkbox\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "name" ], + [ "keyword.operator", "=" ], + [ "string", "\"id\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "value" ], + [ "keyword.operator", "=" ], + [ "string", "\"PERL\"" ], + [ "meta.tag", ">" ], + [ "text", " PERL " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "BR" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name.form", "input" ], + [ "text", " " ], + [ "entity.other.attribute-name", "type" ], + [ "keyword.operator", "=" ], + [ "string", "\"submit\"" ], + [ "text", " " ], + [ "entity.other.attribute-name", "value" ], + [ "keyword.operator", "=" ], + [ "string", "\"Submit\"" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "meta.tag", "<%" ] + ] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "support.function", "String" ], + [ "text", " " ], + [ "identifier", "select" ], + [ "lparen", "[" ], + [ "rparen", "]" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "variable.language", "request" ], + [ "text", "." ], + [ "identifier", "getParameterValues" ], + [ "lparen", "(" ], + [ "string", "\"id\"" ], + [ "rparen", ")" ], + [ "text", "; " ] + ] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "keyword", "if" ], + [ "text", " " ], + [ "lparen", "(" ], + [ "identifier", "select" ], + [ "text", " " ], + [ "keyword.operator", "!" ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.language", "null" ], + [ "text", " " ], + [ "keyword.operator", "&" ], + [ "keyword.operator", "&" ], + [ "text", " " ], + [ "identifier", "select" ], + [ "text", "." ], + [ "identifier", "length" ], + [ "text", " " ], + [ "keyword.operator", "!" ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "rparen", ")" ], + [ "text", " " ], + [ "lparen", "{" ] + ] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "variable.language", "out" ], + [ "text", "." ], + [ "identifier", "println" ], + [ "lparen", "(" ], + [ "string", "\"You have selected: \"" ], + [ "rparen", ")" ], + [ "text", ";" ] + ] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "keyword", "for" ], + [ "text", " " ], + [ "lparen", "(" ], + [ "keyword", "int" ], + [ "text", " " ], + [ "identifier", "i" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "text", "; " ], + [ "identifier", "i" ], + [ "text", " " ], + [ "keyword.operator", "<" ], + [ "text", " " ], + [ "identifier", "select" ], + [ "text", "." ], + [ "identifier", "length" ], + [ "text", "; " ], + [ "identifier", "i" ], + [ "keyword.operator", "++" ], + [ "rparen", ")" ], + [ "text", " " ], + [ "lparen", "{" ] + ] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "variable.language", "out" ], + [ "text", "." ], + [ "identifier", "println" ], + [ "lparen", "(" ], + [ "identifier", "select" ], + [ "lparen", "[" ], + [ "identifier", "i" ], + [ "rparen", "]" ], + [ "rparen", ")" ], + [ "text", "; " ] + ] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "rparen", "}" ] + ] + }, + { + "state": "jsp-start", + "data": [ + [ "text", " " ], + [ "rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "meta.tag", "%>" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "" ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_lisp.json b/lib/ace/mode/_test/tokens_lisp.json new file mode 100644 index 00000000..130a9b1b --- /dev/null +++ b/lib/ace/mode/_test/tokens_lisp.json @@ -0,0 +1,314 @@ +[ + { + "state": "start", + "data": [ + [ "text", "(" ], + [ "storage.type.function-type.lisp", "defun" ], + [ "text", " " ], + [ "entity.name.function.lisp", "prompt-for-cd" ], + [ "text", " ()" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "string", "\"Prompts" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "for" ], + [ "text", " " ], + [ "identifier", "CD" ], + [ "text", "\"" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "identifier", "prompt" ], + [ "text", "-" ], + [ "identifier", "read" ], + [ "text", " " ], + [ "string", "\"Title\"" ], + [ "text", " " ], + [ "constant.numeric", "1.53" ], + [ "text", " " ], + [ "constant.numeric", "1" ], + [ "text", " " ], + [ "constant.numeric", "2" ], + [ "text", "/" ], + [ "constant.numeric", "4" ], + [ "text", " " ], + [ "constant.numeric", "1.7" ], + [ "text", " " ], + [ "constant.numeric", "1.7e0" ], + [ "text", " " ], + [ "constant.numeric", "2.9E-4" ], + [ "text", " " ], + [ "constant.numeric", "+42" ], + [ "text", " " ], + [ "constant.numeric", "-7" ], + [ "text", " " ], + [ "punctuation.definition.constant.character.lisp", "#" ], + [ "constant.character.lisp", "b001" ], + [ "text", " " ], + [ "punctuation.definition.constant.character.lisp", "#" ], + [ "constant.character.lisp", "b001/100" ], + [ "text", " " ], + [ "punctuation.definition.constant.character.lisp", "#" ], + [ "constant.character.lisp", "o777" ], + [ "text", " " ], + [ "punctuation.definition.constant.character.lisp", "#" ], + [ "constant.character.lisp", "O777" ], + [ "text", " " ], + [ "punctuation.definition.constant.character.lisp", "#" ], + [ "constant.character.lisp", "xabc55" ], + [ "text", " " ], + [ "punctuation.definition.constant.character.lisp", "#" ], + [ "constant.character.lisp", "c" ], + [ "text", "(" ], + [ "constant.numeric", "0" ], + [ "text", " " ], + [ "constant.numeric", "-5.6" ], + [ "text", "))" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "identifier", "prompt" ], + [ "text", "-" ], + [ "identifier", "read" ], + [ "text", " " ], + [ "string", "\"Artist\"" ], + [ "text", " &" ], + [ "identifier", "rest" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "keyword.operator", "or" ], + [ "text", " (" ], + [ "identifier", "parse" ], + [ "text", "-" ], + [ "identifier", "integer" ], + [ "text", " (" ], + [ "identifier", "prompt" ], + [ "text", "-" ], + [ "identifier", "read" ], + [ "text", " " ], + [ "string", "\"Rating\"" ], + [ "text", ") :" ], + [ "identifier", "junk" ], + [ "text", "-" ], + [ "identifier", "allowed" ], + [ "text", " " ], + [ "support.function", "t" ], + [ "text", ") " ], + [ "constant.numeric", "0" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "keyword.control", "if" ], + [ "text", " " ], + [ "identifier", "x" ], + [ "text", " (" ], + [ "support.function", "format" ], + [ "text", " " ], + [ "support.function", "t" ], + [ "text", " " ], + [ "string", "\"yes\"" ], + [ "text", ") (" ], + [ "support.function", "format" ], + [ "text", " " ], + [ "support.function", "t" ], + [ "text", " " ], + [ "string", "\"no\"" ], + [ "text", " " ], + [ "constant.language", "nil" ], + [ "text", ") " ], + [ "comment", ";and here comment" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " ) " ], + [ "constant.numeric", "0xFFLL" ], + [ "text", " " ], + [ "constant.numeric", "-23ull" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", ";; second line comment" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " '(+ " ], + [ "constant.numeric", "1" ], + [ "text", " " ], + [ "constant.numeric", "2" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "identifier", "defvar" ], + [ "text", " " ], + [ "punctuation.definition.variable.lisp", "*" ], + [ "variable.other.global.lisp", "lines" ], + [ "punctuation.definition.variable.lisp", "*" ], + [ "text", ") " ], + [ "comment", "; list of all lines" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "identifier", "position" ], + [ "text", "-" ], + [ "keyword.control", "if" ], + [ "text", "-" ], + [ "identifier", "not" ], + [ "text", " " ], + [ "punctuation.definition.constant.character.lisp", "#" ], + [ "constant.character.lisp", "'sys::whitespacep" ], + [ "text", " " ], + [ "identifier", "line" ], + [ "text", " :" ], + [ "identifier", "start" ], + [ "text", " " ], + [ "identifier", "beg" ], + [ "text", "))" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "support.function", "quote" ], + [ "text", " (" ], + [ "identifier", "privet" ], + [ "text", " " ], + [ "constant.numeric", "1" ], + [ "text", " " ], + [ "constant.numeric", "2" ], + [ "text", " " ], + [ "constant.numeric", "3" ], + [ "text", "))" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " '(" ], + [ "identifier", "hello" ], + [ "text", " " ], + [ "identifier", "world" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (* " ], + [ "constant.numeric", "5" ], + [ "text", " " ], + [ "constant.numeric", "7" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "constant.numeric", "1" ], + [ "text", " " ], + [ "constant.numeric", "2" ], + [ "text", " " ], + [ "constant.numeric", "34" ], + [ "text", " " ], + [ "constant.numeric", "5" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (:" ], + [ "identifier", "use" ], + [ "text", " " ], + [ "string", "\"aaaa\"" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "keyword.control", "let" ], + [ "text", " ((" ], + [ "identifier", "x" ], + [ "text", " " ], + [ "constant.numeric", "10" ], + [ "text", ") (" ], + [ "identifier", "y" ], + [ "text", " " ], + [ "constant.numeric", "20" ], + [ "text", "))" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "identifier", "print" ], + [ "text", " (+ " ], + [ "identifier", "x" ], + [ "text", " " ], + [ "identifier", "y" ], + [ "text", "))" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " ) " ], + [ "support.function", "LAmbDa" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "string", "\"asdad" ], + [ "constant.character.escape.lisp", "\\0" ], + [ "string", "eqweqe\"" ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_lucene.json b/lib/ace/mode/_test/tokens_lucene.json new file mode 100644 index 00000000..86a23089 --- /dev/null +++ b/lib/ace/mode/_test/tokens_lucene.json @@ -0,0 +1,21 @@ +[ + { + "state": "start", + "data": [ + [ "paren.lparen", "(" ], + [ "keyword", "title:" ], + [ "string", "\"foo bar\"" ], + [ "text", " " ], + [ "keyword.operator", "AND" ], + [ "text", " " ], + [ "keyword", "body:" ], + [ "string", "\"quick fox\"" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "keyword.operator", "OR" ], + [ "text", " " ], + [ "keyword", "title:" ], + [ "text", "fox" ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_objectivec.json b/lib/ace/mode/_test/tokens_objectivec.json new file mode 100644 index 00000000..107cdf63 --- /dev/null +++ b/lib/ace/mode/_test/tokens_objectivec.json @@ -0,0 +1,1095 @@ +[ + { + "state": "start", + "data": [ + [ "storage.type.objc", "@" ], + [ "punctuation.definition.storage.type.objc", "protocol" ], + [ "entity.name.type.objc", " Printing" ], + [ "text", ": " ], + [ "entity.other.inherited-class.objc", "someParent" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.function.objc", "-" ], + [ "paren.lparen", "(" ], + [ "storage.type", "void" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "identifier", "print" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "storage.type.objc", "@end" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type.objc", "@" ], + [ "punctuation.definition.storage.type.objc", "interface" ], + [ "entity.name.type.objc", " Fraction" ], + [ "text", ": " ], + [ "entity.other.inherited-class.objc", "NSObject" ], + [ "text", " " ], + [ "keyword.operator", "<" ], + [ "identifier", "Printing" ], + [ "punctuation.operator", "," ], + [ "text", " " ], + [ "support.class.cocoa", "NSCopying" ], + [ "keyword.operator", ">" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "storage.type", "int" ], + [ "text", " " ], + [ "identifier", "numerator" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "storage.type", "int" ], + [ "text", " " ], + [ "identifier", "denominator" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "storage.type.objc", "@end" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "string.begin.objc", "@\"" ], + [ "string", "blah" ], + [ "invalid.illegal.unknown-escape.objc", "\\8" ], + [ "punctuation.definition.string.end", "\"" ], + [ "text", " " ], + [ "string.begin.objc", "@\"" ], + [ "string", "a" ], + [ "constant.character.escape.objc", "\\222" ], + [ "string", "sd" ], + [ "invalid.illegal.unknown-escape.objc", "\\d" ], + [ "punctuation.definition.string.end", "\"" ], + [ "text", " " ], + [ "string.begin.objc", "@\"" ], + [ "constant.character.escape.objc", "\\f" ], + [ "string", "aw" ], + [ "constant.character.escape.objc", "\\\"" ], + [ "constant.character.escape.objc", "\\?" ], + [ "string", " " ], + [ "constant.character.escape.objc", "\\'" ], + [ "string", " " ], + [ "constant.character.escape.objc", "\\4" ], + [ "string", " n" ], + [ "constant.character.escape.objc", "\\\\" ], + [ "punctuation.definition.string.end", "\"" ], + [ "text", " " ], + [ "string.begin.objc", "@\"" ], + [ "constant.character.escape.objc", "\\56" ], + [ "punctuation.definition.string.end", "\"" ] + ] + }, + { + "state": "start", + "data": [ + [ "string.begin.objc", "@\"" ], + [ "constant.character.escape.objc", "\\xSF42" ], + [ "punctuation.definition.string.end", "\"" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "meta.function.objc", "-" ], + [ "paren.lparen", "(" ], + [ "support.class.cocoa", "NSDecimalNumber" ], + [ "keyword.operator", "*" ], + [ "paren.rparen", ")" ], + [ "identifier", "addCount" ], + [ "punctuation.operator", ":" ], + [ "paren.lparen", "(" ], + [ "storage.type.id.objc", "id" ], + [ "paren.rparen", ")" ], + [ "identifier", "addObject" ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword.control", "return" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "identifier", "count" ], + [ "text", " " ], + [ "support.function.any-method.objc", "decimalNumberByAdding:" ], + [ "identifier", "addObject" ], + [ "punctuation.operator", "." ], + [ "identifier", "count" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.control.macro.objc", "NS_DURING" ], + [ "text", " " ], + [ "keyword.control.macro.objc", "NS_HANDLER" ], + [ "text", " " ], + [ "keyword.control.macro.objc", "NS_ENDHANDLER" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.definition.keyword.objc", "@" ], + [ "keyword.control.exception.objc", "try" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.control", "if" ], + [ "text", " " ], + [ "paren.lparen", "(" ], + [ "identifier", "argc" ], + [ "text", " " ], + [ "keyword.operator", ">" ], + [ "text", " " ], + [ "constant.numeric", "1" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "punctuation.definition.keyword.objc", "@" ], + [ "keyword.control.exception.objc", "throw" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "support.class.cocoa", "NSException" ], + [ "text", " " ], + [ "support.function.any-method.objc", "exceptionWithName:" ], + [ "string.begin.objc", "@\"" ], + [ "string", "Throwing a test exception" ], + [ "punctuation.definition.string.end", "\"" ], + [ "text", " " ], + [ "identifier", "reason" ], + [ "punctuation.operator", ":" ], + [ "string.begin.objc", "@\"" ], + [ "string", "Testing the @throw directive." ], + [ "punctuation.definition.string.end", "\"" ], + [ "text", " " ], + [ "identifier", "userInfo" ], + [ "punctuation.operator", ":" ], + [ "constant.language.objc", "nil" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.definition.keyword.objc", "@" ], + [ "keyword.control.exception.objc", "catch" ], + [ "text", " " ], + [ "paren.lparen", "(" ], + [ "storage.type.id.objc", "id" ], + [ "text", " " ], + [ "identifier", "theException" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.function.cocoa", "NSLog" ], + [ "paren.lparen", "(" ], + [ "string.begin.objc", "@\"" ], + [ "string", "%@" ], + [ "punctuation.definition.string.end", "\"" ], + [ "punctuation.operator", "," ], + [ "text", " " ], + [ "identifier", "theException" ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "result" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "1" ], + [ "text", " " ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.definition.keyword.objc", "@" ], + [ "keyword.control.exception.objc", "finally" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.function.cocoa", "NSLog" ], + [ "paren.lparen", "(" ], + [ "string.begin.objc", "@\"" ], + [ "string", "This always happens." ], + [ "punctuation.definition.string.end", "\"" ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "result" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "2" ], + [ "text", " " ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "punctuation.definition.storage.modifier.objc", "@" ], + [ "storage.modifier.objc", "synchronized" ], + [ "paren.lparen", "(" ], + [ "identifier", "lock" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.function.cocoa", "NSLog" ], + [ "paren.lparen", "(" ], + [ "string.begin.objc", "@\"" ], + [ "string", "Hello World" ], + [ "punctuation.definition.string.end", "\"" ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type", "struct" ], + [ "text", " " ], + [ "paren.lparen", "{" ], + [ "text", " " ], + [ "punctuation.definition.keyword.objc", "@" ], + [ "keyword.other.objc", "defs" ], + [ "paren.lparen", "(" ], + [ "text", " " ], + [ "support.class.cocoa", "NSObject" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type", "char" ], + [ "text", " " ], + [ "keyword.operator", "*" ], + [ "identifier", "enc1" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.definition.keyword.objc", "@" ], + [ "keyword.other.objc", "encode" ], + [ "paren.lparen", "(" ], + [ "storage.type", "int" ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "storage.type.objc", "IBOutlet" ], + [ "text", "|" ], + [ "storage.type.objc", "IBAction" ], + [ "text", "|" ], + [ "storage.type.objc", "BOOL" ], + [ "text", "|" ], + [ "storage.type.objc", "SEL" ], + [ "text", "|" ], + [ "storage.type.id.objc", "id" ], + [ "text", "|" ], + [ "storage.type.objc", "unichar" ], + [ "text", "|" ], + [ "storage.type.objc", "IMP" ], + [ "text", "|" ], + [ "storage.type.objc", "Class" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "punctuation.definition.storage.type.objc", "@" ], + [ "storage.type.objc", "class" ], + [ "text", " " ], + [ "punctuation.definition.storage.type.objc", "@" ], + [ "storage.type.objc", "protocol" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.definition.storage.modifier.objc", "@" ], + [ "storage.modifier.objc", "public" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// instance variables" ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.definition.storage.modifier.objc", "@" ], + [ "storage.modifier.objc", "package" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// instance variables" ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.definition.storage.modifier.objc", "@" ], + [ "storage.modifier.objc", "protected" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// instance variables" ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.definition.storage.modifier.objc", "@" ], + [ "storage.modifier.objc", "private" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// instance variables" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "constant.language.objc", "YES" ], + [ "text", " " ], + [ "constant.language.objc", "NO" ], + [ "text", " " ], + [ "constant.language.objc", "Nil" ], + [ "text", " " ], + [ "constant.language.objc", "nil" ] + ] + }, + { + "state": "start", + "data": [ + [ "support.variable.foundation", "NSApp" ], + [ "paren.lparen", "(" ], + [ "paren.rparen", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "support.function.cocoa.leopard", "NSRectToCGRect" ], + [ "text", " " ], + [ "paren.lparen", "(" ], + [ "identifier", "Protocol" ], + [ "text", " " ], + [ "identifier", "ProtocolFromString" ], + [ "punctuation.operator", ":" ], + [ "string", "\"NSTableViewDelegate\"" ], + [ "paren.rparen", ")" ], + [ "paren.rparen", ")" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.scope.begin.objc", "[" ], + [ "identifier", "SPPoint" ], + [ "text", " " ], + [ "support.function.any-method.objc", "pointFromCGPoint:" ], + [ "identifier", "self" ], + [ "punctuation.operator", "." ], + [ "identifier", "position" ], + [ "paren.rparen", "]" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "support.function.cocoa", "NSRoundDownToMultipleOfPageSize" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "#import" ], + [ "text", " " ], + [ "constant", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type", "int" ], + [ "text", " " ], + [ "identifier", "main" ], + [ "paren.lparen", "(" ], + [ "text", " " ], + [ "storage.type", "int" ], + [ "text", " " ], + [ "identifier", "argc" ], + [ "punctuation.operator", "," ], + [ "text", " " ], + [ "storage.modifier", "const" ], + [ "text", " " ], + [ "storage.type", "char" ], + [ "text", " " ], + [ "keyword.operator", "*" ], + [ "identifier", "argv" ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "punctuation.section.scope.end.objc", "]" ], + [ "text", " " ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.function.C99.c", "printf" ], + [ "paren.lparen", "(" ], + [ "text", " " ], + [ "string", "\"hello world\\n\"" ], + [ "text", " " ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.control", "return" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "support.class.cocoa", "NSChangeSpelling" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "string.begin.objc", "@\"" ], + [ "string", "0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count" ], + [ "punctuation.definition.string.end", "\"" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.definition.storage.type.objc", "@" ], + [ "punctuation.definition.storage.type.objc", "selector" ], + [ "punctuation", "(" ], + [ "support.function.any-method.name-of-parameter.objc", "lowercaseString" ], + [ "punctuation", ")" ], + [ "text", " " ], + [ "punctuation.definition.storage.type.objc", "@" ], + [ "punctuation.definition.storage.type.objc", "selector" ], + [ "punctuation", "(" ], + [ "support.function.any-method.name-of-parameter.objc", "uppercaseString:" ], + [ "punctuation", ")" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "identifier", "NSFetchRequest" ], + [ "text", " " ], + [ "keyword.operator", "*" ], + [ "identifier", "localRequest" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "identifier", "NSFetchRequest" ], + [ "text", " " ], + [ "support.function.any-method.objc", "alloc" ], + [ "paren.rparen", "]" ], + [ "text", " " ], + [ "identifier", "init" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "localRequest" ], + [ "punctuation.operator", "." ], + [ "identifier", "entity" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "identifier", "NSEntityDescription" ], + [ "text", " " ], + [ "support.function.any-method.objc", "entityForName:" ], + [ "string.begin.objc", "@\"" ], + [ "string", "VNSource" ], + [ "punctuation.definition.string.end", "\"" ], + [ "text", " " ], + [ "identifier", "inManagedObjectContext" ], + [ "punctuation.operator", ":" ], + [ "identifier", "context" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "localRequest" ], + [ "punctuation.operator", "." ], + [ "identifier", "sortDescriptors" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "support.class.cocoa", "NSArray" ], + [ "text", " " ], + [ "support.function.any-method.objc", "arrayWithObject:" ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "support.class.cocoa", "NSSortDescriptor" ], + [ "text", " " ], + [ "support.function.any-method.objc", "sortDescriptorWithKey:" ], + [ "string.begin.objc", "@\"" ], + [ "string", "resolution" ], + [ "punctuation.definition.string.end", "\"" ], + [ "text", " " ], + [ "identifier", "ascending" ], + [ "punctuation.operator", ":" ], + [ "constant.language.objc", "YES" ], + [ "paren.rparen", "]" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "support.class.cocoa", "NSPredicate" ], + [ "text", " " ], + [ "keyword.operator", "*" ], + [ "identifier", "predicate" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "support.class.cocoa", "NSPredicate" ], + [ "text", " " ], + [ "support.function.any-method.objc", "predicateWithFormat:" ], + [ "string.begin.objc", "@\"" ], + [ "string", "0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count" ], + [ "punctuation.definition.string.end", "\"" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.scope.begin.objc", "[" ], + [ "support.class.cocoa", "NSPredicate" ], + [ "text", " " ], + [ "support.function.any-method.objc", "predicateWithFormat:" ], + [ "paren.rparen", "]" ] + ] + }, + { + "state": "start", + "data": [ + [ "support.class.cocoa", "NSString" ], + [ "text", " " ], + [ "keyword.operator", "*" ], + [ "identifier", "predicateString" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "support.class.cocoa", "NSString" ], + [ "text", " " ], + [ "support.function.any-method.objc", "stringWithFormat:" ], + [ "string.begin.objc", "@\"" ], + [ "string", "SELF beginsWith[cd] %@" ], + [ "punctuation.definition.string.end", "\"" ], + [ "punctuation.operator", "," ], + [ "text", " " ], + [ "identifier", "searchString" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "support.class.cocoa", "NSPredicate" ], + [ "text", " " ], + [ "keyword.operator", "*" ], + [ "identifier", "pred" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "support.class.cocoa", "NSPredicate" ], + [ "text", " " ], + [ "support.function.any-method.objc", "predicateWithFormat:" ], + [ "identifier", "predicateString" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "support.class.cocoa", "NSArray" ], + [ "text", " " ], + [ "keyword.operator", "*" ], + [ "identifier", "filteredKeys" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "identifier", "myMutableDictionary" ], + [ "text", " " ], + [ "support.function.any-method.objc", "allKeys" ], + [ "paren.rparen", "]" ], + [ "text", " " ], + [ "identifier", "filteredArrayUsingPredicate" ], + [ "punctuation.operator", ":" ], + [ "identifier", "pred" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "identifier", "localRequest" ], + [ "punctuation.operator", "." ], + [ "identifier", "predicate" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "support.class.cocoa", "NSPredicate" ], + [ "text", " " ], + [ "support.function.any-method.objc", "predicateWithFormat:" ], + [ "string.begin.objc", "@\"" ], + [ "string", "whichChart = %@" ], + [ "punctuation.definition.string.end", "\"" ], + [ "text", " " ], + [ "identifier", "argumentArray" ], + [ "punctuation.operator", ":" ], + [ "text", " " ], + [ "identifier", "listChartToDownload" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "localRequest" ], + [ "punctuation.operator", "." ], + [ "identifier", "fetchBatchSize" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "100" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "arrayRequest" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "punctuation.section.scope.begin.objc", "[" ], + [ "identifier", "context" ], + [ "text", " " ], + [ "support.function.any-method.objc", "executeFetchRequest:" ], + [ "identifier", "localRequest" ], + [ "text", " " ], + [ "identifier", "error" ], + [ "punctuation.operator", ":" ], + [ "keyword.operator", "&" ], + [ "identifier", "error1" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "punctuation.section.scope.begin.objc", "[" ], + [ "identifier", "localRequest" ], + [ "text", " " ], + [ "support.function.any-method.objc", "release" ], + [ "paren.rparen", "]" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "#ifndef" ], + [ "text", " " ], + [ "constant.language.objc", "Nil" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "#define" ], + [ "text", " " ], + [ "constant.language.objc", "Nil" ], + [ "text", " " ], + [ "identifier", "__DARWIN_NULL" ], + [ "text", " " ], + [ "comment", "/*" ], + [ "comment", " id of Nil class */" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "#endif" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type.objc", "@implementation" ], + [ "entity.name.type.objc", " MyObject" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.function.objc", "- " ], + [ "paren.lparen", "(" ], + [ "storage.type", "unsigned" ], + [ "text", " " ], + [ "storage.type", "int" ], + [ "paren.rparen", ")" ], + [ "identifier", "areaOfWidth" ], + [ "punctuation.operator", ":" ], + [ "paren.lparen", "(" ], + [ "storage.type", "unsigned" ], + [ "text", " " ], + [ "storage.type", "int" ], + [ "paren.rparen", ")" ], + [ "identifier", "width" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "height" ], + [ "punctuation.operator", ":" ], + [ "paren.lparen", "(" ], + [ "storage.type", "unsigned" ], + [ "text", " " ], + [ "storage.type", "int" ], + [ "paren.rparen", ")" ], + [ "identifier", "height" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.control", "return" ], + [ "text", " " ], + [ "identifier", "width" ], + [ "keyword.operator", "*" ], + [ "identifier", "height" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "storage.type.objc", "@end" ] + ] + }, + { + "state": "start", + "data": [] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_r.json b/lib/ace/mode/_test/tokens_r.json new file mode 100644 index 00000000..c0c784e3 --- /dev/null +++ b/lib/ace/mode/_test/tokens_r.json @@ -0,0 +1,305 @@ +[ + { + "state": "start", + "data": [ + [ "identifier", "Call" ], + [ "keyword.operator", ":" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "lm" ], + [ "paren.keyword.operator", "(" ], + [ "identifier", "formula" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "identifier", "y" ], + [ "text", " " ], + [ "keyword.operator", "~" ], + [ "text", " " ], + [ "identifier", "x" ], + [ "paren.keyword.operator", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "Residuals" ], + [ "keyword.operator", ":" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.numeric", "1" ], + [ "text", " " ], + [ "constant.numeric", "2" ], + [ "text", " " ], + [ "constant.numeric", "3" ], + [ "text", " " ], + [ "constant.numeric", "4" ], + [ "text", " " ], + [ "constant.numeric", "5" ], + [ "text", " " ], + [ "constant.numeric", "6" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.numeric", "3.3333" ], + [ "text", " " ], + [ "keyword.operator", "-" ], + [ "constant.numeric", "0.6667" ], + [ "text", " " ], + [ "keyword.operator", "-" ], + [ "constant.numeric", "2.6667" ], + [ "text", " " ], + [ "keyword.operator", "-" ], + [ "constant.numeric", "2.6667" ], + [ "text", " " ], + [ "keyword.operator", "-" ], + [ "constant.numeric", "0.6667" ], + [ "text", " " ], + [ "constant.numeric", "3.3333" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "Coefficients" ], + [ "keyword.operator", ":" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "Estimate" ], + [ "text", " " ], + [ "identifier", "Std" ], + [ "text", ". " ], + [ "identifier", "Error" ], + [ "text", " " ], + [ "identifier", "t" ], + [ "text", " " ], + [ "identifier", "value" ], + [ "text", " " ], + [ "identifier", "Pr" ], + [ "paren.keyword.operator", "(" ], + [ "keyword.operator", ">" ], + [ "keyword.operator", "|" ], + [ "identifier", "t" ], + [ "keyword.operator", "|" ], + [ "paren.keyword.operator", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "(" ], + [ "identifier", "Intercept" ], + [ "paren.keyword.operator", ")" ], + [ "text", " " ], + [ "keyword.operator", "-" ], + [ "constant.numeric", "9.3333" ], + [ "text", " " ], + [ "constant.numeric", "2.8441" ], + [ "text", " " ], + [ "keyword.operator", "-" ], + [ "constant.numeric", "3.282" ], + [ "text", " " ], + [ "constant.numeric", "0.030453" ], + [ "text", " " ], + [ "keyword.operator", "*" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "x" ], + [ "text", " " ], + [ "constant.numeric", "7.0000" ], + [ "text", " " ], + [ "constant.numeric", "0.7303" ], + [ "text", " " ], + [ "constant.numeric", "9.585" ], + [ "text", " " ], + [ "constant.numeric", "0.000662" ], + [ "text", " " ], + [ "keyword.operator", "*" ], + [ "keyword.operator", "*" ], + [ "keyword.operator", "*" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword.operator", "-" ], + [ "keyword.operator", "-" ], + [ "keyword.operator", "-" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "Signif" ], + [ "text", ". " ], + [ "identifier", "codes" ], + [ "keyword.operator", ":" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "text", " ‘" ], + [ "keyword.operator", "*" ], + [ "keyword.operator", "*" ], + [ "keyword.operator", "*" ], + [ "text", "’ " ], + [ "constant.numeric", "0.001" ], + [ "text", " ‘" ], + [ "keyword.operator", "*" ], + [ "keyword.operator", "*" ], + [ "text", "’ " ], + [ "constant.numeric", "0.01" ], + [ "text", " ‘" ], + [ "keyword.operator", "*" ], + [ "text", "’ " ], + [ "constant.numeric", "0.05" ], + [ "text", " ‘.’ " ], + [ "constant.numeric", "0.1" ], + [ "text", " ‘ ’ " ], + [ "constant.numeric", "1" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "Residual" ], + [ "text", " " ], + [ "identifier", "standard" ], + [ "text", " " ], + [ "identifier", "error" ], + [ "keyword.operator", ":" ], + [ "text", " " ], + [ "constant.numeric", "3.055" ], + [ "text", " " ], + [ "identifier", "on" ], + [ "text", " " ], + [ "constant.numeric", "4" ], + [ "text", " " ], + [ "identifier", "degrees" ], + [ "text", " " ], + [ "identifier", "of" ], + [ "text", " " ], + [ "identifier", "freedom" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "Multiple" ], + [ "text", " " ], + [ "identifier", "R" ], + [ "keyword.operator", "-" ], + [ "identifier", "squared" ], + [ "keyword.operator", ":" ], + [ "text", " " ], + [ "constant.numeric", "0.9583" ], + [ "text", ", " ], + [ "identifier", "Adjusted" ], + [ "text", " " ], + [ "identifier", "R" ], + [ "keyword.operator", "-" ], + [ "identifier", "squared" ], + [ "keyword.operator", ":" ], + [ "text", " " ], + [ "constant.numeric", "0.9478" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.language.boolean", "F" ], + [ "keyword.operator", "-" ], + [ "identifier", "statistic" ], + [ "keyword.operator", ":" ], + [ "text", " " ], + [ "constant.numeric", "91.88" ], + [ "text", " " ], + [ "identifier", "on" ], + [ "text", " " ], + [ "constant.numeric", "1" ], + [ "text", " " ], + [ "identifier", "and" ], + [ "text", " " ], + [ "constant.numeric", "4" ], + [ "text", " " ], + [ "identifier", "DF" ], + [ "text", ", " ], + [ "identifier", "p" ], + [ "keyword.operator", "-" ], + [ "identifier", "value" ], + [ "keyword.operator", ":" ], + [ "text", " " ], + [ "constant.numeric", "0.000662" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword.operator", ">" ], + [ "text", " " ], + [ "identifier", "par" ], + [ "paren.keyword.operator", "(" ], + [ "identifier", "mfrow" ], + [ "keyword.operator", "=" ], + [ "identifier", "c" ], + [ "paren.keyword.operator", "(" ], + [ "constant.numeric", "2" ], + [ "text", ", " ], + [ "constant.numeric", "2" ], + [ "paren.keyword.operator", ")" ], + [ "paren.keyword.operator", ")" ], + [ "text", " " ], + [ "comment", "# Request 2x2 plot layout" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword.operator", ">" ], + [ "text", " " ], + [ "identifier", "plot" ], + [ "paren.keyword.operator", "(" ], + [ "identifier", "lm_1" ], + [ "paren.keyword.operator", ")" ], + [ "text", " " ], + [ "comment", "# Diagnostic plot of regression model" ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_rdoc.json b/lib/ace/mode/_test/tokens_rdoc.json new file mode 100644 index 00000000..41545f26 --- /dev/null +++ b/lib/ace/mode/_test/tokens_rdoc.json @@ -0,0 +1,721 @@ +[ + { + "state": "start", + "data": [ + [ "keyword", "\\name" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "picker" ], + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "\\alias" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "picker" ], + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "\\title" ], + [ "paren.keyword.operator", "{" ], + [ "text", "Create a picker control" ], + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "\\description" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " Create a picker control to enable manipulation of plot variables based on a set of fixed choices." ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "nospell", + "data": [ + [ "keyword", "\\usage" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", "picker" ], + [ "paren.keyword.operator", "(" ], + [ "text", "...," ], + [ "nospell.text", " " ], + [ "nospell.text", "initial" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "NULL" ], + [ "text", "," ], + [ "nospell.text", " " ], + [ "nospell.text", "label" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "NULL" ], + [ "paren.keyword.operator", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "\\arguments" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\item" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\dots" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " Arguments containing objects to be presented as choices for the picker " ], + [ "paren.keyword.operator", "(" ], + [ "text", "or a list containing the choices" ], + [ "paren.keyword.operator", ")" ], + [ "text", ". If an element is named then the name is used to display it within the picker. If an element is not named then it is displayed within the picker using " ], + [ "keyword", "\\code" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\link" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "as" ], + [ "text", "." ], + [ "nospell.text", "character" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}" ], + [ "text", ". " ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\item" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "initial" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " Initial value for picker. Value must be present in the list of choices specified. If not specified defaults to the first choice." ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\item" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "label" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " Display label for picker. Defaults to the variable name if not specified." ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "\\value" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " An object of class \"manipulator.picker\" which can be passed to the " ], + [ "keyword", "\\code" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\link" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "manipulate" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}" ], + [ "text", " function." ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "\\seealso" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "\\code" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\link" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "manipulate" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}" ], + [ "text", ", " ], + [ "keyword", "\\code" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\link" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "slider" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}" ], + [ "text", ", " ], + [ "keyword", "\\code" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\link" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "checkbox" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}" ], + [ "text", ", " ], + [ "keyword", "\\code" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\link" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "button" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "nospell", + "data": [ + [ "keyword", "\\examples" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "keyword", "\\dontrun" ], + [ "paren.keyword.operator", "{" ] + ] + }, + { + "state": "nospell", + "data": [] + }, + { + "state": "nospell", + "data": [ + [ "text", "##" ], + [ "nospell.text", " " ], + [ "nospell.text", "Filtering" ], + [ "nospell.text", " " ], + [ "nospell.text", "data" ], + [ "nospell.text", " " ], + [ "nospell.text", "with" ], + [ "nospell.text", " " ], + [ "nospell.text", "a" ], + [ "nospell.text", " " ], + [ "nospell.text", "picker" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", "manipulate" ], + [ "paren.keyword.operator", "(" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "barplot" ], + [ "paren.keyword.operator", "(" ], + [ "nospell.text", "as" ], + [ "text", "." ], + [ "nospell.text", "matrix" ], + [ "paren.keyword.operator", "(" ], + [ "nospell.text", "longley" ], + [ "paren.keyword.operator", "[" ], + [ "text", "," ], + [ "nospell.text", "factor" ], + [ "paren.keyword.operator", "]" ], + [ "paren.keyword.operator", ")" ], + [ "text", "," ], + [ "nospell.text", " " ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "beside" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "TRUE" ], + [ "text", "," ], + [ "nospell.text", " " ], + [ "nospell.text", "main" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "factor" ], + [ "paren.keyword.operator", ")" ], + [ "text", "," ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "factor" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "picker" ], + [ "paren.keyword.operator", "(" ], + [ "text", "\"" ], + [ "nospell.text", "GNP" ], + [ "text", "\"," ], + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "Unemployed" ], + [ "text", "\"," ], + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "Employed" ], + [ "text", "\"" ], + [ "paren.keyword.operator", ")" ], + [ "paren.keyword.operator", ")" ] + ] + }, + { + "state": "nospell", + "data": [] + }, + { + "state": "nospell", + "data": [ + [ "text", "##" ], + [ "nospell.text", " " ], + [ "nospell.text", "Create" ], + [ "nospell.text", " " ], + [ "nospell.text", "a" ], + [ "nospell.text", " " ], + [ "nospell.text", "picker" ], + [ "nospell.text", " " ], + [ "nospell.text", "with" ], + [ "nospell.text", " " ], + [ "nospell.text", "labels" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", "manipulate" ], + [ "paren.keyword.operator", "(" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "plot" ], + [ "paren.keyword.operator", "(" ], + [ "nospell.text", "pressure" ], + [ "text", "," ], + [ "nospell.text", " " ], + [ "nospell.text", "type" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "type" ], + [ "paren.keyword.operator", ")" ], + [ "text", "," ], + [ "nospell.text", " " ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "type" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "picker" ], + [ "paren.keyword.operator", "(" ], + [ "text", "\"" ], + [ "nospell.text", "points" ], + [ "text", "\"" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "p" ], + [ "text", "\"," ], + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "line" ], + [ "text", "\"" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "l" ], + [ "text", "\"," ], + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "step" ], + [ "text", "\"" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "s" ], + [ "text", "\"" ], + [ "paren.keyword.operator", ")" ], + [ "paren.keyword.operator", ")" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ] + ] + }, + { + "state": "nospell", + "data": [ + [ "text", "##" ], + [ "nospell.text", " " ], + [ "nospell.text", "Picker" ], + [ "nospell.text", " " ], + [ "nospell.text", "with" ], + [ "nospell.text", " " ], + [ "nospell.text", "groups" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", "manipulate" ], + [ "paren.keyword.operator", "(" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "barplot" ], + [ "paren.keyword.operator", "(" ], + [ "nospell.text", "as" ], + [ "text", "." ], + [ "nospell.text", "matrix" ], + [ "paren.keyword.operator", "(" ], + [ "nospell.text", "mtcars" ], + [ "paren.keyword.operator", "[" ], + [ "nospell.text", "group" ], + [ "text", ",\"" ], + [ "nospell.text", "mpg" ], + [ "text", "\"" ], + [ "paren.keyword.operator", "]" ], + [ "paren.keyword.operator", ")" ], + [ "text", "," ], + [ "nospell.text", " " ], + [ "nospell.text", "beside" ], + [ "text", "=" ], + [ "nospell.text", "TRUE" ], + [ "paren.keyword.operator", ")" ], + [ "text", "," ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "group" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "picker" ], + [ "paren.keyword.operator", "(" ], + [ "text", "\"" ], + [ "nospell.text", "Group" ], + [ "nospell.text", " " ], + [ "nospell.text", "1" ], + [ "text", "\"" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "1" ], + [ "text", ":" ], + [ "nospell.text", "11" ], + [ "text", "," ], + [ "nospell.text", " " ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "Group" ], + [ "nospell.text", " " ], + [ "nospell.text", "2" ], + [ "text", "\"" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "12" ], + [ "text", ":" ], + [ "nospell.text", "22" ], + [ "text", "," ], + [ "nospell.text", " " ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "Group" ], + [ "nospell.text", " " ], + [ "nospell.text", "3" ], + [ "text", "\"" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "23" ], + [ "text", ":" ], + [ "nospell.text", "32" ], + [ "paren.keyword.operator", ")" ], + [ "paren.keyword.operator", ")" ] + ] + }, + { + "state": "nospell", + "data": [] + }, + { + "state": "nospell", + "data": [ + [ "text", "##" ], + [ "nospell.text", " " ], + [ "nospell.text", "Histogram" ], + [ "nospell.text", " " ], + [ "nospell.text", "w" ], + [ "text", "/" ], + [ "nospell.text", " " ], + [ "nospell.text", "picker" ], + [ "nospell.text", " " ], + [ "nospell.text", "to" ], + [ "nospell.text", " " ], + [ "nospell.text", "select" ], + [ "nospell.text", " " ], + [ "nospell.text", "type" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", "require" ], + [ "paren.keyword.operator", "(" ], + [ "nospell.text", "lattice" ], + [ "paren.keyword.operator", ")" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", "require" ], + [ "paren.keyword.operator", "(" ], + [ "nospell.text", "stats" ], + [ "paren.keyword.operator", ")" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", "manipulate" ], + [ "paren.keyword.operator", "(" ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "histogram" ], + [ "paren.keyword.operator", "(" ], + [ "text", "~" ], + [ "nospell.text", " " ], + [ "nospell.text", "height" ], + [ "nospell.text", " " ], + [ "text", "|" ], + [ "nospell.text", " " ], + [ "nospell.text", "voice" ], + [ "text", "." ], + [ "nospell.text", "part" ], + [ "text", "," ], + [ "nospell.text", " " ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "data" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "singer" ], + [ "text", "," ], + [ "nospell.text", " " ], + [ "nospell.text", "type" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "type" ], + [ "paren.keyword.operator", ")" ], + [ "text", "," ] + ] + }, + { + "state": "nospell", + "data": [ + [ "nospell.text", " " ], + [ "nospell.text", "type" ], + [ "nospell.text", " " ], + [ "text", "=" ], + [ "nospell.text", " " ], + [ "nospell.text", "picker" ], + [ "paren.keyword.operator", "(" ], + [ "text", "\"" ], + [ "nospell.text", "percent" ], + [ "text", "\"," ], + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "count" ], + [ "text", "\"," ], + [ "nospell.text", " " ], + [ "text", "\"" ], + [ "nospell.text", "density" ], + [ "text", "\"" ], + [ "paren.keyword.operator", ")" ], + [ "paren.keyword.operator", ")" ] + ] + }, + { + "state": "nospell", + "data": [] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.keyword.operator", "}" ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_rhtml.json b/lib/ace/mode/_test/tokens_rhtml.json new file mode 100644 index 00000000..d25a1077 --- /dev/null +++ b/lib/ace/mode/_test/tokens_rhtml.json @@ -0,0 +1,168 @@ +[ + { + "state": "start", + "data": [ + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "html" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "head" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "title" ], + [ "meta.tag", ">" ], + [ "text", "Title" ], + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "body" ], + [ "meta.tag", ">" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "p" ], + [ "meta.tag", ">" ], + [ "text", "This is an R HTML document. When you click the " ], + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "b" ], + [ "meta.tag", ">" ], + [ "text", "Knit HTML" ], + [ "meta.tag", "" ], + [ "text", " button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:" ], + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "r-start", + "data": [ + [ "support.function.codebegin", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "<" ], + [ "meta.tag.tag-name", "p" ], + [ "meta.tag", ">" ], + [ "text", "You can also embed plots, for example:" ], + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "r-start", + "data": [ + [ "support.function.codebegin", "" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [ + [ "meta.tag", "" ] + ] + }, + { + "state": "start", + "data": [] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_ruby.json b/lib/ace/mode/_test/tokens_ruby.json index 02160407..ee4106b7 100644 --- a/lib/ace/mode/_test/tokens_ruby.json +++ b/lib/ace/mode/_test/tokens_ruby.json @@ -92,7 +92,7 @@ [ "text", " " ], [ "identifier", "fact" ], [ "paren.lparen", "(" ], - [ "variable.class", "ARGV" ], + [ "support.class", "ARGV" ], [ "paren.lparen", "[" ], [ "constant.numeric", "0" ], [ "paren.rparen", "]" ], @@ -100,5 +100,121 @@ [ "identifier", "to_i" ], [ "paren.rparen", ")" ] ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "class" ], + [ "text", " " ], + [ "support.class", "Range" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "def" ], + [ "text", " " ], + [ "identifier", "to_json" ], + [ "paren.lparen", "(" ], + [ "keyword.operator", "*" ], + [ "identifier", "a" ], + [ "paren.rparen", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "string", "'json_class'" ], + [ "text", " " ], + [ "punctuation.separator.key-value", "=>" ], + [ "text", " " ], + [ "variable.language", "self" ], + [ "text", "." ], + [ "keyword", "class" ], + [ "text", "." ], + [ "identifier", "name" ], + [ "text", ", " ], + [ "comment", "# = 'Range'" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "string", "'data'" ], + [ "text", " " ], + [ "punctuation.separator.key-value", "=>" ], + [ "text", " " ], + [ "paren.lparen", "[" ], + [ "text", " " ], + [ "identifier", "first" ], + [ "text", ", " ], + [ "identifier", "last" ], + [ "text", ", " ], + [ "identifier", "exclude_end" ], + [ "text", "? " ], + [ "paren.rparen", "]" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ], + [ "text", "." ], + [ "identifier", "to_json" ], + [ "paren.lparen", "(" ], + [ "keyword.operator", "*" ], + [ "identifier", "a" ], + [ "paren.rparen", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "end" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "end" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "paren.lparen", "{" ], + [ "constant.other.symbol.ruby", ":id" ], + [ "text", " " ], + [ "punctuation.separator.key-value", "=>" ], + [ "text", " " ], + [ "constant.numeric", "34" ], + [ "text", ", " ], + [ "constant.other.symbol.ruby", ":sdfasdfasdf" ], + [ "text", " " ], + [ "punctuation.separator.key-value", "=>" ], + [ "text", " " ], + [ "string", "\"asdasdads\"" ], + [ "paren.rparen", "}" ] + ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_sh.json b/lib/ace/mode/_test/tokens_sh.json index 582282fb..8db30226 100644 --- a/lib/ace/mode/_test/tokens_sh.json +++ b/lib/ace/mode/_test/tokens_sh.json @@ -110,7 +110,7 @@ [ "text", " " ], [ "variable", "repo=" ], [ "text", "`" ], - [ "constant.language", "echo" ], + [ "support.function.builtin", "echo" ], [ "text", " " ], [ "variable", "$remote" ], [ "text", " | " ], @@ -131,7 +131,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "echo" ], + [ "support.function.builtin", "echo" ], [ "text", " " ], [ "variable", "$repo" ], [ "text", " | " ], @@ -152,7 +152,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "exit" ], + [ "support.function.builtin", "exit" ], [ "text", " " ], [ "constant.numeric", "1" ] ] @@ -172,7 +172,7 @@ [ "text", " " ], [ "variable", "repo=" ], [ "text", "`" ], - [ "constant.language", "echo" ], + [ "support.function.builtin", "echo" ], [ "text", " " ], [ "variable", "$remote" ], [ "text", " | " ], @@ -193,7 +193,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "echo" ], + [ "support.function.builtin", "echo" ], [ "text", " " ], [ "variable", "$repo" ], [ "text", " | " ], @@ -219,7 +219,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "exit" ], + [ "support.function.builtin", "exit" ], [ "text", " " ], [ "constant.numeric", "1" ] ] @@ -239,7 +239,7 @@ [ "text", " " ], [ "variable", "repo=" ], [ "text", "`" ], - [ "constant.language", "echo" ], + [ "support.function.builtin", "echo" ], [ "text", " " ], [ "variable", "$remote" ], [ "text", " | " ], @@ -260,7 +260,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "echo" ], + [ "support.function.builtin", "echo" ], [ "text", " " ], [ "variable", "$repo" ], [ "text", " | " ], @@ -281,7 +281,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "exit" ], + [ "support.function.builtin", "exit" ], [ "text", " " ], [ "constant.numeric", "1" ] ] @@ -328,7 +328,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "echo" ], + [ "support.function.builtin", "echo" ], [ "text", " " ], [ "string", "\"Couldn't find a valid remote\"" ], [ "text", " " ], @@ -340,7 +340,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "exit" ], + [ "support.function.builtin", "exit" ], [ "text", " " ], [ "constant.numeric", "1" ] ] @@ -401,7 +401,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "echo" ], + [ "support.function.builtin", "echo" ], [ "text", " " ], [ "string", "\"http://github.com/$repo/pull/new/${branch##refs/heads/}\"" ] ] @@ -416,7 +416,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "constant.language", "exit" ], + [ "support.function.builtin", "exit" ], [ "text", " " ], [ "constant.numeric", "1" ] ] diff --git a/lib/ace/mode/_test/tokens_stylus.json b/lib/ace/mode/_test/tokens_stylus.json new file mode 100644 index 00000000..d2816fad --- /dev/null +++ b/lib/ace/mode/_test/tokens_stylus.json @@ -0,0 +1,428 @@ +[ + { + "state": "start", + "data": [ + [ "comment", "// I'm a comment!" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "comment", + "data": [ + [ "comment", "/*" ] + ] + }, + { + "state": "comment", + "data": [ + [ "comment", " * Adds the given numbers together." ] + ] + }, + { + "state": "start", + "data": [ + [ "comment", " */" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "comment", + "data": [ + [ "comment", "/*!" ] + ] + }, + { + "state": "comment", + "data": [ + [ "comment", " * Adds the given numbers together." ] + ] + }, + { + "state": "start", + "data": [ + [ "comment", " */" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "entity.name.function.stylus", "asdasdasdad" ], + [ "text", "(df, ad" ], + [ "keyword.operator.stylus", "=" ], + [ "constant.numeric", "23" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "entity.name.function.stylus", "add" ], + [ "text", "(" ], + [ "entity.name.tag.stylus", "a" ], + [ "text", ", " ], + [ "entity.name.tag.stylus", "b" ], + [ "text", " " ], + [ "keyword.operator.stylus", "=" ], + [ "text", " " ], + [ "entity.name.tag.stylus", "a" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "entity.name.tag.stylus", "a" ], + [ "text", " " ], + [ "keyword.operator.stylus", "+" ], + [ "text", " " ], + [ "entity.name.tag.stylus", "b" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.name.function.stylus", "green" ], + [ "text", "(" ], + [ "constant.numeric", "#0c0" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " add(" ], + [ "constant.numeric", "10" ], + [ "text", ", " ], + [ "constant.numeric", "5" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "// => 15" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " add(" ], + [ "constant.numeric", "10" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " add(" ], + [ "entity.name.tag.stylus", "a" ], + [ "text", ", " ], + [ "entity.name.tag.stylus", "b" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "entity.language.stylus", " &" ], + [ "text", "asdasd" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " (" ], + [ "variable.language.stylus", "arguments" ], + [ "text", ")" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.stylus", "@sdfsdf" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.other.attribute-name.class.stylus", ".signatures" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "background-color" ], + [ "text", " " ], + [ "constant.numeric", "#e0e8e0" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "border" ], + [ "text", " " ], + [ "constant.numeric", "1" ], + [ "keyword", "px" ], + [ "text", " " ], + [ "keyword", "s" ], + [ "text", "olid grayLighter" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "box-shadow" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "text", " " ], + [ "constant.numeric", "3" ], + [ "keyword", "px" ], + [ "text", " grayLightest" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "border-radius" ], + [ "text", " " ], + [ "constant.numeric", "3" ], + [ "keyword", "px" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "padding" ], + [ "text", " " ], + [ "constant.numeric", "3" ], + [ "keyword", "px" ], + [ "text", " " ], + [ "constant.numeric", "5" ], + [ "keyword", "px" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "string", "\"adsads\"" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "margin-left" ], + [ "text", " " ], + [ "constant.numeric", "0" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "list-style" ], + [ "text", " " ], + [ "support.constant", "none" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.other.attribute-name.class.stylus", ".signature" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "list-style" ], + [ "text", " " ], + [ "support.constant", "none" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "display" ], + [ "text", ": " ], + [ "keyword", "in" ], + [ "support.constant", "line" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "margin-left" ], + [ "text", " " ], + [ "constant.numeric", "0" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.operator.stylus", ">" ], + [ "text", " " ], + [ "entity.name.tag.stylus", "li" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "display" ], + [ "text", " " ], + [ "keyword", "in" ], + [ "support.constant", "line" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword.operator.stylus", "is" ], + [ "text", " " ], + [ "keyword.operator.stylus", "not" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.other.attribute-name.class.stylus", ".signature-values" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "list-style" ], + [ "text", " " ], + [ "support.constant", "none" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "display" ], + [ "text", " " ], + [ "keyword", "in" ], + [ "support.constant", "line" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "margin-left" ], + [ "text", " " ], + [ "constant.numeric", "0" ] + ] + }, + { + "state": "start", + "data": [ + [ "entity.language.stylus", " &" ], + [ "punctuation", ":" ], + [ "entity.other.attribute-name.pseudo-element.css", "before" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "content" ], + [ "text", " " ], + [ "string", "'→'" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "support.type", "margin" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "text", " " ], + [ "constant.numeric", "5" ], + [ "keyword", "px" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.operator.stylus", ">" ], + [ "text", " " ], + [ "entity.name.tag.stylus", "li" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.control.stylus", "!important" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword.control.stylus", "unless" ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_svg.json b/lib/ace/mode/_test/tokens_svg.json index ed1beb9b..bba445bc 100644 --- a/lib/ace/mode/_test/tokens_svg.json +++ b/lib/ace/mode/_test/tokens_svg.json @@ -637,6 +637,7 @@ [ "text", " " ], [ "paren.rparen", "]" ], [ "paren.rparen", "]" ], + [ "keyword.operator", ">" ], [ "meta.tag", "" ] diff --git a/lib/ace/mode/_test/tokens_tcl.json b/lib/ace/mode/_test/tokens_tcl.json index 2f13af3e..4d59cf8e 100644 --- a/lib/ace/mode/_test/tokens_tcl.json +++ b/lib/ace/mode/_test/tokens_tcl.json @@ -41,7 +41,7 @@ [ "paren.rparen", "}" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "graph" ], + [ "variable.instance", "graph" ], [ "text", " " ], [ "paren.lparen", "{" ] ] @@ -57,7 +57,7 @@ [ "identifier", "dist" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "vertex" ], + [ "variable.instance", "vertex" ], [ "text", " " ], [ "identifier", "Inf" ] ] @@ -73,7 +73,7 @@ [ "identifier", "path" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "vertex" ], + [ "variable.instance", "vertex" ], [ "text", " " ], [ "paren.lparen", "{" ], [ "text", "}" ] @@ -96,7 +96,7 @@ [ "identifier", "dist" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "origin" ], + [ "variable.instance", "origin" ], [ "text", " 0" ] ] }, @@ -111,13 +111,13 @@ [ "identifier", "path" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "origin" ], + [ "variable.instance", "origin" ], [ "text", " " ], [ "paren.lparen", "[" ], [ "keyword", "list" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "origin" ], + [ "variable.instance", "origin" ], [ "paren.rparen", "]" ] ] }, @@ -140,7 +140,7 @@ [ "identifier", "size" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "graph" ], + [ "variable.instance", "graph" ], [ "paren.rparen", "]" ], [ "paren.rparen", "}" ], [ "text", " " ], @@ -180,7 +180,7 @@ [ "paren.rparen", "}" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "graph" ], + [ "variable.instance", "graph" ], [ "text", " " ], [ "paren.lparen", "{" ] ] @@ -193,7 +193,7 @@ [ "text", " " ], [ "paren.lparen", "{" ], [ "variable.instancce", "$" ], - [ "variable.instancce", "d" ], + [ "variable.instance", "d" ], [ "text", " " ], [ "support.function", ">" ], [ "text", " " ], @@ -208,10 +208,10 @@ [ "identifier", "get" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "dist" ], + [ "variable.instance", "dist" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "uu" ], + [ "variable.instance", "uu" ], [ "paren.rparen", "]" ], [ "paren.rparen", "]" ], [ "paren.rparen", "}" ], @@ -228,7 +228,7 @@ [ "identifier", "u" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "uu" ] + [ "variable.instance", "uu" ] ] }, { @@ -240,7 +240,7 @@ [ "identifier", "d" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "dd" ] + [ "variable.instance", "dd" ] ] }, { @@ -276,7 +276,7 @@ [ "text", " " ], [ "paren.lparen", "{" ], [ "variable.instancce", "$" ], - [ "variable.instancce", "d" ], + [ "variable.instance", "d" ], [ "text", " " ], [ "support.function", "==" ], [ "text", " " ], @@ -325,10 +325,10 @@ [ "identifier", "get" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "graph" ], + [ "variable.instance", "graph" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "u" ], + [ "variable.instance", "u" ], [ "paren.rparen", "]" ], [ "text", " " ], [ "paren.lparen", "{" ] @@ -347,10 +347,10 @@ [ "identifier", "exists" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "graph" ], + [ "variable.instance", "graph" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "v" ], + [ "variable.instance", "v" ], [ "paren.rparen", "]" ], [ "paren.rparen", "}" ], [ "text", " " ], @@ -370,12 +370,12 @@ [ "text", " " ], [ "paren.lparen", "{" ], [ "variable.instancce", "$" ], - [ "variable.instancce", "d" ], + [ "variable.instance", "d" ], [ "text", " " ], [ "support.function", "+" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "dd" ], + [ "variable.instance", "dd" ], [ "paren.rparen", "}" ], [ "paren.rparen", "]" ] ] @@ -388,7 +388,7 @@ [ "text", " " ], [ "paren.lparen", "{" ], [ "variable.instancce", "$" ], - [ "variable.instancce", "alt" ], + [ "variable.instance", "alt" ], [ "text", " " ], [ "support.function", "<" ], [ "text", " " ], @@ -398,10 +398,10 @@ [ "identifier", "get" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "dist" ], + [ "variable.instance", "dist" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "v" ], + [ "variable.instance", "v" ], [ "paren.rparen", "]" ], [ "paren.rparen", "}" ], [ "text", " " ], @@ -419,10 +419,10 @@ [ "identifier", "dist" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "v" ], + [ "variable.instance", "v" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "alt" ] + [ "variable.instance", "alt" ] ] }, { @@ -436,7 +436,7 @@ [ "identifier", "path" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "v" ], + [ "variable.instance", "v" ], [ "text", " " ], [ "paren.lparen", "[" ], [ "keyword", "list" ], @@ -448,14 +448,14 @@ [ "identifier", "get" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "path" ], + [ "variable.instance", "path" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "u" ], + [ "variable.instance", "u" ], [ "paren.rparen", "]" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "v" ], + [ "variable.instance", "v" ], [ "paren.rparen", "]" ] ] }, @@ -501,7 +501,7 @@ [ "identifier", "graph" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "u" ] + [ "variable.instance", "u" ] ] }, { @@ -520,10 +520,10 @@ [ "keyword", "list" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "dist" ], + [ "variable.instance", "dist" ], [ "text", " " ], [ "variable.instancce", "$" ], - [ "variable.instancce", "path" ], + [ "variable.instance", "path" ], [ "paren.rparen", "]" ] ] }, diff --git a/lib/ace/mode/_test/tokens_tex.json b/lib/ace/mode/_test/tokens_tex.json new file mode 100644 index 00000000..1ecc6211 --- /dev/null +++ b/lib/ace/mode/_test/tokens_tex.json @@ -0,0 +1,194 @@ +[ + { + "state": "start", + "data": [ + [ "text", "The quadratic formula is $$-b " ], + [ "keyword", "\\pm" ], + [ "text", " " ], + [ "keyword", "\\sqrt" ], + [ "paren.keyword.operator", "{" ], + [ "text", "b^2 - 4ac" ], + [ "paren.keyword.operator", "}" ], + [ "text", " " ], + [ "keyword", "\\over" ], + [ "text", " 2a$$" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "\\bye" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "\\makeatletter" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\newcommand" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\be" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "{" ], + [ "comment", "%" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\begingroup" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "comment", "% \\setlength{\\arraycolsep}{2pt}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\eqnarray" ], + [ "comment", "%" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\@" ], + [ "text", "ifstar" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\nonumber" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "{" ], + [ "paren.keyword.operator", "}" ], + [ "comment", "%" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\newcommand" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\ee" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "{" ], + [ "keyword", "\\endeqnarray\\endgroup" ], + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\makeatother" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\begin" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "equation" ], + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " x=" ], + [ "keyword", "\\left\\" ], + [ "paren.keyword.operator", "{" ], + [ "text", " " ], + [ "keyword", "\\begin" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "array" ], + [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "{" ], + [ "text", "cl" ], + [ "paren.keyword.operator", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " 0 & " ], + [ "keyword", "\\textrm" ], + [ "paren.keyword.operator", "{" ], + [ "text", "if " ], + [ "paren.keyword.operator", "}" ], + [ "text", "A=" ], + [ "keyword", "\\ldots\\\\" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " 1 & " ], + [ "keyword", "\\textrm" ], + [ "paren.keyword.operator", "{" ], + [ "text", "if " ], + [ "paren.keyword.operator", "}" ], + [ "text", "B=" ], + [ "keyword", "\\ldots\\\\" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " x & " ], + [ "keyword", "\\textrm" ], + [ "paren.keyword.operator", "{" ], + [ "text", "this runs with as much text as you like, but without an raggeright text" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", "." ], + [ "paren.keyword.operator", "}" ], + [ "keyword", "\\end" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "array" ], + [ "paren.keyword.operator", "}" ], + [ "keyword", "\\right" ], + [ "text", "." ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "\\end" ], + [ "paren.keyword.operator", "{" ], + [ "nospell.text", "equation" ], + [ "paren.keyword.operator", "}" ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_typescript.json b/lib/ace/mode/_test/tokens_typescript.json new file mode 100644 index 00000000..4923d708 --- /dev/null +++ b/lib/ace/mode/_test/tokens_typescript.json @@ -0,0 +1,769 @@ +[ + { + "state": "regex_allowed", + "data": [ + [ "keyword.operator.ts", "class" ], + [ "text", " " ], + [ "identifier", "Greeter" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", "\t" ], + [ "variable.parameter.function.ts", "greeting" ], + [ "text", ": " ], + [ "variable.parameter.function.ts", "string" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", "\t" ], + [ "keyword.operator.ts", "constructor" ], + [ "text", " " ], + [ "paren.lparen", "(" ], + [ "variable.parameter.function.ts", "message" ], + [ "text", ": " ], + [ "variable.parameter.function.ts", "string" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", "\t\t" ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "greeting" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "identifier", "message" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", "\t" ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", "\t" ], + [ "entity.name.function.ts", "greet" ], + [ "paren.lparen", "(" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", "\t\t" ], + [ "keyword", "return" ], + [ "text", " " ], + [ "string", "\"Hello, \"" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "greeting" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", "\t" ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ], + [ "text", " " ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "regex_allowed", + "data": [ + [ "storage.type", "var" ], + [ "text", " " ], + [ "identifier", "greeter" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "keyword", "new" ], + [ "text", " " ], + [ "identifier", "Greeter" ], + [ "paren.lparen", "(" ], + [ "string", "\"world\"" ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "storage.type", "var" ], + [ "text", " " ], + [ "identifier", "button" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "variable.language", "document" ], + [ "punctuation.operator", "." ], + [ "support.function.dom", "createElement" ], + [ "paren.lparen", "(" ], + [ "string", "'button'" ], + [ "paren.rparen", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "identifier", "button" ], + [ "punctuation.operator", "." ], + [ "identifier", "innerText" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "string", "\"Say Hello\"" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "storage.type", "button" ], + [ "punctuation.operator", "." ], + [ "entity.name.function", "onclick" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "storage.type", "function" ], + [ "paren.lparen", "(" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", "\t" ], + [ "support.function", "alert" ], + [ "paren.lparen", "(" ], + [ "entity.name.function.ts", "greeter.greet" ], + [ "paren.lparen", "(" ], + [ "paren.rparen", ")" ], + [ "paren.rparen", ")" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "variable.language", "document" ], + [ "punctuation.operator", "." ], + [ "identifier", "body" ], + [ "punctuation.operator", "." ], + [ "support.function.dom", "appendChild" ], + [ "paren.lparen", "(" ], + [ "identifier", "button" ], + [ "paren.rparen", ")" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "regex_allowed", + "data": [ + [ "keyword.operator.ts", "class" ], + [ "text", " " ], + [ "identifier", "Snake" ], + [ "text", " " ], + [ "keyword.operator.ts", "extends" ], + [ "text", " " ], + [ "identifier", "Animal" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "entity.name.function.ts", "move" ], + [ "paren.lparen", "(" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "support.function", "alert" ], + [ "paren.lparen", "(" ], + [ "string", "\"Slithering...\"" ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "storage.type.variable.ts", "super" ], + [ "text", "(" ], + [ "keyword.other.ts", "5" ], + [ "text", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "regex_allowed", + "data": [ + [ "keyword.operator.ts", "class" ], + [ "text", " " ], + [ "identifier", "Horse" ], + [ "text", " " ], + [ "keyword.operator.ts", "extends" ], + [ "text", " " ], + [ "identifier", "Animal" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "entity.name.function.ts", "move" ], + [ "paren.lparen", "(" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "support.function", "alert" ], + [ "paren.lparen", "(" ], + [ "string", "\"Galloping...\"" ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "super" ], + [ "punctuation.operator", "." ], + [ "identifier", "move" ], + [ "paren.lparen", "(" ], + [ "constant.numeric", "45" ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword.operator.ts", "module" ], + [ "text", " " ], + [ "variable.parameter.function.ts", "Sayings" ], + [ "text", " {" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "export" ], + [ "text", " " ], + [ "keyword.operator.ts", "class" ], + [ "text", " " ], + [ "identifier", "Greeter" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "variable.parameter.function.ts", "greeting" ], + [ "text", ": " ], + [ "variable.parameter.function.ts", "string" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "constructor" ], + [ "text", " " ], + [ "paren.lparen", "(" ], + [ "variable.parameter.function.ts", "message" ], + [ "text", ": " ], + [ "variable.parameter.function.ts", "string" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "greeting" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "identifier", "message" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "entity.name.function.ts", "greet" ], + [ "paren.lparen", "(" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword", "return" ], + [ "text", " " ], + [ "string", "\"Hello, \"" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "greeting" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword.operator.ts", "module" ], + [ "text", " " ], + [ "variable.parameter.function.ts", "Mankala" ], + [ "text", " {" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "export" ], + [ "text", " " ], + [ "keyword.operator.ts", "class" ], + [ "text", " " ], + [ "identifier", "Features" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "public" ], + [ "text", " " ], + [ "identifier", "turnContinues" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.language.boolean", "false" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "public" ], + [ "text", " " ], + [ "identifier", "seedStoredCount" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "public" ], + [ "text", " " ], + [ "identifier", "capturedCount" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "public" ], + [ "text", " " ], + [ "identifier", "spaceCaptured" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "identifier", "NoSpace" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "public" ], + [ "text", " " ], + [ "entity.name.function.ts", "clear" ], + [ "paren.lparen", "(" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "turnContinues" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.language.boolean", "false" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "seedStoredCount" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "capturedCount" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "spaceCaptured" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "identifier", "NoSpace" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword.operator.ts", "public" ], + [ "text", " " ], + [ "entity.name.function.ts", "toString" ], + [ "paren.lparen", "(" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "storage.type", "var" ], + [ "text", " " ], + [ "identifier", "stringBuilder" ], + [ "text", " " ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "string", "\"\"" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword", "if" ], + [ "text", " " ], + [ "paren.lparen", "(" ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "turnContinues" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "identifier", "stringBuilder" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "string", "\" turn continues,\"" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "identifier", "stringBuilder" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "string", "\" stores \"" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "seedStoredCount" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword", "if" ], + [ "text", " " ], + [ "paren.lparen", "(" ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "capturedCount" ], + [ "text", " " ], + [ "keyword.operator", ">" ], + [ "text", " " ], + [ "constant.numeric", "0" ], + [ "paren.rparen", ")" ], + [ "text", " " ], + [ "paren.lparen", "{" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "identifier", "stringBuilder" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "keyword.operator", "=" ], + [ "text", " " ], + [ "string", "\" captures \"" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "capturedCount" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "text", " " ], + [ "string", "\" from space \"" ], + [ "text", " " ], + [ "keyword.operator", "+" ], + [ "text", " " ], + [ "storage.type.variable.ts", "this." ], + [ "identifier", "spaceCaptured" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "regex_allowed", + "data": [ + [ "text", " " ], + [ "keyword", "return" ], + [ "text", " " ], + [ "identifier", "stringBuilder" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "paren.rparen", "}" ] + ] + }, + { + "state": "start", + "data": [ + [ "paren.rparen", "}" ] + ] + } +] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_yaml.json b/lib/ace/mode/_test/tokens_yaml.json index 9a8c1ce7..0dc38ce6 100644 --- a/lib/ace/mode/_test/tokens_yaml.json +++ b/lib/ace/mode/_test/tokens_yaml.json @@ -14,21 +14,22 @@ { "state": "start", "data": [ - [ "comment", "---" ] + [ "list.markup", "---" ] ] }, { "state": "start", "data": [ - [ "identifier", "receipt:" ], - [ "text", " Oz-Ware Purchase Invoice" ] + [ "meta.tag", "receipt" ], + [ "keyword", ": " ], + [ "text", "Oz-Ware Purchase Invoice" ] ] }, { "state": "start", "data": [ - [ "identifier", "date:" ], - [ "text", " " ], + [ "meta.tag", "date" ], + [ "keyword", ": " ], [ "constant.numeric", "2007" ], [ "constant.numeric", "-08" ], [ "constant.numeric", "-06" ] @@ -37,23 +38,24 @@ { "state": "start", "data": [ - [ "identifier", "customer:" ] + [ "meta.tag", "customer" ], + [ "keyword", ":" ] ] }, { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "given:" ], - [ "text", " Dorothy" ] + [ "meta.tag", " given" ], + [ "keyword", ": " ], + [ "text", "Dorothy" ] ] }, { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "family:" ], - [ "text", " Gale" ] + [ "meta.tag", " family" ], + [ "keyword", ": " ], + [ "text", "Gale" ] ] }, { @@ -63,24 +65,25 @@ { "state": "start", "data": [ - [ "identifier", "items:" ] + [ "meta.tag", "items" ], + [ "keyword", ":" ] ] }, { "state": "start", "data": [ - [ "text", " - " ], - [ "identifier", "part_no:" ], - [ "text", " " ], + [ "list.markup", " - " ], + [ "meta.tag", "part_no" ], + [ "keyword", ": " ], [ "string", "'A4786'" ] ] }, { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "descrip:" ], - [ "text", " Water Bucket " ], + [ "meta.tag", " descrip" ], + [ "keyword", ": " ], + [ "text", "Water Bucket " ], [ "paren.lparen", "(" ], [ "text", "Filled" ], [ "paren.rparen", ")" ] @@ -89,18 +92,16 @@ { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "price:" ], - [ "text", " " ], + [ "meta.tag", " price" ], + [ "keyword", ": " ], [ "constant.numeric", "1.47" ] ] }, { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "quantity:" ], - [ "text", " " ], + [ "meta.tag", " quantity" ], + [ "keyword", ": " ], [ "constant.numeric", "4" ] ] }, @@ -111,18 +112,18 @@ { "state": "start", "data": [ - [ "text", " - " ], - [ "identifier", "part_no:" ], - [ "text", " " ], + [ "list.markup", " - " ], + [ "meta.tag", "part_no" ], + [ "keyword", ": " ], [ "string", "'E1628'" ] ] }, { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "descrip:" ], - [ "text", " High Heeled " ], + [ "meta.tag", " descrip" ], + [ "keyword", ": " ], + [ "text", "High Heeled " ], [ "string", "\"Ruby\"" ], [ "text", " Slippers" ] ] @@ -130,27 +131,24 @@ { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "size:" ], - [ "text", " " ], + [ "meta.tag", " size" ], + [ "keyword", ": " ], [ "constant.numeric", "8" ] ] }, { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "price:" ], - [ "text", " " ], + [ "meta.tag", " price" ], + [ "keyword", ": " ], [ "constant.numeric", "100.27" ] ] }, { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "quantity:" ], - [ "text", " " ], + [ "meta.tag", " quantity" ], + [ "keyword", ": " ], [ "constant.numeric", "1" ] ] }, @@ -161,18 +159,16 @@ { "state": "start", "data": [ - [ "text", "bill-" ], - [ "identifier", "to:" ], - [ "text", " " ], - [ "variable", "&id001" ] + [ "meta.tag", "bill-to" ], + [ "keyword", ": " ], + [ "constant.language", "&id001" ] ] }, { "state": "qqstring", "data": [ - [ "text", " " ], - [ "identifier", "street:" ], - [ "text", " " ], + [ "meta.tag", " street" ], + [ "keyword", ": " ], [ "string", "|" ] ] }, @@ -191,17 +187,17 @@ { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "city:" ], - [ "text", " East Centerville" ] + [ "meta.tag", " city" ], + [ "keyword", ": " ], + [ "text", "East Centerville" ] ] }, { "state": "start", "data": [ - [ "text", " " ], - [ "identifier", "state:" ], - [ "text", " KS" ] + [ "meta.tag", " state" ], + [ "keyword", ": " ], + [ "text", "KS" ] ] }, { @@ -211,10 +207,9 @@ { "state": "start", "data": [ - [ "text", "ship-" ], - [ "identifier", "to:" ], - [ "text", " " ], - [ "variable", "*id001" ] + [ "meta.tag", "ship-to" ], + [ "keyword", ": " ], + [ "constant.language", "*id001" ] ] }, { @@ -224,8 +219,8 @@ { "state": "qqstring", "data": [ - [ "identifier", "specialDelivery:" ], - [ "text", " " ], + [ "meta.tag", "specialDelivery" ], + [ "keyword", ": " ], [ "string", ">" ] ] }, From 0c79b239b63d26a6dc15675746d9c8a4096e8701 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 25 Dec 2012 16:56:31 +0400 Subject: [PATCH 03/14] fix c and stylus highlighters --- build | 2 +- lib/ace/mode/_test/tokens_c_cpp.json | 158 +++++++++++++++++++++- lib/ace/mode/_test/tokens_objectivec.json | 12 +- lib/ace/mode/_test/tokens_stylus.json | 17 +-- lib/ace/mode/c_cpp_highlight_rules.js | 4 +- lib/ace/mode/stylus_highlight_rules.js | 19 ++- 6 files changed, 178 insertions(+), 34 deletions(-) diff --git a/build b/build index 9f433321..97bae1d1 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 9f433321a8cca9270753842c2517bd3588354dfe +Subproject commit 97bae1d132effbeca5eef8aaef2a2a1fa836b181 diff --git a/lib/ace/mode/_test/tokens_c_cpp.json b/lib/ace/mode/_test/tokens_c_cpp.json index 93b0d29b..c7612814 100644 --- a/lib/ace/mode/_test/tokens_c_cpp.json +++ b/lib/ace/mode/_test/tokens_c_cpp.json @@ -13,10 +13,94 @@ "state": "start", "data": [ [ "keyword", "#include" ], - [ "text", " " ], - [ "constant", "" ] + [ "constant.other", " " ] ] }, + { + "state": "start", + "data": [] + }, + { + "state": "directive", + "data": [ + [ "keyword", "#include" ], + [ "constant.other.multiline", " \\" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.other", " " ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "directive", + "data": [ + [ "keyword", "#include" ], + [ "constant.other.multiline", " \\" ] + ] + }, + { + "state": "directive", + "data": [ + [ "constant.other.multiline", " \\" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.other", " " ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "directive", + "data": [ + [ "keyword", "#include" ], + [ "constant.other.multiline", " \\" ] + ] + }, + { + "state": "directive", + "data": [ + [ "constant.other.multiline", " \\" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.other", " \"iostream\"" ] + ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "keyword", "#include" ], + [ "constant.other", " " ] + ] + }, + { + "state": "start", + "data": [ + [ "keyword", "#include" ], + [ "constant.other", " \"boost/asio/io_service.hpp\"" ] + ] + }, + { + "state": "start", + "data": [] + }, { "state": "start", "data": [ @@ -105,6 +189,32 @@ [ "punctuation.operator", ";" ] ] }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "#if" ], + [ "constant.other", " VERBOSE >= 2" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "identifier", "prints" ], + [ "paren.lparen", "(" ], + [ "string", "\"trace message\"" ], + [ "paren.rparen", ")" ], + [ "punctuation.operator", ";" ] + ] + }, + { + "state": "start", + "data": [ + [ "text", " " ], + [ "keyword", "#endif" ] + ] + }, { "state": "start", "data": [ @@ -120,5 +230,49 @@ "data": [ [ "paren.rparen", "}" ] ] + }, + { + "state": "start", + "data": [] + }, + { + "state": "start", + "data": [ + [ "comment", "/*" ], + [ "comment", " Print an error message and get out */" ] + ] + }, + { + "state": "directive", + "data": [ + [ "keyword", "#define" ], + [ "constant.other.multiline", " ABORT \\" ] + ] + }, + { + "state": "directive", + "data": [ + [ "constant.other.multiline", " do { \\" ] + ] + }, + { + "state": "directive", + "data": [ + [ "constant.other.multiline", " print( \"Abort\\n\" ); \\" ] + ] + }, + { + "state": "directive", + "data": [ + [ "constant.other.multiline", " exit(8); \\" ] + ] + }, + { + "state": "start", + "data": [ + [ "constant.other", "} while (0) " ], + [ "comment", "/*" ], + [ "comment", " Note: No semicolon */" ] + ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_objectivec.json b/lib/ace/mode/_test/tokens_objectivec.json index 107cdf63..aafd5868 100644 --- a/lib/ace/mode/_test/tokens_objectivec.json +++ b/lib/ace/mode/_test/tokens_objectivec.json @@ -618,8 +618,7 @@ "state": "start", "data": [ [ "keyword", "#import" ], - [ "text", " " ], - [ "constant", "" ] + [ "constant.other", " " ] ] }, { @@ -991,19 +990,14 @@ "state": "start", "data": [ [ "keyword", "#ifndef" ], - [ "text", " " ], - [ "constant.language.objc", "Nil" ] + [ "constant.other", " Nil" ] ] }, { "state": "start", "data": [ [ "keyword", "#define" ], - [ "text", " " ], - [ "constant.language.objc", "Nil" ], - [ "text", " " ], - [ "identifier", "__DARWIN_NULL" ], - [ "text", " " ], + [ "constant.other", " Nil __DARWIN_NULL " ], [ "comment", "/*" ], [ "comment", " id of Nil class */" ] ] diff --git a/lib/ace/mode/_test/tokens_stylus.json b/lib/ace/mode/_test/tokens_stylus.json index d2816fad..d7d6cd94 100644 --- a/lib/ace/mode/_test/tokens_stylus.json +++ b/lib/ace/mode/_test/tokens_stylus.json @@ -207,8 +207,8 @@ [ "constant.numeric", "1" ], [ "keyword", "px" ], [ "text", " " ], - [ "keyword", "s" ], - [ "text", "olid grayLighter" ] + [ "support.constant", "solid" ], + [ "text", " grayLighter" ] ] }, { @@ -295,8 +295,7 @@ [ "text", " " ], [ "support.type", "display" ], [ "text", ": " ], - [ "keyword", "in" ], - [ "support.constant", "line" ] + [ "support.constant", "inline" ] ] }, { @@ -323,8 +322,7 @@ [ "text", " " ], [ "support.type", "display" ], [ "text", " " ], - [ "keyword", "in" ], - [ "support.constant", "line" ] + [ "support.constant", "inline" ] ] }, { @@ -356,8 +354,7 @@ [ "text", " " ], [ "support.type", "display" ], [ "text", " " ], - [ "keyword", "in" ], - [ "support.constant", "line" ] + [ "support.constant", "inline" ] ] }, { @@ -410,7 +407,7 @@ { "state": "start", "data": [ - [ "text", " " ], + [ "text", " " ], [ "keyword.control.stylus", "!important" ] ] }, @@ -421,7 +418,7 @@ { "state": "start", "data": [ - [ "text", " " ], + [ "text", " " ], [ "keyword.control.stylus", "unless" ] ] } diff --git a/lib/ace/mode/c_cpp_highlight_rules.js b/lib/ace/mode/c_cpp_highlight_rules.js index 5be688f5..2eda251b 100644 --- a/lib/ace/mode/c_cpp_highlight_rules.js +++ b/lib/ace/mode/c_cpp_highlight_rules.js @@ -85,11 +85,11 @@ var c_cppHighlightRules = function() { regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }, { token : "keyword", // pre-compiler directives - regex : "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)", + regex : "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)\\b", next : "directive" }, { token : "keyword", // special case pre-compiler directive - regex : "(?:#endif)" + regex : "(?:#endif)\\b" }, { token : "support.function.C99.c", regex : cFunctions diff --git a/lib/ace/mode/stylus_highlight_rules.js b/lib/ace/mode/stylus_highlight_rules.js index 6c012df5..affa06ca 100644 --- a/lib/ace/mode/stylus_highlight_rules.js +++ b/lib/ace/mode/stylus_highlight_rules.js @@ -21,8 +21,7 @@ var StylusHighlightRules = function() { "support.constant.fonts": CssHighlightRules.supportConstantFonts }, "text", true); - this.$rules = - { + this.$rules = { "start": [ { token : "comment", @@ -82,16 +81,16 @@ var StylusHighlightRules = function() { "regex": "-webkit-|-moz\\-|-ms-|-o-" }, { - "token": ["keyword.control.stylus"], - "regex": "(?:\\b|\\s)(!important|for|in|return|true|false|null|if|else|unless|return)(?:\\b)" + "token": "keyword.control.stylus", + "regex": "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b" }, { - "token": ["keyword.operator.stylus"], - "regex": "((?:!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=))" + "token": "keyword.operator.stylus", + "regex": "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=" }, { - "token": ["keyword.operator.stylus"], - "regex": "(?:\\b)(in|is(?:nt)?|not)(?:\\b)" + "token": "keyword.operator.stylus", + "regex": "(?:in|is(?:nt)?|not)\\b" }, { token : "string", @@ -107,8 +106,8 @@ var StylusHighlightRules = function() { regex : CssHighlightRules.numRe }, { - token : ["keyword"], - regex : "(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + token : "keyword", + regex : "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b" }, { token : keywordMapper, From f227cc67f0081c17d6ff5f29f244a1962b6c9af2 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 8 Dec 2012 11:11:39 +0400 Subject: [PATCH 04/14] better support to Github style code blocks in markdown Issue #1131 --- lib/ace/mode/markdown_highlight_rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/mode/markdown_highlight_rules.js b/lib/ace/mode/markdown_highlight_rules.js index 59c4f936..e7bba0f0 100644 --- a/lib/ace/mode/markdown_highlight_rules.js +++ b/lib/ace/mode/markdown_highlight_rules.js @@ -78,7 +78,7 @@ var MarkdownHighlightRules = function() { github_embed("css", "css-"), { // Github style block token : "support.function", - regex : "^```[a-zA-Z]*\\s*$", + regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", next : "githubblock" }, { // block quote token : "string", From bce93cf0319c642129a816125f2f7e9a5d7d3f8e Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 8 Dec 2012 11:12:46 +0400 Subject: [PATCH 05/14] remove weird ruby style comment highlighting from clojure mode --- lib/ace/mode/clojure_highlight_rules.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/ace/mode/clojure_highlight_rules.js b/lib/ace/mode/clojure_highlight_rules.js index bbcfe158..221e37c0 100644 --- a/lib/ace/mode/clojure_highlight_rules.js +++ b/lib/ace/mode/clojure_highlight_rules.js @@ -129,10 +129,6 @@ var ClojureHighlightRules = function() { { token : "comment", regex : ";.*$" - }, { - token : "comment", // multi line comment - regex : "^=begin$", - next : "comment" }, { token : "keyword", //parens regex : "[\\(|\\)]" @@ -182,17 +178,6 @@ var ClojureHighlightRules = function() { } ], - "comment" : [ - { - token : "comment", // closing comment - regex : "^=end$", - next : "start" - }, { - token : "comment", // comment spanning whole line - merge : true, - regex : ".+" - } - ], "string" : [ { token : "constant.language.escape", From 70cd01d85868475004d88cfc99f87f63947479b0 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 8 Dec 2012 11:13:46 +0400 Subject: [PATCH 06/14] cleanup xml highlight rules --- lib/ace/mode/xml_highlight_rules.js | 74 +++++++++-------------------- 1 file changed, 22 insertions(+), 52 deletions(-) diff --git a/lib/ace/mode/xml_highlight_rules.js b/lib/ace/mode/xml_highlight_rules.js index 3244d572..ff46b4a2 100644 --- a/lib/ace/mode/xml_highlight_rules.js +++ b/lib/ace/mode/xml_highlight_rules.js @@ -36,61 +36,31 @@ var xmlUtil = require("./xml_util"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var XmlHighlightRules = function() { - - // regexp must not have capturing parentheses - // regexps are ordered -> the first match is used this.$rules = { - start : [{ - token : "text", - regex : "<\\!\\[CDATA\\[", - next : "cdata" - }, { - token : "xml-pe", - regex : "<\\?.*?\\?>" - }, { - token : "comment", - merge : true, - regex : "<\\!--", - next : "comment" - }, { - token : "xml-pe", - regex : "<\\!.*?>" - }, { - token : "meta.tag", // opening tag - regex : "<\\/?", - next : "tag" - }, { - token : "text", - regex : "\\s+" - }, { - token : "constant.character.entity", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }, { - token : "text", - regex : "[^<]+" - }], + start : [ + {token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + {token : "xml-pe", regex : "<\\?.*?\\?>"}, + {token : "comment", regex : "<\\!--", next : "comment", merge : true}, + {token : "xml-pe", regex : "<\\!.*?>"}, + {token : "meta.tag", regex : "<\\/?", next : "tag"}, + {token : "text", regex : "\\s+"}, + { + token : "constant.character.entity", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {token : "text", regex : "[^<]+"} + ], - cdata : [{ - token : "text", - regex : "\\]\\]>", - next : "start" - }, { - token : "text", - regex : "\\s+" - }, { - token : "text", - regex : "(?:[^\\]]|\\](?!\\]>))+" - }], + cdata : [ + {token : "text", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], - comment : [{ - token : "comment", - regex : ".*?-->", - next : "start" - }, { - token : "comment", - merge : true, - regex : ".+" - }] + comment : [ + {token : "comment", regex : ".*?-->", next : "start"}, + {token : "comment", merge : true, regex : ".+"} + ] }; xmlUtil.tag(this.$rules, "tag", "start"); From 0c360f39a6b1e3273974afa3449c31e942e647c9 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 8 Dec 2012 22:16:18 +0400 Subject: [PATCH 07/14] make xml strings non greedy to allow better mixed modes --- lib/ace/mode/xml_util.js | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/lib/ace/mode/xml_util.js b/lib/ace/mode/xml_util.js index cc3dffa0..a2cdea1b 100644 --- a/lib/ace/mode/xml_util.js +++ b/lib/ace/mode/xml_util.js @@ -34,34 +34,24 @@ define(function(require, exports, module) { function string(state) { return [{ token : "string", - regex : '".*?"' - }, { - token : "string", // multi line string start - merge : true, - regex : '["].*', + regex : '"', next : state + "_qqstring" }, { token : "string", - regex : "'.*?'" - }, { - token : "string", // multi line string start - merge : true, - regex : "['].*", + regex : "'", next : state + "_qstring" }]; } function multiLineString(quote, state) { - return [{ - token : "string", - merge : true, - regex : ".*?" + quote, - next : state - }, { - token : "string", - merge : true, - regex : '.+' - }]; + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {token : "string", merge : true, regex : '\\w+|.|\\s+'} + ]; } exports.tag = function(states, name, nextState, tagMap) { From e56b9284dae450c2c4831751414f05fbd675c6b3 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 8 Dec 2012 22:16:56 +0400 Subject: [PATCH 08/14] non greedy js strings --- lib/ace/mode/javascript_highlight_rules.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/ace/mode/javascript_highlight_rules.js b/lib/ace/mode/javascript_highlight_rules.js index 25216613..72edb1b8 100644 --- a/lib/ace/mode/javascript_highlight_rules.js +++ b/lib/ace/mode/javascript_highlight_rules.js @@ -65,7 +65,7 @@ var JavaScriptHighlightRules = function() { }, "identifier"); // keywords which can be followed by regular expressions - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield"; + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; // TODO: Unicode escape sequences var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; @@ -186,7 +186,7 @@ var JavaScriptHighlightRules = function() { regex : identifierRe }, { token : "keyword.operator", - regex : /!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/, + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, next : "regex_allowed" }, { token : "punctuation.operator", @@ -341,10 +341,6 @@ var JavaScriptHighlightRules = function() { { token : "constant.language.escape", regex : escapedRe - }, { - token : "string", - regex : '[^"\\\\]+', - merge : true }, { token : "string", regex : "\\\\$", @@ -355,16 +351,16 @@ var JavaScriptHighlightRules = function() { regex : '"|$', next : "start", merge : true + }, { + token : "string", + regex : '.|\\w+|\\s+', + merge : true } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe - }, { - token : "string", - regex : "[^'\\\\]+", - merge : true }, { token : "string", regex : "\\\\$", @@ -375,6 +371,10 @@ var JavaScriptHighlightRules = function() { regex : "'|$", next : "start", merge : true + }, { + token : "string", + regex : '.|\\w+|\\s+', + merge : true } ] }; From 759fbaba44317e6e54caac0e515a4f55e27e0c47 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 9 Dec 2012 19:00:17 +0400 Subject: [PATCH 09/14] merge tokens of same type by default --- lib/ace/mode/abap_highlight_rules.js | 8 +++---- lib/ace/mode/asciidoc_highlight_rules.js | 22 +++++++++---------- lib/ace/mode/c_cpp_highlight_rules.js | 6 ------ lib/ace/mode/clojure_highlight_rules.js | 6 ++---- lib/ace/mode/coffee_highlight_rules.js | 13 ----------- lib/ace/mode/coldfusion_highlight_rules.js | 5 ----- lib/ace/mode/csharp_highlight_rules.js | 2 -- lib/ace/mode/css_highlight_rules.js | 4 ---- lib/ace/mode/dart_highlight_rules.js | 10 --------- lib/ace/mode/doc_comment_highlight_rules.js | 6 ------ lib/ace/mode/golang_highlight_rules.js | 6 ------ lib/ace/mode/groovy_highlight_rules.js | 2 -- lib/ace/mode/haxe_highlight_rules.js | 2 -- lib/ace/mode/html_highlight_rules.js | 5 ----- lib/ace/mode/jade_highlight_rules.js | 7 ------ lib/ace/mode/java_highlight_rules.js | 2 -- lib/ace/mode/javascript_highlight_rules.js | 20 ----------------- lib/ace/mode/json_highlight_rules.js | 3 --- lib/ace/mode/jsp_highlight_rules.js | 1 - lib/ace/mode/jsx_highlight_rules.js | 2 -- lib/ace/mode/less_highlight_rules.js | 2 -- lib/ace/mode/liquid_highlight_rules.js | 5 ----- lib/ace/mode/lua_highlight_rules.js | 24 --------------------- lib/ace/mode/objectivec_highlight_rules.js | 2 -- lib/ace/mode/ocaml_highlight_rules.js | 4 ---- lib/ace/mode/perl_highlight_rules.js | 4 ---- lib/ace/mode/pgsql_highlight_rules.js | 8 ------- lib/ace/mode/powershell_highlight_rules.js | 3 --- lib/ace/mode/python_highlight_rules.js | 4 ---- lib/ace/mode/ruby_highlight_rules.js | 2 -- lib/ace/mode/scad_highlight_rules.js | 4 ---- lib/ace/mode/scala_highlight_rules.js | 7 +----- lib/ace/mode/scss_highlight_rules.js | 6 ------ lib/ace/mode/stylus_highlight_rules.js | 21 ++++++------------ lib/ace/mode/tcl_highlight_rules.js | 7 ------ lib/ace/mode/xml_highlight_rules.js | 4 ++-- lib/ace/mode/xml_util.js | 8 +++---- lib/ace/mode/yaml_highlight_rules.js | 2 -- lib/ace/tokenizer.js | 2 +- 39 files changed, 30 insertions(+), 221 deletions(-) diff --git a/lib/ace/mode/abap_highlight_rules.js b/lib/ace/mode/abap_highlight_rules.js index a74d5541..38c50bd0 100644 --- a/lib/ace/mode/abap_highlight_rules.js +++ b/lib/ace/mode/abap_highlight_rules.js @@ -117,13 +117,13 @@ var AbapHighlightRules = function() { ], "qstring" : [ {token : "constant.language.escape", regex : "''"}, - {token : "string", regex : "'", next : "start", merge : true}, - {token : "string", regex : ".|\w+", merge : true} + {token : "string", regex : "'", next : "start"}, + {token : "string", regex : ".|\w+"} ], "string" : [ {token : "constant.language.escape", regex : "``"}, - {token : "string", regex : "`", next : "start", merge : true}, - {token : "string", regex : ".|\w+", merge : true} + {token : "string", regex : "`", next : "start"}, + {token : "string", regex : ".|\w+"} ] } }; diff --git a/lib/ace/mode/asciidoc_highlight_rules.js b/lib/ace/mode/asciidoc_highlight_rules.js index 032cadf4..c0d1a305 100644 --- a/lib/ace/mode/asciidoc_highlight_rules.js +++ b/lib/ace/mode/asciidoc_highlight_rules.js @@ -96,9 +96,9 @@ var AsciidocHighlightRules = function() { // any word {token: "text", regex: identifierRe}, {token: ["keyword", "string", "keyword"], - regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/, merge: true}, - {token: "keyword", regex: /<<[\w\d\-$]+,?|>>/, merge: true}, - {token: "constant.character", regex: /\({2,3}.*?\){2,3}/, merge: true}, + regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/}, + {token: "keyword", regex: /<<[\w\d\-$]+,?|>>/}, + {token: "constant.character", regex: /\({2,3}.*?\){2,3}/}, // Anchor {token: "keyword", regex: /\[\[.+?\]\]/}, // bibliography @@ -122,26 +122,26 @@ var AsciidocHighlightRules = function() { "listingBlock": [ {token: "literal", regex: /^\.{4,}\s*$/, next: "dissallowDelimitedBlock"}, {token: "constant.numeric", regex: '<\\d+>'}, - {token: "literal", regex: '[^<]+', merge: true}, - {token: "literal", regex: '<', merge: true} + {token: "literal", regex: '[^<]+'}, + {token: "literal", regex: '<'} ], "literalBlock": [ {token: "literal", regex: /^-{4,}\s*$/, next: "dissallowDelimitedBlock"}, {token: "constant.numeric", regex: '<\\d+>'}, - {token: "literal", regex: '[^<]+', merge: true}, - {token: "literal", regex: '<', merge: true} + {token: "literal", regex: '[^<]+'}, + {token: "literal", regex: '<'} ], "passthroughBlock": [ {token: "literal", regex: /^\+{4,}\s*$/, next: "dissallowDelimitedBlock"}, - {token: "literal", regex: identifierRe + "|\\d+", merge: true}, + {token: "literal", regex: identifierRe + "|\\d+"}, {include: "macros"}, - {token: "literal", regex: ".", merge: true} + {token: "literal", regex: "."} ], "smallPassthrough": [ {token: "literal", regex: /[+]{3,}/, next: "dissallowDelimitedBlock"}, - {token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock", merge: true}, - {token: "literal", regex: identifierRe + "|\\d+", merge: true}, + {token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock"}, + {token: "literal", regex: identifierRe + "|\\d+"}, {include: "macros"} ], diff --git a/lib/ace/mode/c_cpp_highlight_rules.js b/lib/ace/mode/c_cpp_highlight_rules.js index 2eda251b..427951c6 100644 --- a/lib/ace/mode/c_cpp_highlight_rules.js +++ b/lib/ace/mode/c_cpp_highlight_rules.js @@ -58,7 +58,6 @@ var c_cppHighlightRules = function() { DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, { @@ -66,7 +65,6 @@ var c_cppHighlightRules = function() { regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start - merge : true, regex : '["].*\\\\$', next : "qqstring" }, { @@ -74,7 +72,6 @@ var c_cppHighlightRules = function() { regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "string", // multi line string start - merge : true, regex : "['].*\\\\$", next : "qstring" }, { @@ -120,7 +117,6 @@ var c_cppHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -131,7 +127,6 @@ var c_cppHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], @@ -142,7 +137,6 @@ var c_cppHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], diff --git a/lib/ace/mode/clojure_highlight_rules.js b/lib/ace/mode/clojure_highlight_rules.js index 221e37c0..08d64425 100644 --- a/lib/ace/mode/clojure_highlight_rules.js +++ b/lib/ace/mode/clojure_highlight_rules.js @@ -180,12 +180,10 @@ var ClojureHighlightRules = function() { ], "string" : [ { - token : "constant.language.escape", - merge : true, + token : "constant.language.escape", regex : "\\\\.|\\\\$" }, { - token : "string", - merge : true, + token : "string", regex : '[^"\\\\]+' }, { token : "string", diff --git a/lib/ace/mode/coffee_highlight_rules.js b/lib/ace/mode/coffee_highlight_rules.js index 80fb7ffa..78e0bf6e 100644 --- a/lib/ace/mode/coffee_highlight_rules.js +++ b/lib/ace/mode/coffee_highlight_rules.js @@ -40,7 +40,6 @@ define(function(require, exports, module) { var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; var stringfill = { token : "string", - merge : true, regex : ".+" }; @@ -113,32 +112,26 @@ define(function(require, exports, module) { regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" }, { token : "string", - merge : true, regex : "'''", next : "qdoc" }, { token : "string", - merge : true, regex : '"""', next : "qqdoc" }, { token : "string", - merge : true, regex : "'", next : "qstring" }, { token : "string", - merge : true, regex : '"', next : "qqstring" }, { token : "string", - merge : true, regex : "`", next : "js" }, { token : "string.regex", - merge : true, regex : "///", next : "heregex" }, { @@ -146,7 +139,6 @@ define(function(require, exports, module) { regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ }, { token : "comment", - merge : true, regex : "###(?!#)", next : "comment" }, { @@ -281,20 +273,17 @@ define(function(require, exports, module) { qstring : [{ token : "string", regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'", - merge : true, next : "start" }, stringfill], qqstring : [{ token : "string", regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', - merge : true, next : "start" }, stringfill], js : [{ token : "string", - merge : true, regex : "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`", next : "start" }, stringfill], @@ -308,7 +297,6 @@ define(function(require, exports, module) { regex : "\\s+(?:#.*)?" }, { token : "string.regex", - merge : true, regex : "\\S+" }], @@ -318,7 +306,6 @@ define(function(require, exports, module) { next : "start" }, { token : "comment", - merge : true, regex : ".+" }] }; diff --git a/lib/ace/mode/coldfusion_highlight_rules.js b/lib/ace/mode/coldfusion_highlight_rules.js index 7f4a1e3f..a3b4003f 100644 --- a/lib/ace/mode/coldfusion_highlight_rules.js +++ b/lib/ace/mode/coldfusion_highlight_rules.js @@ -45,7 +45,6 @@ var ColdfusionHighlightRules = function() { this.$rules = { start : [ { token : "text", - merge : true, regex : "<\\!\\[CDATA\\[", next : "cdata" }, { @@ -53,7 +52,6 @@ var ColdfusionHighlightRules = function() { regex : "<\\?.*?\\?>" }, { token : "comment", - merge : true, regex : "<\\!--", next : "comment" }, { @@ -82,11 +80,9 @@ var ColdfusionHighlightRules = function() { next : "start" }, { token : "text", - merge : true, regex : "\\s+" }, { token : "text", - merge : true, regex : ".+" } ], @@ -96,7 +92,6 @@ var ColdfusionHighlightRules = function() { next : "start" }, { token : "comment", - merge : true, regex : ".+" } ] }; diff --git a/lib/ace/mode/csharp_highlight_rules.js b/lib/ace/mode/csharp_highlight_rules.js index 22bbd82c..bdc6a393 100644 --- a/lib/ace/mode/csharp_highlight_rules.js +++ b/lib/ace/mode/csharp_highlight_rules.js @@ -25,7 +25,6 @@ var CSharpHighlightRules = function() { { token : "comment", // multi line comment regex : "\\/\\*", - merge : true, next : "comment" }, { token : "string.regexp", @@ -74,7 +73,6 @@ var CSharpHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ] diff --git a/lib/ace/mode/css_highlight_rules.js b/lib/ace/mode/css_highlight_rules.js index da91a515..ea61338b 100644 --- a/lib/ace/mode/css_highlight_rules.js +++ b/lib/ace/mode/css_highlight_rules.js @@ -63,7 +63,6 @@ var CssHighlightRules = function() { var base_ruleset = [ { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "ruleset_comment" }, { @@ -112,7 +111,6 @@ var CssHighlightRules = function() { var base_comment = [{ token : "comment", // comment spanning whole line - merge : true, regex : ".+" }]; @@ -140,7 +138,6 @@ var CssHighlightRules = function() { this.$rules = { "start" : [{ token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, { @@ -167,7 +164,6 @@ var CssHighlightRules = function() { "media" : [ { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "media_comment" }, { diff --git a/lib/ace/mode/dart_highlight_rules.js b/lib/ace/mode/dart_highlight_rules.js index 4d618086..531a40d8 100644 --- a/lib/ace/mode/dart_highlight_rules.js +++ b/lib/ace/mode/dart_highlight_rules.js @@ -28,7 +28,6 @@ var DartHighlightRules = function() { var stringfill = { token : "string", - merge : true, regex : ".+" }; @@ -44,7 +43,6 @@ var DartHighlightRules = function() { }, { "token" : "comment", // multi line comment - "merge" : true, "regex" : /\/\*/, "next" : "comment" }, @@ -94,25 +92,21 @@ var DartHighlightRules = function() { }, { "token" : "string", - "merge" : true, "regex" : "'''", "next" : "qdoc" }, { "token" : "string", - "merge" : true, "regex" : '"""', "next" : "qqdoc" }, { "token" : "string", - "merge" : true, "regex" : "'", "next" : "qstring" }, { "token" : "string", - "merge" : true, "regex" : '"', "next" : "qqstring" }, @@ -145,11 +139,9 @@ var DartHighlightRules = function() { { token : "comment", // closing comment regex : ".*?\\*\\/", - merge : true, next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -171,7 +163,6 @@ var DartHighlightRules = function() { { "token" : "string", "regex" : "[^\\\\']*(?:\\\\.[^\\\\']*)*'", - "merge" : true, "next" : "start" }, stringfill], @@ -179,7 +170,6 @@ var DartHighlightRules = function() { { "token" : "string", "regex" : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', - "merge" : true, "next" : "start" }, stringfill] } diff --git a/lib/ace/mode/doc_comment_highlight_rules.js b/lib/ace/mode/doc_comment_highlight_rules.js index 566586d3..20a1ade6 100644 --- a/lib/ace/mode/doc_comment_highlight_rules.js +++ b/lib/ace/mode/doc_comment_highlight_rules.js @@ -42,19 +42,15 @@ var DocCommentHighlightRules = function() { regex : "@[\\w\\d_]+" // TODO: fix email addresses }, { token : "comment.doc", - merge : true, regex : "\\s+" }, { token : "comment.doc", - merge : true, regex : "TODO" }, { token : "comment.doc", - merge : true, regex : "[^@\\*]+" }, { token : "comment.doc", - merge : true, regex : "." }] }; @@ -65,7 +61,6 @@ oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment - merge : true, regex : "\\/\\*(?=\\*)", next : start }; @@ -74,7 +69,6 @@ DocCommentHighlightRules.getStartRule = function(start) { DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment - merge : true, regex : "\\*\\/", next : start }; diff --git a/lib/ace/mode/golang_highlight_rules.js b/lib/ace/mode/golang_highlight_rules.js index ad0a85b0..26010bd1 100644 --- a/lib/ace/mode/golang_highlight_rules.js +++ b/lib/ace/mode/golang_highlight_rules.js @@ -27,7 +27,6 @@ define(function(require, exports, module) { DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, { @@ -35,7 +34,6 @@ define(function(require, exports, module) { regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start - merge : true, regex : '["].*\\\\$', next : "qqstring" }, { @@ -43,7 +41,6 @@ define(function(require, exports, module) { regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "string", // multi line string start - merge : true, regex : "['].*\\\\$", next : "qstring" }, { @@ -85,7 +82,6 @@ define(function(require, exports, module) { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -96,7 +92,6 @@ define(function(require, exports, module) { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], @@ -107,7 +102,6 @@ define(function(require, exports, module) { next : "start" }, { token : "string", - merge : true, regex : '.+' } ] diff --git a/lib/ace/mode/groovy_highlight_rules.js b/lib/ace/mode/groovy_highlight_rules.js index b9f4033a..fb3b78e2 100644 --- a/lib/ace/mode/groovy_highlight_rules.js +++ b/lib/ace/mode/groovy_highlight_rules.js @@ -72,7 +72,6 @@ var GroovyHighlightRules = function() { DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, { @@ -127,7 +126,6 @@ var GroovyHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], diff --git a/lib/ace/mode/haxe_highlight_rules.js b/lib/ace/mode/haxe_highlight_rules.js index 4e7f18b1..e9956136 100644 --- a/lib/ace/mode/haxe_highlight_rules.js +++ b/lib/ace/mode/haxe_highlight_rules.js @@ -35,7 +35,6 @@ var HaxeHighlightRules = function() { { token : "comment", // multi line comment regex : "\\/\\*", - merge : true, next : "comment" }, { token : "string.regexp", @@ -84,7 +83,6 @@ var HaxeHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ] diff --git a/lib/ace/mode/html_highlight_rules.js b/lib/ace/mode/html_highlight_rules.js index d6f42f63..6106be1a 100644 --- a/lib/ace/mode/html_highlight_rules.js +++ b/lib/ace/mode/html_highlight_rules.js @@ -64,7 +64,6 @@ var HtmlHighlightRules = function() { this.$rules = { start : [{ token : "text", - merge : true, regex : "<\\!\\[CDATA\\[", next : "cdata" }, { @@ -72,7 +71,6 @@ var HtmlHighlightRules = function() { regex : "<\\?.*?\\?>" }, { token : "comment", - merge : true, regex : "<\\!--", next : "comment" }, { @@ -107,11 +105,9 @@ var HtmlHighlightRules = function() { next : "start" }, { token : "text", - merge : true, regex : "\\s+" }, { token : "text", - merge : true, regex : ".+" } ], @@ -121,7 +117,6 @@ var HtmlHighlightRules = function() { next : "start" }, { token : "comment", - merge : true, regex : ".+" } ] }; diff --git a/lib/ace/mode/jade_highlight_rules.js b/lib/ace/mode/jade_highlight_rules.js index 1f8b5875..6a985d97 100644 --- a/lib/ace/mode/jade_highlight_rules.js +++ b/lib/ace/mode/jade_highlight_rules.js @@ -165,7 +165,6 @@ var JadeHighlightRules = function() { }, { "token": "comment.block.jade", - "merge" : true, "regex" : ".+" } ], @@ -264,17 +263,14 @@ var JadeHighlightRules = function() { }, { token : "string", regex : '[^"\\\\]+', - merge : true }, { token : "string", regex : "\\\\$", next : "qqstring", - merge : true }, { token : "string", regex : '"|$', next : "tag_attributes", - merge : true } ], "qstring" : [ @@ -284,17 +280,14 @@ var JadeHighlightRules = function() { }, { token : "string", regex : "[^'\\\\]+", - merge : true }, { token : "string", regex : "\\\\$", next : "qstring", - merge : true }, { token : "string", regex : "'|$", next : "tag_attributes", - merge : true } ] }; diff --git a/lib/ace/mode/java_highlight_rules.js b/lib/ace/mode/java_highlight_rules.js index ab05fbde..8cba835c 100644 --- a/lib/ace/mode/java_highlight_rules.js +++ b/lib/ace/mode/java_highlight_rules.js @@ -70,7 +70,6 @@ var JavaHighlightRules = function() { DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, { @@ -117,7 +116,6 @@ var JavaHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ] diff --git a/lib/ace/mode/javascript_highlight_rules.js b/lib/ace/mode/javascript_highlight_rules.js index 72edb1b8..fcef1c57 100644 --- a/lib/ace/mode/javascript_highlight_rules.js +++ b/lib/ace/mode/javascript_highlight_rules.js @@ -90,7 +90,6 @@ var JavaScriptHighlightRules = function() { DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment - merge : true, regex : /\/\*/, next : "comment" }, { @@ -217,7 +216,6 @@ var JavaScriptHighlightRules = function() { DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment_regex_allowed" }, { @@ -227,7 +225,6 @@ var JavaScriptHighlightRules = function() { token: "string.regexp", regex: "\\/", next: "regex", - merge: true }, { token : "text", regex : "\\s+" @@ -249,7 +246,6 @@ var JavaScriptHighlightRules = function() { token: "string.regexp", regex: "/\\w*", next: "start", - merge: true }, { // invalid operators token : "invalid", @@ -261,12 +257,10 @@ var JavaScriptHighlightRules = function() { }, { token: "string.regexp", regex: /{|[^{\[\/\\(|)$^+*?]+/, - merge: true }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class", - merge: true }, { token: "empty", regex: "", @@ -281,14 +275,12 @@ var JavaScriptHighlightRules = function() { token: "constant.language.escape", regex: "]", next: "regex", - merge: true }, { token: "constant.language.escape", regex: "-" }, { token: "string.regexp.charachterclass", regex: /[^\]\-\\]+/, - merge: true }, { token: "empty", regex: "", @@ -302,11 +294,9 @@ var JavaScriptHighlightRules = function() { }, { token: "punctuation.operator", regex: "[, ]+", - merge: true }, { token: "punctuation.operator", regex: "$", - merge: true }, { token: "empty", regex: "", @@ -317,11 +307,9 @@ var JavaScriptHighlightRules = function() { { token : "comment", // closing comment regex : ".*?\\*\\/", - merge : true, next : "regex_allowed" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -329,11 +317,9 @@ var JavaScriptHighlightRules = function() { { token : "comment", // closing comment regex : ".*?\\*\\/", - merge : true, next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -345,16 +331,13 @@ var JavaScriptHighlightRules = function() { token : "string", regex : "\\\\$", next : "qqstring", - merge : true }, { token : "string", regex : '"|$', next : "start", - merge : true }, { token : "string", regex : '.|\\w+|\\s+', - merge : true } ], "qstring" : [ @@ -365,16 +348,13 @@ var JavaScriptHighlightRules = function() { token : "string", regex : "\\\\$", next : "qstring", - merge : true }, { token : "string", regex : "'|$", next : "start", - merge : true }, { token : "string", regex : '.|\\w+|\\s+', - merge : true } ] }; diff --git a/lib/ace/mode/json_highlight_rules.js b/lib/ace/mode/json_highlight_rules.js index 7e4f5609..f03f5fac 100644 --- a/lib/ace/mode/json_highlight_rules.js +++ b/lib/ace/mode/json_highlight_rules.js @@ -80,17 +80,14 @@ var JsonHighlightRules = function() { }, { token : "string", regex : '[^"\\\\]+', - merge : true }, { token : "string", regex : '"', next : "start", - merge : true }, { token : "string", regex : "", next : "start", - merge : true } ] }; diff --git a/lib/ace/mode/jsp_highlight_rules.js b/lib/ace/mode/jsp_highlight_rules.js index da0033fc..d639c6bd 100644 --- a/lib/ace/mode/jsp_highlight_rules.js +++ b/lib/ace/mode/jsp_highlight_rules.js @@ -54,7 +54,6 @@ var JspHighlightRules = function() { this.$rules["start"].unshift({ token : "comment", - merge : true, regex : "<%--", next : "comment" }); diff --git a/lib/ace/mode/jsx_highlight_rules.js b/lib/ace/mode/jsx_highlight_rules.js index 0700b011..8e0c3eaa 100644 --- a/lib/ace/mode/jsx_highlight_rules.js +++ b/lib/ace/mode/jsx_highlight_rules.js @@ -37,7 +37,6 @@ define(function(require, exports, module) { { token : "comment", // multi line comment regex : "\\/\\*", - merge : true, next : "comment" }, { token : "string.regexp", @@ -106,7 +105,6 @@ define(function(require, exports, module) { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ] diff --git a/lib/ace/mode/less_highlight_rules.js b/lib/ace/mode/less_highlight_rules.js index 3cc22953..ce494514 100644 --- a/lib/ace/mode/less_highlight_rules.js +++ b/lib/ace/mode/less_highlight_rules.js @@ -177,7 +177,6 @@ var LessHighlightRules = function() { }, { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, { @@ -257,7 +256,6 @@ var LessHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ] diff --git a/lib/ace/mode/liquid_highlight_rules.js b/lib/ace/mode/liquid_highlight_rules.js index 5b4f9c0b..2d64b1c9 100644 --- a/lib/ace/mode/liquid_highlight_rules.js +++ b/lib/ace/mode/liquid_highlight_rules.js @@ -83,7 +83,6 @@ var LiquidHighlightRules = function() { next : "liquid_start" }, { token : "meta.tag", - merge : true, regex : "<\\!\\[CDATA\\[", next : "cdata" }, { @@ -91,7 +90,6 @@ var LiquidHighlightRules = function() { regex : "<\\?.*?\\?>" }, { token : "comment", - merge : true, regex : "<\\!--", next : "comment" }, { @@ -120,11 +118,9 @@ var LiquidHighlightRules = function() { next : "start" }, { token : "text", - merge : true, regex : "\\s+" }, { token : "text", - merge : true, regex : ".+" } ], @@ -134,7 +130,6 @@ var LiquidHighlightRules = function() { next : "start" }, { token : "comment", - merge : true, regex : ".+" } ] , diff --git a/lib/ace/mode/lua_highlight_rules.js b/lib/ace/mode/lua_highlight_rules.js index 81c44905..1ffd8b06 100644 --- a/lib/ace/mode/lua_highlight_rules.js +++ b/lib/ace/mode/lua_highlight_rules.js @@ -128,27 +128,22 @@ var LuaHighlightRules = function() { { token : "comment", // --[[ comment regex : strPre + '\\-\\-\\[\\[.*$', - merge : true, next : "qcomment" }, { token : "comment", // --[=[ comment regex : strPre + '\\-\\-\\[\\=\\[.*$', - merge : true, next : "qcomment1" }, { token : "comment", // --[==[ comment regex : strPre + '\\-\\-\\[\\={2}\\[.*$', - merge : true, next : "qcomment2" }, { token : "comment", // --[===[ comment regex : strPre + '\\-\\-\\[\\={3}\\[.*$', - merge : true, next : "qcomment3" }, { token : "comment", // --[====[ comment regex : strPre + '\\-\\-\\[\\={4}\\[.*$', - merge : true, next : "qcomment4" }, { token : function(value){ // --[====+[ comment @@ -164,7 +159,6 @@ var LuaHighlightRules = function() { return "comment"; }, regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*$', - merge : true, next : "qcomment5" }, @@ -199,27 +193,22 @@ var LuaHighlightRules = function() { { token : "string", // [[ string regex : strPre + '\\[\\[.*$', - merge : true, next : "qstring" }, { token : "string", // [=[ string regex : strPre + '\\[\\=\\[.*$', - merge : true, next : "qstring1" }, { token : "string", // [==[ string regex : strPre + '\\[\\={2}\\[.*$', - merge : true, next : "qstring2" }, { token : "string", // [===[ string regex : strPre + '\\[\\={3}\\[.*$', - merge : true, next : "qstring3" }, { token : "string", // [====[ string regex : strPre + '\\[\\={4}\\[.*$', - merge : true, next : "qstring4" }, { token : function(value){ // --[====+[ string @@ -231,7 +220,6 @@ var LuaHighlightRules = function() { return "string"; }, regex : strPre + '\\[\\={5}\\=*\\[.*$', - merge : true, next : "qstring5" }, @@ -270,7 +258,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "comment", - merge : true, regex : '.+' } ], "qcomment1": [ { @@ -279,7 +266,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "comment", - merge : true, regex : '.+' } ], "qcomment2": [ { @@ -288,7 +274,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "comment", - merge : true, regex : '.+' } ], "qcomment3": [ { @@ -297,7 +282,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "comment", - merge : true, regex : '.+' } ], "qcomment4": [ { @@ -306,7 +290,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "comment", - merge : true, regex : '.+' } ], "qcomment5": [ { @@ -328,7 +311,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "comment", - merge : true, regex : '.+' } ], @@ -338,7 +320,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], "qstring1": [ { @@ -347,7 +328,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], "qstring2": [ { @@ -356,7 +336,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], "qstring3": [ { @@ -365,7 +344,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], "qstring4": [ { @@ -374,7 +352,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], "qstring5": [ { @@ -396,7 +373,6 @@ var LuaHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ] diff --git a/lib/ace/mode/objectivec_highlight_rules.js b/lib/ace/mode/objectivec_highlight_rules.js index 2d557688..e703c8ad 100644 --- a/lib/ace/mode/objectivec_highlight_rules.js +++ b/lib/ace/mode/objectivec_highlight_rules.js @@ -41,7 +41,6 @@ var ObjectiveCHighlightRules = function() { DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, @@ -299,7 +298,6 @@ var ObjectiveCHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], diff --git a/lib/ace/mode/ocaml_highlight_rules.js b/lib/ace/mode/ocaml_highlight_rules.js index c970ed80..a17f034d 100644 --- a/lib/ace/mode/ocaml_highlight_rules.js +++ b/lib/ace/mode/ocaml_highlight_rules.js @@ -257,7 +257,6 @@ var OcamlHighlightRules = function() { }, { token : "comment", - merge : true, regex : '\\(\\*.*', next : "comment" }, @@ -271,7 +270,6 @@ var OcamlHighlightRules = function() { }, { token : "string", // " string - merge : true, regex : '"', next : "qstring" }, @@ -316,7 +314,6 @@ var OcamlHighlightRules = function() { }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -328,7 +325,6 @@ var OcamlHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ] diff --git a/lib/ace/mode/perl_highlight_rules.js b/lib/ace/mode/perl_highlight_rules.js index 7b5dcc5c..98586bb7 100644 --- a/lib/ace/mode/perl_highlight_rules.js +++ b/lib/ace/mode/perl_highlight_rules.js @@ -90,7 +90,6 @@ var PerlHighlightRules = function() { regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start - merge : true, regex : '["].*\\\\$', next : "qqstring" }, { @@ -98,7 +97,6 @@ var PerlHighlightRules = function() { regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "string", // multi line string start - merge : true, regex : "['].*\\\\$", next : "qstring" }, { @@ -131,7 +129,6 @@ var PerlHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], @@ -142,7 +139,6 @@ var PerlHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ] diff --git a/lib/ace/mode/pgsql_highlight_rules.js b/lib/ace/mode/pgsql_highlight_rules.js index c0a37cc2..e0263c12 100755 --- a/lib/ace/mode/pgsql_highlight_rules.js +++ b/lib/ace/mode/pgsql_highlight_rules.js @@ -449,7 +449,6 @@ var PgsqlHighlightRules = function() { DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi-line comment - merge : true, regex : "\\/\\*", next : "comment" },{ @@ -468,7 +467,6 @@ var PgsqlHighlightRules = function() { regex : "--.*$" }, { token : "comment", // multi-line comment - merge : true, regex : "\\/\\*", next : "commentStatement" }, { @@ -500,7 +498,6 @@ var PgsqlHighlightRules = function() { regex : "--.*$" }, { token : "comment", // multi-line comment - merge : true, regex : "\\/\\*", next : "commentDollarSql" }, { @@ -521,7 +518,6 @@ var PgsqlHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -533,7 +529,6 @@ var PgsqlHighlightRules = function() { next : "statement" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -545,7 +540,6 @@ var PgsqlHighlightRules = function() { next : "dollarSql" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -557,7 +551,6 @@ var PgsqlHighlightRules = function() { next : "statement" }, { token : "string", // dollarstring spanning whole line - merge : true, regex : ".+" } ], @@ -569,7 +562,6 @@ var PgsqlHighlightRules = function() { next : "dollarSql" }, { token : "string", // dollarstring spanning whole line - merge : true, regex : ".+" } ] diff --git a/lib/ace/mode/powershell_highlight_rules.js b/lib/ace/mode/powershell_highlight_rules.js index 28117226..6a03ac74 100644 --- a/lib/ace/mode/powershell_highlight_rules.js +++ b/lib/ace/mode/powershell_highlight_rules.js @@ -127,15 +127,12 @@ var PowershellHighlightRules = function() { next : "start" }, { token : "doc.comment.tag", - merge : true, regex : "^\\.\\w+" }, { token : "comment", - merge : true, regex : "\\w+" }, { token : "comment", - merge : true, regex : "." } ] diff --git a/lib/ace/mode/python_highlight_rules.js b/lib/ace/mode/python_highlight_rules.js index bf6f6b48..0e7a8bde 100644 --- a/lib/ace/mode/python_highlight_rules.js +++ b/lib/ace/mode/python_highlight_rules.js @@ -93,7 +93,6 @@ var PythonHighlightRules = function() { regex : strPre + '"{3}(?:[^\\\\]|\\\\.)*?"{3}' }, { token : "string", // multi line """ string start - merge : true, regex : strPre + '"{3}.*$', next : "qqstring" }, { @@ -104,7 +103,6 @@ var PythonHighlightRules = function() { regex : strPre + "'{3}(?:[^\\\\]|\\\\.)*?'{3}" }, { token : "string", // multi line ''' string start - merge : true, regex : strPre + "'{3}.*$", next : "qstring" }, { @@ -144,7 +142,6 @@ var PythonHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], "qstring" : [ { @@ -153,7 +150,6 @@ var PythonHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ] }; diff --git a/lib/ace/mode/ruby_highlight_rules.js b/lib/ace/mode/ruby_highlight_rules.js index 2522525a..8c45c3ae 100644 --- a/lib/ace/mode/ruby_highlight_rules.js +++ b/lib/ace/mode/ruby_highlight_rules.js @@ -134,7 +134,6 @@ var RubyHighlightRules = function() { regex : "#.*$" }, { token : "comment", // multi line comment - merge : true, regex : "^=begin\\s", next : "comment" }, { @@ -193,7 +192,6 @@ var RubyHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ] diff --git a/lib/ace/mode/scad_highlight_rules.js b/lib/ace/mode/scad_highlight_rules.js index 6b98b283..20d7b64a 100644 --- a/lib/ace/mode/scad_highlight_rules.js +++ b/lib/ace/mode/scad_highlight_rules.js @@ -55,7 +55,6 @@ var scadHighlightRules = function() { DocCommentHighlightRules.getStartRule("start"), { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, { @@ -108,7 +107,6 @@ var scadHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -119,7 +117,6 @@ var scadHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], @@ -130,7 +127,6 @@ var scadHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ] diff --git a/lib/ace/mode/scala_highlight_rules.js b/lib/ace/mode/scala_highlight_rules.js index 1277209f..1d8ec8de 100644 --- a/lib/ace/mode/scala_highlight_rules.js +++ b/lib/ace/mode/scala_highlight_rules.js @@ -67,7 +67,6 @@ var ScalaHighlightRules = function() { DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, { @@ -119,7 +118,6 @@ var ScalaHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -129,7 +127,6 @@ var ScalaHighlightRules = function() { regex : '\\\\"' }, { token : "string", - merge : true, regex : '"', next : "start" }, { @@ -138,8 +135,7 @@ var ScalaHighlightRules = function() { next : "start" }, { token : "string", - regex : '[^"\\\\]+', - merge : true + regex : '[^"\\\\]+' } ], "tstring" : [ @@ -149,7 +145,6 @@ var ScalaHighlightRules = function() { next : "start" }, { token : "string", // comment spanning whole line - merge : true, regex : ".+?" } ] diff --git a/lib/ace/mode/scss_highlight_rules.js b/lib/ace/mode/scss_highlight_rules.js index 446826d5..264416f6 100644 --- a/lib/ace/mode/scss_highlight_rules.js +++ b/lib/ace/mode/scss_highlight_rules.js @@ -176,7 +176,6 @@ var ScssHighlightRules = function() { }, { token : "comment", // multi line comment - merge : true, regex : "\\/\\*", next : "comment" }, { @@ -184,7 +183,6 @@ var ScssHighlightRules = function() { regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start - merge : true, regex : '["].*\\\\$', next : "qqstring" }, { @@ -192,7 +190,6 @@ var ScssHighlightRules = function() { regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "string", // multi line string start - merge : true, regex : "['].*\\\\$", next : "qstring" }, { @@ -261,7 +258,6 @@ var ScssHighlightRules = function() { next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], @@ -272,7 +268,6 @@ var ScssHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ], @@ -283,7 +278,6 @@ var ScssHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ] diff --git a/lib/ace/mode/stylus_highlight_rules.js b/lib/ace/mode/stylus_highlight_rules.js index affa06ca..d583a85b 100644 --- a/lib/ace/mode/stylus_highlight_rules.js +++ b/lib/ace/mode/stylus_highlight_rules.js @@ -29,7 +29,6 @@ var StylusHighlightRules = function() { }, { token : "comment", // multi line comment - merge : true, regex : /\/\*/, next : "comment" }, @@ -118,50 +117,42 @@ var StylusHighlightRules = function() { { token : "comment", // closing comment regex : ".*?\\*\\/", - merge : true, next : "start" }, { token : "comment", // comment spanning whole line - merge : true, regex : ".+" } ], "qqstring" : [ { token : "string", - regex : '[^"\\\\]+', - merge : true + regex : '[^"\\\\]+' }, { token : "string", regex : "\\\\$", - next : "qqstring", - merge : true + next : "qqstring" }, { token : "string", regex : '"|$', - next : "start", - merge : true + next : "start" } ], "qstring" : [ { token : "string", - regex : "[^'\\\\]+", - merge : true + regex : "[^'\\\\]+" }, { token : "string", regex : "\\\\$", - next : "qstring", - merge : true + next : "qstring" }, { token : "string", regex : "'|$", - next : "start", - merge : true + next : "start" } ] } diff --git a/lib/ace/mode/tcl_highlight_rules.js b/lib/ace/mode/tcl_highlight_rules.js index 25d72f2b..24f631cb 100644 --- a/lib/ace/mode/tcl_highlight_rules.js +++ b/lib/ace/mode/tcl_highlight_rules.js @@ -42,7 +42,6 @@ var TclHighlightRules = function() { "start" : [ { token : "comment", - merge : true, regex : "#.*\\\\$", next : "commentfollow" }, { @@ -64,12 +63,10 @@ var TclHighlightRules = function() { regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line """ string start - merge : true, regex : '[ ]*["]', next : "qqstring" }, { token : "variable.instancce", // variable xotcl with braces - merge : true, regex : "[$]", next : "variable" }, { @@ -96,7 +93,6 @@ var TclHighlightRules = function() { "commandItem" : [ { token : "comment", - merge : true, regex : "#.*\\\\$", next : "commentfollow" }, { @@ -108,7 +104,6 @@ var TclHighlightRules = function() { regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "variable.instancce", // variable xotcl with braces - merge : true, regex : "[$]", next : "variable" }, { @@ -138,7 +133,6 @@ var TclHighlightRules = function() { next : "commentfollow" }, { token : "comment", - merge : true, regex : '.+', next : "start" } ], @@ -168,7 +162,6 @@ var TclHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ] }; diff --git a/lib/ace/mode/xml_highlight_rules.js b/lib/ace/mode/xml_highlight_rules.js index ff46b4a2..bf8af68e 100644 --- a/lib/ace/mode/xml_highlight_rules.js +++ b/lib/ace/mode/xml_highlight_rules.js @@ -40,7 +40,7 @@ var XmlHighlightRules = function() { start : [ {token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"}, {token : "xml-pe", regex : "<\\?.*?\\?>"}, - {token : "comment", regex : "<\\!--", next : "comment", merge : true}, + {token : "comment", regex : "<\\!--", next : "comment"}, {token : "xml-pe", regex : "<\\!.*?>"}, {token : "meta.tag", regex : "<\\/?", next : "tag"}, {token : "text", regex : "\\s+"}, @@ -59,7 +59,7 @@ var XmlHighlightRules = function() { comment : [ {token : "comment", regex : ".*?-->", next : "start"}, - {token : "comment", merge : true, regex : ".+"} + {token : "comment", regex : ".+"} ] }; diff --git a/lib/ace/mode/xml_util.js b/lib/ace/mode/xml_util.js index a2cdea1b..781249f8 100644 --- a/lib/ace/mode/xml_util.js +++ b/lib/ace/mode/xml_util.js @@ -50,7 +50,7 @@ function multiLineString(quote, state) { token : "constant.language.escape", regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" }, - {token : "string", merge : true, regex : '\\w+|.|\\s+'} + {token : "string", regex : '\\w+|.|\\s+'} ]; } @@ -67,7 +67,6 @@ exports.tag = function(states, name, nextState, tagMap) { else return "meta.tag.tag-name"; }, - merge : true, regex : "[-_a-zA-Z0-9:]+", next : name + "_embed_attribute_list" }, { @@ -80,9 +79,8 @@ exports.tag = function(states, name, nextState, tagMap) { states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); states[name + "_embed_attribute_list"] = [{ - token : "meta.tag", - merge : true, - regex : "\/?>", + token : "meta.tag.r", + regex : "/?>", next : nextState }, { token : "keyword.operator", diff --git a/lib/ace/mode/yaml_highlight_rules.js b/lib/ace/mode/yaml_highlight_rules.js index 06caf64a..b049af1d 100644 --- a/lib/ace/mode/yaml_highlight_rules.js +++ b/lib/ace/mode/yaml_highlight_rules.js @@ -72,7 +72,6 @@ var YamlHighlightRules = function() { regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start - merge : true, regex : '[\\|>]\\w*', next : "qqstring" }, { @@ -111,7 +110,6 @@ var YamlHighlightRules = function() { next : "start" }, { token : "string", - merge : true, regex : '.+' } ]}; diff --git a/lib/ace/tokenizer.js b/lib/ace/tokenizer.js index 4d277275..f468602c 100644 --- a/lib/ace/tokenizer.js +++ b/lib/ace/tokenizer.js @@ -159,7 +159,7 @@ var Tokenizer = function(rules, flag) { if (!value[i]) continue; - if ((!rule || rule.merge || type[i] === "text") && token.type === type[i]) { + if ((!rule || rule.merge !== false) && token.type === type[i]) { token.value += value[i]; } else { if (token.type) From b4a607a28038b07ca1f1ad23306716d257ef086b Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 9 Dec 2012 19:03:29 +0400 Subject: [PATCH 10/14] add forgotten abap demo to index --- .gitignore | 3 ++- demo/kitchen-sink/docs/abap.abap | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 demo/kitchen-sink/docs/abap.abap diff --git a/.gitignore b/.gitignore index 04f175ff..76832436 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,8 @@ # A handy place to put stuff that git should ignore: /ignore/ node_modules/ -tool/node_modules/ +jam/ +* * .git-ref npm-debug.log diff --git a/demo/kitchen-sink/docs/abap.abap b/demo/kitchen-sink/docs/abap.abap new file mode 100644 index 00000000..f66bfdfa --- /dev/null +++ b/demo/kitchen-sink/docs/abap.abap @@ -0,0 +1,36 @@ +*************************************** +** Program: EXAMPLE ** +** Author: Joe Byte, 07-Jul-2007 ** +*************************************** + +REPORT BOOKINGS. + +* Read flight bookings from the database +SELECT * FROM FLIGHTINFO + WHERE CLASS = 'Y' "Y = economy + OR CLASS = 'C'. "C = business +(...) + +REPORT TEST. +WRITE 'Hello World'. + +USERPROMPT = 'Please double-click on a line in the output list ' & + 'to see the complete details of the transaction.'. + + +DATA LAST_EOM TYPE D. "last end-of-month date + +* Start from today's date + LAST_EOM = SY-DATUM. +* Set characters 6 and 7 (0-relative) of the YYYYMMDD string to "01", +* giving the first day of the current month + LAST_EOM+6(2) = '01'. +* Subtract one day + LAST_EOM = LAST_EOM - 1. + + WRITE: 'Last day of previous month was', LAST_EOM. + +DATA : BEGIN OF I_VBRK OCCURS 0, + VBELN LIKE VBRK-VBELN, + ZUONR LIKE VBRK-ZUONR, + END OF I_VBRK. \ No newline at end of file From fa906716198453b569d8087080bb905bf243ffde Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 9 Dec 2012 19:15:07 +0400 Subject: [PATCH 11/14] update highlighting tests after change --- lib/ace/mode/_test/tokens_asciidoc.json | 3 +- lib/ace/mode/_test/tokens_c9search.json | 45 ++-- lib/ace/mode/_test/tokens_c_cpp.json | 15 +- lib/ace/mode/_test/tokens_clojure.json | 77 +++---- lib/ace/mode/_test/tokens_coldfusion.json | 9 +- lib/ace/mode/_test/tokens_diff.json | 9 +- lib/ace/mode/_test/tokens_golang.json | 15 +- lib/ace/mode/_test/tokens_groovy.json | 18 +- lib/ace/mode/_test/tokens_haml.json | 13 +- lib/ace/mode/_test/tokens_html.json | 20 +- lib/ace/mode/_test/tokens_javascript.json | 23 +- lib/ace/mode/_test/tokens_jsp.json | 68 +++--- lib/ace/mode/_test/tokens_latex.json | 4 +- lib/ace/mode/_test/tokens_less.json | 12 +- lib/ace/mode/_test/tokens_liquid.json | 74 ++++--- lib/ace/mode/_test/tokens_lua.json | 19 +- lib/ace/mode/_test/tokens_luapage.json | 243 +++++++++++----------- lib/ace/mode/_test/tokens_markdown.json | 45 ++-- lib/ace/mode/_test/tokens_objectivec.json | 27 +-- lib/ace/mode/_test/tokens_ocaml.json | 24 +-- lib/ace/mode/_test/tokens_perl.json | 6 +- lib/ace/mode/_test/tokens_pgsql.json | 15 +- lib/ace/mode/_test/tokens_php.json | 64 +----- lib/ace/mode/_test/tokens_powershell.json | 3 +- lib/ace/mode/_test/tokens_python.json | 6 +- lib/ace/mode/_test/tokens_r.json | 21 +- lib/ace/mode/_test/tokens_rdoc.json | 208 +++++------------- lib/ace/mode/_test/tokens_rhtml.json | 28 +-- lib/ace/mode/_test/tokens_scad.json | 33 +-- lib/ace/mode/_test/tokens_scala.json | 15 +- lib/ace/mode/_test/tokens_scss.json | 3 +- lib/ace/mode/_test/tokens_sh.json | 6 +- lib/ace/mode/_test/tokens_svg.json | 39 ++-- lib/ace/mode/_test/tokens_tcl.json | 16 +- lib/ace/mode/_test/tokens_tex.json | 13 +- lib/ace/mode/_test/tokens_textile.json | 12 +- lib/ace/mode/_test/tokens_typescript.json | 12 +- lib/ace/mode/_test/tokens_xml.json | 144 ++++++------- lib/ace/mode/_test/tokens_yaml.json | 4 +- 39 files changed, 538 insertions(+), 873 deletions(-) diff --git a/lib/ace/mode/_test/tokens_asciidoc.json b/lib/ace/mode/_test/tokens_asciidoc.json index 99c45dd3..61f63285 100644 --- a/lib/ace/mode/_test/tokens_asciidoc.json +++ b/lib/ace/mode/_test/tokens_asciidoc.json @@ -397,8 +397,7 @@ [ "text", " " ], [ "constant.language.escape", "->" ], [ "text", "--" ], - [ "constant.language.escape", "<=" ], - [ "constant.language.escape", " --" ], + [ "constant.language.escape", "<= --" ], [ "text", " replacements" ] ] }, diff --git a/lib/ace/mode/_test/tokens_c9search.json b/lib/ace/mode/_test/tokens_c9search.json index 9aeee5be..491d3c9f 100644 --- a/lib/ace/mode/_test/tokens_c9search.json +++ b/lib/ace/mode/_test/tokens_c9search.json @@ -20,104 +20,91 @@ "state": "start", "data": [ [ "c9searchresults.constant.numeric", " 1" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var fs = require(\"fs\");" ] + [ "c9searchresults.text", ": var fs = require(\"fs\");" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t2" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var argv = require('optimist').argv;" ] + [ "c9searchresults.text", ": var argv = require('optimist').argv;" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t3" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var path = require(\"path\");" ] + [ "c9searchresults.text", ": var path = require(\"path\");" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t5" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var clientExtensions = {};" ] + [ "c9searchresults.text", ": var clientExtensions = {};" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t6" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var clientDirs = fs.readdirSync(__dirname + \"/../plugins-client\");" ] + [ "c9searchresults.text", ": var clientDirs = fs.readdirSync(__dirname + \"/../plugins-client\");" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t7" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "for (var i = 0; i < clientDirs.length; i++) {" ] + [ "c9searchresults.text", ": for (var i = 0; i < clientDirs.length; i++) {" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t8" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var dir = clientDirs[i];" ] + [ "c9searchresults.text", ": var dir = clientDirs[i];" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t12" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var name = dir.split(\".\")[1];" ] + [ "c9searchresults.text", ": var name = dir.split(\".\")[1];" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t16" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();" ] + [ "c9searchresults.text", ": var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t17" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var fsUrl = \"/workspace\";" ] + [ "c9searchresults.text", ": var fsUrl = \"/workspace\";" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t19" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var port = argv.p || process.env.PORT || 3131;" ] + [ "c9searchresults.text", ": var port = argv.p || process.env.PORT || 3131;" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t20" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var host = argv.l || \"localhost\";" ] + [ "c9searchresults.text", ": var host = argv.l || \"localhost\";" ] ] }, { "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t22" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var config = {" ] + [ "c9searchresults.text", ": var config = {" ] ] }, { @@ -135,8 +122,7 @@ "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t2" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var config = require(\"./default\");" ] + [ "c9searchresults.text", ": var config = require(\"./default\");" ] ] }, { @@ -154,8 +140,7 @@ "state": "start", "data": [ [ "c9searchresults.constant.numeric", "\t1" ], - [ "c9searchresults.text", ": " ], - [ "c9searchresults.text", "var config = require(\"./default\");" ] + [ "c9searchresults.text", ": var config = require(\"./default\");" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_c_cpp.json b/lib/ace/mode/_test/tokens_c_cpp.json index c7612814..0a6f9aae 100644 --- a/lib/ace/mode/_test/tokens_c_cpp.json +++ b/lib/ace/mode/_test/tokens_c_cpp.json @@ -147,8 +147,7 @@ [ "constant.numeric", "3" ], [ "punctuation.operator", ";" ], [ "text", " " ], - [ "comment", "/*" ], - [ "comment", " foobar */" ] + [ "comment", "/* foobar */" ] ] }, { @@ -168,8 +167,7 @@ "data": [ [ "text", " " ], [ "identifier", "a" ], - [ "keyword.operator", "+" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "+=" ], [ "constant.numeric", "2" ], [ "punctuation.operator", ";" ], [ "text", " " ], @@ -182,8 +180,7 @@ [ "text", " " ], [ "identifier", "cout" ], [ "text", " " ], - [ "keyword.operator", "<" ], - [ "keyword.operator", "<" ], + [ "keyword.operator", "<<" ], [ "text", " " ], [ "identifier", "a" ], [ "punctuation.operator", ";" ] @@ -238,8 +235,7 @@ { "state": "start", "data": [ - [ "comment", "/*" ], - [ "comment", " Print an error message and get out */" ] + [ "comment", "/* Print an error message and get out */" ] ] }, { @@ -271,8 +267,7 @@ "state": "start", "data": [ [ "constant.other", "} while (0) " ], - [ "comment", "/*" ], - [ "comment", " Note: No semicolon */" ] + [ "comment", "/* Note: No semicolon */" ] ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_clojure.json b/lib/ace/mode/_test/tokens_clojure.json index e83b3d89..47d197f9 100644 --- a/lib/ace/mode/_test/tokens_clojure.json +++ b/lib/ace/mode/_test/tokens_clojure.json @@ -12,33 +12,27 @@ "state": "start", "data": [ [ "text", " " ], - [ "string", "\"returns a String parting in a given language" ], - [ "string", "\"" ] + [ "string", "\"returns a String parting in a given language\"" ] ] }, { "state": "start", "data": [ [ "text", " " ], - [ "keyword", "(" ], - [ "keyword", "[" ], - [ "keyword", "]" ], + [ "keyword", "([]" ], [ "text", " " ], [ "keyword", "(" ], [ "identifier", "parting" ], [ "text", " " ], - [ "string", "\"World" ], - [ "string", "\"" ], - [ "keyword", ")" ], - [ "keyword", ")" ] + [ "string", "\"World\"" ], + [ "keyword", "))" ] ] }, { "state": "start", "data": [ [ "text", " " ], - [ "keyword", "(" ], - [ "keyword", "[" ], + [ "keyword", "([" ], [ "support.function", "name" ], [ "keyword", "]" ], [ "text", " " ], @@ -47,18 +41,15 @@ [ "text", " " ], [ "support.function", "name" ], [ "text", " " ], - [ "string", "\"en" ], - [ "string", "\"" ], - [ "keyword", ")" ], - [ "keyword", ")" ] + [ "string", "\"en\"" ], + [ "keyword", "))" ] ] }, { "state": "start", "data": [ [ "text", " " ], - [ "keyword", "(" ], - [ "keyword", "[" ], + [ "keyword", "([" ], [ "support.function", "name" ], [ "text", " " ], [ "identifier", "language" ], @@ -109,14 +100,12 @@ "state": "start", "data": [ [ "text", " " ], - [ "string", "\"en" ], - [ "string", "\"" ], + [ "string", "\"en\"" ], [ "text", " " ], [ "keyword", "(" ], [ "support.function", "str" ], [ "text", " " ], - [ "string", "\"Goodbye, " ], - [ "string", "\"" ], + [ "string", "\"Goodbye, \"" ], [ "text", " " ], [ "support.function", "name" ], [ "keyword", ")" ] @@ -126,14 +115,12 @@ "state": "start", "data": [ [ "text", " " ], - [ "string", "\"es" ], - [ "string", "\"" ], + [ "string", "\"es\"" ], [ "text", " " ], [ "keyword", "(" ], [ "support.function", "str" ], [ "text", " " ], - [ "string", "\"Adios, " ], - [ "string", "\"" ], + [ "string", "\"Adios, \"" ], [ "text", " " ], [ "support.function", "name" ], [ "keyword", ")" ] @@ -143,8 +130,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "keyword", "(" ], - [ "keyword", "throw" ], + [ "keyword", "(throw" ], [ "text", " " ], [ "keyword", "(" ], [ "identifier", "IllegalArgumentException" ], @@ -158,16 +144,10 @@ [ "keyword", "(" ], [ "support.function", "str" ], [ "text", " " ], - [ "string", "\"unsupported language " ], - [ "string", "\"" ], + [ "string", "\"unsupported language \"" ], [ "text", " " ], [ "identifier", "language" ], - [ "keyword", ")" ], - [ "keyword", ")" ], - [ "keyword", ")" ], - [ "keyword", ")" ], - [ "keyword", ")" ], - [ "keyword", ")" ] + [ "keyword", "))))))" ] ] }, { @@ -182,8 +162,7 @@ [ "text", " " ], [ "keyword", "(" ], [ "identifier", "parting" ], - [ "keyword", ")" ], - [ "keyword", ")" ], + [ "keyword", "))" ], [ "text", " " ], [ "comment", "; -> Goodbye, World" ] ] @@ -197,10 +176,8 @@ [ "keyword", "(" ], [ "identifier", "parting" ], [ "text", " " ], - [ "string", "\"Mark" ], - [ "string", "\"" ], - [ "keyword", ")" ], - [ "keyword", ")" ], + [ "string", "\"Mark\"" ], + [ "keyword", "))" ], [ "text", " " ], [ "comment", "; -> Goodbye, Mark" ] ] @@ -214,13 +191,10 @@ [ "keyword", "(" ], [ "identifier", "parting" ], [ "text", " " ], - [ "string", "\"Mark" ], - [ "string", "\"" ], + [ "string", "\"Mark\"" ], [ "text", " " ], - [ "string", "\"es" ], - [ "string", "\"" ], - [ "keyword", ")" ], - [ "keyword", ")" ], + [ "string", "\"es\"" ], + [ "keyword", "))" ], [ "text", " " ], [ "comment", "; -> Adios, Mark" ] ] @@ -234,13 +208,10 @@ [ "keyword", "(" ], [ "identifier", "parting" ], [ "text", " " ], - [ "string", "\"Mark" ], - [ "string", "\"" ], + [ "string", "\"Mark\"" ], [ "text", ", " ], - [ "string", "\"xy" ], - [ "string", "\"" ], - [ "keyword", ")" ], - [ "keyword", ")" ], + [ "string", "\"xy\"" ], + [ "keyword", "))" ], [ "text", " " ], [ "comment", "; -> java.lang.IllegalArgumentException: unsupported language xy" ] ] diff --git a/lib/ace/mode/_test/tokens_coldfusion.json b/lib/ace/mode/_test/tokens_coldfusion.json index 2c2a602c..b2da2dd2 100644 --- a/lib/ace/mode/_test/tokens_coldfusion.json +++ b/lib/ace/mode/_test/tokens_coldfusion.json @@ -2,8 +2,7 @@ { "state": "start", "data": [ - [ "comment", "" ] + [ "comment", "" ] ] }, { @@ -19,7 +18,7 @@ [ "entity.other.attribute-name", "welcome" ], [ "keyword.operator", "=" ], [ "string", "\"Hello World!\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -31,11 +30,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "cfoutput" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "#welcome#" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_diff.json b/lib/ace/mode/_test/tokens_diff.json index fa28d05d..fe217e60 100644 --- a/lib/ace/mode/_test/tokens_diff.json +++ b/lib/ace/mode/_test/tokens_diff.json @@ -2,8 +2,7 @@ { "state": "start", "data": [ - [ "variable", "diff" ], - [ "variable", " --git" ], + [ "variable", "diff --git" ], [ "keyword", " a/lib/ace/edit_session.js" ], [ "variable", " b/lib/ace/edit_session.js" ] ] @@ -381,8 +380,7 @@ { "state": "start", "data": [ - [ "variable", "diff" ], - [ "variable", " --git" ], + [ "variable", "diff --git" ], [ "keyword", " a/lib/ace/editor.js" ], [ "variable", " b/lib/ace/editor.js" ] ] @@ -647,8 +645,7 @@ { "state": "start", "data": [ - [ "variable", "diff" ], - [ "variable", " --git" ], + [ "variable", "diff --git" ], [ "keyword", " a/lib/ace/search_highlight.js" ], [ "variable", " b/lib/ace/search_highlight.js" ] ] diff --git a/lib/ace/mode/_test/tokens_golang.json b/lib/ace/mode/_test/tokens_golang.json index edfb232a..3b3929ae 100644 --- a/lib/ace/mode/_test/tokens_golang.json +++ b/lib/ace/mode/_test/tokens_golang.json @@ -102,8 +102,7 @@ [ "identifier", "pi" ], [ "paren.lparen", "(" ], [ "constant.numeric", "5000" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ] + [ "paren.rparen", "))" ] ] }, { @@ -203,8 +202,7 @@ [ "identifier", "float64" ], [ "paren.lparen", "(" ], [ "identifier", "k" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ] + [ "paren.rparen", "))" ] ] }, { @@ -259,11 +257,9 @@ [ "text", " " ], [ "identifier", "f" ], [ "text", " " ], - [ "keyword.operator", "+" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "+=" ], [ "text", " " ], - [ "keyword.operator", "<" ], - [ "keyword.operator", "-" ], + [ "keyword.operator", "<-" ], [ "identifier", "ch" ] ] }, @@ -321,8 +317,7 @@ [ "text", " " ], [ "identifier", "ch" ], [ "text", " " ], - [ "keyword.operator", "<" ], - [ "keyword.operator", "-" ], + [ "keyword.operator", "<-" ], [ "text", " " ], [ "constant.numeric", "4" ], [ "text", " " ], diff --git a/lib/ace/mode/_test/tokens_groovy.json b/lib/ace/mode/_test/tokens_groovy.json index 2c73f16b..8e967253 100644 --- a/lib/ace/mode/_test/tokens_groovy.json +++ b/lib/ace/mode/_test/tokens_groovy.json @@ -162,8 +162,7 @@ [ "identifier", "salary" ], [ "text", ":" ], [ "constant.numeric", "50" ], - [ "rparen", ")" ], - [ "rparen", "]" ] + [ "rparen", ")]" ] ] }, { @@ -195,8 +194,7 @@ [ "text", " " ], [ "identifier", "e" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", ">" ], + [ "keyword.operator", "->" ], [ "text", " " ], [ "identifier", "e" ], [ "text", "." ], @@ -279,8 +277,7 @@ [ "text", " " ], [ "identifier", "e" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", ">" ], + [ "keyword.operator", "->" ], [ "text", " " ], [ "identifier", "e" ], [ "text", "." ], @@ -350,8 +347,7 @@ [ "text", " " ], [ "identifier", "e" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", ">" ], + [ "keyword.operator", "->" ], [ "text", " " ], [ "identifier", "e" ], [ "text", "." ], @@ -398,8 +394,7 @@ [ "identifier", "emps" ], [ "lparen", "[" ], [ "constant.numeric", "0" ], - [ "rparen", "]" ], - [ "rparen", ")" ], + [ "rparen", "])" ], [ "text", " " ], [ "comment", "// true" ] ] @@ -457,8 +452,7 @@ [ "text", " " ], [ "identifier", "reader" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", ">" ], + [ "keyword.operator", "->" ], [ "text", " " ], [ "identifier", "doSomethingWith" ], [ "lparen", "(" ], diff --git a/lib/ace/mode/_test/tokens_haml.json b/lib/ace/mode/_test/tokens_haml.json index 78e4b858..fb4e69f6 100644 --- a/lib/ace/mode/_test/tokens_haml.json +++ b/lib/ace/mode/_test/tokens_haml.json @@ -218,8 +218,7 @@ "state": "start", "data": [ [ "entity.name.tag.haml", " %div" ], - [ "entity.other.attribute-name.class.haml", ".article" ], - [ "entity.other.attribute-name.class.haml", ".title" ], + [ "entity.other.attribute-name.class.haml", ".article.title" ], [ "text", " Blah" ] ] }, @@ -227,20 +226,16 @@ "state": "start", "data": [ [ "entity.name.tag.haml", " %div" ], - [ "entity.other.attribute-name.class.haml", ".article" ], - [ "entity.other.attribute-name.class.haml", ".date" ], + [ "entity.other.attribute-name.class.haml", ".article.date" ], [ "text", " " ], - [ "constant.numeric", "2006" ], - [ "constant.numeric", "-11" ], - [ "constant.numeric", "-05" ] + [ "constant.numeric", "2006-11-05" ] ] }, { "state": "start", "data": [ [ "entity.name.tag.haml", " %div" ], - [ "entity.other.attribute-name.class.haml", ".article" ], - [ "entity.other.attribute-name.class.haml", ".entry" ] + [ "entity.other.attribute-name.class.haml", ".article.entry" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_html.json b/lib/ace/mode/_test/tokens_html.json index 9b031aaf..d2b57638 100644 --- a/lib/ace/mode/_test/tokens_html.json +++ b/lib/ace/mode/_test/tokens_html.json @@ -4,7 +4,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "html" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -13,7 +13,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "head" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -30,7 +30,7 @@ [ "entity.other.attribute-name", "type" ], [ "keyword.operator", "=" ], [ "string", "\"text/css\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -88,7 +88,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -101,7 +101,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -110,7 +110,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "body" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -123,11 +123,11 @@ [ "entity.other.attribute-name", "style" ], [ "keyword.operator", "=" ], [ "string", "\"color:red\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Juhu Kinners" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -136,7 +136,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -144,7 +144,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_javascript.json b/lib/ace/mode/_test/tokens_javascript.json index 12057d81..1d04f26b 100644 --- a/lib/ace/mode/_test/tokens_javascript.json +++ b/lib/ace/mode/_test/tokens_javascript.json @@ -107,8 +107,7 @@ [ "keyword.operator", "=" ], [ "text", " " ], [ "string.regexp", "/d" ], - [ "constant.language.escape", "{1,2}" ], - [ "constant.language.escape", "?" ], + [ "constant.language.escape", "{1,2}?" ], [ "string.regexp", "f{e}" ], [ "invalid", "++" ], [ "string.regexp", "r" ], @@ -120,12 +119,10 @@ [ "string.regexp.charachterclass", "r" ], [ "constant.language.escape", "-" ], [ "string.regexp.charachterclass", "o" ], - [ "regexp.keyword.operator", "\\f" ], - [ "regexp.keyword.operator", "\\f" ], + [ "regexp.keyword.operator", "\\f\\f" ], [ "string.regexp.charachterclass", "[" ], [ "regexp.keyword.operator", "\\f" ], - [ "constant.language.escape", "]" ], - [ "constant.language.escape", "?" ], + [ "constant.language.escape", "]?" ], [ "string.regexp", "r" ], [ "invalid", "{7}+" ], [ "string.regexp", "r" ], @@ -133,21 +130,15 @@ [ "string.regexp", "7}" ], [ "constant.language.escape", "+" ], [ "string.regexp", "rr--rr" ], - [ "constant.language.escape", "$" ], - [ "constant.language.escape", "^" ], - [ "constant.language.escape", "(?:" ], + [ "constant.language.escape", "$^(?:" ], [ "string.regexp", "d" ], [ "constant.language.escape", "|" ], [ "string.regexp", "s" ], - [ "constant.language.escape", ")" ], - [ "constant.language.escape", "(?=" ], + [ "constant.language.escape", ")(?=" ], [ "string.regexp", "a" ], - [ "constant.language.escape", "|" ], - [ "constant.language.escape", ")" ], - [ "constant.language.escape", "(?!" ], + [ "constant.language.escape", "|)(?!" ], [ "string.regexp", "y" ], - [ "constant.language.escape", ")[]" ], - [ "constant.language.escape", "|" ], + [ "constant.language.escape", ")[]|" ], [ "invalid", "$?" ], [ "constant.language.escape", "|" ], [ "invalid", "^*" ], diff --git a/lib/ace/mode/_test/tokens_jsp.json b/lib/ace/mode/_test/tokens_jsp.json index 4f5e9e46..f1ce8e00 100644 --- a/lib/ace/mode/_test/tokens_jsp.json +++ b/lib/ace/mode/_test/tokens_jsp.json @@ -4,7 +4,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "html" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -12,7 +12,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "body" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -21,7 +21,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name.script", "script" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -62,7 +62,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -71,7 +71,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name.style", "style" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -106,7 +106,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -119,7 +119,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -138,8 +138,7 @@ [ "text", "." ], [ "identifier", "Date" ], [ "lparen", "(" ], - [ "rparen", ")" ], - [ "rparen", ")" ], + [ "rparen", "))" ], [ "text", "." ], [ "identifier", "toLocaleString" ], [ "lparen", "(" ], @@ -153,7 +152,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -210,8 +209,7 @@ "state": "start", "data": [ [ "text", " " ], - [ "comment", "<%--" ], - [ "comment", " This is JSP comment --%>" ] + [ "comment", "<%-- This is JSP comment --%>" ] ] }, { @@ -239,11 +237,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "h2" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Select Languages:" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -260,7 +258,7 @@ [ "entity.other.attribute-name", "ACTION" ], [ "keyword.operator", "=" ], [ "string", "\"jspCheckBox.jsp\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -281,11 +279,11 @@ [ "entity.other.attribute-name", "value" ], [ "keyword.operator", "=" ], [ "string", "\"Java\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", " Java" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "BR" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -306,11 +304,11 @@ [ "entity.other.attribute-name", "value" ], [ "keyword.operator", "=" ], [ "string", "\".NET\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", " .NET" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "BR" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -331,11 +329,11 @@ [ "entity.other.attribute-name", "value" ], [ "keyword.operator", "=" ], [ "string", "\"PHP\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", " PHP" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "BR" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -356,11 +354,11 @@ [ "entity.other.attribute-name", "value" ], [ "keyword.operator", "=" ], [ "string", "\"C/C++\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", " C/C++" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "BR" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -381,11 +379,11 @@ [ "entity.other.attribute-name", "value" ], [ "keyword.operator", "=" ], [ "string", "\"PERL\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", " PERL " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "BR" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -402,7 +400,7 @@ [ "entity.other.attribute-name", "value" ], [ "keyword.operator", "=" ], [ "string", "\"Submit\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -411,7 +409,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -455,20 +453,17 @@ [ "lparen", "(" ], [ "identifier", "select" ], [ "text", " " ], - [ "keyword.operator", "!" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "!=" ], [ "text", " " ], [ "constant.language", "null" ], [ "text", " " ], - [ "keyword.operator", "&" ], - [ "keyword.operator", "&" ], + [ "keyword.operator", "&&" ], [ "text", " " ], [ "identifier", "select" ], [ "text", "." ], [ "identifier", "length" ], [ "text", " " ], - [ "keyword.operator", "!" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "!=" ], [ "text", " " ], [ "constant.numeric", "0" ], [ "rparen", ")" ], @@ -530,8 +525,7 @@ [ "identifier", "select" ], [ "lparen", "[" ], [ "identifier", "i" ], - [ "rparen", "]" ], - [ "rparen", ")" ], + [ "rparen", "])" ], [ "text", "; " ] ] }, @@ -561,7 +555,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -569,7 +563,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_latex.json b/lib/ace/mode/_test/tokens_latex.json index 0abe75ed..8d5fee7c 100644 --- a/lib/ace/mode/_test/tokens_latex.json +++ b/lib/ace/mode/_test/tokens_latex.json @@ -169,9 +169,7 @@ [ "rparen", "}" ], [ "lparen", "{" ], [ "text", "c^2" ], - [ "rparen", "}" ], - [ "rparen", "}" ], - [ "rparen", "}" ] + [ "rparen", "}}}" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_less.json b/lib/ace/mode/_test/tokens_less.json index 5a9f91b6..63984de5 100644 --- a/lib/ace/mode/_test/tokens_less.json +++ b/lib/ace/mode/_test/tokens_less.json @@ -2,8 +2,7 @@ { "state": "start", "data": [ - [ "comment", "/*" ], - [ "comment", " styles.less */" ] + [ "comment", "/* styles.less */" ] ] }, { @@ -39,8 +38,7 @@ [ "support.function", "iscolor" ], [ "paren.lparen", "(" ], [ "variable", "@c" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "))" ], [ "text", " " ], [ "paren.lparen", "{" ] ] @@ -99,8 +97,7 @@ [ "support.function", "isnumber" ], [ "paren.lparen", "(" ], [ "variable", "@alpha" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "))" ], [ "text", " " ], [ "paren.lparen", "{" ] ] @@ -122,8 +119,7 @@ [ "constant.numeric", "0" ], [ "text", ", " ], [ "variable", "@alpha" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "))" ], [ "text", ";" ] ] }, diff --git a/lib/ace/mode/_test/tokens_liquid.json b/lib/ace/mode/_test/tokens_liquid.json index 73c37daa..f519d6d9 100644 --- a/lib/ace/mode/_test/tokens_liquid.json +++ b/lib/ace/mode/_test/tokens_liquid.json @@ -89,7 +89,7 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"products\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -115,7 +115,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "li" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -124,7 +124,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "h2" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "variable", "{{" ], [ "text", " " ], [ "identifier", "product" ], @@ -134,7 +134,7 @@ [ "variable", "}}" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -153,7 +153,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "variable", "{{" ], [ "text", " " ], [ "identifier", "product" ], @@ -169,7 +169,7 @@ [ "variable", "}}" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -182,7 +182,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -202,7 +202,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -228,11 +228,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "h2" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Filters" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -240,11 +240,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", " The word \"tobi\" in uppercase: {{ 'tobi' | upcase }} " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -252,11 +252,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "The word \"tobi\" has {{ 'tobi' | size }} letters! " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -264,11 +264,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Change \"Hello world\" to \"Hi world\": {{ 'Hello world' | replace: 'Hello', 'Hi' }} " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -276,11 +276,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "The date today is {{ 'now' | date: \"%Y %b %d\" }} " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -296,11 +296,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "h2" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "If" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -308,7 +308,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -323,8 +323,7 @@ [ "text", "." ], [ "identifier", "name" ], [ "text", " " ], - [ "keyword.operator", "=" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "==" ], [ "text", " " ], [ "string", "'tobi'" ], [ "text", " " ], @@ -334,8 +333,7 @@ [ "text", "." ], [ "identifier", "name" ], [ "text", " " ], - [ "keyword.operator", "=" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "==" ], [ "text", " " ], [ "string", "'marc'" ], [ "text", " " ], @@ -365,7 +363,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -381,11 +379,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "h2" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Case" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -393,7 +391,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -495,7 +493,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -511,11 +509,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "h2" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "For Loops" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -523,7 +521,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -571,7 +569,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -587,11 +585,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "h2" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Tables" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -599,7 +597,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -688,7 +686,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_lua.json b/lib/ace/mode/_test/tokens_lua.json index f249f658..95ddb113 100644 --- a/lib/ace/mode/_test/tokens_lua.json +++ b/lib/ace/mode/_test/tokens_lua.json @@ -20,8 +20,7 @@ { "state": "start", "data": [ - [ "comment", "--]]" ], - [ "comment", "--" ] + [ "comment", "--]]--" ] ] }, { @@ -138,8 +137,7 @@ [ "support.function", "sub" ], [ "paren.lparen", "(" ], [ "constant.numeric", "13" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "))" ], [ "text", ", " ], [ "identifier", "offset" ], [ "text", " " ], @@ -283,8 +281,7 @@ [ "identifier", "other" ], [ "paren.rparen", ")" ], [ "text", " " ], - [ "keyword.operator", "~" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "~=" ], [ "text", " " ], [ "string", "\"table\"" ], [ "text", " " ], @@ -348,8 +345,7 @@ [ "support.function", "unpack" ], [ "paren.lparen", "(" ], [ "identifier", "other" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ] + [ "paren.rparen", "))" ] ] }, { @@ -387,9 +383,7 @@ [ "identifier", "num_args" ], [ "paren.lparen", "(" ], [ "identifier", "int" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", "}" ], - [ "paren.rparen", ")" ] + [ "paren.rparen", ")})" ] ] }, { @@ -411,8 +405,7 @@ { "state": "start", "data": [ - [ "comment", "--]=]" ], - [ "comment", "--" ] + [ "comment", "--]=]--" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_luapage.json b/lib/ace/mode/_test/tokens_luapage.json index a6395ef0..e044e7ad 100644 --- a/lib/ace/mode/_test/tokens_luapage.json +++ b/lib/ace/mode/_test/tokens_luapage.json @@ -19,7 +19,7 @@ "data": [ [ "text", " " ], [ "string", "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -27,7 +27,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "html" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -63,7 +63,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "head" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -72,11 +72,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "title" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Reference" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -92,25 +92,27 @@ [ "text", " " ], [ "entity.other.attribute-name", "href" ], [ "keyword.operator", "=" ], - [ "string", "\"<%=luadoc.doclet.html.link(\"" ], - [ "entity.other.attribute-name", "luadoc" ], + [ "string", "\"" ], + [ "keyword", "<%=" ], + [ "identifier", "luadoc" ], [ "text", "." ], - [ "entity.other.attribute-name", "css" ], - [ "string", "\")%>\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "type" ], - [ "keyword.operator", "=" ], - [ "string", "\"text/css\"" ], - [ "text", " " ], - [ "meta.tag", "/>" ] + [ "identifier", "doclet" ], + [ "text", "." ], + [ "identifier", "html" ], + [ "text", "." ], + [ "identifier", "link" ], + [ "paren.lparen", "(" ], + [ "string", "\"luadoc.css\"" ], + [ "paren.rparen", ")" ], + [ "keyword", "%>" ], + [ "text", "\" type=\"text/css\" />" ] ] }, { "state": "start", "data": [ [ "text", "\t" ], - [ "comment", "" ] + [ "comment", "" ] ] }, { @@ -118,7 +120,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -130,7 +132,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "body" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -142,7 +144,7 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"container\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -158,7 +160,7 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"product\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -171,10 +173,10 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"product_logo\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -187,22 +189,22 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"product_name\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "big" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "b" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -215,10 +217,10 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"product_description\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -226,10 +228,9 @@ "data": [ [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "text", " " ], - [ "comment", "" ] + [ "comment", "" ] ] }, { @@ -245,7 +246,7 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"main\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -261,7 +262,7 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"navigation\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -284,8 +285,7 @@ [ "keyword.operator", "=" ], [ "identifier", "doc" ], [ "text", " " ], - [ "paren.rparen", "}" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "})" ], [ "keyword", "%>" ] ] }, @@ -298,10 +298,9 @@ "data": [ [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "text", " " ], - [ "comment", "" ] + [ "comment", "" ] ] }, { @@ -317,7 +316,7 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"content\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -331,8 +330,7 @@ { "state": "start", "data": [ - [ "keyword", "<%" ], - [ "keyword", "if" ], + [ "keyword", "<%if" ], [ "text", " " ], [ "keyword", "not" ], [ "text", " " ], @@ -351,8 +349,7 @@ [ "text", " " ], [ "constant.numeric", "0" ], [ "text", " " ], - [ "keyword", "then" ], - [ "keyword", "%>" ] + [ "keyword", "then%>" ] ] }, { @@ -360,11 +357,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "h2" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Modules" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -376,21 +373,19 @@ [ "entity.other.attribute-name", "class" ], [ "keyword.operator", "=" ], [ "string", "\"module_list\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { "state": "start", "data": [ - [ "comment", "" ] + [ "comment", "" ] ] }, { "state": "start", "data": [ - [ "keyword", "<%" ], - [ "keyword", "for" ], + [ "keyword", "<%for" ], [ "text", " " ], [ "identifier", "_" ], [ "text", ", " ], @@ -405,8 +400,7 @@ [ "identifier", "modules" ], [ "paren.rparen", ")" ], [ "text", " " ], - [ "keyword", "do" ], - [ "keyword", "%>" ] + [ "keyword", "do%>" ] ] }, { @@ -415,7 +409,7 @@ [ "text", "\t" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name.table", "tr" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -428,23 +422,37 @@ [ "entity.other.attribute-name", "class" ], [ "keyword.operator", "=" ], [ "string", "\"name\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name.anchor", "a" ], [ "text", " " ], [ "entity.other.attribute-name", "href" ], [ "keyword.operator", "=" ], - [ "string", "\"<%=luadoc.doclet.html.module_link(modulename, doc)%>\"" ], - [ "meta.tag", ">" ], + [ "string", "\"" ], + [ "keyword", "<%=" ], + [ "identifier", "luadoc" ], + [ "text", "." ], + [ "identifier", "doclet" ], + [ "text", "." ], + [ "identifier", "html" ], + [ "text", "." ], + [ "identifier", "module_link" ], + [ "paren.lparen", "(" ], + [ "identifier", "modulename" ], + [ "text", ", " ], + [ "identifier", "doc" ], + [ "paren.rparen", ")" ], + [ "keyword", "%>" ], + [ "text", "\">" ], [ "keyword", "<%=" ], [ "identifier", "modulename" ], [ "keyword", "%>" ], [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -457,7 +465,7 @@ [ "entity.other.attribute-name", "class" ], [ "keyword.operator", "=" ], [ "string", "\"summary\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "keyword", "<%=" ], [ "identifier", "doc" ], [ "text", "." ], @@ -470,7 +478,7 @@ [ "keyword", "%>" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -479,15 +487,13 @@ [ "text", "\t" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { "state": "start", "data": [ - [ "keyword", "<%" ], - [ "keyword", "end" ], - [ "keyword", "%>" ] + [ "keyword", "<%end%>" ] ] }, { @@ -495,15 +501,13 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { "state": "start", "data": [ - [ "keyword", "<%" ], - [ "keyword", "end" ], - [ "keyword", "%>" ] + [ "keyword", "<%end%>" ] ] }, { @@ -521,8 +525,7 @@ { "state": "start", "data": [ - [ "keyword", "<%" ], - [ "keyword", "if" ], + [ "keyword", "<%if" ], [ "text", " " ], [ "keyword", "not" ], [ "text", " " ], @@ -541,8 +544,7 @@ [ "text", " " ], [ "constant.numeric", "0" ], [ "text", " " ], - [ "keyword", "then" ], - [ "keyword", "%>" ] + [ "keyword", "then%>" ] ] }, { @@ -550,11 +552,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "h2" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Files" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -566,21 +568,19 @@ [ "entity.other.attribute-name", "class" ], [ "keyword.operator", "=" ], [ "string", "\"file_list\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { "state": "start", "data": [ - [ "comment", "" ] + [ "comment", "" ] ] }, { "state": "start", "data": [ - [ "keyword", "<%" ], - [ "keyword", "for" ], + [ "keyword", "<%for" ], [ "text", " " ], [ "identifier", "_" ], [ "text", ", " ], @@ -595,8 +595,7 @@ [ "identifier", "files" ], [ "paren.rparen", ")" ], [ "text", " " ], - [ "keyword", "do" ], - [ "keyword", "%>" ] + [ "keyword", "do%>" ] ] }, { @@ -605,7 +604,7 @@ [ "text", "\t" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name.table", "tr" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -618,23 +617,35 @@ [ "entity.other.attribute-name", "class" ], [ "keyword.operator", "=" ], [ "string", "\"name\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name.anchor", "a" ], [ "text", " " ], [ "entity.other.attribute-name", "href" ], [ "keyword.operator", "=" ], - [ "string", "\"<%=luadoc.doclet.html.file_link(filepath)%>\"" ], - [ "meta.tag", ">" ], + [ "string", "\"" ], + [ "keyword", "<%=" ], + [ "identifier", "luadoc" ], + [ "text", "." ], + [ "identifier", "doclet" ], + [ "text", "." ], + [ "identifier", "html" ], + [ "text", "." ], + [ "identifier", "file_link" ], + [ "paren.lparen", "(" ], + [ "identifier", "filepath" ], + [ "paren.rparen", ")" ], + [ "keyword", "%>" ], + [ "text", "\">" ], [ "keyword", "<%=" ], [ "identifier", "filepath" ], [ "keyword", "%>" ], [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -647,10 +658,10 @@ [ "entity.other.attribute-name", "class" ], [ "keyword.operator", "=" ], [ "string", "\"summary\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -659,15 +670,13 @@ [ "text", "\t" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { "state": "start", "data": [ - [ "keyword", "<%" ], - [ "keyword", "end" ], - [ "keyword", "%>" ] + [ "keyword", "<%end%>" ] ] }, { @@ -675,15 +684,13 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { "state": "start", "data": [ - [ "keyword", "<%" ], - [ "keyword", "end" ], - [ "keyword", "%>" ] + [ "keyword", "<%end%>" ] ] }, { @@ -695,10 +702,9 @@ "data": [ [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "text", " " ], - [ "comment", "" ] + [ "comment", "" ] ] }, { @@ -710,10 +716,9 @@ "data": [ [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "text", " " ], - [ "comment", "" ] + [ "comment", "" ] ] }, { @@ -729,7 +734,7 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"about\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -738,14 +743,14 @@ [ "text", "\t" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name.anchor", "a" ], [ "text", " " ], [ "entity.other.attribute-name", "href" ], [ "keyword.operator", "=" ], [ "string", "\"http://validator.w3.org/check?uri=referer\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "<" ], [ "meta.tag.tag-name.image", "img" ], [ "text", " " ], @@ -765,13 +770,13 @@ [ "keyword.operator", "=" ], [ "string", "\"88\"" ], [ "text", " " ], - [ "meta.tag", "/>" ], + [ "meta.tag.r", "/>" ], [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -779,10 +784,9 @@ "data": [ [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "text", " " ], - [ "comment", "" ] + [ "comment", "" ] ] }, { @@ -794,10 +798,9 @@ "data": [ [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "text", " " ], - [ "comment", "" ], + [ "comment", "" ], [ "text", "\t" ] ] }, @@ -806,7 +809,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -814,7 +817,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_markdown.json b/lib/ace/mode/_test/tokens_markdown.json index 02e22c00..2ef5e907 100644 --- a/lib/ace/mode/_test/tokens_markdown.json +++ b/lib/ace/mode/_test/tokens_markdown.json @@ -48,8 +48,7 @@ { "state": "listblock", "data": [ - [ "markup.list", "* " ], - [ "markup.list", "Syntax highlighting" ] + [ "markup.list", "* Syntax highlighting" ] ] }, { @@ -288,17 +287,13 @@ "state": "start", "data": [ [ "text", "Ace can be easily embedded into any existing web page. The Ace git repository ships with a pre-packaged version of Ace inside of the " ], - [ "support.function", "`" ], - [ "support.function", "build" ], - [ "support.function", "`" ], + [ "support.function", "`build`" ], [ "text", " directory. The same packaged files are also available as a separate [" ], [ "string", "download" ], [ "text", "](" ], [ "markup.underline", "https://github.com/ajaxorg/ace/downloads" ], [ "text", "). Simply copy the contents of the " ], - [ "support.function", "`" ], - [ "support.function", "src" ], - [ "support.function", "`" ], + [ "support.function", "`src`" ], [ "text", " subdirectory somewhere into your project and take a look at the included demos of how to use Ace." ] ] }, @@ -332,11 +327,11 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"editor\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "some text" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -357,10 +352,10 @@ [ "entity.other.attribute-name", "charset" ], [ "keyword.operator", "=" ], [ "string", "\"utf-8\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -369,7 +364,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name.script", "script" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -422,7 +417,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -439,13 +434,9 @@ "state": "start", "data": [ [ "text", "With \"editor\" being the id of the DOM element, which should be converted to an editor. Note that this element must be explicitly sized and positioned " ], - [ "support.function", "`" ], - [ "support.function", "absolute" ], - [ "support.function", "`" ], + [ "support.function", "`absolute`" ], [ "text", " or " ], - [ "support.function", "`" ], - [ "support.function", "relative" ], - [ "support.function", "`" ], + [ "support.function", "`relative`" ], [ "text", " for Ace to work. e.g." ] ] }, @@ -551,10 +542,10 @@ [ "entity.other.attribute-name", "charset" ], [ "keyword.operator", "=" ], [ "string", "\"utf-8\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -640,10 +631,10 @@ [ "entity.other.attribute-name", "charset" ], [ "keyword.operator", "=" ], [ "string", "\"utf-8\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -707,8 +698,7 @@ [ "text", " " ], [ "identifier", "JavaScriptMode" ], [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "))" ], [ "punctuation.operator", ";" ] ] }, @@ -1131,8 +1121,7 @@ { "state": "listblock", "data": [ - [ "markup.list", "1. " ], - [ "markup.list", "[The Individual CLA](https://github.com/ajaxorg/ace/raw/master/doc/Contributor_License_Agreement-v2.pdf): use this version if you're working on an ajax.org in your spare time, or can clearly claim ownership of copyright in what you'll be submitting." ] + [ "markup.list", "1. [The Individual CLA](https://github.com/ajaxorg/ace/raw/master/doc/Contributor_License_Agreement-v2.pdf): use this version if you're working on an ajax.org in your spare time, or can clearly claim ownership of copyright in what you'll be submitting." ] ] }, { diff --git a/lib/ace/mode/_test/tokens_objectivec.json b/lib/ace/mode/_test/tokens_objectivec.json index aafd5868..d2a77f3d 100644 --- a/lib/ace/mode/_test/tokens_objectivec.json +++ b/lib/ace/mode/_test/tokens_objectivec.json @@ -104,8 +104,7 @@ [ "string.begin.objc", "@\"" ], [ "constant.character.escape.objc", "\\f" ], [ "string", "aw" ], - [ "constant.character.escape.objc", "\\\"" ], - [ "constant.character.escape.objc", "\\?" ], + [ "constant.character.escape.objc", "\\\"\\?" ], [ "string", " " ], [ "constant.character.escape.objc", "\\'" ], [ "string", " " ], @@ -344,8 +343,7 @@ [ "text", " " ], [ "identifier", "result" ], [ "text", " " ], - [ "keyword.operator", "+" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "+=" ], [ "text", " " ], [ "constant.numeric", "2" ], [ "text", " " ], @@ -579,8 +577,7 @@ [ "identifier", "ProtocolFromString" ], [ "punctuation.operator", ":" ], [ "string", "\"NSTableViewDelegate\"" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ] + [ "paren.rparen", "))" ] ] }, { @@ -710,14 +707,12 @@ { "state": "start", "data": [ - [ "punctuation.definition.storage.type.objc", "@" ], - [ "punctuation.definition.storage.type.objc", "selector" ], + [ "punctuation.definition.storage.type.objc", "@selector" ], [ "punctuation", "(" ], [ "support.function.any-method.name-of-parameter.objc", "lowercaseString" ], [ "punctuation", ")" ], [ "text", " " ], - [ "punctuation.definition.storage.type.objc", "@" ], - [ "punctuation.definition.storage.type.objc", "selector" ], + [ "punctuation.definition.storage.type.objc", "@selector" ], [ "punctuation", "(" ], [ "support.function.any-method.name-of-parameter.objc", "uppercaseString:" ], [ "punctuation", ")" ] @@ -737,8 +732,7 @@ [ "text", " " ], [ "keyword.operator", "=" ], [ "text", " " ], - [ "punctuation.section.scope.begin.objc", "[" ], - [ "punctuation.section.scope.begin.objc", "[" ], + [ "punctuation.section.scope.begin.objc", "[[" ], [ "identifier", "NSFetchRequest" ], [ "text", " " ], [ "support.function.any-method.objc", "alloc" ], @@ -799,8 +793,7 @@ [ "identifier", "ascending" ], [ "punctuation.operator", ":" ], [ "constant.language.objc", "YES" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", "]" ], + [ "paren.rparen", "]]" ], [ "punctuation.operator", ";" ], [ "text", " " ] ] @@ -889,8 +882,7 @@ [ "text", " " ], [ "keyword.operator", "=" ], [ "text", " " ], - [ "punctuation.section.scope.begin.objc", "[" ], - [ "punctuation.section.scope.begin.objc", "[" ], + [ "punctuation.section.scope.begin.objc", "[[" ], [ "identifier", "myMutableDictionary" ], [ "text", " " ], [ "support.function.any-method.objc", "allKeys" ], @@ -998,8 +990,7 @@ "data": [ [ "keyword", "#define" ], [ "constant.other", " Nil __DARWIN_NULL " ], - [ "comment", "/*" ], - [ "comment", " id of Nil class */" ] + [ "comment", "/* id of Nil class */" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_ocaml.json b/lib/ace/mode/_test/tokens_ocaml.json index fa5055c4..5985f5ea 100644 --- a/lib/ace/mode/_test/tokens_ocaml.json +++ b/lib/ace/mode/_test/tokens_ocaml.json @@ -45,8 +45,7 @@ [ "text", " : " ], [ "identifier", "_" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", ">" ], + [ "keyword.operator", "->" ], [ "text", " " ], [ "identifier", "t" ], [ "paren.rparen", ")" ], @@ -112,8 +111,7 @@ [ "text", " " ], [ "identifier", "x" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", ">" ], + [ "keyword.operator", "->" ], [ "text", " " ], [ "support.function", "raise" ], [ "text", " " ], @@ -123,8 +121,7 @@ [ "identifier", "Return" ], [ "text", " " ], [ "identifier", "x" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "))" ], [ "text", "; " ], [ "paren.rparen", "}" ], [ "text", " " ], @@ -149,8 +146,7 @@ [ "text", " " ], [ "identifier", "x" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", ">" ], + [ "keyword.operator", "->" ], [ "text", " " ], [ "identifier", "x" ] ] @@ -192,8 +188,7 @@ [ "text", " " ], [ "identifier", "r" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", ">" ] + [ "keyword.operator", "->" ] ] }, { @@ -221,8 +216,7 @@ [ "text", " " ], [ "identifier", "x" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", ">" ] + [ "keyword.operator", "->" ] ] }, { @@ -233,8 +227,7 @@ [ "text", " " ], [ "identifier", "x" ], [ "text", " " ], - [ "keyword.operator", ">" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", ">=" ], [ "text", " " ], [ "constant.numeric", "0" ], [ "text", " " ], @@ -253,8 +246,7 @@ [ "identifier", "return" ], [ "text", " " ], [ "identifier", "acc" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ] + [ "paren.rparen", "))" ] ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_perl.json b/lib/ace/mode/_test/tokens_perl.json index fb33da27..4eca7629 100644 --- a/lib/ace/mode/_test/tokens_perl.json +++ b/lib/ace/mode/_test/tokens_perl.json @@ -130,8 +130,7 @@ [ "lparen", "(" ], [ "identifier", "$num_primes" ], [ "constant.numeric", "-1" ], - [ "rparen", ")" ], - [ "rparen", ")" ] + [ "rparen", "))" ] ] }, { @@ -263,8 +262,7 @@ [ "lparen", "(" ], [ "identifier", "$num_primes" ], [ "constant.numeric", "-1" ], - [ "rparen", ")" ], - [ "rparen", ")" ] + [ "rparen", "))" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_pgsql.json b/lib/ace/mode/_test/tokens_pgsql.json index 6e663093..6f3c8a16 100644 --- a/lib/ace/mode/_test/tokens_pgsql.json +++ b/lib/ace/mode/_test/tokens_pgsql.json @@ -932,11 +932,9 @@ "data": [ [ "keyword.statementBegin", "select" ], [ "text", " " ], - [ "string", "'don'" ], - [ "string", "'t do it now;'" ], + [ "string", "'don''t do it now;'" ], [ "text", " " ], - [ "keyword.operator", "|" ], - [ "keyword.operator", "|" ], + [ "keyword.operator", "||" ], [ "text", " " ], [ "string", "'maybe later'" ], [ "statementEnd", ";" ] @@ -959,14 +957,11 @@ [ "text", " " ], [ "support.function", "length" ], [ "paren.lparen", "(" ], - [ "string", "'some other'" ], - [ "string", "'s stuff'" ], + [ "string", "'some other''s stuff'" ], [ "text", " " ], - [ "keyword.operator", "|" ], - [ "keyword.operator", "|" ], + [ "keyword.operator", "||" ], [ "text", " " ], - [ "string", "$$" ], - [ "string", "cat in hat's stuff $$" ], + [ "string", "$$cat in hat's stuff $$" ], [ "paren.rparen", ")" ], [ "statementEnd", ";" ] ] diff --git a/lib/ace/mode/_test/tokens_php.json b/lib/ace/mode/_test/tokens_php.json index 4af87375..39f26df3 100644 --- a/lib/ace/mode/_test/tokens_php.json +++ b/lib/ace/mode/_test/tokens_php.json @@ -109,41 +109,8 @@ [ "support.function", "echo" ], [ "text", " " ], [ "string", "\"" ], - [ "constant.language.escape", "\\n" ], - [ "constant.language.escape", "\\n" ], - [ "string", "P" ], - [ "string", "l" ], - [ "string", "e" ], - [ "string", "a" ], - [ "string", "s" ], - [ "string", "e" ], - [ "string", " " ], - [ "string", "e" ], - [ "string", "n" ], - [ "string", "t" ], - [ "string", "e" ], - [ "string", "r" ], - [ "string", " " ], - [ "string", "a" ], - [ "string", " " ], - [ "string", "w" ], - [ "string", "h" ], - [ "string", "o" ], - [ "string", "l" ], - [ "string", "e" ], - [ "string", " " ], - [ "string", "n" ], - [ "string", "u" ], - [ "string", "m" ], - [ "string", "b" ], - [ "string", "e" ], - [ "string", "r" ], - [ "string", " " ], - [ "string", "." ], - [ "string", "." ], - [ "string", "." ], - [ "string", " " ], - [ "string", "\"" ], + [ "constant.language.escape", "\\n\\n" ], + [ "string", "Please enter a whole number ... \"" ], [ "text", ";" ] ] }, @@ -159,8 +126,7 @@ [ "support.function", "fgets" ], [ "lparen", "(" ], [ "constant.language", "STDIN" ], - [ "rparen", ")" ], - [ "rparen", ")" ], + [ "rparen", "))" ], [ "text", ";" ] ] }, @@ -182,27 +148,12 @@ [ "keyword.operator", "=" ], [ "text", " " ], [ "string", "\"" ], - [ "constant.language.escape", "\\n" ], - [ "constant.language.escape", "\\n" ], - [ "string", "F" ], - [ "string", "a" ], - [ "string", "c" ], - [ "string", "t" ], - [ "string", "o" ], - [ "string", "r" ], - [ "string", "i" ], - [ "string", "a" ], - [ "string", "l" ], - [ "string", " " ], - [ "string", "\"" ], + [ "constant.language.escape", "\\n\\n" ], + [ "string", "Factorial \"" ], [ "text", " . " ], [ "variable", "$num" ], [ "text", " . " ], - [ "string", "\"" ], - [ "string", " " ], - [ "string", "=" ], - [ "string", " " ], - [ "string", "\"" ], + [ "string", "\" = \"" ], [ "text", " . " ], [ "identifier", "nfact" ], [ "lparen", "(" ], @@ -210,8 +161,7 @@ [ "rparen", ")" ], [ "text", " . " ], [ "string", "\"" ], - [ "constant.language.escape", "\\n" ], - [ "constant.language.escape", "\\n" ], + [ "constant.language.escape", "\\n\\n" ], [ "string", "\"" ], [ "text", ";" ] ] diff --git a/lib/ace/mode/_test/tokens_powershell.json b/lib/ace/mode/_test/tokens_powershell.json index d2fa444e..f3406603 100644 --- a/lib/ace/mode/_test/tokens_powershell.json +++ b/lib/ace/mode/_test/tokens_powershell.json @@ -173,8 +173,7 @@ "data": [ [ "variable.instance", "$number" ], [ "text", " " ], - [ "keyword.operator", "+" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "+=" ], [ "text", " " ], [ "constant.numeric", "3" ] ] diff --git a/lib/ace/mode/_test/tokens_python.json b/lib/ace/mode/_test/tokens_python.json index 5936fce2..4d67cc4b 100644 --- a/lib/ace/mode/_test/tokens_python.json +++ b/lib/ace/mode/_test/tokens_python.json @@ -122,8 +122,7 @@ [ "identifier", "atoi" ], [ "paren.lparen", "(" ], [ "identifier", "i" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ] + [ "paren.rparen", "))" ] ] }, { @@ -198,8 +197,7 @@ [ "identifier", "celsius" ], [ "keyword.operator", "+" ], [ "constant.numeric", ".5" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ] + [ "paren.rparen", "))" ] ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_r.json b/lib/ace/mode/_test/tokens_r.json index c0c784e3..4b999558 100644 --- a/lib/ace/mode/_test/tokens_r.json +++ b/lib/ace/mode/_test/tokens_r.json @@ -101,8 +101,7 @@ [ "text", " " ], [ "identifier", "Pr" ], [ "paren.keyword.operator", "(" ], - [ "keyword.operator", ">" ], - [ "keyword.operator", "|" ], + [ "keyword.operator", ">|" ], [ "identifier", "t" ], [ "keyword.operator", "|" ], [ "paren.keyword.operator", ")" ] @@ -141,17 +140,13 @@ [ "text", " " ], [ "constant.numeric", "0.000662" ], [ "text", " " ], - [ "keyword.operator", "*" ], - [ "keyword.operator", "*" ], - [ "keyword.operator", "*" ] + [ "keyword.operator", "***" ] ] }, { "state": "start", "data": [ - [ "keyword.operator", "-" ], - [ "keyword.operator", "-" ], - [ "keyword.operator", "-" ] + [ "keyword.operator", "---" ] ] }, { @@ -164,14 +159,11 @@ [ "text", " " ], [ "constant.numeric", "0" ], [ "text", " ‘" ], - [ "keyword.operator", "*" ], - [ "keyword.operator", "*" ], - [ "keyword.operator", "*" ], + [ "keyword.operator", "***" ], [ "text", "’ " ], [ "constant.numeric", "0.001" ], [ "text", " ‘" ], - [ "keyword.operator", "*" ], - [ "keyword.operator", "*" ], + [ "keyword.operator", "**" ], [ "text", "’ " ], [ "constant.numeric", "0.01" ], [ "text", " ‘" ], @@ -283,8 +275,7 @@ [ "constant.numeric", "2" ], [ "text", ", " ], [ "constant.numeric", "2" ], - [ "paren.keyword.operator", ")" ], - [ "paren.keyword.operator", ")" ], + [ "paren.keyword.operator", "))" ], [ "text", " " ], [ "comment", "# Request 2x2 plot layout" ] ] diff --git a/lib/ace/mode/_test/tokens_rdoc.json b/lib/ace/mode/_test/tokens_rdoc.json index 41545f26..7e501d65 100644 --- a/lib/ace/mode/_test/tokens_rdoc.json +++ b/lib/ace/mode/_test/tokens_rdoc.json @@ -62,19 +62,13 @@ [ "nospell.text", "picker" ], [ "paren.keyword.operator", "(" ], [ "text", "...," ], - [ "nospell.text", " " ], - [ "nospell.text", "initial" ], - [ "nospell.text", " " ], + [ "nospell.text", " initial " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "NULL" ], + [ "nospell.text", " NULL" ], [ "text", "," ], - [ "nospell.text", " " ], - [ "nospell.text", "label" ], - [ "nospell.text", " " ], + [ "nospell.text", " label " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "NULL" ], + [ "nospell.text", " NULL" ], [ "paren.keyword.operator", ")" ] ] }, @@ -106,8 +100,7 @@ [ "keyword", "\\item" ], [ "paren.keyword.operator", "{" ], [ "keyword", "\\dots" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "{" ] + [ "paren.keyword.operator", "}{" ] ] }, { @@ -125,8 +118,7 @@ [ "nospell.text", "as" ], [ "text", "." ], [ "nospell.text", "character" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}}" ], [ "text", ". " ] ] }, @@ -143,8 +135,7 @@ [ "keyword", "\\item" ], [ "paren.keyword.operator", "{" ], [ "nospell.text", "initial" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "{" ] + [ "paren.keyword.operator", "}{" ] ] }, { @@ -166,8 +157,7 @@ [ "keyword", "\\item" ], [ "paren.keyword.operator", "{" ], [ "nospell.text", "label" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "{" ] + [ "paren.keyword.operator", "}{" ] ] }, { @@ -208,8 +198,7 @@ [ "keyword", "\\link" ], [ "paren.keyword.operator", "{" ], [ "nospell.text", "manipulate" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}}" ], [ "text", " function." ] ] }, @@ -238,32 +227,28 @@ [ "keyword", "\\link" ], [ "paren.keyword.operator", "{" ], [ "nospell.text", "manipulate" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}}" ], [ "text", ", " ], [ "keyword", "\\code" ], [ "paren.keyword.operator", "{" ], [ "keyword", "\\link" ], [ "paren.keyword.operator", "{" ], [ "nospell.text", "slider" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}}" ], [ "text", ", " ], [ "keyword", "\\code" ], [ "paren.keyword.operator", "{" ], [ "keyword", "\\link" ], [ "paren.keyword.operator", "{" ], [ "nospell.text", "checkbox" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}}" ], [ "text", ", " ], [ "keyword", "\\code" ], [ "paren.keyword.operator", "{" ], [ "keyword", "\\link" ], [ "paren.keyword.operator", "{" ], [ "nospell.text", "button" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "}" ] + [ "paren.keyword.operator", "}}" ] ] }, { @@ -302,16 +287,7 @@ "state": "nospell", "data": [ [ "text", "##" ], - [ "nospell.text", " " ], - [ "nospell.text", "Filtering" ], - [ "nospell.text", " " ], - [ "nospell.text", "data" ], - [ "nospell.text", " " ], - [ "nospell.text", "with" ], - [ "nospell.text", " " ], - [ "nospell.text", "a" ], - [ "nospell.text", " " ], - [ "nospell.text", "picker" ] + [ "nospell.text", " Filtering data with a picker" ] ] }, { @@ -324,8 +300,7 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "barplot" ], + [ "nospell.text", " barplot" ], [ "paren.keyword.operator", "(" ], [ "nospell.text", "as" ], [ "text", "." ], @@ -335,8 +310,7 @@ [ "paren.keyword.operator", "[" ], [ "text", "," ], [ "nospell.text", "factor" ], - [ "paren.keyword.operator", "]" ], - [ "paren.keyword.operator", ")" ], + [ "paren.keyword.operator", "])" ], [ "text", "," ], [ "nospell.text", " " ] ] @@ -344,19 +318,13 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "beside" ], - [ "nospell.text", " " ], + [ "nospell.text", " beside " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "TRUE" ], + [ "nospell.text", " TRUE" ], [ "text", "," ], - [ "nospell.text", " " ], - [ "nospell.text", "main" ], - [ "nospell.text", " " ], + [ "nospell.text", " main " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "factor" ], + [ "nospell.text", " factor" ], [ "paren.keyword.operator", ")" ], [ "text", "," ] ] @@ -364,12 +332,9 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "factor" ], - [ "nospell.text", " " ], + [ "nospell.text", " factor " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "picker" ], + [ "nospell.text", " picker" ], [ "paren.keyword.operator", "(" ], [ "text", "\"" ], [ "nospell.text", "GNP" ], @@ -382,8 +347,7 @@ [ "text", "\"" ], [ "nospell.text", "Employed" ], [ "text", "\"" ], - [ "paren.keyword.operator", ")" ], - [ "paren.keyword.operator", ")" ] + [ "paren.keyword.operator", "))" ] ] }, { @@ -394,16 +358,7 @@ "state": "nospell", "data": [ [ "text", "##" ], - [ "nospell.text", " " ], - [ "nospell.text", "Create" ], - [ "nospell.text", " " ], - [ "nospell.text", "a" ], - [ "nospell.text", " " ], - [ "nospell.text", "picker" ], - [ "nospell.text", " " ], - [ "nospell.text", "with" ], - [ "nospell.text", " " ], - [ "nospell.text", "labels" ] + [ "nospell.text", " Create a picker with labels" ] ] }, { @@ -416,17 +371,13 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "plot" ], + [ "nospell.text", " plot" ], [ "paren.keyword.operator", "(" ], [ "nospell.text", "pressure" ], [ "text", "," ], - [ "nospell.text", " " ], - [ "nospell.text", "type" ], - [ "nospell.text", " " ], + [ "nospell.text", " type " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "type" ], + [ "nospell.text", " type" ], [ "paren.keyword.operator", ")" ], [ "text", "," ], [ "nospell.text", " " ] @@ -435,12 +386,9 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "type" ], - [ "nospell.text", " " ], + [ "nospell.text", " type " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "picker" ], + [ "nospell.text", " picker" ], [ "paren.keyword.operator", "(" ], [ "text", "\"" ], [ "nospell.text", "points" ], @@ -471,8 +419,7 @@ [ "text", "\"" ], [ "nospell.text", "s" ], [ "text", "\"" ], - [ "paren.keyword.operator", ")" ], - [ "paren.keyword.operator", ")" ] + [ "paren.keyword.operator", "))" ] ] }, { @@ -485,12 +432,7 @@ "state": "nospell", "data": [ [ "text", "##" ], - [ "nospell.text", " " ], - [ "nospell.text", "Picker" ], - [ "nospell.text", " " ], - [ "nospell.text", "with" ], - [ "nospell.text", " " ], - [ "nospell.text", "groups" ] + [ "nospell.text", " Picker with groups" ] ] }, { @@ -503,8 +445,7 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "barplot" ], + [ "nospell.text", " barplot" ], [ "paren.keyword.operator", "(" ], [ "nospell.text", "as" ], [ "text", "." ], @@ -516,11 +457,9 @@ [ "text", ",\"" ], [ "nospell.text", "mpg" ], [ "text", "\"" ], - [ "paren.keyword.operator", "]" ], - [ "paren.keyword.operator", ")" ], + [ "paren.keyword.operator", "])" ], [ "text", "," ], - [ "nospell.text", " " ], - [ "nospell.text", "beside" ], + [ "nospell.text", " beside" ], [ "text", "=" ], [ "nospell.text", "TRUE" ], [ "paren.keyword.operator", ")" ], @@ -530,22 +469,16 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "group" ], - [ "nospell.text", " " ], + [ "nospell.text", " group " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "picker" ], + [ "nospell.text", " picker" ], [ "paren.keyword.operator", "(" ], [ "text", "\"" ], - [ "nospell.text", "Group" ], - [ "nospell.text", " " ], - [ "nospell.text", "1" ], + [ "nospell.text", "Group 1" ], [ "text", "\"" ], [ "nospell.text", " " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "1" ], + [ "nospell.text", " 1" ], [ "text", ":" ], [ "nospell.text", "11" ], [ "text", "," ], @@ -557,14 +490,11 @@ "data": [ [ "nospell.text", " " ], [ "text", "\"" ], - [ "nospell.text", "Group" ], - [ "nospell.text", " " ], - [ "nospell.text", "2" ], + [ "nospell.text", "Group 2" ], [ "text", "\"" ], [ "nospell.text", " " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "12" ], + [ "nospell.text", " 12" ], [ "text", ":" ], [ "nospell.text", "22" ], [ "text", "," ], @@ -576,18 +506,14 @@ "data": [ [ "nospell.text", " " ], [ "text", "\"" ], - [ "nospell.text", "Group" ], - [ "nospell.text", " " ], - [ "nospell.text", "3" ], + [ "nospell.text", "Group 3" ], [ "text", "\"" ], [ "nospell.text", " " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "23" ], + [ "nospell.text", " 23" ], [ "text", ":" ], [ "nospell.text", "32" ], - [ "paren.keyword.operator", ")" ], - [ "paren.keyword.operator", ")" ] + [ "paren.keyword.operator", "))" ] ] }, { @@ -598,19 +524,9 @@ "state": "nospell", "data": [ [ "text", "##" ], - [ "nospell.text", " " ], - [ "nospell.text", "Histogram" ], - [ "nospell.text", " " ], - [ "nospell.text", "w" ], + [ "nospell.text", " Histogram w" ], [ "text", "/" ], - [ "nospell.text", " " ], - [ "nospell.text", "picker" ], - [ "nospell.text", " " ], - [ "nospell.text", "to" ], - [ "nospell.text", " " ], - [ "nospell.text", "select" ], - [ "nospell.text", " " ], - [ "nospell.text", "type" ] + [ "nospell.text", " picker to select type" ] ] }, { @@ -641,16 +557,12 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "histogram" ], + [ "nospell.text", " histogram" ], [ "paren.keyword.operator", "(" ], [ "text", "~" ], - [ "nospell.text", " " ], - [ "nospell.text", "height" ], - [ "nospell.text", " " ], + [ "nospell.text", " height " ], [ "text", "|" ], - [ "nospell.text", " " ], - [ "nospell.text", "voice" ], + [ "nospell.text", " voice" ], [ "text", "." ], [ "nospell.text", "part" ], [ "text", "," ], @@ -660,19 +572,13 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "data" ], - [ "nospell.text", " " ], + [ "nospell.text", " data " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "singer" ], + [ "nospell.text", " singer" ], [ "text", "," ], - [ "nospell.text", " " ], - [ "nospell.text", "type" ], - [ "nospell.text", " " ], + [ "nospell.text", " type " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "type" ], + [ "nospell.text", " type" ], [ "paren.keyword.operator", ")" ], [ "text", "," ] ] @@ -680,12 +586,9 @@ { "state": "nospell", "data": [ - [ "nospell.text", " " ], - [ "nospell.text", "type" ], - [ "nospell.text", " " ], + [ "nospell.text", " type " ], [ "text", "=" ], - [ "nospell.text", " " ], - [ "nospell.text", "picker" ], + [ "nospell.text", " picker" ], [ "paren.keyword.operator", "(" ], [ "text", "\"" ], [ "nospell.text", "percent" ], @@ -698,8 +601,7 @@ [ "text", "\"" ], [ "nospell.text", "density" ], [ "text", "\"" ], - [ "paren.keyword.operator", ")" ], - [ "paren.keyword.operator", ")" ] + [ "paren.keyword.operator", "))" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_rhtml.json b/lib/ace/mode/_test/tokens_rhtml.json index d25a1077..63d89b8c 100644 --- a/lib/ace/mode/_test/tokens_rhtml.json +++ b/lib/ace/mode/_test/tokens_rhtml.json @@ -4,7 +4,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "html" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -16,7 +16,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "head" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -24,11 +24,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "title" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Title" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -36,7 +36,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -48,7 +48,7 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "body" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -60,19 +60,19 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "This is an R HTML document. When you click the " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "b" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Knit HTML" ], [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "text", " button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -109,11 +109,11 @@ "data": [ [ "meta.tag", "<" ], [ "meta.tag.tag-name", "p" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "You can also embed plots, for example:" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -150,7 +150,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -158,7 +158,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_scad.json b/lib/ace/mode/_test/tokens_scad.json index b9eefe5f..44753261 100644 --- a/lib/ace/mode/_test/tokens_scad.json +++ b/lib/ace/mode/_test/tokens_scad.json @@ -26,15 +26,13 @@ "data": [ [ "text", "\t" ], [ "identifier", "translate" ], - [ "paren.lparen", "(" ], - [ "paren.lparen", "[" ], + [ "paren.lparen", "([" ], [ "identifier", "xpos" ], [ "text", "," ], [ "identifier", "ypos" ], [ "text", "," ], [ "identifier", "zpos" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "])" ], [ "paren.lparen", "{" ] ] }, @@ -53,8 +51,7 @@ "data": [ [ "text", "\t\t\t" ], [ "identifier", "cube" ], - [ "paren.lparen", "(" ], - [ "paren.lparen", "[" ], + [ "paren.lparen", "([" ], [ "constant.numeric", "10" ], [ "text", "," ], [ "constant.numeric", "10" ], @@ -87,15 +84,13 @@ "data": [ [ "text", "\t\t\t" ], [ "identifier", "translate" ], - [ "paren.lparen", "(" ], - [ "paren.lparen", "[" ], + [ "paren.lparen", "([" ], [ "constant.numeric", "0" ], [ "text", "," ], [ "constant.numeric", "0" ], [ "text", "," ], [ "constant.numeric", "10" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "])" ], [ "identifier", "sphere" ], [ "paren.lparen", "(" ], [ "constant.numeric", "5" ], @@ -148,8 +143,7 @@ [ "constant.numeric", "0" ], [ "text", ":" ], [ "constant.numeric", "30" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "])" ], [ "paren.lparen", "{" ] ] }, @@ -220,8 +214,7 @@ [ "constant.numeric", "7" ], [ "text", ", " ], [ "constant.numeric", "11" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "])" ], [ "paren.lparen", "{" ] ] }, @@ -230,8 +223,7 @@ "data": [ [ "text", "\t" ], [ "identifier", "rotate" ], - [ "paren.lparen", "(" ], - [ "paren.lparen", "[" ], + [ "paren.lparen", "([" ], [ "identifier", "i" ], [ "keyword.operator", "*" ], [ "constant.numeric", "10" ], @@ -239,18 +231,15 @@ [ "constant.numeric", "0" ], [ "text", "," ], [ "constant.numeric", "0" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "])" ], [ "identifier", "scale" ], - [ "paren.lparen", "(" ], - [ "paren.lparen", "[" ], + [ "paren.lparen", "([" ], [ "constant.numeric", "1" ], [ "text", "," ], [ "constant.numeric", "1" ], [ "text", "," ], [ "identifier", "i" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", ")" ], + [ "paren.rparen", "])" ], [ "identifier", "cube" ], [ "paren.lparen", "(" ], [ "constant.numeric", "10" ], diff --git a/lib/ace/mode/_test/tokens_scala.json b/lib/ace/mode/_test/tokens_scala.json index 88fa8332..64ee64c0 100644 --- a/lib/ace/mode/_test/tokens_scala.json +++ b/lib/ace/mode/_test/tokens_scala.json @@ -330,8 +330,7 @@ [ "text", " " ], [ "identifier", "Start" ], [ "text", " " ], - [ "keyword.operator", "=" ], - [ "keyword.operator", ">" ] + [ "keyword.operator", "=>" ] ] }, { @@ -378,8 +377,7 @@ [ "text", " " ], [ "identifier", "SendPing" ], [ "text", " " ], - [ "keyword.operator", "=" ], - [ "keyword.operator", ">" ] + [ "keyword.operator", "=>" ] ] }, { @@ -416,8 +414,7 @@ [ "text", " " ], [ "identifier", "Pong" ], [ "text", " " ], - [ "keyword.operator", "=" ], - [ "keyword.operator", ">" ] + [ "keyword.operator", "=>" ] ] }, { @@ -621,8 +618,7 @@ [ "text", " " ], [ "identifier", "Ping" ], [ "text", " " ], - [ "keyword.operator", "=" ], - [ "keyword.operator", ">" ] + [ "keyword.operator", "=>" ] ] }, { @@ -694,8 +690,7 @@ [ "text", " " ], [ "identifier", "Stop" ], [ "text", " " ], - [ "keyword.operator", "=" ], - [ "keyword.operator", ">" ] + [ "keyword.operator", "=>" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_scss.json b/lib/ace/mode/_test/tokens_scss.json index fddaeda5..716ce3dd 100644 --- a/lib/ace/mode/_test/tokens_scss.json +++ b/lib/ace/mode/_test/tokens_scss.json @@ -2,8 +2,7 @@ { "state": "start", "data": [ - [ "comment", "/*" ], - [ "comment", " style.scss */" ] + [ "comment", "/* style.scss */" ] ] }, { diff --git a/lib/ace/mode/_test/tokens_sh.json b/lib/ace/mode/_test/tokens_sh.json index 8db30226..16bbe439 100644 --- a/lib/ace/mode/_test/tokens_sh.json +++ b/lib/ace/mode/_test/tokens_sh.json @@ -52,8 +52,7 @@ [ "text", " " ], [ "identifier", "config" ], [ "text", " " ], - [ "keyword.operator", "-" ], - [ "keyword.operator", "-" ], + [ "keyword.operator", "--" ], [ "identifier", "get" ], [ "text", " " ], [ "identifier", "github" ], @@ -389,8 +388,7 @@ [ "identifier", "HEAD" ], [ "text", " " ], [ "constant.numeric", "2" ], - [ "keyword.operator", ">" ], - [ "keyword.operator", "/" ], + [ "keyword.operator", ">/" ], [ "identifier", "dev" ], [ "keyword.operator", "/" ], [ "identifier", "null" ], diff --git a/lib/ace/mode/_test/tokens_svg.json b/lib/ace/mode/_test/tokens_svg.json index bba445bc..fd8cb5b3 100644 --- a/lib/ace/mode/_test/tokens_svg.json +++ b/lib/ace/mode/_test/tokens_svg.json @@ -35,7 +35,7 @@ [ "entity.other.attribute-name", "onload" ], [ "keyword.operator", "=" ], [ "string", "\"StartAnimation(evt)\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -48,11 +48,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "title" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Test Tube Progress Bar" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -61,11 +61,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "desc" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Created for the Web Directions SVG competition" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -82,9 +82,8 @@ [ "entity.other.attribute-name", "type" ], [ "keyword.operator", "=" ], [ "string", "\"text/ecmascript\"" ], - [ "meta.tag", ">" ], - [ "keyword.operator", "<" ], - [ "keyword.operator", "!" ], + [ "meta.tag.r", ">" ], + [ "keyword.operator", "" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -725,7 +722,7 @@ [ "entity.other.attribute-name", "id" ], [ "keyword.operator", "=" ], [ "string", "\"rect3590\"" ], - [ "meta.tag", "/>" ] + [ "meta.tag.r", "/>" ] ] }, { @@ -783,7 +780,7 @@ [ "entity.other.attribute-name", "display" ], [ "keyword.operator", "=" ], [ "string", "\"none\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -792,7 +789,7 @@ [ "text", " Hickory," ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -846,7 +843,7 @@ [ "entity.other.attribute-name", "display" ], [ "keyword.operator", "=" ], [ "string", "\"none\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -855,7 +852,7 @@ [ "text", " dickory," ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -909,7 +906,7 @@ [ "entity.other.attribute-name", "display" ], [ "keyword.operator", "=" ], [ "string", "\"none\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -918,7 +915,7 @@ [ "text", " dock!" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -926,7 +923,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_tcl.json b/lib/ace/mode/_test/tokens_tcl.json index 4d59cf8e..89204036 100644 --- a/lib/ace/mode/_test/tokens_tcl.json +++ b/lib/ace/mode/_test/tokens_tcl.json @@ -141,8 +141,7 @@ [ "text", " " ], [ "variable.instancce", "$" ], [ "variable.instance", "graph" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", "}" ], + [ "paren.rparen", "]}" ], [ "text", " " ], [ "paren.lparen", "{" ] ] @@ -212,9 +211,7 @@ [ "text", " " ], [ "variable.instancce", "$" ], [ "variable.instance", "uu" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", "}" ], + [ "paren.rparen", "]]}" ], [ "text", " " ], [ "paren.lparen", "{" ] ] @@ -351,8 +348,7 @@ [ "text", " " ], [ "variable.instancce", "$" ], [ "variable.instance", "v" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", "}" ], + [ "paren.rparen", "]}" ], [ "text", " " ], [ "paren.lparen", "{" ] ] @@ -376,8 +372,7 @@ [ "text", " " ], [ "variable.instancce", "$" ], [ "variable.instance", "dd" ], - [ "paren.rparen", "}" ], - [ "paren.rparen", "]" ] + [ "paren.rparen", "}]" ] ] }, { @@ -402,8 +397,7 @@ [ "text", " " ], [ "variable.instancce", "$" ], [ "variable.instance", "v" ], - [ "paren.rparen", "]" ], - [ "paren.rparen", "}" ], + [ "paren.rparen", "]}" ], [ "text", " " ], [ "paren.lparen", "{" ] ] diff --git a/lib/ace/mode/_test/tokens_tex.json b/lib/ace/mode/_test/tokens_tex.json index 1ecc6211..fa4499cb 100644 --- a/lib/ace/mode/_test/tokens_tex.json +++ b/lib/ace/mode/_test/tokens_tex.json @@ -37,8 +37,7 @@ [ "keyword", "\\newcommand" ], [ "paren.keyword.operator", "{" ], [ "keyword", "\\be" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "{" ], + [ "paren.keyword.operator", "}{" ], [ "comment", "%" ] ] }, @@ -72,9 +71,7 @@ [ "text", "ifstar" ], [ "paren.keyword.operator", "{" ], [ "keyword", "\\nonumber" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "{" ], - [ "paren.keyword.operator", "}" ], + [ "paren.keyword.operator", "}{}" ], [ "comment", "%" ] ] }, @@ -92,8 +89,7 @@ [ "keyword", "\\newcommand" ], [ "paren.keyword.operator", "{" ], [ "keyword", "\\ee" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "{" ], + [ "paren.keyword.operator", "}{" ], [ "keyword", "\\endeqnarray\\endgroup" ], [ "paren.keyword.operator", "}" ] ] @@ -129,8 +125,7 @@ [ "keyword", "\\begin" ], [ "paren.keyword.operator", "{" ], [ "nospell.text", "array" ], - [ "paren.keyword.operator", "}" ], - [ "paren.keyword.operator", "{" ], + [ "paren.keyword.operator", "}{" ], [ "text", "cl" ], [ "paren.keyword.operator", "}" ] ] diff --git a/lib/ace/mode/_test/tokens_textile.json b/lib/ace/mode/_test/tokens_textile.json index beb947bc..2768b4c4 100644 --- a/lib/ace/mode/_test/tokens_textile.json +++ b/lib/ace/mode/_test/tokens_textile.json @@ -91,8 +91,7 @@ [ "string", "two" ], [ "text", " " ], [ "string", "three" ], - [ "keyword", ")" ], - [ "keyword", ". " ], + [ "keyword", "). " ], [ "text", "This is a paragraph with classes" ] ] }, @@ -104,11 +103,9 @@ "state": "start", "data": [ [ "markup.heading", "p" ], - [ "keyword", "(" ], - [ "keyword", "#" ], + [ "keyword", "(#" ], [ "string", "id" ], - [ "keyword", ")" ], - [ "keyword", ". " ], + [ "keyword", "). " ], [ "text", "(one with an id)" ] ] }, @@ -128,8 +125,7 @@ [ "string", "three" ], [ "keyword", "#" ], [ "string", "my_id" ], - [ "keyword", ")" ], - [ "keyword", ". " ], + [ "keyword", "). " ], [ "text", "..classes + id" ] ] }, diff --git a/lib/ace/mode/_test/tokens_typescript.json b/lib/ace/mode/_test/tokens_typescript.json index 4923d708..eea87ea4 100644 --- a/lib/ace/mode/_test/tokens_typescript.json +++ b/lib/ace/mode/_test/tokens_typescript.json @@ -173,8 +173,7 @@ [ "paren.lparen", "(" ], [ "entity.name.function.ts", "greeter.greet" ], [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "paren.rparen", ")" ] + [ "paren.rparen", "))" ] ] }, { @@ -652,8 +651,7 @@ [ "text", " " ], [ "identifier", "stringBuilder" ], [ "text", " " ], - [ "keyword.operator", "+" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "+=" ], [ "text", " " ], [ "string", "\" turn continues,\"" ], [ "punctuation.operator", ";" ] @@ -672,8 +670,7 @@ [ "text", " " ], [ "identifier", "stringBuilder" ], [ "text", " " ], - [ "keyword.operator", "+" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "+=" ], [ "text", " " ], [ "string", "\" stores \"" ], [ "text", " " ], @@ -708,8 +705,7 @@ [ "text", " " ], [ "identifier", "stringBuilder" ], [ "text", " " ], - [ "keyword.operator", "+" ], - [ "keyword.operator", "=" ], + [ "keyword.operator", "+=" ], [ "text", " " ], [ "string", "\" captures \"" ], [ "text", " " ], diff --git a/lib/ace/mode/_test/tokens_xml.json b/lib/ace/mode/_test/tokens_xml.json index b7c9dcfd..faeb11e8 100644 --- a/lib/ace/mode/_test/tokens_xml.json +++ b/lib/ace/mode/_test/tokens_xml.json @@ -31,7 +31,7 @@ [ "entity.other.attribute-name", "yahoo:lang" ], [ "keyword.operator", "=" ], [ "string", "\"en-US\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -40,7 +40,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "diagnostics" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -49,11 +49,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "publiclyCallable" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "true" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -74,11 +74,11 @@ [ "entity.other.attribute-name", "execution-time" ], [ "keyword.operator", "=" ], [ "string", "\"25\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -87,11 +87,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "user-time" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "26" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -100,11 +100,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "service-time" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "25" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -113,11 +113,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "build-version" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "21978" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -126,7 +126,7 @@ [ "text", " " ], [ "meta.tag", "" ], + [ "meta.tag.r", ">" ], [ "text", " " ] ] }, @@ -136,7 +136,7 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "results" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -162,7 +162,7 @@ [ "entity.other.attribute-name", "yahoo:uri" ], [ "keyword.operator", "=" ], [ "string", "\"http://where.yahooapis.com/v1/place/24865670\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -171,11 +171,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "24865670" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -188,11 +188,11 @@ [ "entity.other.attribute-name", "code" ], [ "keyword.operator", "=" ], [ "string", "\"29\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Continent" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -201,11 +201,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "name" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Africa" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -214,7 +214,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -240,7 +240,7 @@ [ "entity.other.attribute-name", "yahoo:uri" ], [ "keyword.operator", "=" ], [ "string", "\"http://where.yahooapis.com/v1/place/24865675\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -249,11 +249,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "24865675" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -266,11 +266,11 @@ [ "entity.other.attribute-name", "code" ], [ "keyword.operator", "=" ], [ "string", "\"29\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Continent" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -279,11 +279,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "name" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Europe" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -292,7 +292,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -318,7 +318,7 @@ [ "entity.other.attribute-name", "yahoo:uri" ], [ "keyword.operator", "=" ], [ "string", "\"http://where.yahooapis.com/v1/place/24865673\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -327,11 +327,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "24865673" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -344,11 +344,11 @@ [ "entity.other.attribute-name", "code" ], [ "keyword.operator", "=" ], [ "string", "\"29\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Continent" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -357,11 +357,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "name" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "South America" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -370,7 +370,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -396,7 +396,7 @@ [ "entity.other.attribute-name", "yahoo:uri" ], [ "keyword.operator", "=" ], [ "string", "\"http://where.yahooapis.com/v1/place/28289421\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -405,11 +405,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "28289421" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -422,11 +422,11 @@ [ "entity.other.attribute-name", "code" ], [ "keyword.operator", "=" ], [ "string", "\"29\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Continent" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -435,11 +435,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "name" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Antarctic" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -448,7 +448,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -474,7 +474,7 @@ [ "entity.other.attribute-name", "yahoo:uri" ], [ "keyword.operator", "=" ], [ "string", "\"http://where.yahooapis.com/v1/place/24865671\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -483,11 +483,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "24865671" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -500,11 +500,11 @@ [ "entity.other.attribute-name", "code" ], [ "keyword.operator", "=" ], [ "string", "\"29\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Continent" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -513,11 +513,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "name" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Asia" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -526,7 +526,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -552,7 +552,7 @@ [ "entity.other.attribute-name", "yahoo:uri" ], [ "keyword.operator", "=" ], [ "string", "\"http://where.yahooapis.com/v1/place/24865672\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -561,11 +561,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "24865672" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -578,11 +578,11 @@ [ "entity.other.attribute-name", "code" ], [ "keyword.operator", "=" ], [ "string", "\"29\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Continent" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -591,11 +591,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "name" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "North America" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -604,7 +604,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -630,7 +630,7 @@ [ "entity.other.attribute-name", "yahoo:uri" ], [ "keyword.operator", "=" ], [ "string", "\"http://where.yahooapis.com/v1/place/55949070\"" ], - [ "meta.tag", ">" ] + [ "meta.tag.r", ">" ] ] }, { @@ -639,11 +639,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "55949070" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -656,11 +656,11 @@ [ "entity.other.attribute-name", "code" ], [ "keyword.operator", "=" ], [ "string", "\"29\"" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Continent" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -669,11 +669,11 @@ [ "text", " " ], [ "meta.tag", "<" ], [ "meta.tag.tag-name", "name" ], - [ "meta.tag", ">" ], + [ "meta.tag.r", ">" ], [ "text", "Australia" ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -682,7 +682,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -691,7 +691,7 @@ [ "text", " " ], [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] }, { @@ -699,7 +699,7 @@ "data": [ [ "meta.tag", "" ] + [ "meta.tag.r", ">" ] ] } ] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_yaml.json b/lib/ace/mode/_test/tokens_yaml.json index 0dc38ce6..bbfb8aaa 100644 --- a/lib/ace/mode/_test/tokens_yaml.json +++ b/lib/ace/mode/_test/tokens_yaml.json @@ -30,9 +30,7 @@ "data": [ [ "meta.tag", "date" ], [ "keyword", ": " ], - [ "constant.numeric", "2007" ], - [ "constant.numeric", "-08" ], - [ "constant.numeric", "-06" ] + [ "constant.numeric", "2007-08-06" ] ] }, { From 230bca6b1b1962f5693a52732e5b41d1faeced83 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 19 Dec 2012 00:46:54 +0400 Subject: [PATCH 12/14] #1138 Markdown mode should be based on HTML mode --- lib/ace/mode/markdown_highlight_rules.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/ace/mode/markdown_highlight_rules.js b/lib/ace/mode/markdown_highlight_rules.js index e7bba0f0..033cf88a 100644 --- a/lib/ace/mode/markdown_highlight_rules.js +++ b/lib/ace/mode/markdown_highlight_rules.js @@ -180,6 +180,15 @@ var MarkdownHighlightRules = function() { regex : "^```", next : "start" }]); + + var html = new HtmlHighlightRules().getRules(); + for (var i in html) { + if (this.$rules[i]) + this.$rules[i] = this.$rules[i].concat(html[i]); + else + this.$rules[i] = html[i]; + } + }; oop.inherits(MarkdownHighlightRules, TextHighlightRules); From d2072604f375340fc2a0cbe258a69a4522bc1f68 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 25 Dec 2012 17:51:40 +0400 Subject: [PATCH 13/14] fix tests failing because of merged paren tokens --- lib/ace/mode/coffee_highlight_rules_test.js | 12 ++++++------ lib/ace/mode/html_highlight_rules_test.js | 8 ++++---- lib/ace/mode/javascript_highlight_rules_test.js | 11 ++++------- lib/ace/mode/liquid_highlight_rules_test.js | 10 +++------- lib/ace/mode/xml_highlight_rules_test.js | 10 +++++----- lib/ace/test/all_browser.js | 1 + 6 files changed, 23 insertions(+), 29 deletions(-) diff --git a/lib/ace/mode/coffee_highlight_rules_test.js b/lib/ace/mode/coffee_highlight_rules_test.js index a7cb85db..2823cfbb 100644 --- a/lib/ace/mode/coffee_highlight_rules_test.js +++ b/lib/ace/mode/coffee_highlight_rules_test.js @@ -65,7 +65,7 @@ module.exports = { var tokens = this.tokenizer.getLineTokens("foo = ({args}) ->", "start").tokens; var correct = [ "entity.name.function", "text", "keyword.operator", "text", - "paren.lparen", "paren.lparen", "variable.parameter", "paren.rparen", "paren.rparen", "text", "storage.type" + "paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type" ]; this.testTokens(tokens, correct); @@ -80,7 +80,7 @@ module.exports = { var tokens = this.tokenizer.getLineTokens("foo : ({args}) ->", "start").tokens; var correct = [ "entity.name.function", "text", "punctuation.operator", "text", - "paren.lparen", "paren.lparen", "variable.parameter", "paren.rparen", "paren.rparen", "text", "storage.type" + "paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type" ]; this.testTokens(tokens, correct); }, @@ -115,16 +115,16 @@ module.exports = { var tokens = this.tokenizer.getLineTokens("foo = ({}) ->", "start").tokens; var correct = [ "entity.name.function", "text", "keyword.operator", "text", - "paren.lparen", "paren.lparen", "paren.rparen", "paren.rparen", "text", "storage.type" + "paren.lparen", "paren.rparen", "text", "storage.type" ]; this.testTokens(tokens, correct); tokens = this.tokenizer.getLineTokens("foo = ({ }) ->", "start").tokens; correct = [ "entity.name.function", "text", "keyword.operator", "text", - "paren.lparen", "paren.lparen", "text", "paren.rparen", "paren.rparen", "text", "storage.type" + "paren.lparen", "text", "paren.rparen", "text", "storage.type" ]; - assert.equal(tokens.length, 11); + assert.equal(tokens.length, 9); this.testTokens(tokens, correct); }, @@ -132,7 +132,7 @@ module.exports = { var tokens = this.tokenizer.getLineTokens("foo : ({}) ->", "start").tokens; var correct = [ "entity.name.function", "text", "punctuation.operator", "text", - "paren.lparen", "paren.lparen", "paren.rparen", "paren.rparen", "text", "storage.type" + "paren.lparen", "paren.rparen", "text", "storage.type" ]; this.testTokens(tokens, correct); }, diff --git a/lib/ace/mode/html_highlight_rules_test.js b/lib/ace/mode/html_highlight_rules_test.js index 2a9d2099..d20a30e1 100644 --- a/lib/ace/mode/html_highlight_rules_test.js +++ b/lib/ace/mode/html_highlight_rules_test.js @@ -61,7 +61,7 @@ var testData = { type: "string", value: "'a'" }, { - type: "meta.tag", + type: "meta.tag.r", value: ">" }, { type: "storage.type", @@ -73,7 +73,7 @@ var testData = { type: "meta.tag.tag-name.script", value: "script" }, { - type: "meta.tag", + type: "meta.tag.r", value: ">" }, { type: "text", @@ -111,7 +111,7 @@ var testData = { type: "string", value: "def\"" }, { - type: "meta.tag", + type: "meta.tag.r", value: ">" } ] @@ -147,7 +147,7 @@ var testData = { type: "string", value: "def\"'" }, { - type: "meta.tag", + type: "meta.tag.r", value: ">" } ] diff --git a/lib/ace/mode/javascript_highlight_rules_test.js b/lib/ace/mode/javascript_highlight_rules_test.js index 36647b0f..e0c61bb1 100644 --- a/lib/ace/mode/javascript_highlight_rules_test.js +++ b/lib/ace/mode/javascript_highlight_rules_test.js @@ -99,14 +99,11 @@ module.exports = { var tokens = this.tokenizer.getLineTokens(line, "start").tokens; - assert.equal(7, tokens.length); + // TODO is it useful to keep parens in separate tokens? + assert.equal(3, tokens.length); assert.equal("paren.lparen", tokens[0].type); - assert.equal("paren.lparen", tokens[1].type); - assert.equal("paren.lparen", tokens[2].type); - assert.equal("text", tokens[3].type); - assert.equal("paren.rparen", tokens[4].type); - assert.equal("paren.rparen", tokens[5].type); - assert.equal("paren.rparen", tokens[6].type); + assert.equal("text", tokens[1].type); + assert.equal("paren.rparen", tokens[2].type); }, "test for last rule in ruleset to catch capturing group bugs" : function() { diff --git a/lib/ace/mode/liquid_highlight_rules_test.js b/lib/ace/mode/liquid_highlight_rules_test.js index c6ecf4b7..b3be028e 100644 --- a/lib/ace/mode/liquid_highlight_rules_test.js +++ b/lib/ace/mode/liquid_highlight_rules_test.js @@ -65,14 +65,10 @@ module.exports = { var tokens = this.tokenizer.getLineTokens(line, "liquid_start").tokens; - assert.equal(7, tokens.length); + assert.equal(3, tokens.length); assert.equal("paren.lparen", tokens[0].type); - assert.equal("paren.lparen", tokens[1].type); - assert.equal("paren.lparen", tokens[2].type); - assert.equal("text", tokens[3].type); - assert.equal("paren.rparen", tokens[4].type); - assert.equal("paren.rparen", tokens[5].type); - assert.equal("paren.rparen", tokens[6].type); + assert.equal("text", tokens[1].type); + assert.equal("paren.rparen", tokens[2].type); } }; diff --git a/lib/ace/mode/xml_highlight_rules_test.js b/lib/ace/mode/xml_highlight_rules_test.js index 308e5940..893c67a5 100644 --- a/lib/ace/mode/xml_highlight_rules_test.js +++ b/lib/ace/mode/xml_highlight_rules_test.js @@ -52,7 +52,7 @@ var testData = { value: "Juhu" }, { - type: "meta.tag", + type: "meta.tag.r", value: ">" }, { @@ -68,7 +68,7 @@ var testData = { value: "Kinners" }, { - type: "meta.tag", + type: "meta.tag.r", value: ">" } ] @@ -87,7 +87,7 @@ var testData = { value: "Juhu" }, { - type: "meta.tag", + type: "meta.tag.r", value: ">" }, { @@ -99,7 +99,7 @@ var testData = { value: "Kinners" }, { - type: "meta.tag", + type: "meta.tag.r", value: ">" } ] @@ -168,7 +168,7 @@ var testData = { value: "}\"" }, { - type: "meta.tag", + type: "meta.tag.r", value: "/>" } ] diff --git a/lib/ace/test/all_browser.js b/lib/ace/test/all_browser.js index bd5caf29..26252049 100644 --- a/lib/ace/test/all_browser.js +++ b/lib/ace/test/all_browser.js @@ -34,6 +34,7 @@ var testNames = [ "ace/mode/javascript_highlight_rules_test", "ace/mode/javascript_worker_test", "ace/mode/lucene_highlight_rules_test", + "ace/mode/liquid_highlight_rules_test", "ace/mode/python_test", "ace/mode/ruby_highlight_rules_test", "ace/mode/text_test", From 8f6f6c6e3df6f86d97d39d8fa5ef5e5165d73b0e Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 25 Dec 2012 19:39:33 +0400 Subject: [PATCH 14/14] fix error in objectivec_highlight_rules when Array.prototype is modified --- lib/ace/mode/objectivec_highlight_rules.js | 32 ++++++++-------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/lib/ace/mode/objectivec_highlight_rules.js b/lib/ace/mode/objectivec_highlight_rules.js index e703c8ad..adc95e39 100644 --- a/lib/ace/mode/objectivec_highlight_rules.js +++ b/lib/ace/mode/objectivec_highlight_rules.js @@ -17,12 +17,10 @@ var ObjectiveCHighlightRules = function() { "222|" + "x[a-zA-Z0-9]+)"; - var specialVariables = [ - { + var specialVariables = [{ "regex": "\\b_cmd\\b", "token": "variable.other.selector.objc" - }, - { + }, { "regex": "\\b(?:self|super)\\b", "token": "variable.language.objc" } @@ -31,8 +29,7 @@ var ObjectiveCHighlightRules = function() { var cObj = new CHighlightRules(); var cRules = cObj.getRules(); - this.$rules = - { + this.$rules = { "start": [ { token : "comment", @@ -312,24 +309,17 @@ var ObjectiveCHighlightRules = function() { // copy in C-Rules directly for (var r in cRules) { - if (r == "start") { - for (var key in cRules[r]) { - this.$rules.start.push(cRules[r][key]) - } - } - else { + if (this.$rules[r]) { + if (this.$rules[r].push) + this.$rules[r].push.apply(this.$rules[r], cRules[r]); + } else { this.$rules[r] = cRules[r]; } } - - var startRules = this.$rules.start; - for (var s in startRules) { - this.$rules.bracketed_content.push(startRules[s]); - } - for (var s in specialVariables) { - this.$rules.bracketed_content.push(specialVariables[s]); - } - + + this.$rules.bracketed_content = this.$rules.bracketed_content.concat( + this.$rules.start, specialVariables + ); this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);