From f9d4bbac49e0724171264ad848c9d8e207a1ed78 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 20 Jan 2013 16:47:49 +0400 Subject: [PATCH] tests for all modes --- lib/ace/mode/_test/Readme.md | 9 + lib/ace/mode/_test/highlight_rules_test.js | 152 ++ lib/ace/mode/_test/test_highlight_rules.js | 144 -- lib/ace/mode/_test/text_coffee.txt | 56 + lib/ace/mode/_test/text_curly.txt | 9 + lib/ace/mode/_test/text_html.txt | 8 + lib/ace/mode/_test/text_javascript.txt | 34 + lib/ace/mode/_test/text_lucene.txt | 16 + lib/ace/mode/_test/text_markdown.txt | 13 + lib/ace/mode/_test/text_ruby.txt | 15 + lib/ace/mode/_test/text_xml.txt | 7 + lib/ace/mode/_test/tokens_abap.json | 483 ++-- lib/ace/mode/_test/tokens_asciidoc.json | 1151 +++------ lib/ace/mode/_test/tokens_c9search.json | 249 +- lib/ace/mode/_test/tokens_c_cpp.json | 439 ++-- lib/ace/mode/_test/tokens_clojure.json | 381 ++- lib/ace/mode/_test/tokens_coffee.json | 673 +++-- lib/ace/mode/_test/tokens_coldfusion.json | 66 +- lib/ace/mode/_test/tokens_csharp.json | 71 +- lib/ace/mode/_test/tokens_css.json | 379 ++- lib/ace/mode/_test/tokens_curly.json | 107 + lib/ace/mode/_test/tokens_dart.json | 905 +++---- lib/ace/mode/_test/tokens_diff.json | 1119 +++----- lib/ace/mode/_test/tokens_dot.json | 2254 +++++++++++++++++ lib/ace/mode/_test/tokens_glsl.json | 312 +-- lib/ace/mode/_test/tokens_golang.json | 613 ++--- lib/ace/mode/_test/tokens_groovy.json | 933 +++---- lib/ace/mode/_test/tokens_haml.json | 454 ++-- lib/ace/mode/_test/tokens_haxe.json | 338 ++- lib/ace/mode/_test/tokens_html.json | 253 +- lib/ace/mode/_test/tokens_jade.json | 496 ++-- lib/ace/mode/_test/tokens_java.json | 234 +- lib/ace/mode/_test/tokens_javascript.json | 942 +++---- lib/ace/mode/_test/tokens_json.json | 1023 +++----- lib/ace/mode/_test/tokens_jsp.json | 1004 ++++---- lib/ace/mode/_test/tokens_jsx.json | 130 +- lib/ace/mode/_test/tokens_latex.json | 321 +-- lib/ace/mode/_test/tokens_less.json | 492 ++-- lib/ace/mode/_test/tokens_liquid.json | 1179 ++++----- lib/ace/mode/_test/tokens_lisp.json | 562 ++-- lib/ace/mode/_test/tokens_lua.json | 784 +++--- lib/ace/mode/_test/tokens_luapage.json | 1453 +++++------ lib/ace/mode/_test/tokens_lucene.json | 38 +- lib/ace/mode/_test/tokens_markdown.json | 1881 +++++--------- lib/ace/mode/_test/tokens_objectivec.json | 1872 ++++++-------- lib/ace/mode/_test/tokens_ocaml.json | 452 ++-- lib/ace/mode/_test/tokens_perl.json | 523 ++-- lib/ace/mode/_test/tokens_pgsql.json | 1750 ++++++------- lib/ace/mode/_test/tokens_php.json | 322 +-- lib/ace/mode/_test/tokens_powershell.json | 438 ++-- lib/ace/mode/_test/tokens_python.json | 351 ++- lib/ace/mode/_test/tokens_r.json | 531 ++-- lib/ace/mode/_test/tokens_rdoc.json | 1064 ++++---- lib/ace/mode/_test/tokens_rhtml.json | 274 +- lib/ace/mode/_test/tokens_ruby.json | 374 ++- lib/ace/mode/_test/tokens_scad.json | 450 ++-- lib/ace/mode/_test/tokens_scala.json | 1285 ++++------ lib/ace/mode/_test/tokens_scss.json | 303 +-- lib/ace/mode/_test/tokens_sh.json | 752 +++--- lib/ace/mode/_test/tokens_sql.json | 127 +- lib/ace/mode/_test/tokens_stylus.json | 695 ++--- lib/ace/mode/_test/tokens_svg.json | 1617 +++++------- lib/ace/mode/_test/tokens_tcl.json | 940 +++---- lib/ace/mode/_test/tokens_tex.json | 319 +-- lib/ace/mode/_test/tokens_text.json | 87 +- lib/ace/mode/_test/tokens_textile.json | 304 +-- lib/ace/mode/_test/tokens_typescript.json | 1321 ++++------ lib/ace/mode/_test/tokens_vbscript.json | 249 ++ lib/ace/mode/_test/tokens_xml.json | 1244 ++++----- lib/ace/mode/_test/tokens_xquery.json | 108 +- lib/ace/mode/_test/tokens_yaml.json | 403 ++- lib/ace/mode/coffee_highlight_rules_test.js | 266 -- lib/ace/mode/curly_highlight_rules_test.js | 202 -- .../mode/javascript_highlight_rules_test.js | 215 -- lib/ace/mode/lucene_highlight_rules_test.js | 99 - lib/ace/mode/markdown_highlight_rules_test.js | 100 - lib/ace/mode/ruby_highlight_rules_test.js | 108 - lib/ace/mode/xml_highlight_rules_test.js | 208 -- lib/ace/test/all_browser.js | 8 - 79 files changed, 18431 insertions(+), 23112 deletions(-) create mode 100644 lib/ace/mode/_test/Readme.md create mode 100644 lib/ace/mode/_test/highlight_rules_test.js delete mode 100644 lib/ace/mode/_test/test_highlight_rules.js create mode 100644 lib/ace/mode/_test/text_coffee.txt create mode 100644 lib/ace/mode/_test/text_curly.txt create mode 100644 lib/ace/mode/_test/text_html.txt create mode 100644 lib/ace/mode/_test/text_lucene.txt create mode 100644 lib/ace/mode/_test/text_markdown.txt create mode 100644 lib/ace/mode/_test/text_ruby.txt create mode 100644 lib/ace/mode/_test/text_xml.txt create mode 100644 lib/ace/mode/_test/tokens_curly.json create mode 100644 lib/ace/mode/_test/tokens_dot.json create mode 100644 lib/ace/mode/_test/tokens_vbscript.json delete mode 100644 lib/ace/mode/coffee_highlight_rules_test.js delete mode 100644 lib/ace/mode/curly_highlight_rules_test.js delete mode 100644 lib/ace/mode/javascript_highlight_rules_test.js delete mode 100644 lib/ace/mode/lucene_highlight_rules_test.js delete mode 100644 lib/ace/mode/markdown_highlight_rules_test.js delete mode 100644 lib/ace/mode/ruby_highlight_rules_test.js delete mode 100644 lib/ace/mode/xml_highlight_rules_test.js diff --git a/lib/ace/mode/_test/Readme.md b/lib/ace/mode/_test/Readme.md new file mode 100644 index 00000000..6b5ed443 --- /dev/null +++ b/lib/ace/mode/_test/Readme.md @@ -0,0 +1,9 @@ +`tokens_.json` files keep information about correct tokens and tokenizer states for all modes supported by ace. +They are generated from `text_.txt` or `demo/kitchen-sink/doc/*` with + +```sh +node highlight_rules_test.js gen +``` + +command. + diff --git a/lib/ace/mode/_test/highlight_rules_test.js b/lib/ace/mode/_test/highlight_rules_test.js new file mode 100644 index 00000000..9335e1f8 --- /dev/null +++ b/lib/ace/mode/_test/highlight_rules_test.js @@ -0,0 +1,152 @@ +var fs = require("fs"); +if (!fs.existsSync) + fs.existsSync = require("path").existsSync; + +require("amd-loader"); + +var cwd = __dirname + "/"; + +function generateTestData() { + var root = Array(5).join("../") + "/demo/kitchen-sink/docs"; + var docs = fs.readdirSync(cwd + root); + var specialDocs = fs.readdirSync(cwd); + var modes = fs.readdirSync(cwd + "../").filter(function(x){ + return /^\w+_highlight_rules.js$/.test(x); + }).map(function(x) { + return x.replace(/_highlight_rules.js$/, ""); + }); + + console.log("Docs:", docs); + console.log("Modes:", modes); + + docs.forEach(function(docName) { + var p = docName.toLowerCase().split("."); + if (!p[1]) + return; + var modeName; + if (modes.indexOf(p[0]) != -1) + modeName = p[0]; + else if (modes.indexOf(p[1]) != -1) + modeName = p[1]; + else + modeName = {"txt": "text", cpp: "c_cpp"}[p[1]]; + + var filePath = "text_" + modeName + ".txt"; + if (specialDocs.indexOf(filePath) == -1) { + filePath = root + "/" + docName; + } + + var text = fs.readFileSync(cwd + filePath, "utf8"); + try { + var Mode = require("../" + modeName).Mode; + } catch(e) { + console.warn("Can't load mode :" + modeName, p, e); + return; + } + var tokenizer = new Mode().getTokenizer(); + + var state = "start"; + var data = text.split(/\n|\r|\r\n/).map(function(line) { + var data = tokenizer.getLineTokens(line, state); + var tmp = []; + tmp.push(JSON.stringify(data.state)); + data.tokens.forEach(function(x) { + tmp.push(JSON.stringify([x.type, x.value])); + }); + state = data.state; + return tmp.join(",\n "); + }); + + jsonStr = "[[\n " + data.join("\n],[\n ") + "\n]]"; + fs.writeFileSync(cwd + "tokens_" + modeName + ".json", jsonStr, "utf8"); + }); +} + +function test(startAt) { + var modes = fs.readdirSync(cwd).map(function(x) { + return (x.match(/tokens_(.*).json/) || {})[1]; + }).filter(function(x){return !!x}); + + for (var i = Math.max(0, startAt||0); i < modes.length; i++) + testMode(modes[i], i); + + console.log("\u001b[32m" + "all ok" + "\u001b[0m"); +} +function testMode(modeName, i) { + console.log(padNumber(i+1, 3) + ") testing: \u001b[33m" + modeName + "\u001b[0m"); + + var text = fs.readFileSync(cwd + "tokens_" + modeName + ".json", "utf8"); + var data = JSON.parse(text); + var Mode = require("../" + modeName).Mode; + var tokenizer = new Mode().getTokenizer(); + + var state = "start"; + data.forEach(function(lineData) { + lineData.values = []; + lineData.types = []; + lineData.state = lineData.shift(); + lineData.forEach(function(x) { + lineData.types.push(x[0]); + lineData.values.push(x[1]); + }); + + var line = lineData.values.join(""); + + var tokens = tokenizer.getLineTokens(line, state); + var values = tokens.tokens.map(function(x) {return x.value;}); + var types = tokens.tokens.map(function(x) {return x.type;}); + + var success = true; + var err = testEqual([ + lineData.state, tokens.state, + lineData.types, types, + lineData.values, values]); + + if (err) { + console.log(line) + throw "error"; + } + + state = lineData.state; + }); +} +function testEqual(a) { + var err; + if (a[0] !== a[1]) { + console.log(a[0],a[1]); + err = 1; + } + + if ( a[2] + "" !== a[3] + "" || a[4] + "" !== a[5] + "") { + arrayDiff(a[2],a[3]); + arrayDiff(a[4],a[5]); + err = 1; + } + return err; +} +function arrayDiff(a1, a2) { + var l = Math.max(a1.length, a2.length); + var out = []; + for (var i = 0; i < l; i++) { + out.push("\n", padNumber(i+1, 3), ") "); + if (a1[i] !== a2[i]) + out.push("\u001b[31m", a1[i], "\u001b[0m != \u001b[32m", a2[i], "\u001b[0m"); + else + out.push(a1[i]); + } + console.log(out.join("")); +} +function padNumber(num, digits) { + return (" " + num).slice(-digits); +} + +// cli +var arg = process.argv[2]; +if (!arg) + test() +else if (/--?g(en)?/.test(arg)) + generateTestData(process.argv.splice(3)); +else if (/\d+/.test(arg)) + test(parseInt(process.argv[2],10) || 0); +else + testMode(arg, -1) \ No newline at end of file diff --git a/lib/ace/mode/_test/test_highlight_rules.js b/lib/ace/mode/_test/test_highlight_rules.js deleted file mode 100644 index 6c28ba39..00000000 --- a/lib/ace/mode/_test/test_highlight_rules.js +++ /dev/null @@ -1,144 +0,0 @@ -var fs = require("fs"); -if (!fs.existsSync) - fs.existsSync = require("path").existsSync; - -require("amd-loader"); - -var cwd = __dirname + "/"; - -function generateTestData() { - var root = Array(5).join("../") + "/demo/kitchen-sink/docs"; - var docs = fs.readdirSync(cwd + root); - var specialDocs = fs.readdirSync(cwd); - var modes = fs.readdirSync(cwd + "../").filter(function(x){ - return /^\w+_highlight_rules.js$/.test(x); - }).map(function(x) { - return x.replace(/_highlight_rules.js$/, ""); - }); - - console.log("Docs:", docs); - console.log("Modes:", modes); - - docs.forEach(function(docName) { - var p = docName.toLowerCase().split("."); - if (!p[1]) - return; - var modeName; - if (modes.indexOf(p[0]) != -1) - modeName = p[0]; - else if (modes.indexOf(p[1]) != -1) - modeName = p[1]; - else - modeName = {"txt": "text", cpp: "c_cpp"}[p[1]]; - - var filePath = "text_" + modeName + ".txt"; - if (specialDocs.indexOf(filePath) == -1) { - filePath = root + "/" + docName; - } - - var text = fs.readFileSync(cwd + filePath, "utf8"); - try { - var Mode = require("../" + modeName).Mode; - } catch(e) { - console.warn("Can't load mode :" + modeName, e); - return; - } - var tokenizer = new Mode().getTokenizer(); - - var state = "start"; - var data = text.split(/\n|\r|\r\n/).map(function(line) { - var tokens = tokenizer.getLineTokens(line, state); - state = tokens.state; - tokens = tokens.tokens; - return { - state: state, - data: tokens.map(function(x) {return [x.type, x.value]}) - }; - }); - var jsonStr = JSON.stringify(data, null, 1); - jsonStr = jsonStr.replace(/\n {4}/g, " ").replace(/\n {3}]/g, " ]"); - fs.writeFileSync(cwd + "tokens_" + modeName + ".json", jsonStr, "utf8"); - }); -} - -function test(startAt) { - var docs = fs.readdirSync(cwd).filter(function(x) { - return /^tokens_\w+.json$/.test(x); - }); - if (startAt && startAt > 1) - docs = docs.slice(startAt - 1); - docs.forEach(function(x, i) { - var modeName = x.match(/tokens_(.*).json/)[1]; - - console.log(padNumber(i+1, 3) + ") testing: \u001b[33m" + modeName + "\u001b[0m"); - - var text = fs.readFileSync(cwd + x, "utf8"); - var data = JSON.parse(text); - var Mode = require("../" + modeName).Mode; - var tokenizer = new Mode().getTokenizer(); - - var state = "start"; - data.forEach(function(lineData) { - lineData.values = []; - lineData.types = []; - lineData.data.forEach(function(x) { - lineData.types.push(x[0]); - lineData.values.push(x[1]); - }); - - var line = lineData.values.join(""); - - var tokens = tokenizer.getLineTokens(line, state); - var values = tokens.tokens.map(function(x) {return x.value;}); - var types = tokens.tokens.map(function(x) {return x.type;}); - - var success = true; - testEqual([ - lineData.state, tokens.state, - lineData.types, types, - lineData.values, values]); - - state = lineData.state; - }); - }); - - console.log("\u001b[32m" + "all ok" + "\u001b[0m"); - - function testEqual(a) { - var err; - if (a[0] !== a[1]) { - console.log(a[0],a[1]); - err = 1; - } - - if ( a[2] + "" !== a[3] + "" || a[4] + "" !== a[5] + "") { - arrayDiff(a[2],a[3]); - arrayDiff(a[4],a[5]); - err = 1; - } - if (err) { - throw "error"; - } - } - - function arrayDiff(a1, a2) { - var l = Math.max(a1.length, a2.length); - var out = []; - for (var i = 0; i < l; i++) { - out.push("\n", padNumber(i+1, 3), ") "); - if (a1[i] !== a2[i]) - out.push("\u001b[31m", a1[i], " != ", a2[i], "\u001b[0m"); - else - out.push(a1[i]); - } - console.log(out.join("")); - } - function padNumber(num, digits) { - return (" " + num).slice(-digits); - } -} - -if (process.argv[2] == "gen") - generateTestData(process.argv.splice(3)); -else - test(parseInt(process.argv[2],10) || 0); diff --git a/lib/ace/mode/_test/text_coffee.txt b/lib/ace/mode/_test/text_coffee.txt new file mode 100644 index 00000000..094e61b7 --- /dev/null +++ b/lib/ace/mode/_test/text_coffee.txt @@ -0,0 +1,56 @@ +#test: tokenize keyword + for (i 1..2) +#test: tokenize regexp +/"[a]/ +#test: tokenize functions +foo = ({args}) -> + foo = ({a1, a2}) -> + foo = ({@a1, a2}) -> + foo : ({args}) -> + foo = ({args}) -> + foo = ({0abc}) -> + foo = ({/abc}) => + foo = ({abc/}) -> + foo = ({#abc}) -> + foo = ({abc#}) -> + foo = ({)abc}) -> + foo = ({abc)}) -> + foo = ({a{bc}) -> + foo = ({}) -> + foo = ({ }) -> + foo : ({}) -> + foo = (args) -> + foo = (arg1, arg2) -> + foo = (arg1 = 1, arg2 = 'name') -> + foo = (@arg1 = /abc/, arg2 = 'name') -> + #test: tokenize function: invalid case: + foo=(/args) -> + foo = () -> + foo = ( ) -> + foo : ( ) -> + window.foo = (args) -> + foo = -> + foo = -> + foo : -> + #test: tokenize callback function + foo bar: 1, (args) -> + foo = (1, 2 (x) -> +#test: tokenize class +class Foo +class Foo extends Bar +#test: tokenize illegal name property +foo.static.function +#!test tokenize string with interpolation +a = "#{ 22 / 7 + {x: "#{a + b}"} + 2}" +"""heredoc + """ +do -> + ### + herecomment + ### + re = /regex/imgy.test /// + heregex # comment + ///imgy + this isnt: `just + JavaScript` + undefined diff --git a/lib/ace/mode/_test/text_curly.txt b/lib/ace/mode/_test/text_curly.txt new file mode 100644 index 00000000..1be54b59 --- /dev/null +++ b/lib/ace/mode/_test/text_curly.txt @@ -0,0 +1,9 @@ +tokenize Curly template{{test}} +tokenize embedded script +'123' +tokenize multiline attribute value with double quotes + +tokenize multiline attribute value with single quotes + diff --git a/lib/ace/mode/_test/text_html.txt b/lib/ace/mode/_test/text_html.txt new file mode 100644 index 00000000..64a32cb2 --- /dev/null +++ b/lib/ace/mode/_test/text_html.txt @@ -0,0 +1,8 @@ + +'123' + + + + \ No newline at end of file diff --git a/lib/ace/mode/_test/text_javascript.txt b/lib/ace/mode/_test/text_javascript.txt index a4b5095a..6e180795 100644 --- a/lib/ace/mode/_test/text_javascript.txt +++ b/lib/ace/mode/_test/text_javascript.txt @@ -1,3 +1,37 @@ +//test: tokenize 'standard' functions +string.charCodeAt(23); document.getElementById('test'); console.log('Here it is');"; +test: /**tokenize doc*/ comment +/**tokenize doc comment with @tag {}*/ +//test: tokenize parens + var line = "[{( )}]"; +//test tokenize arithmetic expression which looks like a regexp +a/b/c +a/=b/c +//test tokenize reg exps +a=/b/g +a+/b/g +a = 1 + /2 + 1/b +a=/a/ / /a/ +case /a/.test(c) +//test tokenize multi-line comment containing a single line comment +noRegex +/* foo // bar */ +canBeRegex; +/* foo // bar */ +// test tokenize identifier with umlauts +fu?e +// test // is not a regexp +{ // 123 +//test skipping escaped chars +'Meh\\nNeh' +console.log('\\u1232Feh' +"test multiline\ + strings" +a=' +b="\ +still a string + + function foo(items, nada) { for (var i=0; i//Juhu Kinners +test: two tags in the same lines should be in separate tokens" + +test: multiline attributes" + \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_abap.json b/lib/ace/mode/_test/tokens_abap.json index 06a373dc..95f2f811 100644 --- a/lib/ace/mode/_test/tokens_abap.json +++ b/lib/ace/mode/_test/tokens_abap.json @@ -1,294 +1,189 @@ -[ - { - "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 +[[ + "start", + ["doc.comment","***************************************"] +],[ + "start", + ["doc.comment","** Program: EXAMPLE **"] +],[ + "start", + ["doc.comment","** Author: Joe Byte, 07-Jul-2007 **"] +],[ + "start", + ["doc.comment","***************************************"] +],[ + "start", + ["text"," "] +],[ + "start", + ["keyword","REPORT"], + ["text"," BOOKINGS"], + ["keyword.operator","."] +],[ + "start", + ["text"," "] +],[ + "start", + ["doc.comment","* Read flight bookings from the database"] +],[ + "start", + ["keyword","SELECT"], + ["keyword.operator"," * "], + ["keyword","FROM"], + ["text"," FLIGHTINFO"] +],[ + "start", + ["text"," "], + ["keyword","WHERE"], + ["text"," "], + ["keyword","CLASS"], + ["keyword.operator"," = "], + ["string","'Y'"], + ["text"," "], + ["comment","\"Y = economy"] +],[ + "start", + ["text"," "], + ["keyword","OR"], + ["text"," "], + ["keyword","CLASS"], + ["keyword.operator"," = "], + ["string","'C'"], + ["keyword.operator","."], + ["text"," "], + ["comment","\"C = business"] +],[ + "start", + ["paren.lparen","("], + ["invalid","..."], + ["paren.rparen",")"] +],[ + "start" +],[ + "start", + ["keyword","REPORT"], + ["text"," TEST"], + ["keyword.operator","."] +],[ + "start", + ["keyword","WRITE"], + ["text"," "], + ["string","'Hello World'"], + ["keyword.operator","."] +],[ + "start" +],[ + "start", + ["text","USERPROMPT"], + ["keyword.operator"," = "], + ["string","'Please double-click on a line in the output list '"], + ["text"," "], + ["keyword.operator","&"] +],[ + "start", + ["text"," "], + ["string","'to see the complete details of the transaction.'"], + ["keyword.operator","."] +],[ + "start" +],[ + "start" +],[ + "start", + ["keyword","DATA"], + ["text"," LAST_EOM "], + ["keyword","TYPE"], + ["text"," "], + ["support.type","D"], + ["keyword.operator","."], + ["text"," "], + ["comment","\"last end-of-month date"] +],[ + "start", + ["text"," "] +],[ + "start", + ["doc.comment","* Start from today's date"] +],[ + "start", + ["text"," LAST_EOM"], + ["keyword.operator"," = "], + ["variable.parameter","SY"], + ["keyword.operator","-"], + ["text","DATUM"], + ["keyword.operator","."] +],[ + "start", + ["doc.comment","* Set characters 6 and 7 (0-relative) of the YYYYMMDD string to \"01\","] +],[ + "start", + ["doc.comment","* giving the first day of the current month"] +],[ + "start", + ["text"," LAST_EOM"], + ["constant.numeric","+6"], + ["paren.lparen","("], + ["constant.numeric","2"], + ["paren.rparen",")"], + ["keyword.operator"," = "], + ["string","'01'"], + ["keyword.operator","."] +],[ + "start", + ["doc.comment","* Subtract one day"] +],[ + "start", + ["text"," LAST_EOM"], + ["keyword.operator"," = "], + ["text","LAST_EOM"], + ["keyword.operator"," - "], + ["constant.numeric","1"], + ["keyword.operator","."] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["keyword","WRITE"], + ["keyword.operator",":"], + ["text"," "], + ["string","'Last day of previous month was'"], + ["keyword.operator",","], + ["text"," LAST_EOM"], + ["keyword.operator","."] +],[ + "start", + ["text"," "] +],[ + "start", + ["keyword","DATA"], + ["text"," "], + ["keyword.operator",":"], + ["text"," "], + ["keyword","BEGIN OF"], + ["text"," I_VBRK "], + ["keyword","OCCURS"], + ["text"," "], + ["constant.numeric","0"], + ["keyword.operator",","] +],[ + "start", + ["text"," VBELN "], + ["keyword","LIKE"], + ["text"," "], + ["variable.parameter","VBRK-VBELN"], + ["keyword.operator",","] +],[ + "start", + ["text"," ZUONR "], + ["keyword","LIKE"], + ["text"," "], + ["variable.parameter","VBRK-ZUONR"], + ["keyword.operator",","] +],[ + "start", + ["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 index 61f63285..f54c355e 100644 --- a/lib/ace/mode/_test/tokens_asciidoc.json +++ b/lib/ace/mode/_test/tokens_asciidoc.json @@ -1,729 +1,422 @@ -[ - { - "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", "<= --" ], - [ "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 +[[ + "literalBlock", + ["support.function","------------------------------------"] +],[ + "dissallowDelimitedBlock", + ["support.function","-----------------------------------"] +],[ + "text", + ["string.italic","_ita_lic_"], + ["text",", "], + ["keyword.bold","*bo*ld*"], + ["text",", "], + ["support.function","+mo+no+"], + ["text",", normal. "] +],[ + "text", + ["keyword","``"], + ["text","double quoted"], + ["keyword","''"], + ["text",", `single quoted'."] +],[ + "text", + ["text"," normal, ^super^, "], + ["keyword","~sub~"], + ["text","."] +],[ + "start" +],[ + "text", + ["text","''''"] +],[ + "text", + ["text","Escaped:"] +],[ + "text", + ["constant.language.escape","\\_"], + ["text","italic_, "], + ["support.function","+++"], + ["text","_italic_"], + ["support.function","+++"], + ["text",","] +],[ + "smallPassthrough", + ["text","t"], + ["constant.language.escape","\\_"], + ["text","_e"], + ["string.italic","__st, +++t__"], + ["text","e__st"], + ["support.function","+++"], + ["text",","] +],[ + "smallPassthrough", + ["support.function","+++"], + ["text","bold"], + ["support.function","+++"], + ["text",", $$<"], + ["support.function","b"], + ["text",">"], + ["support.function","normal"], + ["text","$$"] +],[ + "smallPassthrough", + ["text","\\&#"], + ["support.function","182"], + ["text","; &#"], + ["support.function","182"], + ["text",";"] +],[ + "smallPassthrough", + ["text","\\`"], + ["support.function","not"], + ["text"," "], + ["support.function","single"], + ["text"," "], + ["support.function","quoted"], + ["text","'"] +],[ + "smallPassthrough", + ["text","\\`\\`"], + ["support.function","not"], + ["text"," "], + ["support.function","double"], + ["text"," "], + ["support.function","quoted"], + ["text","''"] +],[ + "dissallowDelimitedBlock" +],[ + "text" +],[ + "start", + ["string.regexp","[fffff]"] +],[ + "passthroughBlock", + ["string","+++++++++++++++++++++++++++++++++++++"] +],[ + "passthroughBlock", + ["support.function","(C) "], + ["constant.character","{ss}"], + ["support.function"," ss"] +],[ + "dissallowDelimitedBlock", + ["support.function","+++++++++++++++++++++++++++++++++++++"] +],[ + "text" +],[ + "listingBlock", + ["support.function","............."] +],[ + "listingBlock", + ["support.function","callout "], + ["constant.numeric","<1>"] +],[ + "dissallowDelimitedBlock", + ["support.function",".............."] +],[ + "text" +],[ + "text", + ["text","> 1"] +],[ + "text", + ["text","1> 2"] +],[ + "text", + ["text","<2> 3"] +],[ + "start" +],[ + "text", + ["text","Escaped:"] +],[ + "text", + ["constant.language.escape","\\_"], + ["text","italic_,"] +],[ + "text", + ["text","t"], + ["constant.language.escape","\\_"], + ["text","_e"], + ["string.italic","__st, o__"] +],[ + "start" +],[ + "start", + ["constant.numeric",".optional title"] +],[ + "listingBlock", + ["support.function","............."] +],[ + "listingBlock", + ["support.function","callout "], + ["constant.numeric","<1>"] +],[ + "dissallowDelimitedBlock", + ["support.function",".............."] +],[ + "text" +],[ + "start" +],[ + "text", + ["keyword",":macro:"], + ["text"," dddd"] +],[ + "start" +],[ + "start", + ["constant.numeric",".lists"] +],[ + "listText", + ["keyword",". "], + ["text","1"] +],[ + "listText", + ["keyword",".. "], + ["text","2"] +],[ + "listText", + ["keyword","... "], + ["text","d"] +],[ + "listText", + ["keyword","..... "], + ["text","big"] +],[ + "start", + ["keyword","+"] +],[ + "text", + ["text","continue"], + ["keyword"," +"] +],[ + "text", + ["text","next line"] +],[ + "text", + ["text","xi) no "], + ["support.function","++la+tin++"] +],[ + "start" +],[ + "listText", + ["keyword","xi) "], + ["text","la"], + ["support.function","++tin++"] +],[ + "listText", + ["keyword","2. "], + ["text","num"], + ["string.italic","__ber__"], + ["text"," [red]"], + ["keyword","#"], + ["text","red"], + ["keyword","#"] +],[ + "start", + ["keyword","--"] +],[ + "listText", + ["keyword"," 5. "], + ["text","f "], + ["keyword","<>"], + ["text"," "], + ["constant.character","{macro}"] +],[ + "start", + ["keyword","--"] +],[ + "text", + ["markup.list.macro","image::"], + ["keyword","path"], + ["string","[beauty]"], + ["text"," "], + ["constant.language.escape","->"], + ["text","--"], + ["constant.language.escape","<= --"], + ["text"," replacements"] +],[ + "start" +],[ + "indentedBlock", + ["support.function"," image::s"] +],[ + "indentedBlock", + ["support.function","sssss"] +],[ + "indentedBlock", + ["support.function","sss "] +],[ + "indentedBlock", + ["support.function","sssss"] +],[ + "start" +],[ + "start" +],[ + "start", + ["markup.heading","== 1"] +],[ + "indentedBlock", + ["support.function"," heading"] +],[ + "start", + ["markup.heading","=== not a heading"] +],[ + "start", + ["keyword","===================================="] +],[ + "start" +],[ + "start", + ["keyword","=================================="] +],[ + "text", + ["text","====4 "] +],[ + "text", + ["text","NOTE: above"] +],[ + "start" +],[ + "text", + ["keyword","NOTE:"], + ["text"," above"] +],[ + "start" +],[ + "start", + ["string.regexp","[[x6]]"] +],[ + "text", + ["keyword","WARNING:"], + ["text"," "] +],[ + "start" +],[ + "start", + ["string.regexp","[options[]]"] +],[ + "literalBlock", + ["support.function","---------------------------"] +],[ + "literalBlock", + ["support.function","literal"] +],[ + "dissallowDelimitedBlock", + ["support.function","---------------------------"] +],[ + "text" +],[ + "start" +],[ + "start", + ["markup.heading","= Tables"] +],[ + "tableBlock", + ["doc.comment","|===================================="] +],[ + "tableBlock", + ["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)"] +],[ + "tableBlock" +],[ + "dissallowDelimitedBlock", + ["doc.comment","|===================================="] +],[ + "text" +],[ + "start" +],[ + "start", + ["string.regexp","[more, options]"] +],[ + "commentBlock", + ["doc.comment","///////////"] +],[ + "commentBlock", + ["doc.comment","comment"] +],[ + "dissallowDelimitedBlock", + ["doc.comment","///////////"] +],[ + "text", + ["comment","// one line comment"] +],[ + "start" +],[ + "start" +],[ + "start" +],[ + "text", + ["text","[red]"], + ["keyword","#"], + ["text","red text"], + ["keyword","#"], + ["text"," [yellow-background]"], + ["keyword","#"], + ["text","on yellow"], + ["keyword","#"] +],[ + "text", + ["text","[big]"], + ["keyword","#"], + ["text","large"], + ["keyword","#"], + ["text"," [red yellow-background big]"], + ["keyword.bold","*all bold*"] +],[ + "start" +],[ + "start", + ["text","\t"] +],[ + "text", + ["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]"] +],[ + "text", + ["text"," .still normal text"] +],[ + "start", + ["constant.numeric",".break out thoug should not"] +],[ + "literalBlock", + ["support.function","---------------------------"] +],[ + "literalBlock", + ["support.function","///////////////////////////"] +],[ + "dissallowDelimitedBlock", + ["support.function","---------------------------"] +],[ + "text" +],[ + "start" +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_c9search.json b/lib/ace/mode/_test/tokens_c9search.json index 491d3c9f..4d7485ab 100644 --- a/lib/ace/mode/_test/tokens_c9search.json +++ b/lib/ace/mode/_test/tokens_c9search.json @@ -1,160 +1,89 @@ -[ - { - "state": "start", - "data": [ - [ "text", "Searching for 'var' in /workspace/configs" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "string", "configs/default.js" ], - [ "text", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", " 1" ], - [ "c9searchresults.text", ": var fs = require(\"fs\");" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t2" ], - [ "c9searchresults.text", ": var argv = require('optimist').argv;" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t3" ], - [ "c9searchresults.text", ": var path = require(\"path\");" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t5" ], - [ "c9searchresults.text", ": var clientExtensions = {};" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t6" ], - [ "c9searchresults.text", ": var clientDirs = fs.readdirSync(__dirname + \"/../plugins-client\");" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t7" ], - [ "c9searchresults.text", ": for (var i = 0; i < clientDirs.length; i++) {" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t8" ], - [ "c9searchresults.text", ": var dir = clientDirs[i];" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t12" ], - [ "c9searchresults.text", ": var name = dir.split(\".\")[1];" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t16" ], - [ "c9searchresults.text", ": var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t17" ], - [ "c9searchresults.text", ": var fsUrl = \"/workspace\";" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t19" ], - [ "c9searchresults.text", ": var port = argv.p || process.env.PORT || 3131;" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t20" ], - [ "c9searchresults.text", ": var host = argv.l || \"localhost\";" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t22" ], - [ "c9searchresults.text", ": var config = {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "string", "configs/local.js" ], - [ "text", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t2" ], - [ "c9searchresults.text", ": var config = require(\"./default\");" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "string", "configs/packed.js" ], - [ "text", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "c9searchresults.constant.numeric", "\t1" ], - [ "c9searchresults.text", ": var config = require(\"./default\");" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Found 15 matches in 3 files" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["text","Searching for 'var' in /workspace/configs"] +],[ + "start" +],[ + "start", + ["string","configs/default.js"], + ["text",":"] +],[ + "start", + ["c9searchresults.constant.numeric"," 1"], + ["c9searchresults.text",": var fs = require(\"fs\");"] +],[ + "start", + ["c9searchresults.constant.numeric","\t2"], + ["c9searchresults.text",": var argv = require('optimist').argv;"] +],[ + "start", + ["c9searchresults.constant.numeric","\t3"], + ["c9searchresults.text",": var path = require(\"path\");"] +],[ + "start", + ["c9searchresults.constant.numeric","\t5"], + ["c9searchresults.text",": var clientExtensions = {};"] +],[ + "start", + ["c9searchresults.constant.numeric","\t6"], + ["c9searchresults.text",": var clientDirs = fs.readdirSync(__dirname + \"/../plugins-client\");"] +],[ + "start", + ["c9searchresults.constant.numeric","\t7"], + ["c9searchresults.text",": for (var i = 0; i < clientDirs.length; i++) {"] +],[ + "start", + ["c9searchresults.constant.numeric","\t8"], + ["c9searchresults.text",": var dir = clientDirs[i];"] +],[ + "start", + ["c9searchresults.constant.numeric","\t12"], + ["c9searchresults.text",": var name = dir.split(\".\")[1];"] +],[ + "start", + ["c9searchresults.constant.numeric","\t16"], + ["c9searchresults.text",": var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();"] +],[ + "start", + ["c9searchresults.constant.numeric","\t17"], + ["c9searchresults.text",": var fsUrl = \"/workspace\";"] +],[ + "start", + ["c9searchresults.constant.numeric","\t19"], + ["c9searchresults.text",": var port = argv.p || process.env.PORT || 3131;"] +],[ + "start", + ["c9searchresults.constant.numeric","\t20"], + ["c9searchresults.text",": var host = argv.l || \"localhost\";"] +],[ + "start", + ["c9searchresults.constant.numeric","\t22"], + ["c9searchresults.text",": var config = {"] +],[ + "start" +],[ + "start", + ["string","configs/local.js"], + ["text",":"] +],[ + "start", + ["c9searchresults.constant.numeric","\t2"], + ["c9searchresults.text",": var config = require(\"./default\");"] +],[ + "start" +],[ + "start", + ["string","configs/packed.js"], + ["text",":"] +],[ + "start", + ["c9searchresults.constant.numeric","\t1"], + ["c9searchresults.text",": var config = require(\"./default\");"] +],[ + "start" +],[ + "start" +],[ + "start", + ["text","Found 15 matches in 3 files"] +]] \ 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 0a6f9aae..6ddda060 100644 --- a/lib/ace/mode/_test/tokens_c_cpp.json +++ b/lib/ace/mode/_test/tokens_c_cpp.json @@ -1,273 +1,166 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "// compound assignment operators" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "#include" ], - [ "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": [ - [ "keyword.control", "using" ], - [ "text", " " ], - [ "keyword.operator", "namespace" ], - [ "text", " " ], - [ "identifier", "std" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "storage.type", "int" ], - [ "text", " " ], - [ "identifier", "main" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "storage.type", "int" ], - [ "text", " " ], - [ "identifier", "a" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "identifier", "b" ], - [ "keyword.operator", "=" ], - [ "constant.numeric", "3" ], - [ "punctuation.operator", ";" ], - [ "text", " " ], - [ "comment", "/* foobar */" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "a" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "b" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "a" ], - [ "keyword.operator", "+=" ], - [ "constant.numeric", "2" ], - [ "punctuation.operator", ";" ], - [ "text", " " ], - [ "comment", "// equivalent to a=a+2" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "cout" ], - [ "text", " " ], - [ "keyword.operator", "<<" ], - [ "text", " " ], - [ "identifier", "a" ], - [ "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": [ - [ "text", " " ], - [ "keyword.control", "return" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "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", "/* Note: No semicolon */" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["comment","// compound assignment operators"] +],[ + "start" +],[ + "start", + ["keyword","#include"], + ["constant.other"," "] +],[ + "start" +],[ + "directive", + ["keyword","#include"], + ["constant.other.multiline"," \\"] +],[ + "start", + ["constant.other"," "] +],[ + "start" +],[ + "directive", + ["keyword","#include"], + ["constant.other.multiline"," \\"] +],[ + "directive", + ["constant.other.multiline"," \\"] +],[ + "start", + ["constant.other"," "] +],[ + "start" +],[ + "directive", + ["keyword","#include"], + ["constant.other.multiline"," \\"] +],[ + "directive", + ["constant.other.multiline"," \\"] +],[ + "start", + ["constant.other"," \"iostream\""] +],[ + "start" +],[ + "start", + ["keyword","#include"], + ["constant.other"," "] +],[ + "start", + ["keyword","#include"], + ["constant.other"," \"boost/asio/io_service.hpp\""] +],[ + "start" +],[ + "start", + ["keyword.control","using"], + ["text"," "], + ["keyword.operator","namespace"], + ["text"," "], + ["identifier","std"], + ["punctuation.operator",";"] +],[ + "start" +],[ + "start", + ["storage.type","int"], + ["text"," "], + ["identifier","main"], + ["text"," "], + ["paren.lparen","("], + ["paren.rparen",")"] +],[ + "start", + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["storage.type","int"], + ["text"," "], + ["identifier","a"], + ["punctuation.operator",","], + ["text"," "], + ["identifier","b"], + ["keyword.operator","="], + ["constant.numeric","3"], + ["punctuation.operator",";"], + ["text"," "], + ["comment","/* foobar */"] +],[ + "start", + ["text"," "], + ["identifier","a"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","b"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["identifier","a"], + ["keyword.operator","+="], + ["constant.numeric","2"], + ["punctuation.operator",";"], + ["text"," "], + ["comment","// equivalent to a=a+2"] +],[ + "start", + ["text"," "], + ["identifier","cout"], + ["text"," "], + ["keyword.operator","<<"], + ["text"," "], + ["identifier","a"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["keyword","#if"], + ["constant.other"," VERBOSE >= 2"] +],[ + "start", + ["text"," "], + ["identifier","prints"], + ["paren.lparen","("], + ["string","\"trace message\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["keyword","#endif"] +],[ + "start", + ["text"," "], + ["keyword.control","return"], + ["text"," "], + ["constant.numeric","0"], + ["punctuation.operator",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["comment","/* Print an error message and get out */"] +],[ + "directive", + ["keyword","#define"], + ["constant.other.multiline"," ABORT \\"] +],[ + "directive", + ["constant.other.multiline"," do { \\"] +],[ + "directive", + ["constant.other.multiline"," print( \"Abort\\n\" ); \\"] +],[ + "directive", + ["constant.other.multiline"," exit(8); \\"] +],[ + "start", + ["constant.other","} while (0) "], + ["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 47d197f9..824cba59 100644 --- a/lib/ace/mode/_test/tokens_clojure.json +++ b/lib/ace/mode/_test/tokens_clojure.json @@ -1,219 +1,162 @@ -[ - { - "state": "start", - "data": [ - [ "keyword", "(" ], - [ "support.function", "defn" ], - [ "text", " " ], - [ "identifier", "parting" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "string", "\"returns a String parting in a given language\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "([]" ], - [ "text", " " ], - [ "keyword", "(" ], - [ "identifier", "parting" ], - [ "text", " " ], - [ "string", "\"World\"" ], - [ "keyword", "))" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "([" ], - [ "support.function", "name" ], - [ "keyword", "]" ], - [ "text", " " ], - [ "keyword", "(" ], - [ "identifier", "parting" ], - [ "text", " " ], - [ "support.function", "name" ], - [ "text", " " ], - [ "string", "\"en\"" ], - [ "keyword", "))" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "([" ], - [ "support.function", "name" ], - [ "text", " " ], - [ "identifier", "language" ], - [ "keyword", "]" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "; condp is similar to a case statement in other languages." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "; It is described in more detail later." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "; It is used here to take different actions based on whether the" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "; parameter \"language\" is set to \"en\", \"es\" or something else." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "(" ], - [ "support.function", "condp" ], - [ "text", " " ], - [ "constant.language", "=" ], - [ "text", " " ], - [ "identifier", "language" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "string", "\"en\"" ], - [ "text", " " ], - [ "keyword", "(" ], - [ "support.function", "str" ], - [ "text", " " ], - [ "string", "\"Goodbye, \"" ], - [ "text", " " ], - [ "support.function", "name" ], - [ "keyword", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "string", "\"es\"" ], - [ "text", " " ], - [ "keyword", "(" ], - [ "support.function", "str" ], - [ "text", " " ], - [ "string", "\"Adios, \"" ], - [ "text", " " ], - [ "support.function", "name" ], - [ "keyword", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "(throw" ], - [ "text", " " ], - [ "keyword", "(" ], - [ "identifier", "IllegalArgumentException" ], - [ "text", "." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "(" ], - [ "support.function", "str" ], - [ "text", " " ], - [ "string", "\"unsupported language \"" ], - [ "text", " " ], - [ "identifier", "language" ], - [ "keyword", "))))))" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "(" ], - [ "support.function", "println" ], - [ "text", " " ], - [ "keyword", "(" ], - [ "identifier", "parting" ], - [ "keyword", "))" ], - [ "text", " " ], - [ "comment", "; -> Goodbye, World" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "(" ], - [ "support.function", "println" ], - [ "text", " " ], - [ "keyword", "(" ], - [ "identifier", "parting" ], - [ "text", " " ], - [ "string", "\"Mark\"" ], - [ "keyword", "))" ], - [ "text", " " ], - [ "comment", "; -> Goodbye, Mark" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "(" ], - [ "support.function", "println" ], - [ "text", " " ], - [ "keyword", "(" ], - [ "identifier", "parting" ], - [ "text", " " ], - [ "string", "\"Mark\"" ], - [ "text", " " ], - [ "string", "\"es\"" ], - [ "keyword", "))" ], - [ "text", " " ], - [ "comment", "; -> Adios, Mark" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "(" ], - [ "support.function", "println" ], - [ "text", " " ], - [ "keyword", "(" ], - [ "identifier", "parting" ], - [ "text", " " ], - [ "string", "\"Mark\"" ], - [ "text", ", " ], - [ "string", "\"xy\"" ], - [ "keyword", "))" ], - [ "text", " " ], - [ "comment", "; -> java.lang.IllegalArgumentException: unsupported language xy" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["keyword","("], + ["support.function","defn"], + ["text"," "], + ["identifier","parting"] +],[ + "start", + ["text"," "], + ["string","\"returns a String parting in a given language\""] +],[ + "start", + ["text"," "], + ["keyword","([]"], + ["text"," "], + ["keyword","("], + ["identifier","parting"], + ["text"," "], + ["string","\"World\""], + ["keyword","))"] +],[ + "start", + ["text"," "], + ["keyword","(["], + ["support.function","name"], + ["keyword","]"], + ["text"," "], + ["keyword","("], + ["identifier","parting"], + ["text"," "], + ["support.function","name"], + ["text"," "], + ["string","\"en\""], + ["keyword","))"] +],[ + "start", + ["text"," "], + ["keyword","(["], + ["support.function","name"], + ["text"," "], + ["identifier","language"], + ["keyword","]"] +],[ + "start", + ["text"," "], + ["comment","; condp is similar to a case statement in other languages."] +],[ + "start", + ["text"," "], + ["comment","; It is described in more detail later."] +],[ + "start", + ["text"," "], + ["comment","; It is used here to take different actions based on whether the"] +],[ + "start", + ["text"," "], + ["comment","; parameter \"language\" is set to \"en\", \"es\" or something else."] +],[ + "start", + ["text"," "], + ["keyword","("], + ["support.function","condp"], + ["text"," "], + ["constant.language","="], + ["text"," "], + ["identifier","language"] +],[ + "start", + ["text"," "], + ["string","\"en\""], + ["text"," "], + ["keyword","("], + ["support.function","str"], + ["text"," "], + ["string","\"Goodbye, \""], + ["text"," "], + ["support.function","name"], + ["keyword",")"] +],[ + "start", + ["text"," "], + ["string","\"es\""], + ["text"," "], + ["keyword","("], + ["support.function","str"], + ["text"," "], + ["string","\"Adios, \""], + ["text"," "], + ["support.function","name"], + ["keyword",")"] +],[ + "start", + ["text"," "], + ["keyword","(throw"], + ["text"," "], + ["keyword","("], + ["identifier","IllegalArgumentException"], + ["text","."] +],[ + "start", + ["text"," "], + ["keyword","("], + ["support.function","str"], + ["text"," "], + ["string","\"unsupported language \""], + ["text"," "], + ["identifier","language"], + ["keyword","))))))"] +],[ + "start" +],[ + "start", + ["keyword","("], + ["support.function","println"], + ["text"," "], + ["keyword","("], + ["identifier","parting"], + ["keyword","))"], + ["text"," "], + ["comment","; -> Goodbye, World"] +],[ + "start", + ["keyword","("], + ["support.function","println"], + ["text"," "], + ["keyword","("], + ["identifier","parting"], + ["text"," "], + ["string","\"Mark\""], + ["keyword","))"], + ["text"," "], + ["comment","; -> Goodbye, Mark"] +],[ + "start", + ["keyword","("], + ["support.function","println"], + ["text"," "], + ["keyword","("], + ["identifier","parting"], + ["text"," "], + ["string","\"Mark\""], + ["text"," "], + ["string","\"es\""], + ["keyword","))"], + ["text"," "], + ["comment","; -> Adios, Mark"] +],[ + "start", + ["keyword","("], + ["support.function","println"], + ["text"," "], + ["keyword","("], + ["identifier","parting"], + ["text"," "], + ["string","\"Mark\""], + ["text",", "], + ["string","\"xy\""], + ["keyword","))"], + ["text"," "], + ["comment","; -> java.lang.IllegalArgumentException: unsupported language xy"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_coffee.json b/lib/ace/mode/_test/tokens_coffee.json index a47de57a..5d9d8645 100644 --- a/lib/ace/mode/_test/tokens_coffee.json +++ b/lib/ace/mode/_test/tokens_coffee.json @@ -1,190 +1,483 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "#!/usr/bin/env coffee" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "try" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "throw" ], - [ "text", " " ], - [ "language.support.class", "URIError" ], - [ "text", " " ], - [ "language.support.function", "decodeURI" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "0xC0ffee" ], - [ "text", " " ], - [ "keyword.operator", "*" ], - [ "text", " " ], - [ "constant.numeric", "123456.7e-8" ], - [ "text", " " ], - [ "keyword.operator", "/" ], - [ "text", " " ], - [ "constant.numeric", ".9" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "catch" ], - [ "text", " " ], - [ "identifier", "e" ] - ] - }, - { - "state": "qdoc", - "data": [ - [ "text", " " ], - [ "identifier", "console" ], - [ "punctuation.operator", "." ], - [ "identifier", "log" ], - [ "text", " " ], - [ "string", "'qstring'" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "string", "\"qqstring\"" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "string", "'''" ] - ] - }, - { - "state": "qdoc", - "data": [ - [ "string", " qdoc" ] - ] - }, - { - "state": "qqdoc", - "data": [ - [ "string", " '''" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "string", "\"\"\"" ] - ] - }, - { - "state": "qqdoc", - "data": [ - [ "string", " qqdoc" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", " \"\"\"" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "do" ], - [ "text", " " ], - [ "storage.type", "->" ] - ] - }, - { - "state": "comment", - "data": [ - [ "text", " " ], - [ "comment", "###" ] - ] - }, - { - "state": "comment", - "data": [ - [ "comment", " herecomment" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", " ###" ] - ] - }, - { - "state": "heregex", - "data": [ - [ "text", " " ], - [ "identifier", "re" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string.regex", "/regex/imgy" ], - [ "punctuation.operator", "." ], - [ "identifier", "test" ], - [ "text", " " ], - [ "string.regex", "///" ] - ] - }, - { - "state": "heregex", - "data": [ - [ "comment.regex", " " ], - [ "string.regex", "heregex" ], - [ "comment.regex", " # comment" ] - ] - }, - { - "state": "start", - "data": [ - [ "string.regex", " ///imgy" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "this" ], - [ "text", " " ], - [ "keyword", "isnt" ], - [ "punctuation.operator", ":" ], - [ "text", " " ], - [ "string", "`just JavaScript`" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "constant.language", "undefined" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "identifier", "sentence" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string", "\"#{ 22 / 7 } is a decent approximation of π\"" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["comment","#test: tokenize keyword"] +],[ + "start", + ["text"," "], + ["keyword","for"], + ["text"," "], + ["paren.lparen","("], + ["identifier","i"], + ["text"," "], + ["constant.numeric","1"], + ["punctuation.operator","."], + ["constant.numeric",".2"], + ["paren.rparen",")"] +],[ + "start", + ["comment","#test: tokenize regexp"] +],[ + "start", + ["string.regex","/\"[a]/"] +],[ + "start", + ["comment","#test: tokenize functions"] +],[ + "start", + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["variable.parameter","args"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["variable.parameter","a1, a2"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["variable.parameter","@a1, a2"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["punctuation.operator",":"], + ["text"," "], + ["paren.lparen","({"], + ["variable.parameter","args"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["variable.parameter","args"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["constant.numeric","0"], + ["identifier","abc"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["keyword.operator","/"], + ["identifier","abc"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","=>"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["identifier","abc"], + ["keyword.operator","/"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["comment","#abc}) ->"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["identifier","abc"], + ["comment","#}) ->"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["paren.rparen",")"], + ["identifier","abc"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["identifier","abc"], + ["paren.rparen",")})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["identifier","a"], + ["paren.lparen","{"], + ["identifier","bc"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","({"], + ["text"," "], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["punctuation.operator",":"], + ["text"," "], + ["paren.lparen","({"], + ["paren.rparen","})"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["variable.parameter","args"], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["variable.parameter","arg1, arg2"], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["variable.parameter","arg1 = 1, arg2 = 'name'"], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["variable.parameter","@arg1 = /abc/, arg2 = 'name'"], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["comment","#test: tokenize function: invalid case:"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["keyword.operator","="], + ["paren.lparen","("], + ["keyword.operator","/"], + ["identifier","args"], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["text"," "], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["punctuation.operator",":"], + ["text"," "], + ["paren.lparen","("], + ["text"," "], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["variable.language","window"], + ["punctuation.operator","."], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["variable.parameter","args"], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["entity.name.function","foo"], + ["text"," "], + ["punctuation.operator",":"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["comment","#test: tokenize callback function"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["identifier","bar"], + ["punctuation.operator",":"], + ["text"," "], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["text"," "], + ["paren.lparen","("], + ["variable.parameter","args"], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["text"," "], + ["identifier","foo"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["text"," "], + ["constant.numeric","2"], + ["text"," "], + ["paren.lparen","("], + ["variable.parameter","x"], + ["paren.rparen",")"], + ["text"," "], + ["storage.type","->"] +],[ + "start", + ["comment","#test: tokenize class"] +],[ + "start", + ["keyword","class"], + ["text"," "], + ["language.support.class","Foo"] +],[ + "start", + ["keyword","class"], + ["text"," "], + ["language.support.class","Foo"], + ["text"," "], + ["keyword","extends"], + ["text"," "], + ["language.support.class","Bar"] +],[ + "start", + ["comment","#test: tokenize illegal name property"] +],[ + "start", + ["identifier","foo"], + ["punctuation.operator","."], + ["identifier","static"], + ["punctuation.operator","."], + ["identifier","function"] +],[ + "start", + ["comment","#!test tokenize string with interpolation"] +],[ + "start", + ["identifier","a"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","\"#{ 22 / 7 + {x: \""], + ["comment","#{a + b}\"} + 2}\""] +],[ + "qqdoc", + ["string","\"\"\"heredoc"] +],[ + "start", + ["string"," \"\"\""] +],[ + "start", + ["keyword","do"], + ["text"," "], + ["storage.type","->"] +],[ + "comment", + ["text"," "], + ["comment","###"] +],[ + "comment", + ["comment"," herecomment"] +],[ + "start", + ["comment"," ###"] +],[ + "heregex", + ["text"," "], + ["identifier","re"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string.regex","/regex/imgy"], + ["punctuation.operator","."], + ["identifier","test"], + ["text"," "], + ["string.regex","///"] +],[ + "heregex", + ["comment.regex"," "], + ["string.regex","heregex"], + ["comment.regex"," # comment"] +],[ + "start", + ["string.regex"," ///imgy"] +],[ + "start", + ["text"," "], + ["keyword","this"], + ["text"," "], + ["keyword","isnt"], + ["punctuation.operator",":"], + ["text"," "], + ["string","`just JavaScript`"] +],[ + "start", + ["text"," "], + ["constant.language","undefined"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_coldfusion.json b/lib/ace/mode/_test/tokens_coldfusion.json index b2da2dd2..e636d3cf 100644 --- a/lib/ace/mode/_test/tokens_coldfusion.json +++ b/lib/ace/mode/_test/tokens_coldfusion.json @@ -1,40 +1,26 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "cfset" ], - [ "text", " " ], - [ "entity.other.attribute-name", "welcome" ], - [ "keyword.operator", "=" ], - [ "string", "\"Hello World!\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "cfoutput" ], - [ "meta.tag.r", ">" ], - [ "text", "#welcome#" ], - [ "meta.tag", "" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["comment",""] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","cfset"], + ["text"," "], + ["entity.other.attribute-name","welcome"], + ["keyword.operator","="], + ["string","\"Hello World!\""], + ["meta.tag.r",">"] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","cfoutput"], + ["meta.tag.r",">"], + ["text","#welcome#"], + ["meta.tag",""] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_csharp.json b/lib/ace/mode/_test/tokens_csharp.json index 167fdbe8..6b49cc56 100644 --- a/lib/ace/mode/_test/tokens_csharp.json +++ b/lib/ace/mode/_test/tokens_csharp.json @@ -1,42 +1,29 @@ -[ - { - "state": "start", - "data": [ - [ "keyword", "public" ], - [ "text", " " ], - [ "keyword", "void" ], - [ "text", " " ], - [ "identifier", "HelloWorld" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "//Say Hello!" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "Console" ], - [ "punctuation.operator", "." ], - [ "identifier", "WriteLine" ], - [ "paren.lparen", "(" ], - [ "string", "\"Hello World\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["keyword","public"], + ["text"," "], + ["keyword","void"], + ["text"," "], + ["identifier","HelloWorld"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["comment","//Say Hello!"] +],[ + "start", + ["text"," "], + ["identifier","Console"], + ["punctuation.operator","."], + ["identifier","WriteLine"], + ["paren.lparen","("], + ["string","\"Hello World\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["paren.rparen","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_css.json b/lib/ace/mode/_test/tokens_css.json index a7b607cc..dec51e37 100644 --- a/lib/ace/mode/_test/tokens_css.json +++ b/lib/ace/mode/_test/tokens_css.json @@ -1,231 +1,148 @@ -[ - { - "state": "ruleset", - "data": [ - [ "variable", ".text-layer" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "font-family" ], - [ "text", ": Monaco, " ], - [ "string", "\"Courier New\"" ], - [ "text", ", " ], - [ "support.constant.fonts", "monospace" ], - [ "text", ";" ] - ] - }, - { - "state": "ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "font-size" ], - [ "text", ": " ], - [ "constant.numeric", "12" ], - [ "keyword", "px" ], - [ "text", ";" ] - ] - }, - { - "state": "ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "cursor" ], - [ "text", ": " ], - [ "support.constant", "text" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "ruleset", - "data": [ - [ "variable", ".blinker" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "animation-duration" ], - [ "text", ": " ], - [ "constant.numeric", "1" ], - [ "keyword", "s" ], - [ "text", ";" ] - ] - }, - { - "state": "ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "animation-name" ], - [ "text", ": blink;" ] - ] - }, - { - "state": "ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "animation-iteration-count" ], - [ "text", ": infinite;" ] - ] - }, - { - "state": "ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "animation-direction" ], - [ "text", ": alternate;" ] - ] - }, - { - "state": "ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "animation-timing-function" ], - [ "text", ": " ], - [ "support.constant", "linear" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "media", - "data": [ - [ "string", "@keyframes blink {" ] - ] - }, - { - "state": "media_ruleset", - "data": [ - [ "text", " " ], - [ "constant", "0" ], - [ "text", "% " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "media_ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "opacity" ], - [ "text", ": " ], - [ "constant.numeric", "0" ], - [ "text", ";" ] - ] - }, - { - "state": "media", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "media_ruleset", - "data": [ - [ "text", " " ], - [ "constant", "40" ], - [ "text", "% " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "media_ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "opacity" ], - [ "text", ": " ], - [ "constant.numeric", "0" ], - [ "text", ";" ] - ] - }, - { - "state": "media", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "media_ruleset", - "data": [ - [ "text", " " ], - [ "constant", "40" ], - [ "variable", ".5" ], - [ "text", "% " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "media_ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "opacity" ], - [ "text", ": " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "media", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "media_ruleset", - "data": [ - [ "text", " " ], - [ "constant", "100" ], - [ "text", "% " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "media_ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "opacity" ], - [ "text", ": " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "media", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "}" ] - ] - } -] \ No newline at end of file +[[ + "ruleset", + ["variable",".text-layer"], + ["text"," "], + ["paren.lparen","{"] +],[ + "ruleset", + ["text"," "], + ["support.type","font-family"], + ["text",": Monaco, "], + ["string","\"Courier New\""], + ["text",", "], + ["support.constant.fonts","monospace"], + ["text",";"] +],[ + "ruleset", + ["text"," "], + ["support.type","font-size"], + ["text",": "], + ["constant.numeric","12"], + ["keyword","px"], + ["text",";"] +],[ + "ruleset", + ["text"," "], + ["support.type","cursor"], + ["text",": "], + ["support.constant","text"], + ["text",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "ruleset", + ["variable",".blinker"], + ["text"," "], + ["paren.lparen","{"] +],[ + "ruleset", + ["text"," "], + ["support.type","animation-duration"], + ["text",": "], + ["constant.numeric","1"], + ["keyword","s"], + ["text",";"] +],[ + "ruleset", + ["text"," "], + ["support.type","animation-name"], + ["text",": blink;"] +],[ + "ruleset", + ["text"," "], + ["support.type","animation-iteration-count"], + ["text",": infinite;"] +],[ + "ruleset", + ["text"," "], + ["support.type","animation-direction"], + ["text",": alternate;"] +],[ + "ruleset", + ["text"," "], + ["support.type","animation-timing-function"], + ["text",": "], + ["support.constant","linear"], + ["text",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "media", + ["string","@keyframes blink {"] +],[ + "media_ruleset", + ["text"," "], + ["constant","0"], + ["text","% "], + ["paren.lparen","{"] +],[ + "media_ruleset", + ["text"," "], + ["support.type","opacity"], + ["text",": "], + ["constant.numeric","0"], + ["text",";"] +],[ + "media", + ["text"," "], + ["paren.rparen","}"] +],[ + "media_ruleset", + ["text"," "], + ["constant","40"], + ["text","% "], + ["paren.lparen","{"] +],[ + "media_ruleset", + ["text"," "], + ["support.type","opacity"], + ["text",": "], + ["constant.numeric","0"], + ["text",";"] +],[ + "media", + ["text"," "], + ["paren.rparen","}"] +],[ + "media_ruleset", + ["text"," "], + ["constant","40"], + ["variable",".5"], + ["text","% "], + ["paren.lparen","{"] +],[ + "media_ruleset", + ["text"," "], + ["support.type","opacity"], + ["text",": "], + ["constant.numeric","1"] +],[ + "media", + ["text"," "], + ["paren.rparen","}"] +],[ + "media_ruleset", + ["text"," "], + ["constant","100"], + ["text","% "], + ["paren.lparen","{"] +],[ + "media_ruleset", + ["text"," "], + ["support.type","opacity"], + ["text",": "], + ["constant.numeric","1"] +],[ + "media", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["string","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_curly.json b/lib/ace/mode/_test/tokens_curly.json new file mode 100644 index 00000000..6d086717 --- /dev/null +++ b/lib/ace/mode/_test/tokens_curly.json @@ -0,0 +1,107 @@ +[[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","html"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","head"], + ["meta.tag.r",">"] +],[ + "start" +],[ + "css-start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name.style","style"], + ["text"," "], + ["entity.other.attribute-name","type"], + ["keyword.operator","="], + ["string","\"text/css\""], + ["meta.tag.r",">"] +],[ + "css-ruleset", + ["text"," "], + ["variable",".text-layer"], + ["text"," "], + ["paren.lparen","{"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","font-family"], + ["text",": Monaco, "], + ["string","\"Courier New\""], + ["text",", "], + ["support.constant.fonts","monospace"], + ["text",";"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","font-size"], + ["text",": "], + ["constant.numeric","12"], + ["keyword","px"], + ["text",";"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","cursor"], + ["text",": "], + ["support.constant","text"], + ["text",";"] +],[ + "css-start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start" +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","body"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","h1"], + ["text"," "], + ["entity.other.attribute-name","style"], + ["keyword.operator","="], + ["string","\"color:red\""], + ["meta.tag.r",">"], + ["variable","{{"], + ["text","author_name"], + ["variable","}}"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start", + ["meta.tag",""] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_dart.json b/lib/ace/mode/_test/tokens_dart.json index b741bdc1..2faee981 100644 --- a/lib/ace/mode/_test/tokens_dart.json +++ b/lib/ace/mode/_test/tokens_dart.json @@ -1,537 +1,368 @@ -[ - { - "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 +[[ + "start", + ["identifier","main"], + ["text","() {"] +],[ + "start", + ["text"," "], + ["identifier","print"], + ["text","("], + ["string","'Hello World!'"], + ["text",");"] +],[ + "start", + ["text","}"] +],[ + "start" +],[ + "start" +],[ + "start", + ["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",";"] +],[ + "start", + ["identifier","main"], + ["text","() {"] +],[ + "start", + ["text"," "], + ["identifier","print"], + ["text","("], + ["string","'fib(20) = ${fib(20)}'"], + ["text",");"] +],[ + "start", + ["text","}"] +],[ + "comment", + ["comment","/*asd"] +],[ + "comment", + ["comment","asdad"] +],[ + "start", + ["comment","*/"] +],[ + "start", + ["constant.numeric","0.67"] +],[ + "start", + ["constant.numeric","77"] +],[ + "start", + ["text","."], + ["constant.numeric","86"] +],[ + "start" +],[ + "start", + ["keyword.other.import.dart","#import"], + ["text","("], + ["string","\"http://dartwatch.com/myOtherLibrary.dart\""], + ["text",");"] +],[ + "start", + ["keyword.other.import.dart","#import"], + ["text","("], + ["string","\"myOtherLibrary.dart\""], + ["text",", "], + ["keyword.other.import.dart","prefix"], + ["text",":"], + ["string","\"lib1\""], + ["text",");"] +],[ + "start" +],[ + "qqdoc", + ["string","\"\"\"asdasdads"] +],[ + "qqdoc", + ["string","asdadsadsasd"] +],[ + "start", + ["string","asdasdasdad\"\"\""] +],[ + "start", + ["text"," "] +],[ + "start", + ["string","'23424'"] +],[ + "start" +],[ + "start", + ["constant.numeric","0x234"] +],[ + "start" +],[ + "start", + ["identifier","foo"], + ["text"," "], + ["keyword.operator.dart","is"], + ["text"," "], + ["identifier","bar"] +],[ + "start" +],[ + "start", + ["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"," "] +],[ + "start", + ["comment","// Create a class for Point."] +],[ + "start", + ["keyword.declaration.dart","class"], + ["text"," "], + ["identifier","Point"], + ["text"," {"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["comment","// Final variables cannot be changed once they are assigned."] +],[ + "start", + ["text"," "], + ["comment","// Create two instance variables."] +],[ + "start", + ["text"," "], + ["storage.modifier.dart","final"], + ["text"," "], + ["storage.type.primitive.dart","num"], + ["text"," "], + ["identifier","x"], + ["text",", "], + ["identifier","y"], + ["text",";"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["comment","// A constructor, with syntactic sugar for setting instance variables."] +],[ + "start", + ["text"," "], + ["identifier","Point"], + ["text","("], + ["variable.language.dart","this"], + ["text","."], + ["identifier","x"], + ["text",", "], + ["variable.language.dart","this"], + ["text","."], + ["identifier","y"], + ["text",");"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["comment","// A named constructor with an initializer list."] +],[ + "start", + ["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",";"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["comment","// A method."] +],[ + "start", + ["text"," "], + ["storage.type.primitive.dart","num"], + ["text"," "], + ["identifier","distanceTo"], + ["text","("], + ["identifier","Point"], + ["text"," "], + ["identifier","other"], + ["text",") {"] +],[ + "start", + ["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",";"] +],[ + "start", + ["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",";"] +],[ + "start", + ["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",");"] +],[ + "start", + ["text"," }"] +],[ + "start", + ["text","}"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["comment","// Check for null."] +],[ + "start", + ["storage.type.primitive.dart","var"], + ["text"," "], + ["identifier","unicorn"], + ["text",";"] +],[ + "start", + ["identifier","assert"], + ["text","("], + ["identifier","unicorn"], + ["text"," "], + ["keyword.operator.comparison.dart","=="], + ["text"," "], + ["constant.language.dart","null"], + ["text",");"] +],[ + "start" +],[ + "start", + ["comment","// Check for NaN."] +],[ + "start", + ["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",";"] +],[ + "start", + ["identifier","assert"], + ["text","("], + ["identifier","iMeantToDoThis"], + ["text","."], + ["identifier","isNaN"], + ["text","());"] +],[ + "start" +]] \ 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 fe217e60..66afb5bf 100644 --- a/lib/ace/mode/_test/tokens_diff.json +++ b/lib/ace/mode/_test/tokens_diff.json @@ -1,729 +1,390 @@ -[ - { - "state": "start", - "data": [ - [ "variable", "diff --git" ], - [ "keyword", " a/lib/ace/edit_session.js" ], - [ "variable", " b/lib/ace/edit_session.js" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable", "index 23fc3fc..ed3b273 100644" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant.numeric", "---" ], - [ "meta.tag", " a/lib/ace/edit_session.js" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant.numeric", "+++" ], - [ "meta.tag", " b/lib/ace/edit_session.js" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant", "@@" ], - [ "constant.numeric", " -51,6 +51,7 " ], - [ "constant", "@@" ], - [ "comment.doc.tag", " var TextMode = require(\"./mode/text\").Mode;" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " var Range = require(\"./range\").Range;" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " var Document = require(\"./document\").Document;" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " var BackgroundTokenizer = require(\"./background_tokenizer\").BackgroundTokenizer;" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", "var SearchHighlight = require(\"./search_highlight\").SearchHighlight;" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " /**" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " * class EditSession" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant", "@@" ], - [ "constant.numeric", " -307,6 +308,13 " ], - [ "constant", "@@" ], - [ "comment.doc.tag", " var EditSession = function(text, mode) {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " return token;" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " };" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " this.highlight = function(re) {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " if (!this.$searchHighlight) {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " var highlight = new SearchHighlight(null, \"ace_selected-word\", \"text\");" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " this.$searchHighlight = this.addDynamicMarker(highlight);" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " }" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " this.$searchHighlight.setRegexp(re);" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " }" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " /**" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " * EditSession.setUndoManager(undoManager)" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " * - undoManager (UndoManager): The new undo manager" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant", "@@" ], - [ "constant.numeric", " -556,7 +564,8 " ], - [ "constant", "@@" ], - [ "comment.doc.tag", " var EditSession = function(text, mode) {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " type : type || \"line\"," ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " renderer: typeof type == \"function\" ? type : null," ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " clazz : clazz," ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "-" ], - [ "string", " inFront: !!inFront" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " inFront: !!inFront," ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " id: id" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " }" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " if (inFront) {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable", "diff --git" ], - [ "keyword", " a/lib/ace/editor.js" ], - [ "variable", " b/lib/ace/editor.js" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable", "index 834e603..b27ec73 100644" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant.numeric", "---" ], - [ "meta.tag", " a/lib/ace/editor.js" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant.numeric", "+++" ], - [ "meta.tag", " b/lib/ace/editor.js" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant", "@@" ], - [ "constant.numeric", " -494,7 +494,7 " ], - [ "constant", "@@" ], - [ "comment.doc.tag", " var Editor = function(renderer, session) {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " * Emitted when a selection has changed." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " **/" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " this.onSelectionChange = function(e) {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "-" ], - [ "string", " var session = this.getSession();" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " var session = this.session;" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " if (session.$selectionMarker) {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " session.removeMarker(session.$selectionMarker);" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant", "@@" ], - [ "constant.numeric", " -509,12 +509,40 " ], - [ "constant", "@@" ], - [ "comment.doc.tag", " var Editor = function(renderer, session) {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " this.$updateHighlightActiveLine();" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " }" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "-" ], - [ "string", " var self = this;" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "-" ], - [ "string", " if (this.$highlightSelectedWord && !this.$wordHighlightTimer)" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "-" ], - [ "string", " this.$wordHighlightTimer = setTimeout(function() {" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "-" ], - [ "string", " self.session.$mode.highlightSelection(self);" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "-" ], - [ "string", " self.$wordHighlightTimer = null;" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "-" ], - [ "string", " }, 30, this);" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", " var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp()" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", " };" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable", "diff --git" ], - [ "keyword", " a/lib/ace/search_highlight.js" ], - [ "variable", " b/lib/ace/search_highlight.js" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "invisible", "new file mode 100644" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable", "index 0000000..b2df779" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant.numeric", "---" ], - [ "meta.tag", " /dev/null" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant.numeric", "+++" ], - [ "meta.tag", " b/lib/ace/search_highlight.js" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "constant", "@@" ], - [ "constant.numeric", " -0,0 +1,3 " ], - [ "constant", "@@" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", "new" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.constant", "+" ], - [ "text", "empty file" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["variable","diff --git"], + ["keyword"," a/lib/ace/edit_session.js"], + ["variable"," b/lib/ace/edit_session.js"] +],[ + "start" +],[ + "start", + ["variable","index 23fc3fc..ed3b273 100644"] +],[ + "start" +],[ + "start", + ["constant.numeric","---"], + ["meta.tag"," a/lib/ace/edit_session.js"] +],[ + "start" +],[ + "start", + ["constant.numeric","+++"], + ["meta.tag"," b/lib/ace/edit_session.js"] +],[ + "start" +],[ + "start", + ["constant","@@"], + ["constant.numeric"," -51,6 +51,7 "], + ["constant","@@"], + ["comment.doc.tag"," var TextMode = require(\"./mode/text\").Mode;"] +],[ + "start" +],[ + "start", + ["invisible"," var Range = require(\"./range\").Range;"] +],[ + "start" +],[ + "start", + ["invisible"," var Document = require(\"./document\").Document;"] +],[ + "start" +],[ + "start", + ["invisible"," var BackgroundTokenizer = require(\"./background_tokenizer\").BackgroundTokenizer;"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text","var SearchHighlight = require(\"./search_highlight\").SearchHighlight;"] +],[ + "start" +],[ + "start" +],[ + "start" +],[ + "start", + ["invisible"," /**"] +],[ + "start" +],[ + "start", + ["invisible"," * class EditSession"] +],[ + "start" +],[ + "start", + ["constant","@@"], + ["constant.numeric"," -307,6 +308,13 "], + ["constant","@@"], + ["comment.doc.tag"," var EditSession = function(text, mode) {"] +],[ + "start" +],[ + "start", + ["invisible"," return token;"] +],[ + "start" +],[ + "start", + ["invisible"," };"] +],[ + "start" +],[ + "start" +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," this.highlight = function(re) {"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," if (!this.$searchHighlight) {"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," var highlight = new SearchHighlight(null, \"ace_selected-word\", \"text\");"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," this.$searchHighlight = this.addDynamicMarker(highlight);"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," }"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," this.$searchHighlight.setRegexp(re);"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," }"] +],[ + "start" +],[ + "start", + ["invisible"," /**"] +],[ + "start" +],[ + "start", + ["invisible"," * EditSession.setUndoManager(undoManager)"] +],[ + "start" +],[ + "start", + ["invisible"," * - undoManager (UndoManager): The new undo manager"] +],[ + "start" +],[ + "start", + ["constant","@@"], + ["constant.numeric"," -556,7 +564,8 "], + ["constant","@@"], + ["comment.doc.tag"," var EditSession = function(text, mode) {"] +],[ + "start" +],[ + "start", + ["invisible"," type : type || \"line\","] +],[ + "start" +],[ + "start", + ["invisible"," renderer: typeof type == \"function\" ? type : null,"] +],[ + "start" +],[ + "start", + ["invisible"," clazz : clazz,"] +],[ + "start" +],[ + "start", + ["support.function","-"], + ["string"," inFront: !!inFront"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," inFront: !!inFront,"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," id: id"] +],[ + "start" +],[ + "start", + ["invisible"," }"] +],[ + "start" +],[ + "start" +],[ + "start" +],[ + "start", + ["invisible"," if (inFront) {"] +],[ + "start" +],[ + "start", + ["variable","diff --git"], + ["keyword"," a/lib/ace/editor.js"], + ["variable"," b/lib/ace/editor.js"] +],[ + "start" +],[ + "start", + ["variable","index 834e603..b27ec73 100644"] +],[ + "start" +],[ + "start", + ["constant.numeric","---"], + ["meta.tag"," a/lib/ace/editor.js"] +],[ + "start" +],[ + "start", + ["constant.numeric","+++"], + ["meta.tag"," b/lib/ace/editor.js"] +],[ + "start" +],[ + "start", + ["constant","@@"], + ["constant.numeric"," -494,7 +494,7 "], + ["constant","@@"], + ["comment.doc.tag"," var Editor = function(renderer, session) {"] +],[ + "start" +],[ + "start", + ["invisible"," * Emitted when a selection has changed."] +],[ + "start" +],[ + "start", + ["invisible"," **/"] +],[ + "start" +],[ + "start", + ["invisible"," this.onSelectionChange = function(e) {"] +],[ + "start" +],[ + "start", + ["support.function","-"], + ["string"," var session = this.getSession();"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," var session = this.session;"] +],[ + "start" +],[ + "start" +],[ + "start" +],[ + "start", + ["invisible"," if (session.$selectionMarker) {"] +],[ + "start" +],[ + "start", + ["invisible"," session.removeMarker(session.$selectionMarker);"] +],[ + "start" +],[ + "start", + ["constant","@@"], + ["constant.numeric"," -509,12 +509,40 "], + ["constant","@@"], + ["comment.doc.tag"," var Editor = function(renderer, session) {"] +],[ + "start" +],[ + "start", + ["invisible"," this.$updateHighlightActiveLine();"] +],[ + "start" +],[ + "start", + ["invisible"," }"] +],[ + "start" +],[ + "start" +],[ + "start" +],[ + "start", + ["support.function","-"], + ["string"," var self = this;"] +],[ + "start" +],[ + "start", + ["support.function","-"], + ["string"," if (this.$highlightSelectedWord && !this.$wordHighlightTimer)"] +],[ + "start" +],[ + "start", + ["support.function","-"], + ["string"," this.$wordHighlightTimer = setTimeout(function() {"] +],[ + "start" +],[ + "start", + ["support.function","-"], + ["string"," self.session.$mode.highlightSelection(self);"] +],[ + "start" +],[ + "start", + ["support.function","-"], + ["string"," self.$wordHighlightTimer = null;"] +],[ + "start" +],[ + "start", + ["support.function","-"], + ["string"," }, 30, this);"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text"," var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp()"] +],[ + "start" +],[ + "start", + ["invisible"," };"] +],[ + "start" +],[ + "start", + ["variable","diff --git"], + ["keyword"," a/lib/ace/search_highlight.js"], + ["variable"," b/lib/ace/search_highlight.js"] +],[ + "start" +],[ + "start", + ["invisible","new file mode 100644"] +],[ + "start" +],[ + "start", + ["variable","index 0000000..b2df779"] +],[ + "start" +],[ + "start", + ["constant.numeric","---"], + ["meta.tag"," /dev/null"] +],[ + "start" +],[ + "start", + ["constant.numeric","+++"], + ["meta.tag"," b/lib/ace/search_highlight.js"] +],[ + "start" +],[ + "start", + ["constant","@@"], + ["constant.numeric"," -0,0 +1,3 "], + ["constant","@@"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text","new"] +],[ + "start" +],[ + "start", + ["support.constant","+"], + ["text","empty file"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_dot.json b/lib/ace/mode/_test/tokens_dot.json new file mode 100644 index 00000000..fec8b969 --- /dev/null +++ b/lib/ace/mode/_test/tokens_dot.json @@ -0,0 +1,2254 @@ +[[ + "start", + ["comment","// Original source: http://www.graphviz.org/content/lion_share"] +],[ + "start", + ["comment","##\"A few people in the field of genetics are using dot to draw \"marriage node diagram\" pedigree drawings. Here is one I have done of a test pedigree from the FTREE pedigree drawing package (Lion Share was a racehorse).\" Contributed by David Duffy."] +],[ + "start" +],[ + "start", + ["comment","##Command to get the layout: \"dot -Tpng thisfile > thisfile.png\""] +],[ + "start" +],[ + "start", + ["keyword","digraph"], + ["text"," Ped_Lion_Share "], + ["paren.lparen","{"] +],[ + "start", + ["comment","# page = \"8.2677165,11.692913\" ;"] +],[ + "start", + ["variable","ratio"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","\"auto\""], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["text","mincross "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","2.0"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["variable","label"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","\"Pedigree Lion_Share\""], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start" +],[ + "start", + ["string","\"001\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"002\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"003\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"004\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"005\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"006\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"007\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"009\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"014\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"015\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"016\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"ZZ01\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"ZZ02\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"017\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"012\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"008\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"011\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"013\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"010\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"023\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"020\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"021\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"018\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"025\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"019\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"022\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"024\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"027\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","circle "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"026\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","white "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"028\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","box "], + ["punctuation.operator",","], + ["text"," "], + ["variable","regular"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","fillcolor"], + ["keyword.operator","="], + ["text","grey "], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0001\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"001\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0001\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"007\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0001\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0001\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"017\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0002\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"001\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0002\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"ZZ02\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0002\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0002\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"012\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0003\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"002\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0003\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"003\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0003\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0003\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"008\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0004\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"002\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0004\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"006\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0004\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0004\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"011\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0005\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"002\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0005\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"ZZ01\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0005\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0005\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"013\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0006\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"004\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0006\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"009\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0006\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0006\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"010\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0007\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"005\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0007\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"015\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0007\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0007\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"023\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0008\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"005\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0008\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"016\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0008\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0008\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"020\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0009\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"005\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0009\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"012\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0009\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0009\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"021\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0010\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"008\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0010\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"017\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0010\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0010\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"018\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0011\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"011\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0011\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"023\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0011\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0011\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"025\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0012\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"013\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0012\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"014\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0012\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0012\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"019\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0013\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"010\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0013\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"021\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0013\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0013\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"022\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0014\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"019\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0014\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"020\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0014\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0014\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"024\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0015\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"022\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0015\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"025\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0015\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0015\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"027\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0016\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"024\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0016\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"018\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0016\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0016\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"026\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0017\""], + ["text"," "], + ["paren.lparen","["], + ["variable","shape"], + ["keyword.operator","="], + ["text","diamond"], + ["punctuation.operator",","], + ["variable","style"], + ["keyword.operator","="], + ["text","filled"], + ["punctuation.operator",","], + ["variable","label"], + ["keyword.operator","="], + ["string","\"\""], + ["punctuation.operator",","], + ["variable","height"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["variable","width"], + ["keyword.operator","="], + ["text","."], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"026\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0017\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"027\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"marr0017\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","1"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["string","\"marr0017\""], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["string","\"028\""], + ["text"," "], + ["paren.lparen","["], + ["variable","dir"], + ["keyword.operator","="], + ["text","none"], + ["punctuation.operator",","], + ["text"," "], + ["variable","weight"], + ["keyword.operator","="], + ["constant.numeric","2"], + ["paren.rparen","]"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +]] \ 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 5f825707..ce8a4d16 100644 --- a/lib/ace/mode/_test/tokens_glsl.json +++ b/lib/ace/mode/_test/tokens_glsl.json @@ -1,185 +1,127 @@ -[ - { - "state": "start", - "data": [ - [ "keyword", "uniform" ], - [ "text", " " ], - [ "keyword", "float" ], - [ "text", " " ], - [ "identifier", "amplitude" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "attribute" ], - [ "text", " " ], - [ "keyword", "float" ], - [ "text", " " ], - [ "identifier", "displacement" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "varying" ], - [ "text", " " ], - [ "keyword", "vec3" ], - [ "text", " " ], - [ "identifier", "vNormal" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "void" ], - [ "text", " " ], - [ "identifier", "main" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "vNormal" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "normal" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "// multiply our displacement by the" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "// amplitude. The amp will get animated" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "// so we'll have animated displacement" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "vec3" ], - [ "text", " " ], - [ "identifier", "newPosition" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "position" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "normal" ], - [ "text", " " ], - [ "keyword.operator", "*" ], - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "vec3" ], - [ "paren.lparen", "(" ], - [ "identifier", "displacement" ], - [ "text", " " ], - [ "keyword.operator", "*" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "amplitude" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "constant.language", "gl_Position" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "projectionMatrix" ], - [ "text", " " ], - [ "keyword.operator", "*" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "modelViewMatrix" ], - [ "text", " " ], - [ "keyword.operator", "*" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "vec4" ], - [ "paren.lparen", "(" ], - [ "identifier", "newPosition" ], - [ "punctuation.operator", "," ], - [ "constant.numeric", "1.0" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["keyword","uniform"], + ["text"," "], + ["keyword","float"], + ["text"," "], + ["identifier","amplitude"], + ["punctuation.operator",";"] +],[ + "start", + ["keyword","attribute"], + ["text"," "], + ["keyword","float"], + ["text"," "], + ["identifier","displacement"], + ["punctuation.operator",";"] +],[ + "start", + ["keyword","varying"], + ["text"," "], + ["keyword","vec3"], + ["text"," "], + ["identifier","vNormal"], + ["punctuation.operator",";"] +],[ + "start" +],[ + "start", + ["keyword","void"], + ["text"," "], + ["identifier","main"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start" +],[ + "start", + ["text"," "], + ["identifier","vNormal"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","normal"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["comment","// multiply our displacement by the"] +],[ + "start", + ["text"," "], + ["comment","// amplitude. The amp will get animated"] +],[ + "start", + ["text"," "], + ["comment","// so we'll have animated displacement"] +],[ + "start", + ["text"," "], + ["keyword","vec3"], + ["text"," "], + ["identifier","newPosition"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","position"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "] +],[ + "start", + ["text"," "], + ["identifier","normal"], + ["text"," "], + ["keyword.operator","*"], + ["text"," "] +],[ + "start", + ["text"," "], + ["keyword","vec3"], + ["paren.lparen","("], + ["identifier","displacement"], + ["text"," "], + ["keyword.operator","*"] +],[ + "start", + ["text"," "], + ["identifier","amplitude"], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start" +],[ + "start", + ["text"," "], + ["constant.language","gl_Position"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","projectionMatrix"], + ["text"," "], + ["keyword.operator","*"] +],[ + "start", + ["text"," "], + ["identifier","modelViewMatrix"], + ["text"," "], + ["keyword.operator","*"] +],[ + "start", + ["text"," "], + ["keyword","vec4"], + ["paren.lparen","("], + ["identifier","newPosition"], + ["punctuation.operator",","], + ["constant.numeric","1.0"], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["paren.rparen","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_golang.json b/lib/ace/mode/_test/tokens_golang.json index 3b3929ae..4257369b 100644 --- a/lib/ace/mode/_test/tokens_golang.json +++ b/lib/ace/mode/_test/tokens_golang.json @@ -1,357 +1,256 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "// Concurrent computation of pi." ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "// See http://goo.gl/ZuTZM." ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "//" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "// This demonstrates Go's ability to handle" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "// large numbers of concurrent processes." ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "// It is an unreasonable way to calculate pi." ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "package" ], - [ "text", " " ], - [ "identifier", "main" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "import" ], - [ "text", " " ], - [ "paren.lparen", "(" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "string", "\"fmt\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "string", "\"math\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "func" ], - [ "text", " " ], - [ "identifier", "main" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "fmt" ], - [ "punctuation.operator", "." ], - [ "identifier", "Println" ], - [ "paren.lparen", "(" ], - [ "identifier", "pi" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "5000" ], - [ "paren.rparen", "))" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "// pi launches n goroutines to compute an" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "// approximation of pi." ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "func" ], - [ "text", " " ], - [ "identifier", "pi" ], - [ "paren.lparen", "(" ], - [ "identifier", "n" ], - [ "text", " " ], - [ "identifier", "int" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "identifier", "float64" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "ch" ], - [ "text", " " ], - [ "punctuation.operator", ":" ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "make" ], - [ "paren.lparen", "(" ], - [ "keyword", "chan" ], - [ "text", " " ], - [ "identifier", "float64" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "for" ], - [ "text", " " ], - [ "identifier", "k" ], - [ "text", " " ], - [ "punctuation.operator", ":" ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "punctuation.operator", ";" ], - [ "text", " " ], - [ "identifier", "k" ], - [ "text", " " ], - [ "keyword.operator", "<=" ], - [ "text", " " ], - [ "identifier", "n" ], - [ "punctuation.operator", ";" ], - [ "text", " " ], - [ "identifier", "k" ], - [ "keyword.operator", "++" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "go" ], - [ "text", " " ], - [ "identifier", "term" ], - [ "paren.lparen", "(" ], - [ "identifier", "ch" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "identifier", "float64" ], - [ "paren.lparen", "(" ], - [ "identifier", "k" ], - [ "paren.rparen", "))" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "f" ], - [ "text", " " ], - [ "punctuation.operator", ":" ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "0.0" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "for" ], - [ "text", " " ], - [ "identifier", "k" ], - [ "text", " " ], - [ "punctuation.operator", ":" ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "punctuation.operator", ";" ], - [ "text", " " ], - [ "identifier", "k" ], - [ "text", " " ], - [ "keyword.operator", "<=" ], - [ "text", " " ], - [ "identifier", "n" ], - [ "punctuation.operator", ";" ], - [ "text", " " ], - [ "identifier", "k" ], - [ "keyword.operator", "++" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "f" ], - [ "text", " " ], - [ "keyword.operator", "+=" ], - [ "text", " " ], - [ "keyword.operator", "<-" ], - [ "identifier", "ch" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "return" ], - [ "text", " " ], - [ "identifier", "f" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "func" ], - [ "text", " " ], - [ "identifier", "term" ], - [ "paren.lparen", "(" ], - [ "identifier", "ch" ], - [ "text", " " ], - [ "keyword", "chan" ], - [ "text", " " ], - [ "identifier", "float64" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "identifier", "k" ], - [ "text", " " ], - [ "identifier", "float64" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "ch" ], - [ "text", " " ], - [ "keyword.operator", "<-" ], - [ "text", " " ], - [ "constant.numeric", "4" ], - [ "text", " " ], - [ "keyword.operator", "*" ], - [ "text", " " ], - [ "identifier", "math" ], - [ "punctuation.operator", "." ], - [ "identifier", "Pow" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "-1" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "identifier", "k" ], - [ "paren.rparen", ")" ], - [ "text", " / " ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "2" ], - [ "keyword.operator", "*" ], - [ "identifier", "k" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "constant.numeric", "1" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "start", + ["comment","// Concurrent computation of pi."] +],[ + "start", + ["comment","// See http://goo.gl/ZuTZM."] +],[ + "start", + ["comment","//"] +],[ + "start", + ["comment","// This demonstrates Go's ability to handle"] +],[ + "start", + ["comment","// large numbers of concurrent processes."] +],[ + "start", + ["comment","// It is an unreasonable way to calculate pi."] +],[ + "start", + ["keyword","package"], + ["text"," "], + ["identifier","main"] +],[ + "start" +],[ + "start", + ["keyword","import"], + ["text"," "], + ["paren.lparen","("] +],[ + "start", + ["text"," "], + ["string","\"fmt\""] +],[ + "start", + ["text"," "], + ["string","\"math\""] +],[ + "start", + ["paren.rparen",")"] +],[ + "start" +],[ + "start", + ["keyword","func"], + ["text"," "], + ["identifier","main"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","fmt"], + ["punctuation.operator","."], + ["identifier","Println"], + ["paren.lparen","("], + ["identifier","pi"], + ["paren.lparen","("], + ["constant.numeric","5000"], + ["paren.rparen","))"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["comment","// pi launches n goroutines to compute an"] +],[ + "start", + ["comment","// approximation of pi."] +],[ + "start", + ["keyword","func"], + ["text"," "], + ["identifier","pi"], + ["paren.lparen","("], + ["identifier","n"], + ["text"," "], + ["identifier","int"], + ["paren.rparen",")"], + ["text"," "], + ["identifier","float64"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","ch"], + ["text"," "], + ["punctuation.operator",":"], + ["keyword.operator","="], + ["text"," "], + ["identifier","make"], + ["paren.lparen","("], + ["keyword","chan"], + ["text"," "], + ["identifier","float64"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["keyword","for"], + ["text"," "], + ["identifier","k"], + ["text"," "], + ["punctuation.operator",":"], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0"], + ["punctuation.operator",";"], + ["text"," "], + ["identifier","k"], + ["text"," "], + ["keyword.operator","<="], + ["text"," "], + ["identifier","n"], + ["punctuation.operator",";"], + ["text"," "], + ["identifier","k"], + ["keyword.operator","++"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","go"], + ["text"," "], + ["identifier","term"], + ["paren.lparen","("], + ["identifier","ch"], + ["punctuation.operator",","], + ["text"," "], + ["identifier","float64"], + ["paren.lparen","("], + ["identifier","k"], + ["paren.rparen","))"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["identifier","f"], + ["text"," "], + ["punctuation.operator",":"], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0.0"] +],[ + "start", + ["text"," "], + ["keyword","for"], + ["text"," "], + ["identifier","k"], + ["text"," "], + ["punctuation.operator",":"], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0"], + ["punctuation.operator",";"], + ["text"," "], + ["identifier","k"], + ["text"," "], + ["keyword.operator","<="], + ["text"," "], + ["identifier","n"], + ["punctuation.operator",";"], + ["text"," "], + ["identifier","k"], + ["keyword.operator","++"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","f"], + ["text"," "], + ["keyword.operator","+="], + ["text"," "], + ["keyword.operator","<-"], + ["identifier","ch"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["keyword","return"], + ["text"," "], + ["identifier","f"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","func"], + ["text"," "], + ["identifier","term"], + ["paren.lparen","("], + ["identifier","ch"], + ["text"," "], + ["keyword","chan"], + ["text"," "], + ["identifier","float64"], + ["punctuation.operator",","], + ["text"," "], + ["identifier","k"], + ["text"," "], + ["identifier","float64"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","ch"], + ["text"," "], + ["keyword.operator","<-"], + ["text"," "], + ["constant.numeric","4"], + ["text"," "], + ["keyword.operator","*"], + ["text"," "], + ["identifier","math"], + ["punctuation.operator","."], + ["identifier","Pow"], + ["paren.lparen","("], + ["constant.numeric","-1"], + ["punctuation.operator",","], + ["text"," "], + ["identifier","k"], + ["paren.rparen",")"], + ["text"," / "], + ["paren.lparen","("], + ["constant.numeric","2"], + ["keyword.operator","*"], + ["identifier","k"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["constant.numeric","1"], + ["paren.rparen",")"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_groovy.json b/lib/ace/mode/_test/tokens_groovy.json index 8e967253..c7dae6b1 100644 --- a/lib/ace/mode/_test/tokens_groovy.json +++ b/lib/ace/mode/_test/tokens_groovy.json @@ -1,523 +1,410 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "//http://groovy.codehaus.org/Martin+Fowler%27s+closure+examples+in+Groovy" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "class" ], - [ "text", " " ], - [ "identifier", "Employee" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "name" ], - [ "text", ", " ], - [ "identifier", "salary" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "boolean" ], - [ "text", " " ], - [ "identifier", "manager" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function", "String" ], - [ "text", " " ], - [ "identifier", "toString" ], - [ "lparen", "(" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ], - [ "text", " " ], - [ "keyword", "return" ], - [ "text", " " ], - [ "identifier", "name" ], - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "emps" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "lparen", "[" ], - [ "keyword", "new" ], - [ "text", " " ], - [ "identifier", "Employee" ], - [ "lparen", "(" ], - [ "identifier", "name" ], - [ "text", ":" ], - [ "string", "'Guillaume'" ], - [ "text", ", " ], - [ "identifier", "manager" ], - [ "text", ":" ], - [ "constant.language.boolean", "true" ], - [ "text", ", " ], - [ "identifier", "salary" ], - [ "text", ":" ], - [ "constant.numeric", "200" ], - [ "rparen", ")" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "new" ], - [ "text", " " ], - [ "identifier", "Employee" ], - [ "lparen", "(" ], - [ "identifier", "name" ], - [ "text", ":" ], - [ "string", "'Graeme'" ], - [ "text", ", " ], - [ "identifier", "manager" ], - [ "text", ":" ], - [ "constant.language.boolean", "true" ], - [ "text", ", " ], - [ "identifier", "salary" ], - [ "text", ":" ], - [ "constant.numeric", "200" ], - [ "rparen", ")" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "new" ], - [ "text", " " ], - [ "identifier", "Employee" ], - [ "lparen", "(" ], - [ "identifier", "name" ], - [ "text", ":" ], - [ "string", "'Dierk'" ], - [ "text", ", " ], - [ "identifier", "manager" ], - [ "text", ":" ], - [ "constant.language.boolean", "false" ], - [ "text", ", " ], - [ "identifier", "salary" ], - [ "text", ":" ], - [ "constant.numeric", "151" ], - [ "rparen", ")" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "new" ], - [ "text", " " ], - [ "identifier", "Employee" ], - [ "lparen", "(" ], - [ "identifier", "name" ], - [ "text", ":" ], - [ "string", "'Bernd'" ], - [ "text", ", " ], - [ "identifier", "manager" ], - [ "text", ":" ], - [ "constant.language.boolean", "false" ], - [ "text", ", " ], - [ "identifier", "salary" ], - [ "text", ":" ], - [ "constant.numeric", "50" ], - [ "rparen", ")]" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "managers" ], - [ "lparen", "(" ], - [ "identifier", "emps" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "emps" ], - [ "text", "." ], - [ "identifier", "findAll" ], - [ "text", " " ], - [ "lparen", "{" ], - [ "text", " " ], - [ "identifier", "e" ], - [ "text", " " ], - [ "keyword.operator", "->" ], - [ "text", " " ], - [ "identifier", "e" ], - [ "text", "." ], - [ "identifier", "isManager" ], - [ "lparen", "(" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "assert" ], - [ "text", " " ], - [ "identifier", "emps" ], - [ "lparen", "[" ], - [ "constant.numeric", "0" ], - [ "text", ".." ], - [ "constant.numeric", "1" ], - [ "rparen", "]" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "identifier", "managers" ], - [ "lparen", "(" ], - [ "identifier", "emps" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "comment", "// [Guillaume, Graeme]" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "highPaid" ], - [ "lparen", "(" ], - [ "identifier", "emps" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "threshold" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "150" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "emps" ], - [ "text", "." ], - [ "identifier", "findAll" ], - [ "text", " " ], - [ "lparen", "{" ], - [ "text", " " ], - [ "identifier", "e" ], - [ "text", " " ], - [ "keyword.operator", "->" ], - [ "text", " " ], - [ "identifier", "e" ], - [ "text", "." ], - [ "identifier", "salary" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "identifier", "threshold" ], - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "assert" ], - [ "text", " " ], - [ "identifier", "emps" ], - [ "lparen", "[" ], - [ "constant.numeric", "0" ], - [ "text", ".." ], - [ "constant.numeric", "2" ], - [ "rparen", "]" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "identifier", "highPaid" ], - [ "lparen", "(" ], - [ "identifier", "emps" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "comment", "// [Guillaume, Graeme, Dierk]" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "paidMore" ], - [ "lparen", "(" ], - [ "identifier", "amount" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "lparen", "{" ], - [ "text", " " ], - [ "identifier", "e" ], - [ "text", " " ], - [ "keyword.operator", "->" ], - [ "text", " " ], - [ "identifier", "e" ], - [ "text", "." ], - [ "identifier", "salary" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "identifier", "amount" ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "highPaid" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "paidMore" ], - [ "lparen", "(" ], - [ "constant.numeric", "150" ], - [ "rparen", ")" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "assert" ], - [ "text", " " ], - [ "identifier", "highPaid" ], - [ "lparen", "(" ], - [ "identifier", "emps" ], - [ "lparen", "[" ], - [ "constant.numeric", "0" ], - [ "rparen", "])" ], - [ "text", " " ], - [ "comment", "// true" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "assert" ], - [ "text", " " ], - [ "identifier", "emps" ], - [ "lparen", "[" ], - [ "constant.numeric", "0" ], - [ "text", ".." ], - [ "constant.numeric", "2" ], - [ "rparen", "]" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "identifier", "emps" ], - [ "text", "." ], - [ "identifier", "findAll" ], - [ "lparen", "(" ], - [ "identifier", "highPaid" ], - [ "rparen", ")" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "filename" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string", "'test.txt'" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "new" ], - [ "text", " " ], - [ "identifier", "File" ], - [ "lparen", "(" ], - [ "identifier", "filename" ], - [ "rparen", ")" ], - [ "text", "." ], - [ "identifier", "withReader" ], - [ "lparen", "{" ], - [ "text", " " ], - [ "identifier", "reader" ], - [ "text", " " ], - [ "keyword.operator", "->" ], - [ "text", " " ], - [ "identifier", "doSomethingWith" ], - [ "lparen", "(" ], - [ "identifier", "reader" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "readersText" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "doSomethingWith" ], - [ "lparen", "(" ], - [ "identifier", "reader" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ], - [ "text", " " ], - [ "identifier", "readersText" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "reader" ], - [ "text", "." ], - [ "identifier", "text" ], - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "assert" ], - [ "text", " " ], - [ "keyword", "new" ], - [ "text", " " ], - [ "identifier", "File" ], - [ "lparen", "(" ], - [ "identifier", "filename" ], - [ "rparen", ")" ], - [ "text", "." ], - [ "identifier", "text" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "identifier", "readersText" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["comment","//http://groovy.codehaus.org/Martin+Fowler%27s+closure+examples+in+Groovy"] +],[ + "start" +],[ + "start", + ["keyword","class"], + ["text"," "], + ["identifier","Employee"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","def"], + ["text"," "], + ["identifier","name"], + ["text",", "], + ["identifier","salary"] +],[ + "start", + ["text"," "], + ["keyword","boolean"], + ["text"," "], + ["identifier","manager"] +],[ + "start", + ["text"," "], + ["support.function","String"], + ["text"," "], + ["identifier","toString"], + ["lparen","("], + ["rparen",")"], + ["text"," "], + ["lparen","{"], + ["text"," "], + ["keyword","return"], + ["text"," "], + ["identifier","name"], + ["text"," "], + ["rparen","}"] +],[ + "start", + ["rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","def"], + ["text"," "], + ["identifier","emps"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["lparen","["], + ["keyword","new"], + ["text"," "], + ["identifier","Employee"], + ["lparen","("], + ["identifier","name"], + ["text",":"], + ["string","'Guillaume'"], + ["text",", "], + ["identifier","manager"], + ["text",":"], + ["constant.language.boolean","true"], + ["text",", "], + ["identifier","salary"], + ["text",":"], + ["constant.numeric","200"], + ["rparen",")"], + ["text",","] +],[ + "start", + ["text"," "], + ["keyword","new"], + ["text"," "], + ["identifier","Employee"], + ["lparen","("], + ["identifier","name"], + ["text",":"], + ["string","'Graeme'"], + ["text",", "], + ["identifier","manager"], + ["text",":"], + ["constant.language.boolean","true"], + ["text",", "], + ["identifier","salary"], + ["text",":"], + ["constant.numeric","200"], + ["rparen",")"], + ["text",","] +],[ + "start", + ["text"," "], + ["keyword","new"], + ["text"," "], + ["identifier","Employee"], + ["lparen","("], + ["identifier","name"], + ["text",":"], + ["string","'Dierk'"], + ["text",", "], + ["identifier","manager"], + ["text",":"], + ["constant.language.boolean","false"], + ["text",", "], + ["identifier","salary"], + ["text",":"], + ["constant.numeric","151"], + ["rparen",")"], + ["text",","] +],[ + "start", + ["text"," "], + ["keyword","new"], + ["text"," "], + ["identifier","Employee"], + ["lparen","("], + ["identifier","name"], + ["text",":"], + ["string","'Bernd'"], + ["text",", "], + ["identifier","manager"], + ["text",":"], + ["constant.language.boolean","false"], + ["text",", "], + ["identifier","salary"], + ["text",":"], + ["constant.numeric","50"], + ["rparen",")]"] +],[ + "start" +],[ + "start", + ["keyword","def"], + ["text"," "], + ["identifier","managers"], + ["lparen","("], + ["identifier","emps"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","emps"], + ["text","."], + ["identifier","findAll"], + ["text"," "], + ["lparen","{"], + ["text"," "], + ["identifier","e"], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["identifier","e"], + ["text","."], + ["identifier","isManager"], + ["lparen","("], + ["rparen",")"], + ["text"," "], + ["rparen","}"] +],[ + "start", + ["rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","assert"], + ["text"," "], + ["identifier","emps"], + ["lparen","["], + ["constant.numeric","0"], + ["text",".."], + ["constant.numeric","1"], + ["rparen","]"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["identifier","managers"], + ["lparen","("], + ["identifier","emps"], + ["rparen",")"], + ["text"," "], + ["comment","// [Guillaume, Graeme]"] +],[ + "start" +],[ + "start", + ["keyword","def"], + ["text"," "], + ["identifier","highPaid"], + ["lparen","("], + ["identifier","emps"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","threshold"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","150"] +],[ + "start", + ["text"," "], + ["identifier","emps"], + ["text","."], + ["identifier","findAll"], + ["text"," "], + ["lparen","{"], + ["text"," "], + ["identifier","e"], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["identifier","e"], + ["text","."], + ["identifier","salary"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["identifier","threshold"], + ["text"," "], + ["rparen","}"] +],[ + "start", + ["rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","assert"], + ["text"," "], + ["identifier","emps"], + ["lparen","["], + ["constant.numeric","0"], + ["text",".."], + ["constant.numeric","2"], + ["rparen","]"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["identifier","highPaid"], + ["lparen","("], + ["identifier","emps"], + ["rparen",")"], + ["text"," "], + ["comment","// [Guillaume, Graeme, Dierk]"] +],[ + "start" +],[ + "start", + ["keyword","def"], + ["text"," "], + ["identifier","paidMore"], + ["lparen","("], + ["identifier","amount"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["lparen","{"], + ["text"," "], + ["identifier","e"], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["identifier","e"], + ["text","."], + ["identifier","salary"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["identifier","amount"], + ["rparen","}"] +],[ + "start", + ["rparen","}"] +],[ + "start", + ["keyword","def"], + ["text"," "], + ["identifier","highPaid"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","paidMore"], + ["lparen","("], + ["constant.numeric","150"], + ["rparen",")"] +],[ + "start" +],[ + "start", + ["keyword","assert"], + ["text"," "], + ["identifier","highPaid"], + ["lparen","("], + ["identifier","emps"], + ["lparen","["], + ["constant.numeric","0"], + ["rparen","])"], + ["text"," "], + ["comment","// true"] +],[ + "start", + ["keyword","assert"], + ["text"," "], + ["identifier","emps"], + ["lparen","["], + ["constant.numeric","0"], + ["text",".."], + ["constant.numeric","2"], + ["rparen","]"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["identifier","emps"], + ["text","."], + ["identifier","findAll"], + ["lparen","("], + ["identifier","highPaid"], + ["rparen",")"] +],[ + "start" +],[ + "start", + ["keyword","def"], + ["text"," "], + ["identifier","filename"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","'test.txt'"] +],[ + "start", + ["keyword","new"], + ["text"," "], + ["identifier","File"], + ["lparen","("], + ["identifier","filename"], + ["rparen",")"], + ["text","."], + ["identifier","withReader"], + ["lparen","{"], + ["text"," "], + ["identifier","reader"], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["identifier","doSomethingWith"], + ["lparen","("], + ["identifier","reader"], + ["rparen",")"], + ["text"," "], + ["rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","def"], + ["text"," "], + ["identifier","readersText"] +],[ + "start", + ["keyword","def"], + ["text"," "], + ["identifier","doSomethingWith"], + ["lparen","("], + ["identifier","reader"], + ["rparen",")"], + ["text"," "], + ["lparen","{"], + ["text"," "], + ["identifier","readersText"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","reader"], + ["text","."], + ["identifier","text"], + ["text"," "], + ["rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","assert"], + ["text"," "], + ["keyword","new"], + ["text"," "], + ["identifier","File"], + ["lparen","("], + ["identifier","filename"], + ["rparen",")"], + ["text","."], + ["identifier","text"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["identifier","readersText"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_haml.json b/lib/ace/mode/_test/tokens_haml.json index fb4e69f6..423c3bd5 100644 --- a/lib/ace/mode/_test/tokens_haml.json +++ b/lib/ace/mode/_test/tokens_haml.json @@ -1,280 +1,174 @@ -[ - { - "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.title" ], - [ "text", " Blah" ] - ] - }, - { - "state": "start", - "data": [ - [ "entity.name.tag.haml", " %div" ], - [ "entity.other.attribute-name.class.haml", ".article.date" ], - [ "text", " " ], - [ "constant.numeric", "2006-11-05" ] - ] - }, - { - "state": "start", - "data": [ - [ "entity.name.tag.haml", " %div" ], - [ "entity.other.attribute-name.class.haml", ".article.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 +[[ + "start", + ["keyword.other.doctype","!!!5"] +],[ + "start" +],[ + "start", + ["punctuation.section.comment","# "] +],[ + "start", + ["punctuation.section.comment","# "] +],[ + "start", + ["punctuation.section.comment","# "] +],[ + "start", + ["punctuation.section.comment","# "] +],[ + "start" +],[ + "start" +],[ + "start", + ["punctuation.section.comment","/adasdasdad"] +],[ + "start", + ["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","}"] +],[ + "start", + ["punctuation.section.comment","/ file: app/views/movies/index.html.haml"] +],[ + "start", + ["meta.escape.haml","\\d"] +],[ + "start", + ["entity.name.tag.haml","%ads:"], + ["punctuation.section","{"], + ["constant.other.symbol.ruby",":bleh"], + ["text"," => "], + ["constant.numeric","33"], + ["punctuation.section","}"] +],[ + "embedded_ruby", + ["entity.name.tag.haml","%p"], + ["text","==ddd=="] +],[ + "start", + ["text"," Date/Time:"] +],[ + "embedded_ruby", + ["text"," - "], + ["identifier","now"], + ["text"," = "], + ["support.class","DateTime"], + ["text","."], + ["identifier","now"], + ["text"," "] +],[ + "start", + ["entity.name.tag.haml"," %strong"], + ["text","= now"] +],[ + "embedded_ruby", + ["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","\")"] +],[ + "embedded_ruby", + ["text"," = \""], + ["support.class","Happy"], + ["text"," "], + ["identifier","new"], + ["text"," \" + \""], + ["identifier","year"], + ["text","!\""] +],[ + "start", + ["entity.name.tag.haml","%sfd"], + ["entity.other.attribute-name.class.haml",".dfdfg"] +],[ + "start", + ["punctuation.section.comment","#content"] +],[ + "start", + ["text"," .title"] +],[ + "start", + ["entity.name.tag.haml"," %h1"], + ["text","= @title"] +],[ + "embedded_ruby", + ["text"," = "], + ["support.function","link_to"], + ["text"," '"], + ["support.class","Home"], + ["text","', "], + ["identifier","home_url"] +],[ + "start" +],[ + "start", + ["punctuation.section.comment"," #contents"] +],[ + "start", + ["entity.name.tag.haml","%div"], + ["entity.other.attribute-name.id.haml","#content"] +],[ + "start", + ["entity.name.tag.haml"," %div"], + ["entity.other.attribute-name.class.haml",".articles"] +],[ + "start", + ["entity.name.tag.haml"," %div"], + ["entity.other.attribute-name.class.haml",".article.title"], + ["text"," Blah"] +],[ + "start", + ["entity.name.tag.haml"," %div"], + ["entity.other.attribute-name.class.haml",".article.date"], + ["text"," "], + ["constant.numeric","2006-11-05"] +],[ + "start", + ["entity.name.tag.haml"," %div"], + ["entity.other.attribute-name.class.haml",".article.entry"] +],[ + "start", + ["text"," Neil Patrick Harris "] +],[ + "start" +],[ + "start", + ["entity.name.tag.haml","%div"], + ["text","[@user, "], + ["constant.other.symbol.ruby",":greeting"], + ["text","]"] +],[ + "start", + ["entity.name.tag.haml"," %bar"], + ["text","["], + ["constant.numeric","290"], + ["text","]/"] +],[ + "start", + ["text"," "], + ["string.quoted.double","==Hello!=="] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_haxe.json b/lib/ace/mode/_test/tokens_haxe.json index bec79d5c..f0f79a48 100644 --- a/lib/ace/mode/_test/tokens_haxe.json +++ b/lib/ace/mode/_test/tokens_haxe.json @@ -1,195 +1,143 @@ -[ - { - "state": "start", - "data": [ - [ "keyword", "class" ], - [ "text", " " ], - [ "identifier", "Haxe" ], - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "public" ], - [ "text", " " ], - [ "keyword", "static" ], - [ "text", " " ], - [ "keyword", "function" ], - [ "text", " " ], - [ "identifier", "main" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "// Say Hello!" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "var" ], - [ "text", " " ], - [ "identifier", "greeting" ], - [ "punctuation.operator", ":" ], - [ "keyword", "String" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string", "\"Hello World\"" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "trace" ], - [ "paren.lparen", "(" ], - [ "identifier", "greeting" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "var" ], - [ "text", " " ], - [ "identifier", "targets" ], - [ "punctuation.operator", ":" ], - [ "keyword", "Array" ], - [ "keyword.operator", "<" ], - [ "keyword", "String" ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "string", "\"Flash\"" ], - [ "punctuation.operator", "," ], - [ "string", "\"Javascript\"" ], - [ "punctuation.operator", "," ], - [ "string", "\"PHP\"" ], - [ "punctuation.operator", "," ], - [ "string", "\"Neko\"" ], - [ "punctuation.operator", "," ], - [ "string", "\"C++\"" ], - [ "punctuation.operator", "," ], - [ "string", "\"iOS\"" ], - [ "punctuation.operator", "," ], - [ "string", "\"Android\"" ], - [ "punctuation.operator", "," ], - [ "string", "\"webOS\"" ], - [ "paren.rparen", "]" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "trace" ], - [ "paren.lparen", "(" ], - [ "string", "\"Haxe is a great language that can target:\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "for" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "target" ], - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "identifier", "targets" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "trace" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "string", "\" - \"" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "identifier", "target" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "trace" ], - [ "paren.lparen", "(" ], - [ "string", "\"And many more!\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["keyword","class"], + ["text"," "], + ["identifier","Haxe"], + ["text"," "] +],[ + "start", + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","public"], + ["text"," "], + ["keyword","static"], + ["text"," "], + ["keyword","function"], + ["text"," "], + ["identifier","main"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "] +],[ + "start", + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["comment","// Say Hello!"] +],[ + "start", + ["text"," "], + ["keyword","var"], + ["text"," "], + ["identifier","greeting"], + ["punctuation.operator",":"], + ["keyword","String"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","\"Hello World\""], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["keyword","trace"], + ["paren.lparen","("], + ["identifier","greeting"], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["keyword","var"], + ["text"," "], + ["identifier","targets"], + ["punctuation.operator",":"], + ["keyword","Array"], + ["keyword.operator","<"], + ["keyword","String"], + ["keyword.operator",">"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","["], + ["string","\"Flash\""], + ["punctuation.operator",","], + ["string","\"Javascript\""], + ["punctuation.operator",","], + ["string","\"PHP\""], + ["punctuation.operator",","], + ["string","\"Neko\""], + ["punctuation.operator",","], + ["string","\"C++\""], + ["punctuation.operator",","], + ["string","\"iOS\""], + ["punctuation.operator",","], + ["string","\"Android\""], + ["punctuation.operator",","], + ["string","\"webOS\""], + ["paren.rparen","]"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["keyword","trace"], + ["paren.lparen","("], + ["string","\"Haxe is a great language that can target:\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["keyword","for"], + ["text"," "], + ["paren.lparen","("], + ["identifier","target"], + ["text"," "], + ["keyword","in"], + ["text"," "], + ["identifier","targets"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","trace"], + ["text"," "], + ["paren.lparen","("], + ["string","\" - \""], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["identifier","target"], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["keyword","trace"], + ["paren.lparen","("], + ["string","\"And many more!\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_html.json b/lib/ace/mode/_test/tokens_html.json index d2b57638..df77b5d3 100644 --- a/lib/ace/mode/_test/tokens_html.json +++ b/lib/ace/mode/_test/tokens_html.json @@ -1,150 +1,103 @@ -[ - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "html" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "head" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "css-start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.style", "style" ], - [ "text", " " ], - [ "entity.other.attribute-name", "type" ], - [ "keyword.operator", "=" ], - [ "string", "\"text/css\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "css-ruleset", - "data": [ - [ "text", " " ], - [ "variable", ".text-layer" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "css-ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "font-family" ], - [ "text", ": Monaco, " ], - [ "string", "\"Courier New\"" ], - [ "text", ", " ], - [ "support.constant.fonts", "monospace" ], - [ "text", ";" ] - ] - }, - { - "state": "css-ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "font-size" ], - [ "text", ": " ], - [ "constant.numeric", "12" ], - [ "keyword", "px" ], - [ "text", ";" ] - ] - }, - { - "state": "css-ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "cursor" ], - [ "text", ": " ], - [ "support.constant", "text" ], - [ "text", ";" ] - ] - }, - { - "state": "css-start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "body" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "h1" ], - [ "text", " " ], - [ "entity.other.attribute-name", "style" ], - [ "keyword.operator", "=" ], - [ "string", "\"color:red\"" ], - [ "meta.tag.r", ">" ], - [ "text", "Juhu Kinners" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","html"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","head"], + ["meta.tag.r",">"] +],[ + "start" +],[ + "css-start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name.style","style"], + ["text"," "], + ["entity.other.attribute-name","type"], + ["keyword.operator","="], + ["string","\"text/css\""], + ["meta.tag.r",">"] +],[ + "css-ruleset", + ["text"," "], + ["variable",".text-layer"], + ["text"," "], + ["paren.lparen","{"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","font-family"], + ["text",": Monaco, "], + ["string","\"Courier New\""], + ["text",", "], + ["support.constant.fonts","monospace"], + ["text",";"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","font-size"], + ["text",": "], + ["constant.numeric","12"], + ["keyword","px"], + ["text",";"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","cursor"], + ["text",": "], + ["support.constant","text"], + ["text",";"] +],[ + "css-start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start" +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","body"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","h1"], + ["text"," "], + ["entity.other.attribute-name","style"], + ["keyword.operator","="], + ["string","\"color:red\""], + ["meta.tag.r",">"], + ["text","Juhu Kinners"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start", + ["meta.tag",""] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_jade.json b/lib/ace/mode/_test/tokens_jade.json index 0d9f8c96..f6838b5c 100644 --- a/lib/ace/mode/_test/tokens_jade.json +++ b/lib/ace/mode/_test/tokens_jade.json @@ -1,309 +1,187 @@ -[ - { - "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 +[[ + "start", + ["keyword.other.doctype.jade","!!!doctype"] +],[ + "start", + ["keyword.other.doctype.jade","!!!5"] +],[ + "start", + ["keyword.other.doctype.jade","!!!"] +],[ + "start" +],[ + "start", + ["keyword.control.import.include.jade","include"], + ["text"," something"] +],[ + "start" +],[ + "start", + ["keyword.control.import.include.jade"," include"], + ["text"," another_thing"] +],[ + "start" +],[ + "start", + ["punctuation.section.comment"," // let's talk about it"] +],[ + "start" +],[ + "comment_block", + ["punctuation.section.comment","//"] +],[ + "comment_block", + ["comment.block.jade"," here it is. a block comment!"] +],[ + "comment_block", + ["comment.block.jade"," and another row!"] +],[ + "start", + ["text","but not here."] +],[ + "start" +],[ + "comment_block", + ["punctuation.section.comment"," // "] +],[ + "comment_block", + ["comment.block.jade"," a far spaced"] +],[ + "comment_block", + ["comment.block.jade"," should be lack of block"] +],[ + "start" +],[ + "start", + ["punctuation.section.comment"," // also not a comment"] +],[ + "start", + ["meta.tag.any.jade"," div"], + ["entity.other.attribute-name.class.jade",".attemptAtBlock"] +],[ + "start", + ["text"," "] +],[ + "start", + ["meta.tag.any.jade"," span"], + ["entity.other.attribute-name.id.jade","#myName"] +],[ + "start" +],[ + "start", + ["text"," "], + ["string.interpolated.jade","#{implicit}"] +],[ + "start", + ["text"," "], + ["string.interpolated.jade","!{more_explicit}"] +],[ + "start" +],[ + "start", + ["text"," "], + ["suport.type.attribute.id.jade","#idDiv"] +],[ + "start" +],[ + "start", + ["text"," "], + ["suport.type.attribute.class.jade",".idDiv"] +],[ + "start" +],[ + "start", + ["meta.tag.any.jade"," test"], + ["punctuation","("], + ["entity.other.attribute-name.jade","id"], + ["text","="], + ["string","\"tag\""], + ["punctuation",")"] +],[ + "start", + ["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",")"] +],[ + "start", + ["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",")"] +],[ + "start" +],[ + "start", + ["storage.type.function.jade"," mixin"], + ["entity.name.function.jade"," bleh"], + ["punctuation.definition.parameters.begin.jade","("], + ["punctuation.definition.parameters.end.jade",")"] +],[ + "start" +],[ + "start", + ["storage.type.function.jade"," mixin"], + ["entity.name.function.jade"," clever-name"] +],[ + "start" +],[ + "start", + ["source.js.embedded.jade"," -"], + ["storage.type","var"], + ["text"," "], + ["identifier","x"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","\"0\""], + ["text",";"] +],[ + "start", + ["source.js.embedded.jade"," -"], + ["text"," "], + ["identifier","y"], + ["text"," "], + ["identifier","each"], + ["text"," z"] +],[ + "start" +],[ + "start", + ["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","]"] +],[ + "start", + ["meta.tag.any.jade"," each"], + ["text"," item in items"] +],[ + "start", + ["meta.tag.any.jade"," li"], + ["text","= item"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_java.json b/lib/ace/mode/_test/tokens_java.json index 376bdc7e..799ebdb5 100644 --- a/lib/ace/mode/_test/tokens_java.json +++ b/lib/ace/mode/_test/tokens_java.json @@ -1,139 +1,95 @@ -[ - { - "state": "start", - "data": [ - [ "keyword", "public" ], - [ "text", " " ], - [ "keyword", "class" ], - [ "text", " " ], - [ "identifier", "InfiniteLoop" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "comment", - "data": [ - [ "text", " " ], - [ "comment", "/*" ] - ] - }, - { - "state": "comment", - "data": [ - [ "comment", " * This will cause the program to hang..." ] - ] - }, - { - "state": "comment", - "data": [ - [ "comment", " *" ] - ] - }, - { - "state": "comment", - "data": [ - [ "comment", " * Taken from:" ] - ] - }, - { - "state": "comment", - "data": [ - [ "comment", " * http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", " */" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "public" ], - [ "text", " " ], - [ "keyword", "static" ], - [ "text", " " ], - [ "keyword", "void" ], - [ "text", " " ], - [ "identifier", "main" ], - [ "lparen", "(" ], - [ "support.function", "String" ], - [ "lparen", "[" ], - [ "rparen", "]" ], - [ "text", " " ], - [ "identifier", "args" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "double" ], - [ "text", " " ], - [ "identifier", "d" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "support.function", "Double" ], - [ "text", "." ], - [ "identifier", "parseDouble" ], - [ "lparen", "(" ], - [ "string", "\"2.2250738585072012e-308\"" ], - [ "rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "// unreachable code" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function", "System" ], - [ "text", "." ], - [ "identifier", "out" ], - [ "text", "." ], - [ "identifier", "println" ], - [ "lparen", "(" ], - [ "string", "\"Value: \"" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "identifier", "d" ], - [ "rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["keyword","public"], + ["text"," "], + ["keyword","class"], + ["text"," "], + ["identifier","InfiniteLoop"], + ["text"," "], + ["lparen","{"] +],[ + "start" +],[ + "comment", + ["text"," "], + ["comment","/*"] +],[ + "comment", + ["comment"," * This will cause the program to hang..."] +],[ + "comment", + ["comment"," *"] +],[ + "comment", + ["comment"," * Taken from:"] +],[ + "comment", + ["comment"," * http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/"] +],[ + "start", + ["comment"," */"] +],[ + "start", + ["text"," "], + ["keyword","public"], + ["text"," "], + ["keyword","static"], + ["text"," "], + ["keyword","void"], + ["text"," "], + ["identifier","main"], + ["lparen","("], + ["support.function","String"], + ["lparen","["], + ["rparen","]"], + ["text"," "], + ["identifier","args"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","double"], + ["text"," "], + ["identifier","d"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["support.function","Double"], + ["text","."], + ["identifier","parseDouble"], + ["lparen","("], + ["string","\"2.2250738585072012e-308\""], + ["rparen",")"], + ["text",";"] +],[ + "start" +],[ + "start", + ["text"," "], + ["comment","// unreachable code"] +],[ + "start", + ["text"," "], + ["support.function","System"], + ["text","."], + ["identifier","out"], + ["text","."], + ["identifier","println"], + ["lparen","("], + ["string","\"Value: \""], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["identifier","d"], + ["rparen",")"], + ["text",";"] +],[ + "start", + ["text"," "], + ["rparen","}"] +],[ + "start", + ["rparen","}"] +]] \ 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 1d04f26b..85ae0a42 100644 --- a/lib/ace/mode/_test/tokens_javascript.json +++ b/lib/ace/mode/_test/tokens_javascript.json @@ -1,545 +1,397 @@ -[ - { - "state": "regex_allowed", - "data": [ - [ "storage.type", "function" ], - [ "text", " " ], - [ "entity.name.function", "foo" ], - [ "paren.lparen", "(" ], - [ "variable.parameter", "items" ], - [ "punctuation.operator", ", " ], - [ "variable.parameter", "nada" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "regex_allowed", - "data": [ - [ "text", " " ], - [ "keyword", "for" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "storage.type", "var" ], - [ "text", " " ], - [ "identifier", "i" ], - [ "keyword.operator", "=" ], - [ "constant.numeric", "0" ], - [ "punctuation.operator", ";" ], - [ "text", " " ], - [ "identifier", "i" ], - [ "keyword.operator", "<" ], - [ "identifier", "items" ], - [ "punctuation.operator", "." ], - [ "support.constant", "length" ], - [ "punctuation.operator", ";" ], - [ "text", " " ], - [ "identifier", "i" ], - [ "keyword.operator", "++" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "regex_allowed", - "data": [ - [ "text", " " ], - [ "support.function", "alert" ], - [ "paren.lparen", "(" ], - [ "identifier", "items" ], - [ "paren.lparen", "[" ], - [ "identifier", "i" ], - [ "paren.rparen", "]" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "string", "\"juhu" ], - [ "constant.language.escape", "\\n" ], - [ "string", "\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ], - [ "text", "\t" ], - [ "comment", "// Real Tab." ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "identifier", "regexp" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string.regexp", "/p" ], - [ "constant.language.escape", "|" ], - [ "string.regexp", "p/" ], - [ "text", " " ], - [ "comment", "// ends here" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "identifier", "r" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string.regexp", "/d" ], - [ "constant.language.escape", "{1,2}?" ], - [ "string.regexp", "f{e}" ], - [ "invalid", "++" ], - [ "string.regexp", "r" ], - [ "constant.language.escape", "*?" ], - [ "regexp.keyword.operator", "\\d" ], - [ "constant.language.escape", "+?[]" ], - [ "string.regexp", "r" ], - [ "constant.language.escape", "[^" ], - [ "string.regexp.charachterclass", "r" ], - [ "constant.language.escape", "-" ], - [ "string.regexp.charachterclass", "o" ], - [ "regexp.keyword.operator", "\\f\\f" ], - [ "string.regexp.charachterclass", "[" ], - [ "regexp.keyword.operator", "\\f" ], - [ "constant.language.escape", "]?" ], - [ "string.regexp", "r" ], - [ "invalid", "{7}+" ], - [ "string.regexp", "r" ], - [ "regexp.keyword.operator", "\\{" ], - [ "string.regexp", "7}" ], - [ "constant.language.escape", "+" ], - [ "string.regexp", "rr--rr" ], - [ "constant.language.escape", "$^(?:" ], - [ "string.regexp", "d" ], - [ "constant.language.escape", "|" ], - [ "string.regexp", "s" ], - [ "constant.language.escape", ")(?=" ], - [ "string.regexp", "a" ], - [ "constant.language.escape", "|)(?!" ], - [ "string.regexp", "y" ], - [ "constant.language.escape", ")[]|" ], - [ "invalid", "$?" ], - [ "constant.language.escape", "|" ], - [ "invalid", "^*" ], - [ "string.regexp", "/" ], - [ "text", " " ], - [ "identifier", "o" ] - ] - }, - { - "state": "start", - "data": [ - [ "identifier", "a" ], - [ "keyword.operator", "=" ], - [ "string.regexp", "/a/" ], - [ "text", " " ], - [ "identifier", "jk" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string.regexp", "/ /" ], - [ "text", " " ], - [ "keyword.operator", "/" ], - [ "text", " " ], - [ "string.regexp", "/ /" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment.doc", "/************************************/" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment.doc", "/** total mess, tricky to highlight**/" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "regex_allowed", - "data": [ - [ "storage.type", "function" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "doc-start", - "data": [ - [ "text", "\t" ], - [ "comment.doc", "/**" ] - ] - }, - { - "state": "doc-start", - "data": [ - [ "comment.doc", "\t * docComment" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment.doc", "\t **/" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "identifier", "r" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string.regexp", "/u" ], - [ "regexp.keyword.operator", "\\t" ], - [ "constant.language.escape", "*" ], - [ "string.regexp", "/" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "identifier", "g" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "1." ], - [ "text", "00" ], - [ "identifier", "E" ], - [ "text", "^" ], - [ "constant.numeric", "1" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "identifier", "y" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "1.2" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "punctuation.operator", "." ], - [ "constant.numeric", "2" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "constant.numeric", "052" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "constant.numeric", "0x25" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "identifier", "t" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "string", "'d'" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "string", "''" ], - [ "paren.rparen", "]" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "regex_allowed", - "data": [ - [ "storage.type", "function" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "regex_allowed", - "data": [ - [ "text", "\t" ], - [ "comment", "/* eee */" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "qqstring", - "data": [ - [ "string", "\"s\\" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "s" ], - [ "constant.language.escape", "\\u7824" ], - [ "string", "sss" ], - [ "constant.language.escape", "\\u" ], - [ "string", "1\"" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "qstring", - "data": [ - [ "string", "'\\" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "string'" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "'" ] - ] - }, - { - "state": "start", - "data": [ - [ "identifier", "string" ], - [ "text", "'" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "string", "\"trailing space" ], - [ "constant.language.escape", "\\ " ], - [ "string", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "\" \"" ], - [ "text", " " ], - [ "keyword.operator", "/" ], - [ "identifier", "not" ], - [ "text", " " ], - [ "identifier", "a" ], - [ "text", " " ], - [ "identifier", "regexp" ], - [ "keyword.operator", "/" ], - [ "identifier", "g" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "doc-start", - "data": [ - [ "comment.doc", "/**" ] - ] - }, - { - "state": "doc-start", - "data": [ - [ "comment.doc", " *doc" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment.doc", " */" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "regex_allowed", - "data": [ - [ "identifier", "a" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "regex_allowed", - "data": [ - [ "text", "\t" ], - [ "string", "'a'" ], - [ "punctuation.operator", ":" ], - [ "text", " " ], - [ "identifier", "b" ], - [ "punctuation.operator", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "string", "'g'" ], - [ "text", ": " ], - [ "storage.type", "function" ], - [ "paren.lparen", "(" ], - [ "variable.parameter", "t" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "entity.name.function", "gta" ], - [ "punctuation.operator", ":" ], - [ "storage.type", "function" ], - [ "paren.lparen", "(" ], - [ "variable.parameter", "a" ], - [ "punctuation.operator", "," ], - [ "variable.parameter", "b" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "function_arguments", - "data": [ - [ "identifier", "foo" ], - [ "punctuation.operator", "." ], - [ "storage.type", "protoype" ], - [ "punctuation.operator", "." ], - [ "entity.name.function", "d" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "storage.type", "function" ], - [ "paren.lparen", "(" ], - [ "variable.parameter", "a" ], - [ "punctuation.operator", ", " ], - [ "variable.parameter", "b" ], - [ "punctuation.operator", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "punctuation.operator", " " ], - [ "variable.parameter", "c" ], - [ "punctuation.operator", ", " ], - [ "variable.parameter", "d" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "storage.type", "foo" ], - [ "punctuation.operator", "." ], - [ "entity.name.function", "d" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "storage.type", "function" ], - [ "paren.lparen", "(" ], - [ "variable.parameter", "a" ], - [ "punctuation.operator", ", " ], - [ "variable.parameter", "b" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "storage.type", "foo" ], - [ "punctuation.operator", "." ], - [ "entity.name.function", "d" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "storage.type", "function" ], - [ "paren.lparen", "(" ], - [ "variable.parameter", "a" ], - [ "punctuation.operator", ", " ], - [ "comment.doc", "/*****/" ], - [ "text", " " ], - [ "identifier", "d" ], - [ "string", "\"string\"" ], - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "regex_allowed", + ["storage.type","function"], + ["text"," "], + ["entity.name.function","foo"], + ["paren.lparen","("], + ["variable.parameter","items"], + ["punctuation.operator",", "], + ["variable.parameter","nada"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["keyword","for"], + ["text"," "], + ["paren.lparen","("], + ["storage.type","var"], + ["text"," "], + ["identifier","i"], + ["keyword.operator","="], + ["constant.numeric","0"], + ["punctuation.operator",";"], + ["text"," "], + ["identifier","i"], + ["keyword.operator","<"], + ["identifier","items"], + ["punctuation.operator","."], + ["support.constant","length"], + ["punctuation.operator",";"], + ["text"," "], + ["identifier","i"], + ["keyword.operator","++"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["support.function","alert"], + ["paren.lparen","("], + ["identifier","items"], + ["paren.lparen","["], + ["identifier","i"], + ["paren.rparen","]"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["string","\"juhu"], + ["constant.language.escape","\\n"], + ["string","\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"], + ["text","\t"], + ["comment","// Real Tab."] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["identifier","regexp"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string.regexp","/p"], + ["constant.language.escape","|"], + ["string.regexp","p/"], + ["text"," "], + ["comment","// ends here"] +],[ + "start" +],[ + "start", + ["identifier","r"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string.regexp","/d"], + ["constant.language.escape","{1,2}?"], + ["string.regexp","f{e}"], + ["invalid","++"], + ["string.regexp","r"], + ["constant.language.escape","*?"], + ["regexp.keyword.operator","\\d"], + ["constant.language.escape","+?[]"], + ["string.regexp","r"], + ["constant.language.escape","[^"], + ["string.regexp.charachterclass","r"], + ["constant.language.escape","-"], + ["string.regexp.charachterclass","o"], + ["regexp.keyword.operator","\\f\\f"], + ["string.regexp.charachterclass","["], + ["regexp.keyword.operator","\\f"], + ["constant.language.escape","]?"], + ["string.regexp","r"], + ["invalid","{7}+"], + ["string.regexp","r"], + ["regexp.keyword.operator","\\{"], + ["string.regexp","7}"], + ["constant.language.escape","+"], + ["string.regexp","rr--rr"], + ["constant.language.escape","$^(?:"], + ["string.regexp","d"], + ["constant.language.escape","|"], + ["string.regexp","s"], + ["constant.language.escape",")(?="], + ["string.regexp","a"], + ["constant.language.escape","|)(?!"], + ["string.regexp","y"], + ["constant.language.escape",")[]|"], + ["invalid","$?"], + ["constant.language.escape","|"], + ["invalid","^*"], + ["string.regexp","/"], + ["text"," "], + ["identifier","o"] +],[ + "start", + ["identifier","a"], + ["keyword.operator","="], + ["string.regexp","/a/"], + ["text"," "], + ["identifier","jk"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string.regexp","/ /"], + ["text"," "], + ["keyword.operator","/"], + ["text"," "], + ["string.regexp","/ /"] +],[ + "start", + ["text"," "], + ["comment.doc","/************************************/"] +],[ + "start", + ["comment.doc","/** total mess, tricky to highlight**/"] +],[ + "start" +],[ + "regex_allowed", + ["storage.type","function"], + ["text"," "], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "doc-start", + ["text","\t"], + ["comment.doc","/**"] +],[ + "doc-start", + ["comment.doc","\t * docComment"] +],[ + "start", + ["comment.doc","\t **/"] +],[ + "start", + ["text","\t"], + ["identifier","r"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string.regexp","/u"], + ["regexp.keyword.operator","\\t"], + ["constant.language.escape","*"], + ["string.regexp","/"] +],[ + "start", + ["text","\t"], + ["identifier","g"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","1."], + ["text","00"], + ["identifier","E"], + ["text","^"], + ["constant.numeric","1"], + ["punctuation.operator",","], + ["text"," "], + ["identifier","y"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","1.2"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["punctuation.operator","."], + ["constant.numeric","2"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["constant.numeric","052"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["constant.numeric","0x25"] +],[ + "start", + ["text","\t"], + ["identifier","t"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","["], + ["string","'d'"], + ["punctuation.operator",","], + ["text"," "], + ["string","''"], + ["paren.rparen","]"] +],[ + "start", + ["paren.rparen","}"] +],[ + "regex_allowed", + ["storage.type","function"], + ["text"," "], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text","\t"], + ["comment","/* eee */"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "qqstring", + ["string","\"s\\"] +],[ + "start", + ["string","s"], + ["constant.language.escape","\\u7824"], + ["string","sss"], + ["constant.language.escape","\\u"], + ["string","1\""] +],[ + "start" +],[ + "qstring", + ["string","'\\"] +],[ + "start", + ["string","string'"] +],[ + "start" +],[ + "start", + ["text","'"] +],[ + "start", + ["identifier","string"], + ["text","'"] +],[ + "start" +],[ + "start", + ["string","\"trailing space"], + ["constant.language.escape","\\ "], + ["string"," "] +],[ + "start", + ["string","\" \""], + ["text"," "], + ["keyword.operator","/"], + ["identifier","not"], + ["text"," "], + ["identifier","a"], + ["text"," "], + ["identifier","regexp"], + ["keyword.operator","/"], + ["identifier","g"] +],[ + "start" +],[ + "doc-start", + ["comment.doc","/**"] +],[ + "doc-start", + ["comment.doc"," *doc"] +],[ + "start", + ["comment.doc"," */"] +],[ + "start" +],[ + "regex_allowed", + ["identifier","a"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text","\t"], + ["string","'a'"], + ["punctuation.operator",":"], + ["text"," "], + ["identifier","b"], + ["punctuation.operator",","] +],[ + "start", + ["text","\t"], + ["string","'g'"], + ["text",": "], + ["storage.type","function"], + ["paren.lparen","("], + ["variable.parameter","t"], + ["paren.rparen",")"] +],[ + "start", + ["text","\t"], + ["entity.name.function","gta"], + ["punctuation.operator",":"], + ["storage.type","function"], + ["paren.lparen","("], + ["variable.parameter","a"], + ["punctuation.operator",","], + ["variable.parameter","b"], + ["paren.rparen",")"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start" +],[ + "function_arguments", + ["identifier","foo"], + ["punctuation.operator","."], + ["storage.type","protoype"], + ["punctuation.operator","."], + ["entity.name.function","d"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["storage.type","function"], + ["paren.lparen","("], + ["variable.parameter","a"], + ["punctuation.operator",", "], + ["variable.parameter","b"], + ["punctuation.operator",","] +],[ + "start", + ["punctuation.operator"," "], + ["variable.parameter","c"], + ["punctuation.operator",", "], + ["variable.parameter","d"], + ["paren.rparen",")"] +],[ + "start", + ["storage.type","foo"], + ["punctuation.operator","."], + ["entity.name.function","d"], + ["text"," "], + ["keyword.operator","="], + ["storage.type","function"], + ["paren.lparen","("], + ["variable.parameter","a"], + ["punctuation.operator",", "], + ["variable.parameter","b"], + ["paren.rparen",")"] +],[ + "start", + ["storage.type","foo"], + ["punctuation.operator","."], + ["entity.name.function","d"], + ["text"," "], + ["keyword.operator","="], + ["storage.type","function"], + ["paren.lparen","("], + ["variable.parameter","a"], + ["punctuation.operator",", "], + ["comment.doc","/*****/"], + ["text"," "], + ["identifier","d"], + ["string","\"string\""], + ["text"," "] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_json.json b/lib/ace/mode/_test/tokens_json.json index 22dc2db7..4420a740 100644 --- a/lib/ace/mode/_test/tokens_json.json +++ b/lib/ace/mode/_test/tokens_json.json @@ -1,611 +1,412 @@ -[ - { - "state": "start", - "data": [ - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"query\"" ], - [ "text", ": " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"count\"" ], - [ "text", ": " ], - [ "constant.numeric", "10" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"created\"" ], - [ "text", ": " ], - [ "string", "\"2011-06-21T08:10:46Z\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"lang\"" ], - [ "text", ": " ], - [ "string", "\"en-US\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"results\"" ], - [ "text", ": " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"photo\"" ], - [ "text", ": " ], - [ "paren.lparen", "[" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"farm\"" ], - [ "text", ": " ], - [ "string", "\"6\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"id\"" ], - [ "text", ": " ], - [ "string", "\"5855620975\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfamily\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfriend\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"ispublic\"" ], - [ "text", ": " ], - [ "string", "\"1\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"owner\"" ], - [ "text", ": " ], - [ "string", "\"32021554@N04\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"secret\"" ], - [ "text", ": " ], - [ "string", "\"f1f5e8515d\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"server\"" ], - [ "text", ": " ], - [ "string", "\"5110\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"title\"" ], - [ "text", ": " ], - [ "string", "\"7087 bandit cat\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"farm\"" ], - [ "text", ": " ], - [ "string", "\"4\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"id\"" ], - [ "text", ": " ], - [ "string", "\"5856170534\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfamily\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfriend\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"ispublic\"" ], - [ "text", ": " ], - [ "string", "\"1\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"owner\"" ], - [ "text", ": " ], - [ "string", "\"32021554@N04\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"secret\"" ], - [ "text", ": " ], - [ "string", "\"ff1efb2a6f\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"server\"" ], - [ "text", ": " ], - [ "string", "\"3217\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"title\"" ], - [ "text", ": " ], - [ "string", "\"6975 rusty cat\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"farm\"" ], - [ "text", ": " ], - [ "string", "\"6\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"id\"" ], - [ "text", ": " ], - [ "string", "\"5856172972\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfamily\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfriend\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"ispublic\"" ], - [ "text", ": " ], - [ "string", "\"1\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"owner\"" ], - [ "text", ": " ], - [ "string", "\"51249875@N03\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"secret\"" ], - [ "text", ": " ], - [ "string", "\"6c6887347c\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"server\"" ], - [ "text", ": " ], - [ "string", "\"5192\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"title\"" ], - [ "text", ": " ], - [ "string", "\"watermarked-cats\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"farm\"" ], - [ "text", ": " ], - [ "string", "\"6\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"id\"" ], - [ "text", ": " ], - [ "string", "\"5856168328\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfamily\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfriend\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"ispublic\"" ], - [ "text", ": " ], - [ "string", "\"1\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"owner\"" ], - [ "text", ": " ], - [ "string", "\"32021554@N04\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"secret\"" ], - [ "text", ": " ], - [ "string", "\"0c1cfdf64c\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"server\"" ], - [ "text", ": " ], - [ "string", "\"5078\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"title\"" ], - [ "text", ": " ], - [ "string", "\"7020 mandy cat\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"farm\"" ], - [ "text", ": " ], - [ "string", "\"3\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"id\"" ], - [ "text", ": " ], - [ "string", "\"5856171774\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfamily\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"isfriend\"" ], - [ "text", ": " ], - [ "string", "\"0\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"ispublic\"" ], - [ "text", ": " ], - [ "string", "\"1\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"owner\"" ], - [ "text", ": " ], - [ "string", "\"32021554@N04\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"secret\"" ], - [ "text", ": " ], - [ "string", "\"7f5a3180ab\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"server\"" ], - [ "text", ": " ], - [ "string", "\"2696\"" ], - [ "text", "," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "\"title\"" ], - [ "text", ": " ], - [ "string", "\"7448 bobby cat\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "]" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable","\"query\""], + ["text",": "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable","\"count\""], + ["text",": "], + ["constant.numeric","10"], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"created\""], + ["text",": "], + ["string","\"2011-06-21T08:10:46Z\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"lang\""], + ["text",": "], + ["string","\"en-US\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"results\""], + ["text",": "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable","\"photo\""], + ["text",": "], + ["paren.lparen","["] +],[ + "start", + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable","\"farm\""], + ["text",": "], + ["string","\"6\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"id\""], + ["text",": "], + ["string","\"5855620975\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfamily\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfriend\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"ispublic\""], + ["text",": "], + ["string","\"1\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"owner\""], + ["text",": "], + ["string","\"32021554@N04\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"secret\""], + ["text",": "], + ["string","\"f1f5e8515d\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"server\""], + ["text",": "], + ["string","\"5110\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"title\""], + ["text",": "], + ["string","\"7087 bandit cat\""] +],[ + "start", + ["text"," "], + ["paren.rparen","}"], + ["text",","] +],[ + "start", + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable","\"farm\""], + ["text",": "], + ["string","\"4\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"id\""], + ["text",": "], + ["string","\"5856170534\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfamily\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfriend\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"ispublic\""], + ["text",": "], + ["string","\"1\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"owner\""], + ["text",": "], + ["string","\"32021554@N04\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"secret\""], + ["text",": "], + ["string","\"ff1efb2a6f\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"server\""], + ["text",": "], + ["string","\"3217\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"title\""], + ["text",": "], + ["string","\"6975 rusty cat\""] +],[ + "start", + ["text"," "], + ["paren.rparen","}"], + ["text",","] +],[ + "start", + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable","\"farm\""], + ["text",": "], + ["string","\"6\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"id\""], + ["text",": "], + ["string","\"5856172972\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfamily\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfriend\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"ispublic\""], + ["text",": "], + ["string","\"1\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"owner\""], + ["text",": "], + ["string","\"51249875@N03\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"secret\""], + ["text",": "], + ["string","\"6c6887347c\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"server\""], + ["text",": "], + ["string","\"5192\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"title\""], + ["text",": "], + ["string","\"watermarked-cats\""] +],[ + "start", + ["text"," "], + ["paren.rparen","}"], + ["text",","] +],[ + "start", + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable","\"farm\""], + ["text",": "], + ["string","\"6\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"id\""], + ["text",": "], + ["string","\"5856168328\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfamily\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfriend\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"ispublic\""], + ["text",": "], + ["string","\"1\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"owner\""], + ["text",": "], + ["string","\"32021554@N04\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"secret\""], + ["text",": "], + ["string","\"0c1cfdf64c\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"server\""], + ["text",": "], + ["string","\"5078\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"title\""], + ["text",": "], + ["string","\"7020 mandy cat\""] +],[ + "start", + ["text"," "], + ["paren.rparen","}"], + ["text",","] +],[ + "start", + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable","\"farm\""], + ["text",": "], + ["string","\"3\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"id\""], + ["text",": "], + ["string","\"5856171774\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfamily\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"isfriend\""], + ["text",": "], + ["string","\"0\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"ispublic\""], + ["text",": "], + ["string","\"1\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"owner\""], + ["text",": "], + ["string","\"32021554@N04\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"secret\""], + ["text",": "], + ["string","\"7f5a3180ab\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"server\""], + ["text",": "], + ["string","\"2696\""], + ["text",","] +],[ + "start", + ["text"," "], + ["variable","\"title\""], + ["text",": "], + ["string","\"7448 bobby cat\""] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","]"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_jsp.json b/lib/ace/mode/_test/tokens_jsp.json index f1ce8e00..a38205cc 100644 --- a/lib/ace/mode/_test/tokens_jsp.json +++ b/lib/ace/mode/_test/tokens_jsp.json @@ -1,569 +1,435 @@ -[ - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "html" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "body" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "js-start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.script", "script" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "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.r", ">" ] - ] - }, - { - "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.r", ">" ] - ] - }, - { - "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", "))" ], - [ "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", "<%-- 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.r", ">" ], - [ "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.r", ">" ] - ] - }, - { - "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.r", ">" ], - [ "text", " Java" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "BR" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "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.r", ">" ], - [ "text", " .NET" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "BR" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "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.r", ">" ], - [ "text", " PHP" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "BR" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "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.r", ">" ], - [ "text", " C/C++" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "BR" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "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.r", ">" ], - [ "text", " PERL " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "BR" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "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.r", ">" ] - ] - }, - { - "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", "!=" ], - [ "text", " " ], - [ "constant.language", "null" ], - [ "text", " " ], - [ "keyword.operator", "&&" ], - [ "text", " " ], - [ "identifier", "select" ], - [ "text", "." ], - [ "identifier", "length" ], - [ "text", " " ], - [ "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", "])" ], - [ "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 +[[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","html"], + ["meta.tag.r",">"] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","body"], + ["meta.tag.r",">"] +],[ + "js-start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name.script","script"], + ["meta.tag.r",">"] +],[ + "js-regex_allowed", + ["text"," "], + ["storage.type","var"], + ["text"," "], + ["identifier","x"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","\"abc\""], + ["punctuation.operator",";"] +],[ + "js-regex_allowed", + ["text"," "], + ["storage.type","function"], + ["text"," "], + ["identifier","y"], + ["text"," "], + ["paren.lparen","{"] +],[ + "js-start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "css-start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name.style","style"], + ["meta.tag.r",">"] +],[ + "css-ruleset", + ["text"," "], + ["variable",".class"], + ["text"," "], + ["paren.lparen","{"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","background"], + ["text",": "], + ["constant.numeric","#124356"], + ["text",";"] +],[ + "css-start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start" +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," Today's date: "], + ["meta.tag","<%"], + ["keyword.operator","="], + ["text"," "], + ["lparen","("], + ["keyword","new"], + ["text"," "], + ["identifier","java"], + ["text","."], + ["identifier","util"], + ["text","."], + ["identifier","Date"], + ["lparen","("], + ["rparen","))"], + ["text","."], + ["identifier","toLocaleString"], + ["lparen","("], + ["rparen",")"], + ["meta.tag","%>"] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<%"], + ["keyword.operator","!"], + ["text"," "], + ["keyword","int"], + ["text"," "], + ["identifier","i"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0"], + ["text","; "], + ["meta.tag","%>"] +],[ + "jsp-start", + ["text"," "], + ["meta.tag",""] +],[ + "jsp-start", + ["text"," "], + ["keyword","int"], + ["text"," "], + ["identifier","j"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","10"], + ["text",";"] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start" +],[ + "start", + ["text"," "], + ["comment","<%-- This is JSP comment --%>"] +],[ + "start", + ["text"," "], + ["meta.tag","<%@"], + ["text"," "], + ["identifier","directive"], + ["text"," "], + ["identifier","attribute"], + ["keyword.operator","="], + ["string","\"value\""], + ["text"," "], + ["meta.tag","%>"] +],[ + "start" +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","h2"], + ["meta.tag.r",">"], + ["text","Select Languages:"], + ["meta.tag",""] +],[ + "start" +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name.form","form"], + ["text"," "], + ["entity.other.attribute-name","ACTION"], + ["keyword.operator","="], + ["string","\"jspCheckBox.jsp\""], + ["meta.tag.r",">"] +],[ + "start", + ["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.r",">"], + ["text"," Java"], + ["meta.tag","<"], + ["meta.tag.tag-name","BR"], + ["meta.tag.r",">"] +],[ + "start", + ["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.r",">"], + ["text"," .NET"], + ["meta.tag","<"], + ["meta.tag.tag-name","BR"], + ["meta.tag.r",">"] +],[ + "start", + ["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.r",">"], + ["text"," PHP"], + ["meta.tag","<"], + ["meta.tag.tag-name","BR"], + ["meta.tag.r",">"] +],[ + "start", + ["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.r",">"], + ["text"," C/C++"], + ["meta.tag","<"], + ["meta.tag.tag-name","BR"], + ["meta.tag.r",">"] +],[ + "start", + ["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.r",">"], + ["text"," PERL "], + ["meta.tag","<"], + ["meta.tag.tag-name","BR"], + ["meta.tag.r",">"] +],[ + "start", + ["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.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start" +],[ + "jsp-start", + ["text"," "], + ["meta.tag","<%"] +],[ + "jsp-start", + ["text"," "], + ["support.function","String"], + ["text"," "], + ["identifier","select"], + ["lparen","["], + ["rparen","]"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["variable.language","request"], + ["text","."], + ["identifier","getParameterValues"], + ["lparen","("], + ["string","\"id\""], + ["rparen",")"], + ["text","; "] +],[ + "jsp-start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["lparen","("], + ["identifier","select"], + ["text"," "], + ["keyword.operator","!="], + ["text"," "], + ["constant.language","null"], + ["text"," "], + ["keyword.operator","&&"], + ["text"," "], + ["identifier","select"], + ["text","."], + ["identifier","length"], + ["text"," "], + ["keyword.operator","!="], + ["text"," "], + ["constant.numeric","0"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "jsp-start", + ["text"," "], + ["variable.language","out"], + ["text","."], + ["identifier","println"], + ["lparen","("], + ["string","\"You have selected: \""], + ["rparen",")"], + ["text",";"] +],[ + "jsp-start", + ["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","{"] +],[ + "jsp-start", + ["text"," "], + ["variable.language","out"], + ["text","."], + ["identifier","println"], + ["lparen","("], + ["identifier","select"], + ["lparen","["], + ["identifier","i"], + ["rparen","])"], + ["text","; "] +],[ + "jsp-start", + ["text"," "], + ["rparen","}"] +],[ + "jsp-start", + ["text"," "], + ["rparen","}"] +],[ + "start", + ["text"," "], + ["meta.tag","%>"] +],[ + "start", + ["meta.tag",""] +],[ + "start", + ["meta.tag",""] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_jsx.json b/lib/ace/mode/_test/tokens_jsx.json index d7a227c9..d1a740b0 100644 --- a/lib/ace/mode/_test/tokens_jsx.json +++ b/lib/ace/mode/_test/tokens_jsx.json @@ -1,79 +1,51 @@ -[ - { - "state": "comment", - "data": [ - [ "comment", "/*EXPECTED" ] - ] - }, - { - "state": "comment", - "data": [ - [ "comment", "hello world!" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "*/" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "class" ], - [ "text", " " ], - [ "language.support.class", "Test" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "static" ], - [ "text", " " ], - [ "storage.type", "function" ], - [ "text", " " ], - [ "entity.name.function", "run" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "punctuation.operator", ":" ], - [ "text", " " ], - [ "keyword", "void" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "// console.log(\"hello world!\");" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "log" ], - [ "text", " " ], - [ "string", "\"hello world!\"" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "comment", + ["comment","/*EXPECTED"] +],[ + "comment", + ["comment","hello world!"] +],[ + "start", + ["comment","*/"] +],[ + "start", + ["keyword","class"], + ["text"," "], + ["language.support.class","Test"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","static"], + ["text"," "], + ["storage.type","function"], + ["text"," "], + ["entity.name.function","run"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["punctuation.operator",":"], + ["text"," "], + ["keyword","void"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["comment","// console.log(\"hello world!\");"] +],[ + "start", + ["text"," "], + ["keyword","log"], + ["text"," "], + ["string","\"hello world!\""], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +]] \ 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 8d5fee7c..0ac37725 100644 --- a/lib/ace/mode/_test/tokens_latex.json +++ b/lib/ace/mode/_test/tokens_latex.json @@ -1,194 +1,127 @@ -[ - { - "state": "start", - "data": [ - [ "keyword", "\\usepackage" ], - [ "lparen", "{" ], - [ "text", "amsmath" ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "\\title" ], - [ "lparen", "{" ], - [ "keyword", "\\LaTeX" ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "\\date" ], - [ "lparen", "{" ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "\\begin" ], - [ "lparen", "{" ], - [ "text", "document" ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "\\maketitle" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "\\LaTeX" ], - [ "lparen", "{" ], - [ "rparen", "}" ], - [ "text", " is a document preparation system for the " ], - [ "keyword", "\\TeX" ], - [ "lparen", "{" ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " typesetting program. It offers programmable desktop publishing" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " features and extensive facilities for automating most aspects of" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " typesetting and desktop publishing, including numbering and" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " cross-referencing, tables and figures, page layout, bibliographies," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " and much more. " ], - [ "keyword", "\\LaTeX" ], - [ "lparen", "{" ], - [ "rparen", "}" ], - [ "text", " was originally written in 1984 by Leslie" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " Lamport and has become the dominant method for using " ], - [ "keyword", "\\TeX" ], - [ "text", "; few" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " people write in plain " ], - [ "keyword", "\\TeX" ], - [ "lparen", "{" ], - [ "rparen", "}" ], - [ "text", " anymore. The current version is" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "\\LaTeXe" ], - [ "text", "." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "% This is a comment; it will not be shown in the final output." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "% The following shows a little of the typesetting power of LaTeX:" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "\\begin" ], - [ "lparen", "{" ], - [ "text", "align" ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " E &= mc^2 " ], - [ "keyword", "\\\\" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " m &= " ], - [ "keyword", "\\frac" ], - [ "lparen", "{" ], - [ "text", "m_0" ], - [ "rparen", "}" ], - [ "lparen", "{" ], - [ "keyword", "\\sqrt" ], - [ "lparen", "{" ], - [ "text", "1-" ], - [ "keyword", "\\frac" ], - [ "lparen", "{" ], - [ "text", "v^2" ], - [ "rparen", "}" ], - [ "lparen", "{" ], - [ "text", "c^2" ], - [ "rparen", "}}}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "\\end" ], - [ "lparen", "{" ], - [ "text", "align" ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "\\end" ], - [ "lparen", "{" ], - [ "text", "document" ], - [ "rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["keyword","\\usepackage"], + ["lparen","{"], + ["text","amsmath"], + ["rparen","}"] +],[ + "start", + ["keyword","\\title"], + ["lparen","{"], + ["keyword","\\LaTeX"], + ["rparen","}"] +],[ + "start", + ["keyword","\\date"], + ["lparen","{"], + ["rparen","}"] +],[ + "start", + ["keyword","\\begin"], + ["lparen","{"], + ["text","document"], + ["rparen","}"] +],[ + "start", + ["text"," "], + ["keyword","\\maketitle"] +],[ + "start", + ["text"," "], + ["keyword","\\LaTeX"], + ["lparen","{"], + ["rparen","}"], + ["text"," is a document preparation system for the "], + ["keyword","\\TeX"], + ["lparen","{"], + ["rparen","}"] +],[ + "start", + ["text"," typesetting program. It offers programmable desktop publishing"] +],[ + "start", + ["text"," features and extensive facilities for automating most aspects of"] +],[ + "start", + ["text"," typesetting and desktop publishing, including numbering and"] +],[ + "start", + ["text"," cross-referencing, tables and figures, page layout, bibliographies,"] +],[ + "start", + ["text"," and much more. "], + ["keyword","\\LaTeX"], + ["lparen","{"], + ["rparen","}"], + ["text"," was originally written in 1984 by Leslie"] +],[ + "start", + ["text"," Lamport and has become the dominant method for using "], + ["keyword","\\TeX"], + ["text","; few"] +],[ + "start", + ["text"," people write in plain "], + ["keyword","\\TeX"], + ["lparen","{"], + ["rparen","}"], + ["text"," anymore. The current version is"] +],[ + "start", + ["text"," "], + ["keyword","\\LaTeXe"], + ["text","."] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["comment","% This is a comment; it will not be shown in the final output."] +],[ + "start", + ["text"," "], + ["comment","% The following shows a little of the typesetting power of LaTeX:"] +],[ + "start", + ["text"," "], + ["keyword","\\begin"], + ["lparen","{"], + ["text","align"], + ["rparen","}"] +],[ + "start", + ["text"," E &= mc^2 "], + ["keyword","\\\\"] +],[ + "start", + ["text"," m &= "], + ["keyword","\\frac"], + ["lparen","{"], + ["text","m_0"], + ["rparen","}"], + ["lparen","{"], + ["keyword","\\sqrt"], + ["lparen","{"], + ["text","1-"], + ["keyword","\\frac"], + ["lparen","{"], + ["text","v^2"], + ["rparen","}"], + ["lparen","{"], + ["text","c^2"], + ["rparen","}}}"] +],[ + "start", + ["text"," "], + ["keyword","\\end"], + ["lparen","{"], + ["text","align"], + ["rparen","}"] +],[ + "start", + ["keyword","\\end"], + ["lparen","{"], + ["text","document"], + ["rparen","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_less.json b/lib/ace/mode/_test/tokens_less.json index 63984de5..81fe0c20 100644 --- a/lib/ace/mode/_test/tokens_less.json +++ b/lib/ace/mode/_test/tokens_less.json @@ -1,288 +1,204 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "/* styles.less */" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable", "@base" ], - [ "text", ": " ], - [ "constant.numeric", "#f938ab" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable.language", ".box-shadow" ], - [ "paren.lparen", "(" ], - [ "variable", "@style" ], - [ "text", ", " ], - [ "variable", "@c" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "when" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "support.function", "iscolor" ], - [ "paren.lparen", "(" ], - [ "variable", "@c" ], - [ "paren.rparen", "))" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " box-shadow: " ], - [ "variable", "@style" ], - [ "text", " " ], - [ "variable", "@c" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " -webkit-box-shadow: " ], - [ "variable", "@style" ], - [ "text", " " ], - [ "variable", "@c" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " -moz-box-shadow: " ], - [ "variable", "@style" ], - [ "text", " " ], - [ "variable", "@c" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "variable.language", ".box-shadow" ], - [ "paren.lparen", "(" ], - [ "variable", "@style" ], - [ "text", ", " ], - [ "variable", "@alpha" ], - [ "text", ": " ], - [ "constant.numeric", "50%" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "when" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "support.function", "isnumber" ], - [ "paren.lparen", "(" ], - [ "variable", "@alpha" ], - [ "paren.rparen", "))" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable.language", ".box-shadow" ], - [ "paren.lparen", "(" ], - [ "variable", "@style" ], - [ "text", ", " ], - [ "support.function", "rgba" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "0" ], - [ "text", ", " ], - [ "constant.numeric", "0" ], - [ "text", ", " ], - [ "constant.numeric", "0" ], - [ "text", ", " ], - [ "variable", "@alpha" ], - [ "paren.rparen", "))" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "// Box styles" ] - ] - }, - { - "state": "start", - "data": [ - [ "variable.language", ".box" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "color" ], - [ "text", ": " ], - [ "support.function", "saturate" ], - [ "paren.lparen", "(" ], - [ "variable", "@base" ], - [ "text", ", " ], - [ "constant.numeric", "5%" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "border-color" ], - [ "text", ": " ], - [ "support.function", "lighten" ], - [ "paren.lparen", "(" ], - [ "variable", "@base" ], - [ "text", ", " ], - [ "constant.numeric", "30%" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable.language", "div" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "text", " " ], - [ "variable.language", ".box-shadow" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "0" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "text", " " ], - [ "constant.numeric", "5px" ], - [ "text", ", " ], - [ "constant.numeric", "30%" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable.language", "a" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "color" ], - [ "text", ": " ], - [ "variable", "@base" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " &" ], - [ "variable.language", ":hover" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "color" ], - [ "text", ": " ], - [ "support.function", "lighten" ], - [ "paren.lparen", "(" ], - [ "variable", "@base" ], - [ "text", ", " ], - [ "constant.numeric", "50%" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "start", + ["comment","/* styles.less */"] +],[ + "start" +],[ + "start", + ["variable","@base"], + ["text",": "], + ["constant.numeric","#f938ab"], + ["text",";"] +],[ + "start" +],[ + "start", + ["variable.language",".box-shadow"], + ["paren.lparen","("], + ["variable","@style"], + ["text",", "], + ["variable","@c"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","when"], + ["text"," "], + ["paren.lparen","("], + ["support.function","iscolor"], + ["paren.lparen","("], + ["variable","@c"], + ["paren.rparen","))"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," box-shadow: "], + ["variable","@style"], + ["text"," "], + ["variable","@c"], + ["text",";"] +],[ + "start", + ["text"," -webkit-box-shadow: "], + ["variable","@style"], + ["text"," "], + ["variable","@c"], + ["text",";"] +],[ + "start", + ["text"," -moz-box-shadow: "], + ["variable","@style"], + ["text"," "], + ["variable","@c"], + ["text",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start", + ["variable.language",".box-shadow"], + ["paren.lparen","("], + ["variable","@style"], + ["text",", "], + ["variable","@alpha"], + ["text",": "], + ["constant.numeric","50%"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","when"], + ["text"," "], + ["paren.lparen","("], + ["support.function","isnumber"], + ["paren.lparen","("], + ["variable","@alpha"], + ["paren.rparen","))"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable.language",".box-shadow"], + ["paren.lparen","("], + ["variable","@style"], + ["text",", "], + ["support.function","rgba"], + ["paren.lparen","("], + ["constant.numeric","0"], + ["text",", "], + ["constant.numeric","0"], + ["text",", "], + ["constant.numeric","0"], + ["text",", "], + ["variable","@alpha"], + ["paren.rparen","))"], + ["text",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["comment","// Box styles"] +],[ + "start", + ["variable.language",".box"], + ["text"," "], + ["paren.lparen","{"], + ["text"," "] +],[ + "start", + ["text"," "], + ["support.type","color"], + ["text",": "], + ["support.function","saturate"], + ["paren.lparen","("], + ["variable","@base"], + ["text",", "], + ["constant.numeric","5%"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text"," "], + ["support.type","border-color"], + ["text",": "], + ["support.function","lighten"], + ["paren.lparen","("], + ["variable","@base"], + ["text",", "], + ["constant.numeric","30%"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["variable.language","div"], + ["text"," "], + ["paren.lparen","{"], + ["text"," "], + ["variable.language",".box-shadow"], + ["paren.lparen","("], + ["constant.numeric","0"], + ["text"," "], + ["constant.numeric","0"], + ["text"," "], + ["constant.numeric","5px"], + ["text",", "], + ["constant.numeric","30%"], + ["paren.rparen",")"], + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," "], + ["variable.language","a"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["support.type","color"], + ["text",": "], + ["variable","@base"], + ["text",";"] +],[ + "start", + ["text"," "] +],[ + "start", + ["text"," &"], + ["variable.language",":hover"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["support.type","color"], + ["text",": "], + ["support.function","lighten"], + ["paren.lparen","("], + ["variable","@base"], + ["text",", "], + ["constant.numeric","50%"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_liquid.json b/lib/ace/mode/_test/tokens_liquid.json index f519d6d9..7cca8750 100644 --- a/lib/ace/mode/_test/tokens_liquid.json +++ b/lib/ace/mode/_test/tokens_liquid.json @@ -1,696 +1,483 @@ -[ - { - "state": "start", - "data": [ - [ "text", "The following examples can be found in full at http://liquidmarkup.org/" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Liquid is an extraction from the e-commerce system Shopify." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "Shopify powers many thousands of e-commerce stores which all call for unique designs." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "For this we developed Liquid which allows our customers complete design freedom while" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "maintaining the integrity of our servers." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Liquid has been in production use since June 2006 and is now used by many other" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "hosted web applications." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "It was developed for usage in Ruby on Rails web applications and integrates seamlessly" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "as a plugin but it also works excellently as a stand alone library." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Here's what it looks like:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "ul" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"products\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "for" ], - [ "text", " " ], - [ "identifier", "product" ], - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "identifier", "products" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "li" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "h2" ], - [ "meta.tag.r", ">" ], - [ "variable", "{{" ], - [ "text", " " ], - [ "identifier", "product" ], - [ "text", "." ], - [ "identifier", "title" ], - [ "text", " " ], - [ "variable", "}}" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " Only {{ product.price | format_as_money }}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ], - [ "variable", "{{" ], - [ "text", " " ], - [ "identifier", "product" ], - [ "text", "." ], - [ "identifier", "description" ], - [ "text", " | " ], - [ "identifier", "prettyprint" ], - [ "text", " | " ], - [ "support.function", "truncate" ], - [ "text", ": " ], - [ "constant.numeric", "200" ], - [ "text", " " ], - [ "variable", "}}" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "endfor" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Some more features include:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "h2" ], - [ "meta.tag.r", ">" ], - [ "text", "Filters" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ], - [ "text", " The word \"tobi\" in uppercase: {{ 'tobi' | upcase }} " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ], - [ "text", "The word \"tobi\" has {{ 'tobi' | size }} letters! " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ], - [ "text", "Change \"Hello world\" to \"Hi world\": {{ 'Hello world' | replace: 'Hello', 'Hi' }} " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ], - [ "text", "The date today is {{ 'now' | date: \"%Y %b %d\" }} " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "h2" ], - [ "meta.tag.r", ">" ], - [ "text", "If" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "identifier", "user" ], - [ "text", "." ], - [ "identifier", "name" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "string", "'tobi'" ], - [ "text", " " ], - [ "identifier", "or" ], - [ "text", " " ], - [ "identifier", "user" ], - [ "text", "." ], - [ "identifier", "name" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "string", "'marc'" ], - [ "text", " " ], - [ "variable", "%}" ], - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " hi marc or tobi" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "endif" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "h2" ], - [ "meta.tag.r", ">" ], - [ "text", "Case" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "case" ], - [ "text", " " ], - [ "identifier", "template" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "when" ], - [ "text", " " ], - [ "string", "'index'" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " Welcome" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "when" ], - [ "text", " " ], - [ "string", "'product'" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{{" ], - [ "text", " " ], - [ "identifier", "product" ], - [ "text", "." ], - [ "identifier", "vendor" ], - [ "text", " | " ], - [ "identifier", "link_to_vendor" ], - [ "text", " " ], - [ "variable", "}}" ], - [ "text", " / {{ product.title }}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "else" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{{" ], - [ "text", " " ], - [ "identifier", "page_title" ], - [ "text", " " ], - [ "variable", "}}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "endcase" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "h2" ], - [ "meta.tag.r", ">" ], - [ "text", "For Loops" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "for" ], - [ "text", " " ], - [ "identifier", "item" ], - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "identifier", "array" ], - [ "text", " " ], - [ "variable", "%}" ], - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{{" ], - [ "text", " " ], - [ "identifier", "item" ], - [ "text", " " ], - [ "variable", "}}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "endfor" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "h2" ], - [ "meta.tag.r", ">" ], - [ "text", "Tables" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "tablerow" ], - [ "text", " " ], - [ "identifier", "item" ], - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "identifier", "items" ], - [ "text", " " ], - [ "identifier", "cols" ], - [ "text", ": " ], - [ "constant.numeric", "3" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "variable.language", "tablerowloop" ], - [ "text", "." ], - [ "identifier", "col_first" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " First column: {{ item.variable }}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "else" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " Different column: {{ item.variable }}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "endif" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "{%" ], - [ "text", " " ], - [ "keyword", "endtablerow" ], - [ "text", " " ], - [ "variable", "%}" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "start", + ["text","The following examples can be found in full at http://liquidmarkup.org/"] +],[ + "start" +],[ + "start", + ["text","Liquid is an extraction from the e-commerce system Shopify."] +],[ + "start", + ["text","Shopify powers many thousands of e-commerce stores which all call for unique designs."] +],[ + "start", + ["text","For this we developed Liquid which allows our customers complete design freedom while"] +],[ + "start", + ["text","maintaining the integrity of our servers."] +],[ + "start" +],[ + "start", + ["text","Liquid has been in production use since June 2006 and is now used by many other"] +],[ + "start", + ["text","hosted web applications."] +],[ + "start" +],[ + "start", + ["text","It was developed for usage in Ruby on Rails web applications and integrates seamlessly"] +],[ + "start", + ["text","as a plugin but it also works excellently as a stand alone library."] +],[ + "start" +],[ + "start", + ["text","Here's what it looks like:"] +],[ + "start" +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","ul"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"products\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","for"], + ["text"," "], + ["identifier","product"], + ["text"," "], + ["keyword","in"], + ["text"," "], + ["identifier","products"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","li"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","h2"], + ["meta.tag.r",">"], + ["variable","{{"], + ["text"," "], + ["identifier","product"], + ["text","."], + ["identifier","title"], + ["text"," "], + ["variable","}}"], + ["meta.tag",""] +],[ + "start", + ["text"," Only {{ product.price | format_as_money }}"] +],[ + "start" +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"], + ["variable","{{"], + ["text"," "], + ["identifier","product"], + ["text","."], + ["identifier","description"], + ["text"," | "], + ["identifier","prettyprint"], + ["text"," | "], + ["support.function","truncate"], + ["text",": "], + ["constant.numeric","200"], + ["text"," "], + ["variable","}}"], + ["meta.tag",""] +],[ + "start" +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","endfor"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start" +],[ + "start" +],[ + "start", + ["text","Some more features include:"] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","h2"], + ["meta.tag.r",">"], + ["text","Filters"], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"], + ["text"," The word \"tobi\" in uppercase: {{ 'tobi' | upcase }} "], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"], + ["text","The word \"tobi\" has {{ 'tobi' | size }} letters! "], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"], + ["text","Change \"Hello world\" to \"Hi world\": {{ 'Hello world' | replace: 'Hello', 'Hi' }} "], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"], + ["text","The date today is {{ 'now' | date: \"%Y %b %d\" }} "], + ["meta.tag",""] +],[ + "start" +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","h2"], + ["meta.tag.r",">"], + ["text","If"], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","if"], + ["text"," "], + ["identifier","user"], + ["text","."], + ["identifier","name"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["string","'tobi'"], + ["text"," "], + ["identifier","or"], + ["text"," "], + ["identifier","user"], + ["text","."], + ["identifier","name"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["string","'marc'"], + ["text"," "], + ["variable","%}"], + ["text"," "] +],[ + "start", + ["text"," hi marc or tobi"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","endif"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["meta.tag",""] +],[ + "start" +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","h2"], + ["meta.tag.r",">"], + ["text","Case"], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","case"], + ["text"," "], + ["identifier","template"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","when"], + ["text"," "], + ["string","'index'"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," Welcome"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","when"], + ["text"," "], + ["string","'product'"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," "], + ["variable","{{"], + ["text"," "], + ["identifier","product"], + ["text","."], + ["identifier","vendor"], + ["text"," | "], + ["identifier","link_to_vendor"], + ["text"," "], + ["variable","}}"], + ["text"," / {{ product.title }}"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","else"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," "], + ["variable","{{"], + ["text"," "], + ["identifier","page_title"], + ["text"," "], + ["variable","}}"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","endcase"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["meta.tag",""] +],[ + "start" +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","h2"], + ["meta.tag.r",">"], + ["text","For Loops"], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","for"], + ["text"," "], + ["identifier","item"], + ["text"," "], + ["keyword","in"], + ["text"," "], + ["identifier","array"], + ["text"," "], + ["variable","%}"], + ["text"," "] +],[ + "start", + ["text"," "], + ["variable","{{"], + ["text"," "], + ["identifier","item"], + ["text"," "], + ["variable","}}"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","endfor"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["meta.tag",""] +],[ + "start" +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","h2"], + ["meta.tag.r",">"], + ["text","Tables"], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","tablerow"], + ["text"," "], + ["identifier","item"], + ["text"," "], + ["keyword","in"], + ["text"," "], + ["identifier","items"], + ["text"," "], + ["identifier","cols"], + ["text",": "], + ["constant.numeric","3"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","if"], + ["text"," "], + ["variable.language","tablerowloop"], + ["text","."], + ["identifier","col_first"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," First column: {{ item.variable }}"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","else"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," Different column: {{ item.variable }}"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","endif"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["text"," "], + ["variable","{%"], + ["text"," "], + ["keyword","endtablerow"], + ["text"," "], + ["variable","%}"] +],[ + "start", + ["meta.tag",""] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_lisp.json b/lib/ace/mode/_test/tokens_lisp.json index 130a9b1b..2e70a555 100644 --- a/lib/ace/mode/_test/tokens_lisp.json +++ b/lib/ace/mode/_test/tokens_lisp.json @@ -1,314 +1,248 @@ -[ - { - "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 +[[ + "start", + ["text","("], + ["storage.type.function-type.lisp","defun"], + ["text"," "], + ["entity.name.function.lisp","prompt-for-cd"], + ["text"," ()"] +],[ + "start", + ["text"," "], + ["string","\"Prompts"] +],[ + "start", + ["text"," "], + ["identifier","for"], + ["text"," "], + ["identifier","CD"], + ["text","\""] +],[ + "start", + ["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","))"] +],[ + "start", + ["text"," ("], + ["identifier","prompt"], + ["text","-"], + ["identifier","read"], + ["text"," "], + ["string","\"Artist\""], + ["text"," &"], + ["identifier","rest"], + ["text",")"] +],[ + "start", + ["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",")"] +],[ + "start", + ["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"] +],[ + "start", + ["text"," ) "], + ["constant.numeric","0xFFLL"], + ["text"," "], + ["constant.numeric","-23ull"] +],[ + "start", + ["text"," "], + ["comment",";; second line comment"] +],[ + "start", + ["text"," '(+ "], + ["constant.numeric","1"], + ["text"," "], + ["constant.numeric","2"], + ["text",")"] +],[ + "start", + ["text"," ("], + ["identifier","defvar"], + ["text"," "], + ["punctuation.definition.variable.lisp","*"], + ["variable.other.global.lisp","lines"], + ["punctuation.definition.variable.lisp","*"], + ["text",") "], + ["comment","; list of all lines"] +],[ + "start", + ["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","))"] +],[ + "start", + ["text"," ("], + ["support.function","quote"], + ["text"," ("], + ["identifier","privet"], + ["text"," "], + ["constant.numeric","1"], + ["text"," "], + ["constant.numeric","2"], + ["text"," "], + ["constant.numeric","3"], + ["text","))"] +],[ + "start", + ["text"," '("], + ["identifier","hello"], + ["text"," "], + ["identifier","world"], + ["text",")"] +],[ + "start", + ["text"," (* "], + ["constant.numeric","5"], + ["text"," "], + ["constant.numeric","7"], + ["text",")"] +],[ + "start", + ["text"," ("], + ["constant.numeric","1"], + ["text"," "], + ["constant.numeric","2"], + ["text"," "], + ["constant.numeric","34"], + ["text"," "], + ["constant.numeric","5"], + ["text",")"] +],[ + "start", + ["text"," (:"], + ["identifier","use"], + ["text"," "], + ["string","\"aaaa\""], + ["text",")"] +],[ + "start", + ["text"," ("], + ["keyword.control","let"], + ["text"," (("], + ["identifier","x"], + ["text"," "], + ["constant.numeric","10"], + ["text",") ("], + ["identifier","y"], + ["text"," "], + ["constant.numeric","20"], + ["text","))"] +],[ + "start", + ["text"," ("], + ["identifier","print"], + ["text"," (+ "], + ["identifier","x"], + ["text"," "], + ["identifier","y"], + ["text","))"] +],[ + "start", + ["text"," ) "], + ["support.function","LAmbDa"] +],[ + "start" +],[ + "start", + ["text"," "], + ["string","\"asdad"], + ["constant.character.escape.lisp","\\0"], + ["string","eqweqe\""] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_lua.json b/lib/ace/mode/_test/tokens_lua.json index 95ddb113..01d9ebed 100644 --- a/lib/ace/mode/_test/tokens_lua.json +++ b/lib/ace/mode/_test/tokens_lua.json @@ -1,444 +1,340 @@ -[ - { - "state": "qcomment", - "data": [ - [ "comment", "--[[--" ] - ] - }, - { - "state": "qcomment", - "data": [ - [ "comment", "num_args takes in 5.1 byte code and extracts the number of arguments" ] - ] - }, - { - "state": "qcomment", - "data": [ - [ "comment", "from its function header." ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "--]]--" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "function" ], - [ "text", " " ], - [ "identifier", "int" ], - [ "paren.lparen", "(" ], - [ "identifier", "t" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "keyword", "return" ], - [ "text", " " ], - [ "identifier", "t" ], - [ "keyword.operator", ":" ], - [ "support.function", "byte" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "1" ], - [ "paren.rparen", ")" ], - [ "keyword.operator", "+" ], - [ "identifier", "t" ], - [ "keyword.operator", ":" ], - [ "support.function", "byte" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "2" ], - [ "paren.rparen", ")" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "0x100" ], - [ "keyword.operator", "+" ], - [ "identifier", "t" ], - [ "keyword.operator", ":" ], - [ "support.function", "byte" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "3" ], - [ "paren.rparen", ")" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "0x10000" ], - [ "keyword.operator", "+" ], - [ "identifier", "t" ], - [ "keyword.operator", ":" ], - [ "support.function", "byte" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "4" ], - [ "paren.rparen", ")" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "0x1000000" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "end" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "function" ], - [ "text", " " ], - [ "identifier", "num_args" ], - [ "paren.lparen", "(" ], - [ "identifier", "func" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "keyword", "local" ], - [ "text", " " ], - [ "support.function", "dump" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.library", "string" ], - [ "text", "." ], - [ "support.function", "dump" ], - [ "paren.lparen", "(" ], - [ "identifier", "func" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "keyword", "local" ], - [ "text", " " ], - [ "identifier", "offset" ], - [ "text", ", " ], - [ "identifier", "cursor" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "int" ], - [ "paren.lparen", "(" ], - [ "support.function", "dump" ], - [ "keyword.operator", ":" ], - [ "support.function", "sub" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "13" ], - [ "paren.rparen", "))" ], - [ "text", ", " ], - [ "identifier", "offset" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "constant.numeric", "26" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "comment", "--Get the params and var flag (whether there's a ... in the param)" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "keyword", "return" ], - [ "text", " " ], - [ "support.function", "dump" ], - [ "keyword.operator", ":" ], - [ "support.function", "sub" ], - [ "paren.lparen", "(" ], - [ "identifier", "cursor" ], - [ "paren.rparen", ")" ], - [ "keyword.operator", ":" ], - [ "support.function", "byte" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", ", " ], - [ "support.function", "dump" ], - [ "keyword.operator", ":" ], - [ "support.function", "sub" ], - [ "paren.lparen", "(" ], - [ "identifier", "cursor" ], - [ "keyword.operator", "+" ], - [ "constant.numeric", "1" ], - [ "paren.rparen", ")" ], - [ "keyword.operator", ":" ], - [ "support.function", "byte" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "end" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "-- Usage:" ] - ] - }, - { - "state": "start", - "data": [ - [ "identifier", "num_args" ], - [ "paren.lparen", "(" ], - [ "keyword", "function" ], - [ "paren.lparen", "(" ], - [ "identifier", "a" ], - [ "text", "," ], - [ "identifier", "b" ], - [ "text", "," ], - [ "identifier", "c" ], - [ "text", "," ], - [ "identifier", "d" ], - [ "text", ", " ], - [ "keyword.operator", "..." ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "end" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "comment", "-- return 4, 7" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "-- Python styled string format operator" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "local" ], - [ "text", " " ], - [ "identifier", "gm" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.library", "debug" ], - [ "text", "." ], - [ "support.function", "getmetatable" ], - [ "paren.lparen", "(" ], - [ "string", "\"\"" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "identifier", "gm" ], - [ "text", "." ], - [ "support.function", "__mod" ], - [ "keyword.operator", "=" ], - [ "keyword", "function" ], - [ "paren.lparen", "(" ], - [ "identifier", "self" ], - [ "text", ", " ], - [ "identifier", "other" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "support.function", "type" ], - [ "paren.lparen", "(" ], - [ "identifier", "other" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword.operator", "~=" ], - [ "text", " " ], - [ "string", "\"table\"" ], - [ "text", " " ], - [ "keyword", "then" ], - [ "text", " " ], - [ "identifier", "other" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "identifier", "other" ], - [ "paren.rparen", "}" ], - [ "text", " " ], - [ "keyword", "end" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "for" ], - [ "text", " " ], - [ "identifier", "i" ], - [ "text", "," ], - [ "identifier", "v" ], - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "support.function", "ipairs" ], - [ "paren.lparen", "(" ], - [ "identifier", "other" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "do" ], - [ "text", " " ], - [ "identifier", "other" ], - [ "paren.lparen", "[" ], - [ "identifier", "i" ], - [ "paren.rparen", "]" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "support.function", "tostring" ], - [ "paren.lparen", "(" ], - [ "identifier", "v" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "end" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "return" ], - [ "text", " " ], - [ "identifier", "self" ], - [ "keyword.operator", ":" ], - [ "support.function", "format" ], - [ "paren.lparen", "(" ], - [ "support.function", "unpack" ], - [ "paren.lparen", "(" ], - [ "identifier", "other" ], - [ "paren.rparen", "))" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "end" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "qstring3", - "data": [ - [ "support.function", "print" ], - [ "paren.lparen", "(" ], - [ "string", "[===[" ] - ] - }, - { - "state": "qstring3", - "data": [ - [ "string", " blah blah %s, (%d %d)" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "]===]" ], - [ "keyword.operator", "%" ], - [ "paren.lparen", "{" ], - [ "string", "\"blah\"" ], - [ "text", ", " ], - [ "identifier", "num_args" ], - [ "paren.lparen", "(" ], - [ "identifier", "int" ], - [ "paren.rparen", ")})" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "qcomment1", - "data": [ - [ "comment", "--[=[--" ] - ] - }, - { - "state": "qcomment1", - "data": [ - [ "comment", "table.maxn is deprecated, use # instead." ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "--]=]--" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "print" ], - [ "paren.lparen", "(" ], - [ "constant.library", "table" ], - [ "text", "." ], - [ "invalid.deprecated", "maxn" ], - [ "paren.lparen", "{" ], - [ "constant.numeric", "1" ], - [ "text", "," ], - [ "constant.numeric", "2" ], - [ "text", "," ], - [ "paren.lparen", "[" ], - [ "constant.numeric", "4" ], - [ "paren.rparen", "]" ], - [ "keyword.operator", "=" ], - [ "constant.numeric", "4" ], - [ "text", "," ], - [ "paren.lparen", "[" ], - [ "constant.numeric", "8" ], - [ "paren.rparen", "]" ], - [ "keyword.operator", "=" ], - [ "constant.numeric", "8" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "comment", "-- outputs 8 instead of 2" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "qcomment", + ["comment","--[[--"] +],[ + "qcomment", + ["comment","num_args takes in 5.1 byte code and extracts the number of arguments"] +],[ + "qcomment", + ["comment","from its function header."] +],[ + "start", + ["comment","--]]--"] +],[ + "start" +],[ + "start", + ["keyword","function"], + ["text"," "], + ["identifier","int"], + ["paren.lparen","("], + ["identifier","t"], + ["paren.rparen",")"] +],[ + "start", + ["text","\t"], + ["keyword","return"], + ["text"," "], + ["identifier","t"], + ["keyword.operator",":"], + ["support.function","byte"], + ["paren.lparen","("], + ["constant.numeric","1"], + ["paren.rparen",")"], + ["keyword.operator","+"], + ["identifier","t"], + ["keyword.operator",":"], + ["support.function","byte"], + ["paren.lparen","("], + ["constant.numeric","2"], + ["paren.rparen",")"], + ["keyword.operator","*"], + ["constant.numeric","0x100"], + ["keyword.operator","+"], + ["identifier","t"], + ["keyword.operator",":"], + ["support.function","byte"], + ["paren.lparen","("], + ["constant.numeric","3"], + ["paren.rparen",")"], + ["keyword.operator","*"], + ["constant.numeric","0x10000"], + ["keyword.operator","+"], + ["identifier","t"], + ["keyword.operator",":"], + ["support.function","byte"], + ["paren.lparen","("], + ["constant.numeric","4"], + ["paren.rparen",")"], + ["keyword.operator","*"], + ["constant.numeric","0x1000000"] +],[ + "start", + ["keyword","end"] +],[ + "start" +],[ + "start", + ["keyword","function"], + ["text"," "], + ["identifier","num_args"], + ["paren.lparen","("], + ["identifier","func"], + ["paren.rparen",")"] +],[ + "start", + ["text","\t"], + ["keyword","local"], + ["text"," "], + ["support.function","dump"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.library","string"], + ["text","."], + ["support.function","dump"], + ["paren.lparen","("], + ["identifier","func"], + ["paren.rparen",")"] +],[ + "start", + ["text","\t"], + ["keyword","local"], + ["text"," "], + ["identifier","offset"], + ["text",", "], + ["identifier","cursor"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","int"], + ["paren.lparen","("], + ["support.function","dump"], + ["keyword.operator",":"], + ["support.function","sub"], + ["paren.lparen","("], + ["constant.numeric","13"], + ["paren.rparen","))"], + ["text",", "], + ["identifier","offset"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["constant.numeric","26"] +],[ + "start", + ["text","\t"], + ["comment","--Get the params and var flag (whether there's a ... in the param)"] +],[ + "start", + ["text","\t"], + ["keyword","return"], + ["text"," "], + ["support.function","dump"], + ["keyword.operator",":"], + ["support.function","sub"], + ["paren.lparen","("], + ["identifier","cursor"], + ["paren.rparen",")"], + ["keyword.operator",":"], + ["support.function","byte"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text",", "], + ["support.function","dump"], + ["keyword.operator",":"], + ["support.function","sub"], + ["paren.lparen","("], + ["identifier","cursor"], + ["keyword.operator","+"], + ["constant.numeric","1"], + ["paren.rparen",")"], + ["keyword.operator",":"], + ["support.function","byte"], + ["paren.lparen","("], + ["paren.rparen",")"] +],[ + "start", + ["keyword","end"] +],[ + "start" +],[ + "start", + ["comment","-- Usage:"] +],[ + "start", + ["identifier","num_args"], + ["paren.lparen","("], + ["keyword","function"], + ["paren.lparen","("], + ["identifier","a"], + ["text",","], + ["identifier","b"], + ["text",","], + ["identifier","c"], + ["text",","], + ["identifier","d"], + ["text",", "], + ["keyword.operator","..."], + ["paren.rparen",")"], + ["text"," "], + ["keyword","end"], + ["paren.rparen",")"], + ["text"," "], + ["comment","-- return 4, 7"] +],[ + "start" +],[ + "start", + ["comment","-- Python styled string format operator"] +],[ + "start", + ["keyword","local"], + ["text"," "], + ["identifier","gm"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.library","debug"], + ["text","."], + ["support.function","getmetatable"], + ["paren.lparen","("], + ["string","\"\""], + ["paren.rparen",")"] +],[ + "start" +],[ + "start", + ["identifier","gm"], + ["text","."], + ["support.function","__mod"], + ["keyword.operator","="], + ["keyword","function"], + ["paren.lparen","("], + ["identifier","self"], + ["text",", "], + ["identifier","other"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["support.function","type"], + ["paren.lparen","("], + ["identifier","other"], + ["paren.rparen",")"], + ["text"," "], + ["keyword.operator","~="], + ["text"," "], + ["string","\"table\""], + ["text"," "], + ["keyword","then"], + ["text"," "], + ["identifier","other"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","{"], + ["identifier","other"], + ["paren.rparen","}"], + ["text"," "], + ["keyword","end"] +],[ + "start", + ["text"," "], + ["keyword","for"], + ["text"," "], + ["identifier","i"], + ["text",","], + ["identifier","v"], + ["text"," "], + ["keyword","in"], + ["text"," "], + ["support.function","ipairs"], + ["paren.lparen","("], + ["identifier","other"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","do"], + ["text"," "], + ["identifier","other"], + ["paren.lparen","["], + ["identifier","i"], + ["paren.rparen","]"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["support.function","tostring"], + ["paren.lparen","("], + ["identifier","v"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","end"] +],[ + "start", + ["text"," "], + ["keyword","return"], + ["text"," "], + ["identifier","self"], + ["keyword.operator",":"], + ["support.function","format"], + ["paren.lparen","("], + ["support.function","unpack"], + ["paren.lparen","("], + ["identifier","other"], + ["paren.rparen","))"] +],[ + "start", + ["keyword","end"] +],[ + "start" +],[ + "qstring3", + ["support.function","print"], + ["paren.lparen","("], + ["string","[===["] +],[ + "qstring3", + ["string"," blah blah %s, (%d %d)"] +],[ + "start", + ["string","]===]"], + ["keyword.operator","%"], + ["paren.lparen","{"], + ["string","\"blah\""], + ["text",", "], + ["identifier","num_args"], + ["paren.lparen","("], + ["identifier","int"], + ["paren.rparen",")})"] +],[ + "start" +],[ + "qcomment1", + ["comment","--[=[--"] +],[ + "qcomment1", + ["comment","table.maxn is deprecated, use # instead."] +],[ + "start", + ["comment","--]=]--"] +],[ + "start", + ["support.function","print"], + ["paren.lparen","("], + ["constant.library","table"], + ["text","."], + ["invalid.deprecated","maxn"], + ["paren.lparen","{"], + ["constant.numeric","1"], + ["text",","], + ["constant.numeric","2"], + ["text",","], + ["paren.lparen","["], + ["constant.numeric","4"], + ["paren.rparen","]"], + ["keyword.operator","="], + ["constant.numeric","4"], + ["text",","], + ["paren.lparen","["], + ["constant.numeric","8"], + ["paren.rparen","]"], + ["keyword.operator","="], + ["constant.numeric","8"], + ["paren.rparen",")"], + ["text"," "], + ["comment","-- outputs 8 instead of 2"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_luapage.json b/lib/ace/mode/_test/tokens_luapage.json index e044e7ad..bdcf77b9 100644 --- a/lib/ace/mode/_test/tokens_luapage.json +++ b/lib/ace/mode/_test/tokens_luapage.json @@ -1,827 +1,626 @@ -[ - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", "" ], - [ "meta.tag", "<" ], - [ "text", "!" ], - [ "entity.other.attribute-name", "DOCTYPE" ], - [ "text", " " ], - [ "entity.other.attribute-name", "html" ], - [ "text", " " ], - [ "entity.other.attribute-name", "PUBLIC" ], - [ "text", " " ], - [ "string", "\"-//W3C//DTD XHTML 1.0 Strict//EN\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "string", "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "html" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "lua-qcomment", - "data": [ - [ "keyword", "<%" ], - [ "text", " " ], - [ "comment", "--[[--" ] - ] - }, - { - "state": "lua-qcomment", - "data": [ - [ "comment", " index.lp from the Kepler Project's LuaDoc HTML doclet." ] - ] - }, - { - "state": "lua-qcomment", - "data": [ - [ "comment", " http://keplerproject.github.com/luadoc/" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "--]]" ], - [ "text", " " ], - [ "keyword", "%>" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "head" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "title" ], - [ "meta.tag.r", ">" ], - [ "text", "Reference" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "link" ], - [ "text", " " ], - [ "entity.other.attribute-name", "rel" ], - [ "keyword.operator", "=" ], - [ "string", "\"stylesheet\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "href" ], - [ "keyword.operator", "=" ], - [ "string", "\"" ], - [ "keyword", "<%=" ], - [ "identifier", "luadoc" ], - [ "text", "." ], - [ "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", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "body" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"container\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"product\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"product_logo\"" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"product_name\"" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "big" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "b" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "" ], - [ "meta.tag", "" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"product_description\"" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ], - [ "text", " " ], - [ "comment", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"main\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"navigation\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "<%=" ], - [ "identifier", "luadoc" ], - [ "text", "." ], - [ "identifier", "doclet" ], - [ "text", "." ], - [ "identifier", "html" ], - [ "text", "." ], - [ "identifier", "include" ], - [ "paren.lparen", "(" ], - [ "string", "\"menu.lp\"" ], - [ "text", ", " ], - [ "paren.lparen", "{" ], - [ "text", " " ], - [ "identifier", "doc" ], - [ "keyword.operator", "=" ], - [ "identifier", "doc" ], - [ "text", " " ], - [ "paren.rparen", "})" ], - [ "keyword", "%>" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ], - [ "text", " " ], - [ "comment", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"content\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "<%if" ], - [ "text", " " ], - [ "keyword", "not" ], - [ "text", " " ], - [ "identifier", "options" ], - [ "text", "." ], - [ "identifier", "nomodules" ], - [ "text", " " ], - [ "keyword", "and" ], - [ "text", " " ], - [ "keyword.operator", "#" ], - [ "identifier", "doc" ], - [ "text", "." ], - [ "identifier", "modules" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "text", " " ], - [ "keyword", "then%>" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "h2" ], - [ "meta.tag.r", ">" ], - [ "text", "Modules" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.table", "table" ], - [ "text", " " ], - [ "entity.other.attribute-name", "class" ], - [ "keyword.operator", "=" ], - [ "string", "\"module_list\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "<%for" ], - [ "text", " " ], - [ "identifier", "_" ], - [ "text", ", " ], - [ "identifier", "modulename" ], - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "support.function", "ipairs" ], - [ "paren.lparen", "(" ], - [ "identifier", "doc" ], - [ "text", "." ], - [ "identifier", "modules" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "do%>" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.table", "tr" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.table", "td" ], - [ "text", " " ], - [ "entity.other.attribute-name", "class" ], - [ "keyword.operator", "=" ], - [ "string", "\"name\"" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.anchor", "a" ], - [ "text", " " ], - [ "entity.other.attribute-name", "href" ], - [ "keyword.operator", "=" ], - [ "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", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.table", "td" ], - [ "text", " " ], - [ "entity.other.attribute-name", "class" ], - [ "keyword.operator", "=" ], - [ "string", "\"summary\"" ], - [ "meta.tag.r", ">" ], - [ "keyword", "<%=" ], - [ "identifier", "doc" ], - [ "text", "." ], - [ "identifier", "modules" ], - [ "paren.lparen", "[" ], - [ "identifier", "modulename" ], - [ "paren.rparen", "]" ], - [ "text", "." ], - [ "identifier", "summary" ], - [ "keyword", "%>" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "<%end%>" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "<%end%>" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "<%if" ], - [ "text", " " ], - [ "keyword", "not" ], - [ "text", " " ], - [ "identifier", "options" ], - [ "text", "." ], - [ "identifier", "nofiles" ], - [ "text", " " ], - [ "keyword", "and" ], - [ "text", " " ], - [ "keyword.operator", "#" ], - [ "identifier", "doc" ], - [ "text", "." ], - [ "identifier", "files" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "text", " " ], - [ "keyword", "then%>" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "h2" ], - [ "meta.tag.r", ">" ], - [ "text", "Files" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.table", "table" ], - [ "text", " " ], - [ "entity.other.attribute-name", "class" ], - [ "keyword.operator", "=" ], - [ "string", "\"file_list\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "<%for" ], - [ "text", " " ], - [ "identifier", "_" ], - [ "text", ", " ], - [ "identifier", "filepath" ], - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "support.function", "ipairs" ], - [ "paren.lparen", "(" ], - [ "identifier", "doc" ], - [ "text", "." ], - [ "identifier", "files" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "do%>" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.table", "tr" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.table", "td" ], - [ "text", " " ], - [ "entity.other.attribute-name", "class" ], - [ "keyword.operator", "=" ], - [ "string", "\"name\"" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.anchor", "a" ], - [ "text", " " ], - [ "entity.other.attribute-name", "href" ], - [ "keyword.operator", "=" ], - [ "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", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.table", "td" ], - [ "text", " " ], - [ "entity.other.attribute-name", "class" ], - [ "keyword.operator", "=" ], - [ "string", "\"summary\"" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "<%end%>" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "<%end%>" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ], - [ "text", " " ], - [ "comment", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ], - [ "text", " " ], - [ "comment", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"about\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "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.r", ">" ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.image", "img" ], - [ "text", " " ], - [ "entity.other.attribute-name", "src" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://www.w3.org/Icons/valid-xhtml10\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "alt" ], - [ "keyword.operator", "=" ], - [ "string", "\"Valid XHTML 1.0!\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "height" ], - [ "keyword.operator", "=" ], - [ "string", "\"31\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "width" ], - [ "keyword.operator", "=" ], - [ "string", "\"88\"" ], - [ "text", " " ], - [ "meta.tag.r", "/>" ], - [ "meta.tag", "" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ], - [ "text", " " ], - [ "comment", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ], - [ "text", " " ], - [ "comment", "" ], - [ "text", "\t" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "tag_embed_attribute_list", + ["text",""], + ["meta.tag","<"], + ["text","!"], + ["entity.other.attribute-name","DOCTYPE"], + ["text"," "], + ["entity.other.attribute-name","html"], + ["text"," "], + ["entity.other.attribute-name","PUBLIC"], + ["text"," "], + ["string","\"-//W3C//DTD XHTML 1.0 Strict//EN\""] +],[ + "start", + ["text"," "], + ["string","\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\""], + ["meta.tag.r",">"] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","html"], + ["meta.tag.r",">"] +],[ + "lua-qcomment", + ["keyword","<%"], + ["text"," "], + ["comment","--[[--"] +],[ + "lua-qcomment", + ["comment"," index.lp from the Kepler Project's LuaDoc HTML doclet."] +],[ + "lua-qcomment", + ["comment"," http://keplerproject.github.com/luadoc/"] +],[ + "start", + ["comment","--]]"], + ["text"," "], + ["keyword","%>"] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","head"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","title"], + ["meta.tag.r",">"], + ["text","Reference"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","link"], + ["text"," "], + ["entity.other.attribute-name","rel"], + ["keyword.operator","="], + ["string","\"stylesheet\""], + ["text"," "], + ["entity.other.attribute-name","href"], + ["keyword.operator","="], + ["string","\""], + ["keyword","<%="], + ["identifier","luadoc"], + ["text","."], + ["identifier","doclet"], + ["text","."], + ["identifier","html"], + ["text","."], + ["identifier","link"], + ["paren.lparen","("], + ["string","\"luadoc.css\""], + ["paren.rparen",")"], + ["keyword","%>"], + ["text","\" type=\"text/css\" />"] +],[ + "start", + ["text","\t"], + ["comment",""] +],[ + "start", + ["meta.tag",""] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","body"], + ["meta.tag.r",">"] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"container\""], + ["meta.tag.r",">"] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"product\""], + ["meta.tag.r",">"] +],[ + "start", + ["text","\t"], + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"product_logo\""], + ["meta.tag.r",">"], + ["meta.tag",""] +],[ + "start", + ["text","\t"], + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"product_name\""], + ["meta.tag.r",">"], + ["meta.tag","<"], + ["meta.tag.tag-name","big"], + ["meta.tag.r",">"], + ["meta.tag","<"], + ["meta.tag.tag-name","b"], + ["meta.tag.r",">"], + ["meta.tag",""], + ["meta.tag",""], + ["meta.tag",""] +],[ + "start", + ["text","\t"], + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"product_description\""], + ["meta.tag.r",">"], + ["meta.tag",""] +],[ + "start", + ["meta.tag",""], + ["text"," "], + ["comment",""] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"main\""], + ["meta.tag.r",">"] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"navigation\""], + ["meta.tag.r",">"] +],[ + "start", + ["keyword","<%="], + ["identifier","luadoc"], + ["text","."], + ["identifier","doclet"], + ["text","."], + ["identifier","html"], + ["text","."], + ["identifier","include"], + ["paren.lparen","("], + ["string","\"menu.lp\""], + ["text",", "], + ["paren.lparen","{"], + ["text"," "], + ["identifier","doc"], + ["keyword.operator","="], + ["identifier","doc"], + ["text"," "], + ["paren.rparen","})"], + ["keyword","%>"] +],[ + "start" +],[ + "start", + ["meta.tag",""], + ["text"," "], + ["comment",""] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"content\""], + ["meta.tag.r",">"] +],[ + "start" +],[ + "start" +],[ + "start", + ["keyword","<%if"], + ["text"," "], + ["keyword","not"], + ["text"," "], + ["identifier","options"], + ["text","."], + ["identifier","nomodules"], + ["text"," "], + ["keyword","and"], + ["text"," "], + ["keyword.operator","#"], + ["identifier","doc"], + ["text","."], + ["identifier","modules"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["constant.numeric","0"], + ["text"," "], + ["keyword","then%>"] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","h2"], + ["meta.tag.r",">"], + ["text","Modules"], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name.table","table"], + ["text"," "], + ["entity.other.attribute-name","class"], + ["keyword.operator","="], + ["string","\"module_list\""], + ["meta.tag.r",">"] +],[ + "start", + ["comment",""] +],[ + "start", + ["keyword","<%for"], + ["text"," "], + ["identifier","_"], + ["text",", "], + ["identifier","modulename"], + ["text"," "], + ["keyword","in"], + ["text"," "], + ["support.function","ipairs"], + ["paren.lparen","("], + ["identifier","doc"], + ["text","."], + ["identifier","modules"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","do%>"] +],[ + "start", + ["text","\t"], + ["meta.tag","<"], + ["meta.tag.tag-name.table","tr"], + ["meta.tag.r",">"] +],[ + "start", + ["text","\t\t"], + ["meta.tag","<"], + ["meta.tag.tag-name.table","td"], + ["text"," "], + ["entity.other.attribute-name","class"], + ["keyword.operator","="], + ["string","\"name\""], + ["meta.tag.r",">"], + ["meta.tag","<"], + ["meta.tag.tag-name.anchor","a"], + ["text"," "], + ["entity.other.attribute-name","href"], + ["keyword.operator","="], + ["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",""] +],[ + "start", + ["text","\t\t"], + ["meta.tag","<"], + ["meta.tag.tag-name.table","td"], + ["text"," "], + ["entity.other.attribute-name","class"], + ["keyword.operator","="], + ["string","\"summary\""], + ["meta.tag.r",">"], + ["keyword","<%="], + ["identifier","doc"], + ["text","."], + ["identifier","modules"], + ["paren.lparen","["], + ["identifier","modulename"], + ["paren.rparen","]"], + ["text","."], + ["identifier","summary"], + ["keyword","%>"], + ["meta.tag",""] +],[ + "start", + ["text","\t"], + ["meta.tag",""] +],[ + "start", + ["keyword","<%end%>"] +],[ + "start", + ["meta.tag",""] +],[ + "start", + ["keyword","<%end%>"] +],[ + "start" +],[ + "start" +],[ + "start" +],[ + "start", + ["keyword","<%if"], + ["text"," "], + ["keyword","not"], + ["text"," "], + ["identifier","options"], + ["text","."], + ["identifier","nofiles"], + ["text"," "], + ["keyword","and"], + ["text"," "], + ["keyword.operator","#"], + ["identifier","doc"], + ["text","."], + ["identifier","files"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["constant.numeric","0"], + ["text"," "], + ["keyword","then%>"] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","h2"], + ["meta.tag.r",">"], + ["text","Files"], + ["meta.tag",""] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name.table","table"], + ["text"," "], + ["entity.other.attribute-name","class"], + ["keyword.operator","="], + ["string","\"file_list\""], + ["meta.tag.r",">"] +],[ + "start", + ["comment",""] +],[ + "start", + ["keyword","<%for"], + ["text"," "], + ["identifier","_"], + ["text",", "], + ["identifier","filepath"], + ["text"," "], + ["keyword","in"], + ["text"," "], + ["support.function","ipairs"], + ["paren.lparen","("], + ["identifier","doc"], + ["text","."], + ["identifier","files"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","do%>"] +],[ + "start", + ["text","\t"], + ["meta.tag","<"], + ["meta.tag.tag-name.table","tr"], + ["meta.tag.r",">"] +],[ + "start", + ["text","\t\t"], + ["meta.tag","<"], + ["meta.tag.tag-name.table","td"], + ["text"," "], + ["entity.other.attribute-name","class"], + ["keyword.operator","="], + ["string","\"name\""], + ["meta.tag.r",">"], + ["meta.tag","<"], + ["meta.tag.tag-name.anchor","a"], + ["text"," "], + ["entity.other.attribute-name","href"], + ["keyword.operator","="], + ["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",""] +],[ + "start", + ["text","\t\t"], + ["meta.tag","<"], + ["meta.tag.tag-name.table","td"], + ["text"," "], + ["entity.other.attribute-name","class"], + ["keyword.operator","="], + ["string","\"summary\""], + ["meta.tag.r",">"], + ["meta.tag",""] +],[ + "start", + ["text","\t"], + ["meta.tag",""] +],[ + "start", + ["keyword","<%end%>"] +],[ + "start", + ["meta.tag",""] +],[ + "start", + ["keyword","<%end%>"] +],[ + "start" +],[ + "start", + ["meta.tag",""], + ["text"," "], + ["comment",""] +],[ + "start" +],[ + "start", + ["meta.tag",""], + ["text"," "], + ["comment",""] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"about\""], + ["meta.tag.r",">"] +],[ + "start", + ["text","\t"], + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["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.r",">"], + ["meta.tag","<"], + ["meta.tag.tag-name.image","img"], + ["text"," "], + ["entity.other.attribute-name","src"], + ["keyword.operator","="], + ["string","\"http://www.w3.org/Icons/valid-xhtml10\""], + ["text"," "], + ["entity.other.attribute-name","alt"], + ["keyword.operator","="], + ["string","\"Valid XHTML 1.0!\""], + ["text"," "], + ["entity.other.attribute-name","height"], + ["keyword.operator","="], + ["string","\"31\""], + ["text"," "], + ["entity.other.attribute-name","width"], + ["keyword.operator","="], + ["string","\"88\""], + ["text"," "], + ["meta.tag.r","/>"], + ["meta.tag",""], + ["meta.tag",""] +],[ + "start", + ["meta.tag",""], + ["text"," "], + ["comment",""] +],[ + "start" +],[ + "start", + ["meta.tag",""], + ["text"," "], + ["comment",""], + ["text","\t"] +],[ + "start", + ["meta.tag",""] +],[ + "start", + ["meta.tag",""] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_lucene.json b/lib/ace/mode/_test/tokens_lucene.json index 86a23089..4b75447b 100644 --- a/lib/ace/mode/_test/tokens_lucene.json +++ b/lib/ace/mode/_test/tokens_lucene.json @@ -1,21 +1,17 @@ -[ - { - "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 +[[ + "start", + ["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_markdown.json b/lib/ace/mode/_test/tokens_markdown.json index 2ef5e907..5fe3be82 100644 --- a/lib/ace/mode/_test/tokens_markdown.json +++ b/lib/ace/mode/_test/tokens_markdown.json @@ -1,1191 +1,690 @@ -[ - { - "state": "start", - "data": [ - [ "text", "Ace (Ajax.org Cloud9 Editor)" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.1", "============================" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Ace is a standalone code editor written in JavaScript. Our goal is to create a browser based editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page or JavaScript application. Ace is developed as the primary editor for [" ], - [ "string", "Cloud9 IDE" ], - [ "text", "](" ], - [ "markup.underline", "http://www.cloud9ide.com/" ], - [ "text", ") and the successor of the Mozilla Skywriter (Bespin) Project." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Features" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "--------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Syntax highlighting" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Automatic indent and outdent" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* An optional command line" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Handles huge documents (100,000 lines and more are no problem)" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Fully customizable key bindings including VI and Emacs modes" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Themes (TextMate themes can be imported)" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Search and replace with regular expressions" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Highlight matching parentheses" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Toggle between soft tabs and real tabs" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Displays hidden characters" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Drag and drop text using the mouse" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Line wrapping" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Unstructured / user code folding" ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "* Live syntax checker (currently JavaScript/CoffeeScript)" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Take Ace for a spin!" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "--------------------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Check out the Ace live [" ], - [ "string", "demo" ], - [ "text", "](" ], - [ "markup.underline", "http://ajaxorg.github.com/ace/" ], - [ "text", ") or get a [" ], - [ "string", "Cloud9 IDE account" ], - [ "text", "](" ], - [ "markup.underline", "http://run.cloud9ide.com" ], - [ "text", ") to experience Ace while editing one of your own GitHub projects." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "If you want, you can use Ace as a textarea replacement thanks to the [" ], - [ "string", "Ace Bookmarklet" ], - [ "text", "](" ], - [ "markup.underline", "http://ajaxorg.github.com/ace/build/textarea/editor.html" ], - [ "text", ")." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "History" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "-------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Previously known as “Bespin” and “Skywriter” it’s now known as Ace (Ajax.org Cloud9 Editor)! Bespin and Ace started as two independent projects, both aiming to build a no-compromise code editor component for the web. Bespin started as part of Mozilla Labs and was based on the canvas tag, while Ace is the Editor component of the Cloud9 IDE and is using the DOM for rendering. After the release of Ace at JSConf.eu 2010 in Berlin the Skywriter team decided to merge Ace with a simplified version of Skywriter's plugin system and some of Skywriter's extensibility points. All these changes have been merged back to Ace. Both Ajax.org and Mozilla are actively developing and maintaining Ace." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Getting the code" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "----------------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Ace is a community project. We actively encourage and support contributions. The Ace source code is hosted on GitHub. It is released under the BSD License. This license is very simple, and is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", "```bash" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " git clone git://github.com/ajaxorg/ace.git" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " cd ace" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " git submodule update --init --recursive" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Embedding Ace" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "-------------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "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", "`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", "`src`" ], - [ "text", " subdirectory somewhere into your project and take a look at the included demos of how to use Ace." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "The easiest version is simply:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "html-start", - "data": [ - [ "support.function", "```html" ] - ] - }, - { - "state": "html-start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "div" ], - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"editor\"" ], - [ "meta.tag.r", ">" ], - [ "text", "some text" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "html-start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.script", "script" ], - [ "text", " " ], - [ "entity.other.attribute-name", "src" ], - [ "keyword.operator", "=" ], - [ "string", "\"src/ace.js\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "type" ], - [ "keyword.operator", "=" ], - [ "string", "\"text/javascript\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "charset" ], - [ "keyword.operator", "=" ], - [ "string", "\"utf-8\"" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "html-js-start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.script", "script" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "html-js-regex_allowed", - "data": [ - [ "text", " " ], - [ "storage.type", "window" ], - [ "punctuation.operator", "." ], - [ "entity.name.function", "onload" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "storage.type", "function" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "html-js-regex_allowed", - "data": [ - [ "text", " " ], - [ "storage.type", "var" ], - [ "text", " " ], - [ "identifier", "editor" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "ace" ], - [ "punctuation.operator", "." ], - [ "identifier", "edit" ], - [ "paren.lparen", "(" ], - [ "string", "\"editor\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "html-js-regex_allowed", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "html-start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "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", "`absolute`" ], - [ "text", " or " ], - [ "support.function", "`relative`" ], - [ "text", " for Ace to work. e.g." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "css-start", - "data": [ - [ "support.function", "```css" ] - ] - }, - { - "state": "css-ruleset", - "data": [ - [ "text", " " ], - [ "keyword", "#editor" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "css-ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "position" ], - [ "text", ": " ], - [ "support.constant", "absolute" ], - [ "text", ";" ] - ] - }, - { - "state": "css-ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "width" ], - [ "text", ": " ], - [ "constant.numeric", "500" ], - [ "keyword", "px" ], - [ "text", ";" ] - ] - }, - { - "state": "css-ruleset", - "data": [ - [ "text", " " ], - [ "support.type", "height" ], - [ "text", ": " ], - [ "constant.numeric", "400" ], - [ "keyword", "px" ], - [ "text", ";" ] - ] - }, - { - "state": "css-start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "To change the theme simply include the Theme's JavaScript file" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "html-start", - "data": [ - [ "support.function", "```html" ] - ] - }, - { - "state": "html-start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.script", "script" ], - [ "text", " " ], - [ "entity.other.attribute-name", "src" ], - [ "keyword.operator", "=" ], - [ "string", "\"src/theme-twilight.js\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "type" ], - [ "keyword.operator", "=" ], - [ "string", "\"text/javascript\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "charset" ], - [ "keyword.operator", "=" ], - [ "string", "\"utf-8\"" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "and configure the editor to use the theme:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "js-start", - "data": [ - [ "support.function", "```javascript" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "editor" ], - [ "punctuation.operator", "." ], - [ "identifier", "setTheme" ], - [ "paren.lparen", "(" ], - [ "string", "\"ace/theme/twilight\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "By default the editor only supports plain text mode; many other languages are available as separate modules. After including the mode's JavaScript file:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "html-start", - "data": [ - [ "support.function", "```html" ] - ] - }, - { - "state": "html-start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name.script", "script" ], - [ "text", " " ], - [ "entity.other.attribute-name", "src" ], - [ "keyword.operator", "=" ], - [ "string", "\"src/mode-javascript.js\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "type" ], - [ "keyword.operator", "=" ], - [ "string", "\"text/javascript\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "charset" ], - [ "keyword.operator", "=" ], - [ "string", "\"utf-8\"" ], - [ "meta.tag.r", ">" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Then the mode can be used like this:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "js-start", - "data": [ - [ "support.function", "```javascript" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "storage.type", "var" ], - [ "text", " " ], - [ "identifier", "JavaScriptMode" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "require" ], - [ "paren.lparen", "(" ], - [ "string", "\"ace/mode/javascript\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", "." ], - [ "identifier", "Mode" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "editor" ], - [ "punctuation.operator", "." ], - [ "identifier", "getSession" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", "." ], - [ "identifier", "setMode" ], - [ "paren.lparen", "(" ], - [ "keyword", "new" ], - [ "text", " " ], - [ "identifier", "JavaScriptMode" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", "))" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Documentation" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "-------------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "You find a lot more sample code in the [" ], - [ "string", "demo app" ], - [ "text", "](" ], - [ "markup.underline", "https://github.com/ajaxorg/ace/blob/master/demo/demo.js" ], - [ "text", ")." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "There is also some documentation on the [" ], - [ "string", "wiki page" ], - [ "text", "](" ], - [ "markup.underline", "https://github.com/ajaxorg/ace/wiki" ], - [ "text", ")." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "If you still need help, feel free to drop a mail on the [" ], - [ "string", "ace mailing list" ], - [ "text", "](" ], - [ "markup.underline", "http://groups.google.com/group/ace-discuss" ], - [ "text", ")." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Running Ace" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "-----------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "After the checkout Ace works out of the box. No build step is required. Open 'editor.html' in any browser except Google Chrome. Google Chrome doesn't allow XMLHTTPRequests from files loaded from disc (i.e. with a file:/// URL). To open Ace in Chrome simply start the bundled mini HTTP server:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", "```bash" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " ./static.py" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Or using Node.JS" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", "```bash" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " ./static.js" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "The editor can then be opened at http://localhost:8888/index.html." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Package Ace" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "-----------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "To package Ace we use the dryice build tool developed by the Mozilla Skywriter team. Before you can build you need to make sure that the submodules are up to date." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", "```bash" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " git submodule update --init --recursive" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Afterwards Ace can be built by calling" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", "```bash" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " ./Makefile.dryice.js normal" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "The packaged Ace will be put in the 'build' folder." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "To build the bookmarklet version execute" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", "```bash" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " ./Makefile.dryice.js bm" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Running the Unit Tests" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "----------------------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "The Ace unit tests run on node.js. Before the first run a couple of node modules have to be installed. The easiest way to do this is by using the node package manager (npm). In the Ace base directory simply call" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", "```bash" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " npm link ." ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "To run the tests call:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", "```bash" ] - ] - }, - { - "state": "githubblock", - "data": [ - [ "support.function", " node lib/ace/test/all.js" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "```" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "You can also run the tests in your browser by serving:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", " http://localhost:8888/lib/ace/test/tests.html" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "This makes debugging failing tests way more easier." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Contributing" ] - ] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "------------" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Ace wouldn't be what it is without contributions! Feel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request. To protect the interests of the Ace contributors and users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is the simplest of agreements, requiring that the contributions you make to an ajax.org project are only those you're allowed to make. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes ten minutes, and only needs to be completed once. There are two versions of the agreement:" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "listblock", - "data": [ - [ "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." ] - ] - }, - { - "state": "listblock", - "data": [ - [ "markup.list", "2. [The Corporate CLA](https://github.com/ajaxorg/ace/raw/master/doc/Corporate_Contributor_License_Agreement-v2.pdf): have your corporate lawyer review and submit this if your company is going to be contributing to ajax.org projects" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "If you want to contribute to an ajax.org project please print the CLA and fill it out and sign it. Then either send it by snail mail or fax to us or send it back scanned (or as a photo) by email." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Email: fabian.jakobs@web.de" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Fax: +31 (0) 206388953" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Address: Ajax.org B.V." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " Keizersgracht 241" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " 1016 EA, Amsterdam" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " the Netherlands" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["text","Ace (Ajax.org Cloud9 Editor)"] +],[ + "start", + ["markup.heading.1","============================"] +],[ + "start" +],[ + "start", + ["text","Ace is a standalone code editor written in JavaScript. Our goal is to create a browser based editor that matches and extends the features, usability and performance of existing native editors such as TextMate, Vim or Eclipse. It can be easily embedded in any web page or JavaScript application. Ace is developed as the primary editor for ["], + ["string","Cloud9 IDE"], + ["text","]("], + ["markup.underline","http://www.cloud9ide.com/"], + ["text",") and the successor of the Mozilla Skywriter (Bespin) Project."] +],[ + "start" +],[ + "start", + ["text","Features"] +],[ + "start", + ["markup.heading.2","--------"] +],[ + "start" +],[ + "listblock", + ["markup.list","* Syntax highlighting"] +],[ + "listblock", + ["markup.list","* Automatic indent and outdent"] +],[ + "listblock", + ["markup.list","* An optional command line"] +],[ + "listblock", + ["markup.list","* Handles huge documents (100,000 lines and more are no problem)"] +],[ + "listblock", + ["markup.list","* Fully customizable key bindings including VI and Emacs modes"] +],[ + "listblock", + ["markup.list","* Themes (TextMate themes can be imported)"] +],[ + "listblock", + ["markup.list","* Search and replace with regular expressions"] +],[ + "listblock", + ["markup.list","* Highlight matching parentheses"] +],[ + "listblock", + ["markup.list","* Toggle between soft tabs and real tabs"] +],[ + "listblock", + ["markup.list","* Displays hidden characters"] +],[ + "listblock", + ["markup.list","* Drag and drop text using the mouse"] +],[ + "listblock", + ["markup.list","* Line wrapping"] +],[ + "listblock", + ["markup.list","* Unstructured / user code folding"] +],[ + "listblock", + ["markup.list","* Live syntax checker (currently JavaScript/CoffeeScript)"] +],[ + "start" +],[ + "start", + ["text","Take Ace for a spin!"] +],[ + "start", + ["markup.heading.2","--------------------"] +],[ + "start" +],[ + "start", + ["text","Check out the Ace live ["], + ["string","demo"], + ["text","]("], + ["markup.underline","http://ajaxorg.github.com/ace/"], + ["text",") or get a ["], + ["string","Cloud9 IDE account"], + ["text","]("], + ["markup.underline","http://run.cloud9ide.com"], + ["text",") to experience Ace while editing one of your own GitHub projects."] +],[ + "start" +],[ + "start", + ["text","If you want, you can use Ace as a textarea replacement thanks to the ["], + ["string","Ace Bookmarklet"], + ["text","]("], + ["markup.underline","http://ajaxorg.github.com/ace/build/textarea/editor.html"], + ["text",")."] +],[ + "start" +],[ + "start", + ["text","History"] +],[ + "start", + ["markup.heading.2","-------"] +],[ + "start" +],[ + "start", + ["text","Previously known as “Bespin” and “Skywriter” it’s now known as Ace (Ajax.org Cloud9 Editor)! Bespin and Ace started as two independent projects, both aiming to build a no-compromise code editor component for the web. Bespin started as part of Mozilla Labs and was based on the canvas tag, while Ace is the Editor component of the Cloud9 IDE and is using the DOM for rendering. After the release of Ace at JSConf.eu 2010 in Berlin the Skywriter team decided to merge Ace with a simplified version of Skywriter's plugin system and some of Skywriter's extensibility points. All these changes have been merged back to Ace. Both Ajax.org and Mozilla are actively developing and maintaining Ace."] +],[ + "start" +],[ + "start", + ["text","Getting the code"] +],[ + "start", + ["markup.heading.2","----------------"] +],[ + "start" +],[ + "start", + ["text","Ace is a community project. We actively encourage and support contributions. The Ace source code is hosted on GitHub. It is released under the BSD License. This license is very simple, and is friendly to all kinds of projects, whether open source or not. Take charge of your editor and add your favorite language highlighting and keybindings!"] +],[ + "start" +],[ + "githubblock", + ["support.function","```bash"] +],[ + "githubblock", + ["support.function"," git clone git://github.com/ajaxorg/ace.git"] +],[ + "githubblock", + ["support.function"," cd ace"] +],[ + "githubblock", + ["support.function"," git submodule update --init --recursive"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","Embedding Ace"] +],[ + "start", + ["markup.heading.2","-------------"] +],[ + "start" +],[ + "start", + ["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","`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","`src`"], + ["text"," subdirectory somewhere into your project and take a look at the included demos of how to use Ace."] +],[ + "start" +],[ + "start", + ["text","The easiest version is simply:"] +],[ + "start" +],[ + "html-start", + ["support.function","```html"] +],[ + "html-start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","div"], + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"editor\""], + ["meta.tag.r",">"], + ["text","some text"], + ["meta.tag",""] +],[ + "html-start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name.script","script"], + ["text"," "], + ["entity.other.attribute-name","src"], + ["keyword.operator","="], + ["string","\"src/ace.js\""], + ["text"," "], + ["entity.other.attribute-name","type"], + ["keyword.operator","="], + ["string","\"text/javascript\""], + ["text"," "], + ["entity.other.attribute-name","charset"], + ["keyword.operator","="], + ["string","\"utf-8\""], + ["meta.tag.r",">"], + ["meta.tag",""] +],[ + "html-js-start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name.script","script"], + ["meta.tag.r",">"] +],[ + "html-js-regex_allowed", + ["text"," "], + ["storage.type","window"], + ["punctuation.operator","."], + ["entity.name.function","onload"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["storage.type","function"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "html-js-regex_allowed", + ["text"," "], + ["storage.type","var"], + ["text"," "], + ["identifier","editor"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","ace"], + ["punctuation.operator","."], + ["identifier","edit"], + ["paren.lparen","("], + ["string","\"editor\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "html-js-regex_allowed", + ["text"," "], + ["paren.rparen","}"], + ["punctuation.operator",";"] +],[ + "html-start", + ["text"," "], + ["meta.tag",""] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["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","`absolute`"], + ["text"," or "], + ["support.function","`relative`"], + ["text"," for Ace to work. e.g."] +],[ + "start" +],[ + "css-start", + ["support.function","```css"] +],[ + "css-ruleset", + ["text"," "], + ["keyword","#editor"], + ["text"," "], + ["paren.lparen","{"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","position"], + ["text",": "], + ["support.constant","absolute"], + ["text",";"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","width"], + ["text",": "], + ["constant.numeric","500"], + ["keyword","px"], + ["text",";"] +],[ + "css-ruleset", + ["text"," "], + ["support.type","height"], + ["text",": "], + ["constant.numeric","400"], + ["keyword","px"], + ["text",";"] +],[ + "css-start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","To change the theme simply include the Theme's JavaScript file"] +],[ + "start" +],[ + "html-start", + ["support.function","```html"] +],[ + "html-start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name.script","script"], + ["text"," "], + ["entity.other.attribute-name","src"], + ["keyword.operator","="], + ["string","\"src/theme-twilight.js\""], + ["text"," "], + ["entity.other.attribute-name","type"], + ["keyword.operator","="], + ["string","\"text/javascript\""], + ["text"," "], + ["entity.other.attribute-name","charset"], + ["keyword.operator","="], + ["string","\"utf-8\""], + ["meta.tag.r",">"], + ["meta.tag",""] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","and configure the editor to use the theme:"] +],[ + "start" +],[ + "js-start", + ["support.function","```javascript"] +],[ + "js-regex_allowed", + ["text"," "], + ["identifier","editor"], + ["punctuation.operator","."], + ["identifier","setTheme"], + ["paren.lparen","("], + ["string","\"ace/theme/twilight\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","By default the editor only supports plain text mode; many other languages are available as separate modules. After including the mode's JavaScript file:"] +],[ + "start" +],[ + "html-start", + ["support.function","```html"] +],[ + "html-start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name.script","script"], + ["text"," "], + ["entity.other.attribute-name","src"], + ["keyword.operator","="], + ["string","\"src/mode-javascript.js\""], + ["text"," "], + ["entity.other.attribute-name","type"], + ["keyword.operator","="], + ["string","\"text/javascript\""], + ["text"," "], + ["entity.other.attribute-name","charset"], + ["keyword.operator","="], + ["string","\"utf-8\""], + ["meta.tag.r",">"], + ["meta.tag",""] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","Then the mode can be used like this:"] +],[ + "start" +],[ + "js-start", + ["support.function","```javascript"] +],[ + "js-regex_allowed", + ["text"," "], + ["storage.type","var"], + ["text"," "], + ["identifier","JavaScriptMode"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","require"], + ["paren.lparen","("], + ["string","\"ace/mode/javascript\""], + ["paren.rparen",")"], + ["punctuation.operator","."], + ["identifier","Mode"], + ["punctuation.operator",";"] +],[ + "js-regex_allowed", + ["text"," "], + ["identifier","editor"], + ["punctuation.operator","."], + ["identifier","getSession"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["punctuation.operator","."], + ["identifier","setMode"], + ["paren.lparen","("], + ["keyword","new"], + ["text"," "], + ["identifier","JavaScriptMode"], + ["paren.lparen","("], + ["paren.rparen","))"], + ["punctuation.operator",";"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","Documentation"] +],[ + "start", + ["markup.heading.2","-------------"] +],[ + "start" +],[ + "start", + ["text","You find a lot more sample code in the ["], + ["string","demo app"], + ["text","]("], + ["markup.underline","https://github.com/ajaxorg/ace/blob/master/demo/demo.js"], + ["text",")."] +],[ + "start" +],[ + "start", + ["text","There is also some documentation on the ["], + ["string","wiki page"], + ["text","]("], + ["markup.underline","https://github.com/ajaxorg/ace/wiki"], + ["text",")."] +],[ + "start" +],[ + "start", + ["text","If you still need help, feel free to drop a mail on the ["], + ["string","ace mailing list"], + ["text","]("], + ["markup.underline","http://groups.google.com/group/ace-discuss"], + ["text",")."] +],[ + "start" +],[ + "start", + ["text","Running Ace"] +],[ + "start", + ["markup.heading.2","-----------"] +],[ + "start" +],[ + "start", + ["text","After the checkout Ace works out of the box. No build step is required. Open 'editor.html' in any browser except Google Chrome. Google Chrome doesn't allow XMLHTTPRequests from files loaded from disc (i.e. with a file:/// URL). To open Ace in Chrome simply start the bundled mini HTTP server:"] +],[ + "start" +],[ + "githubblock", + ["support.function","```bash"] +],[ + "githubblock", + ["support.function"," ./static.py"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","Or using Node.JS"] +],[ + "start" +],[ + "githubblock", + ["support.function","```bash"] +],[ + "githubblock", + ["support.function"," ./static.js"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","The editor can then be opened at http://localhost:8888/index.html."] +],[ + "start" +],[ + "start", + ["text","Package Ace"] +],[ + "start", + ["markup.heading.2","-----------"] +],[ + "start" +],[ + "start", + ["text","To package Ace we use the dryice build tool developed by the Mozilla Skywriter team. Before you can build you need to make sure that the submodules are up to date."] +],[ + "start" +],[ + "githubblock", + ["support.function","```bash"] +],[ + "githubblock", + ["support.function"," git submodule update --init --recursive"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","Afterwards Ace can be built by calling"] +],[ + "start" +],[ + "githubblock", + ["support.function","```bash"] +],[ + "githubblock", + ["support.function"," ./Makefile.dryice.js normal"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","The packaged Ace will be put in the 'build' folder."] +],[ + "start" +],[ + "start", + ["text","To build the bookmarklet version execute"] +],[ + "start" +],[ + "githubblock", + ["support.function","```bash"] +],[ + "githubblock", + ["support.function"," ./Makefile.dryice.js bm"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","Running the Unit Tests"] +],[ + "start", + ["markup.heading.2","----------------------"] +],[ + "start" +],[ + "start", + ["text","The Ace unit tests run on node.js. Before the first run a couple of node modules have to be installed. The easiest way to do this is by using the node package manager (npm). In the Ace base directory simply call"] +],[ + "start" +],[ + "githubblock", + ["support.function","```bash"] +],[ + "githubblock", + ["support.function"," npm link ."] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","To run the tests call:"] +],[ + "start" +],[ + "githubblock", + ["support.function","```bash"] +],[ + "githubblock", + ["support.function"," node lib/ace/test/all.js"] +],[ + "start", + ["support.function","```"] +],[ + "start" +],[ + "start", + ["text","You can also run the tests in your browser by serving:"] +],[ + "start" +],[ + "start", + ["support.function"," http://localhost:8888/lib/ace/test/tests.html"] +],[ + "start" +],[ + "start", + ["text","This makes debugging failing tests way more easier."] +],[ + "start" +],[ + "start", + ["text","Contributing"] +],[ + "start", + ["markup.heading.2","------------"] +],[ + "start" +],[ + "start", + ["text","Ace wouldn't be what it is without contributions! Feel free to fork and improve/enhance Ace any way you want. If you feel that the editor or the Ace community will benefit from your changes, please open a pull request. To protect the interests of the Ace contributors and users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is the simplest of agreements, requiring that the contributions you make to an ajax.org project are only those you're allowed to make. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes ten minutes, and only needs to be completed once. There are two versions of the agreement:"] +],[ + "start" +],[ + "listblock", + ["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."] +],[ + "listblock", + ["markup.list","2. [The Corporate CLA](https://github.com/ajaxorg/ace/raw/master/doc/Corporate_Contributor_License_Agreement-v2.pdf): have your corporate lawyer review and submit this if your company is going to be contributing to ajax.org projects"] +],[ + "start" +],[ + "start", + ["text","If you want to contribute to an ajax.org project please print the CLA and fill it out and sign it. Then either send it by snail mail or fax to us or send it back scanned (or as a photo) by email."] +],[ + "start" +],[ + "start", + ["text","Email: fabian.jakobs@web.de"] +],[ + "start" +],[ + "start", + ["text","Fax: +31 (0) 206388953"] +],[ + "start" +],[ + "start", + ["text","Address: Ajax.org B.V."] +],[ + "start", + ["text"," Keizersgracht 241"] +],[ + "start", + ["text"," 1016 EA, Amsterdam"] +],[ + "start", + ["text"," the Netherlands"] +]] \ 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 d2a77f3d..c6582d20 100644 --- a/lib/ace/mode/_test/tokens_objectivec.json +++ b/lib/ace/mode/_test/tokens_objectivec.json @@ -1,1080 +1,792 @@ -[ - { - "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", "\\\"\\?" ], - [ "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", "+=" ], - [ "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", "))" ] - ] - }, - { - "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" ], - [ "constant.other", " " ] - ] - }, - { - "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", "@selector" ], - [ "punctuation", "(" ], - [ "support.function.any-method.name-of-parameter.objc", "lowercaseString" ], - [ "punctuation", ")" ], - [ "text", " " ], - [ "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", "[[" ], - [ "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", "]]" ], - [ "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", "[[" ], - [ "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" ], - [ "constant.other", " Nil" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "#define" ], - [ "constant.other", " Nil __DARWIN_NULL " ], - [ "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 +[[ + "start", + ["storage.type.objc","@"], + ["punctuation.definition.storage.type.objc","protocol"], + ["entity.name.type.objc"," Printing"], + ["text",": "], + ["entity.other.inherited-class.objc","someParent"] +],[ + "start", + ["meta.function.objc","-"], + ["paren.lparen","("], + ["storage.type","void"], + ["paren.rparen",")"], + ["text"," "], + ["identifier","print"], + ["punctuation.operator",";"] +],[ + "start", + ["storage.type.objc","@end"] +],[ + "start" +],[ + "start", + ["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","{"] +],[ + "start", + ["text"," "], + ["storage.type","int"], + ["text"," "], + ["identifier","numerator"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["storage.type","int"], + ["text"," "], + ["identifier","denominator"], + ["punctuation.operator",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start", + ["storage.type.objc","@end"] +],[ + "start" +],[ + "start", + ["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","\\\"\\?"], + ["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","\""] +],[ + "start", + ["string.begin.objc","@\""], + ["constant.character.escape.objc","\\xSF42"], + ["punctuation.definition.string.end","\""] +],[ + "start" +],[ + "start", + ["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","{"] +],[ + "start" +],[ + "start", + ["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",";"] +],[ + "start" +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["text"," "], + ["keyword.control.macro.objc","NS_DURING"], + ["text"," "], + ["keyword.control.macro.objc","NS_HANDLER"], + ["text"," "], + ["keyword.control.macro.objc","NS_ENDHANDLER"] +],[ + "start" +],[ + "start", + ["punctuation.definition.keyword.objc","@"], + ["keyword.control.exception.objc","try"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword.control","if"], + ["text"," "], + ["paren.lparen","("], + ["identifier","argc"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["constant.numeric","1"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["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",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"], + ["text"," "] +],[ + "start", + ["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","{"] +],[ + "start", + ["text"," "], + ["support.function.cocoa","NSLog"], + ["paren.lparen","("], + ["string.begin.objc","@\""], + ["string","%@"], + ["punctuation.definition.string.end","\""], + ["punctuation.operator",","], + ["text"," "], + ["identifier","theException"], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["identifier","result"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","1"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["paren.rparen","}"], + ["text"," "] +],[ + "start", + ["punctuation.definition.keyword.objc","@"], + ["keyword.control.exception.objc","finally"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["support.function.cocoa","NSLog"], + ["paren.lparen","("], + ["string.begin.objc","@\""], + ["string","This always happens."], + ["punctuation.definition.string.end","\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["identifier","result"], + ["text"," "], + ["keyword.operator","+="], + ["text"," "], + ["constant.numeric","2"], + ["text"," "], + ["punctuation.operator",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["text"," "], + ["punctuation.definition.storage.modifier.objc","@"], + ["storage.modifier.objc","synchronized"], + ["paren.lparen","("], + ["identifier","lock"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["support.function.cocoa","NSLog"], + ["paren.lparen","("], + ["string.begin.objc","@\""], + ["string","Hello World"], + ["punctuation.definition.string.end","\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["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","}"] +],[ + "start" +],[ + "start", + ["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",";"] +],[ + "start" +],[ + "start", + ["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"," "] +],[ + "start" +],[ + "start" +],[ + "start", + ["text"," "], + ["punctuation.definition.storage.type.objc","@"], + ["storage.type.objc","class"], + ["text"," "], + ["punctuation.definition.storage.type.objc","@"], + ["storage.type.objc","protocol"] +],[ + "start" +],[ + "start", + ["punctuation.definition.storage.modifier.objc","@"], + ["storage.modifier.objc","public"] +],[ + "start", + ["text"," "], + ["comment","// instance variables"] +],[ + "start", + ["punctuation.definition.storage.modifier.objc","@"], + ["storage.modifier.objc","package"] +],[ + "start", + ["text"," "], + ["comment","// instance variables"] +],[ + "start", + ["punctuation.definition.storage.modifier.objc","@"], + ["storage.modifier.objc","protected"] +],[ + "start", + ["text"," "], + ["comment","// instance variables"] +],[ + "start", + ["punctuation.definition.storage.modifier.objc","@"], + ["storage.modifier.objc","private"] +],[ + "start", + ["text"," "], + ["comment","// instance variables"] +],[ + "start" +],[ + "start", + ["text"," "], + ["constant.language.objc","YES"], + ["text"," "], + ["constant.language.objc","NO"], + ["text"," "], + ["constant.language.objc","Nil"], + ["text"," "], + ["constant.language.objc","nil"] +],[ + "start", + ["support.variable.foundation","NSApp"], + ["paren.lparen","("], + ["paren.rparen",")"] +],[ + "start", + ["support.function.cocoa.leopard","NSRectToCGRect"], + ["text"," "], + ["paren.lparen","("], + ["identifier","Protocol"], + ["text"," "], + ["identifier","ProtocolFromString"], + ["punctuation.operator",":"], + ["string","\"NSTableViewDelegate\""], + ["paren.rparen","))"] +],[ + "start" +],[ + "start", + ["punctuation.section.scope.begin.objc","["], + ["identifier","SPPoint"], + ["text"," "], + ["support.function.any-method.objc","pointFromCGPoint:"], + ["identifier","self"], + ["punctuation.operator","."], + ["identifier","position"], + ["paren.rparen","]"] +],[ + "start" +],[ + "start", + ["support.function.cocoa","NSRoundDownToMultipleOfPageSize"] +],[ + "start" +],[ + "start", + ["keyword","#import"], + ["constant.other"," "] +],[ + "start" +],[ + "start", + ["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","{"] +],[ + "start", + ["text"," "], + ["support.function.C99.c","printf"], + ["paren.lparen","("], + ["text"," "], + ["string","\"hello world\\n\""], + ["text"," "], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["keyword.control","return"], + ["text"," "], + ["constant.numeric","0"], + ["punctuation.operator",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["support.class.cocoa","NSChangeSpelling"] +],[ + "start" +],[ + "start", + ["string.begin.objc","@\""], + ["string","0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count"], + ["punctuation.definition.string.end","\""] +],[ + "start" +],[ + "start", + ["punctuation.definition.storage.type.objc","@selector"], + ["punctuation","("], + ["support.function.any-method.name-of-parameter.objc","lowercaseString"], + ["punctuation",")"], + ["text"," "], + ["punctuation.definition.storage.type.objc","@selector"], + ["punctuation","("], + ["support.function.any-method.name-of-parameter.objc","uppercaseString:"], + ["punctuation",")"] +],[ + "start" +],[ + "start", + ["identifier","NSFetchRequest"], + ["text"," "], + ["keyword.operator","*"], + ["identifier","localRequest"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["punctuation.section.scope.begin.objc","[["], + ["identifier","NSFetchRequest"], + ["text"," "], + ["support.function.any-method.objc","alloc"], + ["paren.rparen","]"], + ["text"," "], + ["identifier","init"], + ["paren.rparen","]"], + ["punctuation.operator",";"], + ["text"," "] +],[ + "start", + ["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"," "] +],[ + "start", + ["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","]]"], + ["punctuation.operator",";"], + ["text"," "] +],[ + "start", + ["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",";"] +],[ + "start", + ["punctuation.section.scope.begin.objc","["], + ["support.class.cocoa","NSPredicate"], + ["text"," "], + ["support.function.any-method.objc","predicateWithFormat:"], + ["paren.rparen","]"] +],[ + "start", + ["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",";"] +],[ + "start", + ["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",";"] +],[ + "start", + ["support.class.cocoa","NSArray"], + ["text"," "], + ["keyword.operator","*"], + ["identifier","filteredKeys"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["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"," "] +],[ + "start" +],[ + "start", + ["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",";"] +],[ + "start", + ["identifier","localRequest"], + ["punctuation.operator","."], + ["identifier","fetchBatchSize"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","100"], + ["punctuation.operator",";"] +],[ + "start", + ["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",";"] +],[ + "start" +],[ + "start", + ["punctuation.section.scope.begin.objc","["], + ["identifier","localRequest"], + ["text"," "], + ["support.function.any-method.objc","release"], + ["paren.rparen","]"], + ["punctuation.operator",";"] +],[ + "start" +],[ + "start", + ["keyword","#ifndef"], + ["constant.other"," Nil"] +],[ + "start", + ["keyword","#define"], + ["constant.other"," Nil __DARWIN_NULL "], + ["comment","/* id of Nil class */"] +],[ + "start", + ["keyword","#endif"] +],[ + "start" +],[ + "start", + ["storage.type.objc","@implementation"], + ["entity.name.type.objc"," MyObject"] +],[ + "start", + ["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"] +],[ + "start", + ["text"," "], + ["identifier","height"], + ["punctuation.operator",":"], + ["paren.lparen","("], + ["storage.type","unsigned"], + ["text"," "], + ["storage.type","int"], + ["paren.rparen",")"], + ["identifier","height"] +],[ + "start", + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword.control","return"], + ["text"," "], + ["identifier","width"], + ["keyword.operator","*"], + ["identifier","height"], + ["punctuation.operator",";"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start", + ["storage.type.objc","@end"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_ocaml.json b/lib/ace/mode/_test/tokens_ocaml.json index 5985f5ea..73e3cfcd 100644 --- a/lib/ace/mode/_test/tokens_ocaml.json +++ b/lib/ace/mode/_test/tokens_ocaml.json @@ -1,252 +1,200 @@ -[ - { - "state": "comment", - "data": [ - [ "comment", "(*" ] - ] - }, - { - "state": "comment", - "data": [ - [ "comment", " * Example of early return implementation taken from" ] - ] - }, - { - "state": "comment", - "data": [ - [ "comment", " * http://ocaml.janestreet.com/?q=node/91" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", " *)" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "let" ], - [ "text", " " ], - [ "identifier", "with_return" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "keyword", "type" ], - [ "text", " " ], - [ "identifier", "t" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "f" ], - [ "text", " : " ], - [ "identifier", "_" ], - [ "text", " " ], - [ "keyword.operator", "->" ], - [ "text", " " ], - [ "identifier", "t" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword.operator", "=" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "let" ], - [ "text", " " ], - [ "keyword", "module" ], - [ "text", " " ], - [ "identifier", "M" ], - [ "text", " " ], - [ "keyword.operator", "=" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "struct" ], - [ "text", " " ], - [ "keyword", "exception" ], - [ "text", " " ], - [ "identifier", "Return" ], - [ "text", " " ], - [ "keyword", "of" ], - [ "text", " " ], - [ "identifier", "t" ], - [ "text", " " ], - [ "keyword", "end" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "in" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "let" ], - [ "text", " " ], - [ "identifier", "return" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "text", " " ], - [ "identifier", "return" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "keyword", "fun" ], - [ "text", " " ], - [ "identifier", "x" ], - [ "text", " " ], - [ "keyword.operator", "->" ], - [ "text", " " ], - [ "support.function", "raise" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "M" ], - [ "text", "." ], - [ "identifier", "Return" ], - [ "text", " " ], - [ "identifier", "x" ], - [ "paren.rparen", "))" ], - [ "text", "; " ], - [ "paren.rparen", "}" ], - [ "text", " " ], - [ "keyword", "in" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "try" ], - [ "text", " " ], - [ "identifier", "f" ], - [ "text", " " ], - [ "identifier", "return" ], - [ "text", " " ], - [ "keyword", "with" ], - [ "text", " " ], - [ "identifier", "M" ], - [ "text", "." ], - [ "identifier", "Return" ], - [ "text", " " ], - [ "identifier", "x" ], - [ "text", " " ], - [ "keyword.operator", "->" ], - [ "text", " " ], - [ "identifier", "x" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "(* Function that uses the 'early return' functionality provided by `with_return` *)" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "let" ], - [ "text", " " ], - [ "identifier", "sum_until_first_negative" ], - [ "text", " " ], - [ "support.function", "list" ], - [ "text", " " ], - [ "keyword.operator", "=" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "with_return" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "keyword", "fun" ], - [ "text", " " ], - [ "identifier", "r" ], - [ "text", " " ], - [ "keyword.operator", "->" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function", "List" ], - [ "text", "." ], - [ "support.function", "fold" ], - [ "text", " " ], - [ "support.function", "list" ], - [ "text", " " ], - [ "keyword.operator", "~" ], - [ "support.function", "init" ], - [ "text", ":" ], - [ "constant.numeric", "0" ], - [ "text", " " ], - [ "keyword.operator", "~" ], - [ "identifier", "f" ], - [ "text", ":" ], - [ "paren.lparen", "(" ], - [ "keyword", "fun" ], - [ "text", " " ], - [ "identifier", "acc" ], - [ "text", " " ], - [ "identifier", "x" ], - [ "text", " " ], - [ "keyword.operator", "->" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "identifier", "x" ], - [ "text", " " ], - [ "keyword.operator", ">=" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "text", " " ], - [ "keyword", "then" ], - [ "text", " " ], - [ "identifier", "acc" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "identifier", "x" ], - [ "text", " " ], - [ "keyword", "else" ], - [ "text", " " ], - [ "identifier", "r" ], - [ "text", "." ], - [ "identifier", "return" ], - [ "text", " " ], - [ "identifier", "acc" ], - [ "paren.rparen", "))" ] - ] - } -] \ No newline at end of file +[[ + "comment", + ["comment","(*"] +],[ + "comment", + ["comment"," * Example of early return implementation taken from"] +],[ + "comment", + ["comment"," * http://ocaml.janestreet.com/?q=node/91"] +],[ + "start", + ["comment"," *)"] +],[ + "start" +],[ + "start", + ["keyword","let"], + ["text"," "], + ["identifier","with_return"], + ["text"," "], + ["paren.lparen","("], + ["keyword","type"], + ["text"," "], + ["identifier","t"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","("], + ["identifier","f"], + ["text"," : "], + ["identifier","_"], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["identifier","t"], + ["paren.rparen",")"], + ["text"," "], + ["keyword.operator","="] +],[ + "start", + ["text"," "], + ["keyword","let"], + ["text"," "], + ["keyword","module"], + ["text"," "], + ["identifier","M"], + ["text"," "], + ["keyword.operator","="] +],[ + "start", + ["text"," "], + ["keyword","struct"], + ["text"," "], + ["keyword","exception"], + ["text"," "], + ["identifier","Return"], + ["text"," "], + ["keyword","of"], + ["text"," "], + ["identifier","t"], + ["text"," "], + ["keyword","end"] +],[ + "start", + ["text"," "], + ["keyword","in"] +],[ + "start", + ["text"," "], + ["keyword","let"], + ["text"," "], + ["identifier","return"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","{"], + ["text"," "], + ["identifier","return"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["keyword","fun"], + ["text"," "], + ["identifier","x"], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["support.function","raise"], + ["text"," "], + ["paren.lparen","("], + ["identifier","M"], + ["text","."], + ["identifier","Return"], + ["text"," "], + ["identifier","x"], + ["paren.rparen","))"], + ["text","; "], + ["paren.rparen","}"], + ["text"," "], + ["keyword","in"] +],[ + "start", + ["text"," "], + ["keyword","try"], + ["text"," "], + ["identifier","f"], + ["text"," "], + ["identifier","return"], + ["text"," "], + ["keyword","with"], + ["text"," "], + ["identifier","M"], + ["text","."], + ["identifier","Return"], + ["text"," "], + ["identifier","x"], + ["text"," "], + ["keyword.operator","->"], + ["text"," "], + ["identifier","x"] +],[ + "start" +],[ + "start" +],[ + "start", + ["comment","(* Function that uses the 'early return' functionality provided by `with_return` *)"] +],[ + "start", + ["keyword","let"], + ["text"," "], + ["identifier","sum_until_first_negative"], + ["text"," "], + ["support.function","list"], + ["text"," "], + ["keyword.operator","="] +],[ + "start", + ["text"," "], + ["identifier","with_return"], + ["text"," "], + ["paren.lparen","("], + ["keyword","fun"], + ["text"," "], + ["identifier","r"], + ["text"," "], + ["keyword.operator","->"] +],[ + "start", + ["text"," "], + ["support.function","List"], + ["text","."], + ["support.function","fold"], + ["text"," "], + ["support.function","list"], + ["text"," "], + ["keyword.operator","~"], + ["support.function","init"], + ["text",":"], + ["constant.numeric","0"], + ["text"," "], + ["keyword.operator","~"], + ["identifier","f"], + ["text",":"], + ["paren.lparen","("], + ["keyword","fun"], + ["text"," "], + ["identifier","acc"], + ["text"," "], + ["identifier","x"], + ["text"," "], + ["keyword.operator","->"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["identifier","x"], + ["text"," "], + ["keyword.operator",">="], + ["text"," "], + ["constant.numeric","0"], + ["text"," "], + ["keyword","then"], + ["text"," "], + ["identifier","acc"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["identifier","x"], + ["text"," "], + ["keyword","else"], + ["text"," "], + ["identifier","r"], + ["text","."], + ["identifier","return"], + ["text"," "], + ["identifier","acc"], + ["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 4eca7629..9822a8bd 100644 --- a/lib/ace/mode/_test/tokens_perl.json +++ b/lib/ace/mode/_test/tokens_perl.json @@ -1,309 +1,214 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "#!/usr/bin/perl" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "use" ], - [ "text", " " ], - [ "identifier", "strict" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "use" ], - [ "text", " " ], - [ "identifier", "warnings" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "my" ], - [ "text", " " ], - [ "identifier", "$num_primes" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "my" ], - [ "text", " @" ], - [ "identifier", "primes" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "# Put 2 as the first prime so we won't have an empty array" ] - ] - }, - { - "state": "start", - "data": [ - [ "identifier", "$primes" ], - [ "lparen", "[" ], - [ "identifier", "$num_primes" ], - [ "rparen", "]" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "2" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "identifier", "$num_primes" ], - [ "keyword.operator", "++" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "identifier", "MAIN_LOOP" ], - [ "text", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "for" ], - [ "text", " " ], - [ "keyword", "my" ], - [ "text", " " ], - [ "identifier", "$number_to_check" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "constant.numeric", "3" ], - [ "text", " " ], - [ "keyword.operator", ".." ], - [ "text", " " ], - [ "constant.numeric", "200" ], - [ "rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "for" ], - [ "text", " " ], - [ "keyword", "my" ], - [ "text", " " ], - [ "identifier", "$p" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "constant.numeric", "0" ], - [ "text", " " ], - [ "keyword.operator", ".." ], - [ "text", " " ], - [ "lparen", "(" ], - [ "identifier", "$num_primes" ], - [ "constant.numeric", "-1" ], - [ "rparen", "))" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "identifier", "$number_to_check" ], - [ "text", " " ], - [ "keyword.operator", "%" ], - [ "text", " " ], - [ "identifier", "$primes" ], - [ "lparen", "[" ], - [ "identifier", "$p" ], - [ "rparen", "]" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "next" ], - [ "text", " " ], - [ "identifier", "MAIN_LOOP" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "# If we reached this point it means $number_to_check is not" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "# divisable by any prime number that came before it." ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "$primes" ], - [ "lparen", "[" ], - [ "identifier", "$num_primes" ], - [ "rparen", "]" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "$number_to_check" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "$num_primes" ], - [ "keyword.operator", "++" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "for" ], - [ "text", " " ], - [ "keyword", "my" ], - [ "text", " " ], - [ "identifier", "$p" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "constant.numeric", "0" ], - [ "text", " " ], - [ "keyword.operator", ".." ], - [ "text", " " ], - [ "lparen", "(" ], - [ "identifier", "$num_primes" ], - [ "constant.numeric", "-1" ], - [ "rparen", "))" ] - ] - }, - { - "state": "start", - "data": [ - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function", "print" ], - [ "text", " " ], - [ "identifier", "$primes" ], - [ "lparen", "[" ], - [ "identifier", "$p" ], - [ "rparen", "]" ], - [ "keyword.operator", "," ], - [ "text", " " ], - [ "string", "\", \"" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.function", "print" ], - [ "text", " " ], - [ "string", "\"\\n\"" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "start", + ["comment","#!/usr/bin/perl"] +],[ + "start", + ["keyword","use"], + ["text"," "], + ["identifier","strict"], + ["text",";"] +],[ + "start", + ["keyword","use"], + ["text"," "], + ["identifier","warnings"], + ["text",";"] +],[ + "start", + ["keyword","my"], + ["text"," "], + ["identifier","$num_primes"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0"], + ["text",";"] +],[ + "start", + ["keyword","my"], + ["text"," @"], + ["identifier","primes"], + ["text",";"] +],[ + "start" +],[ + "start", + ["comment","# Put 2 as the first prime so we won't have an empty array"] +],[ + "start", + ["identifier","$primes"], + ["lparen","["], + ["identifier","$num_primes"], + ["rparen","]"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","2"], + ["text",";"] +],[ + "start", + ["identifier","$num_primes"], + ["keyword.operator","++"], + ["text",";"] +],[ + "start" +],[ + "start", + ["identifier","MAIN_LOOP"], + ["text",":"] +],[ + "start", + ["keyword","for"], + ["text"," "], + ["keyword","my"], + ["text"," "], + ["identifier","$number_to_check"], + ["text"," "], + ["lparen","("], + ["constant.numeric","3"], + ["text"," "], + ["keyword.operator",".."], + ["text"," "], + ["constant.numeric","200"], + ["rparen",")"] +],[ + "start", + ["lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","for"], + ["text"," "], + ["keyword","my"], + ["text"," "], + ["identifier","$p"], + ["text"," "], + ["lparen","("], + ["constant.numeric","0"], + ["text"," "], + ["keyword.operator",".."], + ["text"," "], + ["lparen","("], + ["identifier","$num_primes"], + ["constant.numeric","-1"], + ["rparen","))"] +],[ + "start", + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["lparen","("], + ["identifier","$number_to_check"], + ["text"," "], + ["keyword.operator","%"], + ["text"," "], + ["identifier","$primes"], + ["lparen","["], + ["identifier","$p"], + ["rparen","]"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["constant.numeric","0"], + ["rparen",")"] +],[ + "start", + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","next"], + ["text"," "], + ["identifier","MAIN_LOOP"], + ["text",";"] +],[ + "start", + ["text"," "], + ["rparen","}"] +],[ + "start", + ["text"," "], + ["rparen","}"] +],[ + "start" +],[ + "start", + ["text"," "], + ["comment","# If we reached this point it means $number_to_check is not"] +],[ + "start", + ["text"," "], + ["comment","# divisable by any prime number that came before it."] +],[ + "start", + ["text"," "], + ["identifier","$primes"], + ["lparen","["], + ["identifier","$num_primes"], + ["rparen","]"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","$number_to_check"], + ["text",";"] +],[ + "start", + ["text"," "], + ["identifier","$num_primes"], + ["keyword.operator","++"], + ["text",";"] +],[ + "start", + ["rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","for"], + ["text"," "], + ["keyword","my"], + ["text"," "], + ["identifier","$p"], + ["text"," "], + ["lparen","("], + ["constant.numeric","0"], + ["text"," "], + ["keyword.operator",".."], + ["text"," "], + ["lparen","("], + ["identifier","$num_primes"], + ["constant.numeric","-1"], + ["rparen","))"] +],[ + "start", + ["lparen","{"] +],[ + "start", + ["text"," "], + ["support.function","print"], + ["text"," "], + ["identifier","$primes"], + ["lparen","["], + ["identifier","$p"], + ["rparen","]"], + ["keyword.operator",","], + ["text"," "], + ["string","\", \""], + ["text",";"] +],[ + "start", + ["rparen","}"] +],[ + "start", + ["support.function","print"], + ["text"," "], + ["string","\"\\n\""], + ["text",";"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_pgsql.json b/lib/ace/mode/_test/tokens_pgsql.json index 6f3c8a16..ded4bb86 100644 --- a/lib/ace/mode/_test/tokens_pgsql.json +++ b/lib/ace/mode/_test/tokens_pgsql.json @@ -1,1015 +1,735 @@ -[ - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword.statementBegin", "BEGIN" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "doc-start", - "data": [ - [ "comment.doc", "/**" ] - ] - }, - { - "state": "doc-start", - "data": [ - [ "comment.doc", "* Samples from PostgreSQL src/tutorial/basics.source" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment.doc", "*/" ] - ] - }, - { - "state": "statement", - "data": [ - [ "keyword.statementBegin", "CREATE" ], - [ "text", " " ], - [ "keyword", "TABLE" ], - [ "text", " " ], - [ "identifier", "weather" ], - [ "text", " " ], - [ "paren.lparen", "(" ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", "\t" ], - [ "identifier", "city" ], - [ "text", "\t\t" ], - [ "keyword", "varchar" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "80" ], - [ "paren.rparen", ")" ], - [ "text", "," ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", "\t" ], - [ "identifier", "temp_lo" ], - [ "text", "\t\t" ], - [ "keyword", "int" ], - [ "text", ",\t\t" ], - [ "comment", "-- low temperature" ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", "\t" ], - [ "identifier", "temp_hi" ], - [ "text", "\t\t" ], - [ "keyword", "int" ], - [ "text", ",\t\t" ], - [ "comment", "-- high temperature" ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", "\t" ], - [ "identifier", "prcp" ], - [ "text", "\t\t" ], - [ "keyword", "real" ], - [ "text", ",\t\t" ], - [ "comment", "-- precipitation" ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", "\t" ], - [ "variable.language", "\"date\"" ], - [ "text", "\t\t" ], - [ "keyword", "date" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", ")" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "statement", - "data": [ - [ "keyword.statementBegin", "CREATE" ], - [ "text", " " ], - [ "keyword", "TABLE" ], - [ "text", " " ], - [ "identifier", "cities" ], - [ "text", " " ], - [ "paren.lparen", "(" ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", "\t" ], - [ "keyword", "name" ], - [ "text", "\t\t" ], - [ "keyword", "varchar" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "80" ], - [ "paren.rparen", ")" ], - [ "text", "," ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", "\t" ], - [ "keyword", "location" ], - [ "text", "\t" ], - [ "keyword", "point" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", ")" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "statement", - "data": [ - [ "keyword.statementBegin", "INSERT" ], - [ "text", " " ], - [ "keyword", "INTO" ], - [ "text", " " ], - [ "identifier", "weather" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "VALUES" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "string", "'San Francisco'" ], - [ "text", ", " ], - [ "constant.numeric", "46" ], - [ "text", ", " ], - [ "constant.numeric", "50" ], - [ "text", ", " ], - [ "constant.numeric", "0.25" ], - [ "text", ", " ], - [ "string", "'1994-11-27'" ], - [ "paren.rparen", ")" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "statement", - "data": [ - [ "keyword.statementBegin", "INSERT" ], - [ "text", " " ], - [ "keyword", "INTO" ], - [ "text", " " ], - [ "identifier", "cities" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "VALUES" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "string", "'San Francisco'" ], - [ "text", ", " ], - [ "string", "'(-194.0, 53.0)'" ], - [ "paren.rparen", ")" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "statement", - "data": [ - [ "keyword.statementBegin", "INSERT" ], - [ "text", " " ], - [ "keyword", "INTO" ], - [ "text", " " ], - [ "identifier", "weather" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "city" ], - [ "text", ", " ], - [ "identifier", "temp_lo" ], - [ "text", ", " ], - [ "identifier", "temp_hi" ], - [ "text", ", " ], - [ "identifier", "prcp" ], - [ "text", ", " ], - [ "variable.language", "\"date\"" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "VALUES" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "string", "'San Francisco'" ], - [ "text", ", " ], - [ "constant.numeric", "43" ], - [ "text", ", " ], - [ "constant.numeric", "57" ], - [ "text", ", " ], - [ "constant.numeric", "0.0" ], - [ "text", ", " ], - [ "string", "'1994-11-29'" ], - [ "paren.rparen", ")" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "statement", - "data": [ - [ "keyword.statementBegin", "INSERT" ], - [ "text", " " ], - [ "keyword", "INTO" ], - [ "text", " " ], - [ "identifier", "weather" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "keyword", "date" ], - [ "text", ", " ], - [ "identifier", "city" ], - [ "text", ", " ], - [ "identifier", "temp_hi" ], - [ "text", ", " ], - [ "identifier", "temp_lo" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "VALUES" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "string", "'1994-11-29'" ], - [ "text", ", " ], - [ "string", "'Hayward'" ], - [ "text", ", " ], - [ "constant.numeric", "54" ], - [ "text", ", " ], - [ "constant.numeric", "37" ], - [ "paren.rparen", ")" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword.statementBegin", "SELECT" ], - [ "text", " " ], - [ "identifier", "city" ], - [ "text", ", " ], - [ "paren.lparen", "(" ], - [ "identifier", "temp_hi" ], - [ "keyword.operator", "+" ], - [ "identifier", "temp_lo" ], - [ "paren.rparen", ")" ], - [ "keyword.operator", "/" ], - [ "constant.numeric", "2" ], - [ "text", " " ], - [ "keyword", "AS" ], - [ "text", " " ], - [ "identifier", "temp_avg" ], - [ "text", ", " ], - [ "variable.language", "\"date\"" ], - [ "text", " " ], - [ "keyword", "FROM" ], - [ "text", " " ], - [ "identifier", "weather" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "statement", - "data": [ - [ "keyword.statementBegin", "SELECT" ], - [ "text", " " ], - [ "identifier", "city" ], - [ "text", ", " ], - [ "identifier", "temp_lo" ], - [ "text", ", " ], - [ "identifier", "temp_hi" ], - [ "text", ", " ], - [ "identifier", "prcp" ], - [ "text", ", " ], - [ "variable.language", "\"date\"" ], - [ "text", ", " ], - [ "keyword", "location" ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", " " ], - [ "keyword", "FROM" ], - [ "text", " " ], - [ "identifier", "weather" ], - [ "text", ", " ], - [ "identifier", "cities" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "WHERE" ], - [ "text", " " ], - [ "identifier", "city" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "keyword", "name" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "doc-start", - "data": [ - [ "comment.doc", "/**" ] - ] - }, - { - "state": "doc-start", - "data": [ - [ "comment.doc", "* Dollar quotes starting at the end of the line are colored as SQL unless" ] - ] - }, - { - "state": "doc-start", - "data": [ - [ "comment.doc", "* a special language tag is used. Pearl and Python are currently implemented" ] - ] - }, - { - "state": "doc-start", - "data": [ - [ "comment.doc", "* but lots of others are possible." ] - ] - }, - { - "state": "start", - "data": [ - [ "comment.doc", "*/" ] - ] - }, - { - "state": "statement", - "data": [ - [ "keyword.statementBegin", "create" ], - [ "text", " " ], - [ "keyword", "or" ], - [ "text", " " ], - [ "keyword", "replace" ], - [ "text", " " ], - [ "keyword", "function" ], - [ "text", " " ], - [ "identifier", "blob_content_chunked" ], - [ "paren.lparen", "(" ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "identifier", "p_data" ], - [ "text", " " ], - [ "keyword", "bytea" ], - [ "text", ", " ] - ] - }, - { - "state": "statement", - "data": [ - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "identifier", "p_chunk" ], - [ "text", " " ], - [ "keyword", "integer" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "dollarSql", - "data": [ - [ "keyword", "returns" ], - [ "text", " " ], - [ "keyword", "setof" ], - [ "text", " " ], - [ "keyword", "bytea" ], - [ "text", " " ], - [ "keyword", "as" ], - [ "text", " " ], - [ "string", "$$" ] - ] - }, - { - "state": "dollarSql", - "data": [ - [ "comment", "-- Still SQL comments" ] - ] - }, - { - "state": "dollarSql", - "data": [ - [ "keyword", "declare" ] - ] - }, - { - "state": "dollarSql", - "data": [ - [ "text", "\t" ], - [ "identifier", "v_size" ], - [ "text", " " ], - [ "keyword", "integer" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "support.function", "octet_length" ], - [ "paren.lparen", "(" ], - [ "identifier", "p_data" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "dollarSql", - "data": [ - [ "keyword", "begin" ] - ] - }, - { - "state": "dollarSql", - "data": [ - [ "text", "\t" ], - [ "keyword", "for" ], - [ "text", " " ], - [ "identifier", "i" ], - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "constant.numeric", "1" ], - [ "text", ".." ], - [ "identifier", "v_size" ], - [ "text", " " ], - [ "keyword", "by" ], - [ "text", " " ], - [ "identifier", "p_chunk" ], - [ "text", " " ], - [ "identifier", "loop" ] - ] - }, - { - "state": "dollarSql", - "data": [ - [ "text", "\t\t" ], - [ "identifier", "return" ], - [ "text", " " ], - [ "keyword", "next" ], - [ "text", " " ], - [ "keyword", "substring" ], - [ "paren.lparen", "(" ], - [ "identifier", "p_data" ], - [ "text", " " ], - [ "keyword", "from" ], - [ "text", " " ], - [ "identifier", "i" ], - [ "text", " " ], - [ "keyword", "for" ], - [ "text", " " ], - [ "identifier", "p_chunk" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "dollarSql", - "data": [ - [ "text", "\t" ], - [ "keyword", "end" ], - [ "text", " " ], - [ "identifier", "loop" ], - [ "text", ";" ] - ] - }, - { - "state": "dollarSql", - "data": [ - [ "keyword", "end" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "$$" ], - [ "text", " " ], - [ "keyword", "language" ], - [ "text", " " ], - [ "identifier", "plpgsql" ], - [ "text", " " ], - [ "keyword", "stable" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "-- pl/perl" ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "keyword.statementBegin", "CREATE" ], - [ "text", " " ], - [ "keyword", "FUNCTION" ], - [ "text", " " ], - [ "identifier", "perl_max" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "keyword", "integer" ], - [ "text", ", " ], - [ "keyword", "integer" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "RETURNS" ], - [ "text", " " ], - [ "keyword", "integer" ], - [ "text", " " ], - [ "keyword", "AS" ], - [ "text", " " ], - [ "string", "$perl$" ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "text", " " ], - [ "comment", "# perl comment..." ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "text", " " ], - [ "keyword", "my" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "identifier", "$x" ], - [ "keyword.operator", "," ], - [ "identifier", "$y" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " @" ], - [ "identifier", "_" ], - [ "text", ";" ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "keyword.operator", "!" ], - [ "text", " " ], - [ "support.function", "defined" ], - [ "text", " " ], - [ "identifier", "$x" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "keyword.operator", "!" ], - [ "text", " " ], - [ "support.function", "defined" ], - [ "text", " " ], - [ "identifier", "$y" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ], - [ "text", " " ], - [ "support.function", "return" ], - [ "text", " " ], - [ "support.function", "undef" ], - [ "text", "; " ], - [ "rparen", "}" ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "text", " " ], - [ "support.function", "return" ], - [ "text", " " ], - [ "identifier", "$y" ], - [ "text", ";" ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "keyword.operator", "!" ], - [ "text", " " ], - [ "support.function", "defined" ], - [ "text", " " ], - [ "identifier", "$y" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ], - [ "text", " " ], - [ "support.function", "return" ], - [ "text", " " ], - [ "identifier", "$x" ], - [ "text", "; " ], - [ "rparen", "}" ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "identifier", "$x" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "identifier", "$y" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ], - [ "text", " " ], - [ "support.function", "return" ], - [ "text", " " ], - [ "identifier", "$x" ], - [ "text", "; " ], - [ "rparen", "}" ] - ] - }, - { - "state": "perl-start", - "data": [ - [ "text", " " ], - [ "support.function", "return" ], - [ "text", " " ], - [ "identifier", "$y" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "$perl$" ], - [ "text", " " ], - [ "keyword", "LANGUAGE" ], - [ "text", " " ], - [ "identifier", "plperl" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "-- pl/python" ] - ] - }, - { - "state": "python-start", - "data": [ - [ "keyword.statementBegin", "CREATE" ], - [ "text", " " ], - [ "keyword", "FUNCTION" ], - [ "text", " " ], - [ "identifier", "usesavedplan" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "RETURNS" ], - [ "text", " " ], - [ "keyword", "trigger" ], - [ "text", " " ], - [ "keyword", "AS" ], - [ "text", " " ], - [ "string", "$python$" ] - ] - }, - { - "state": "python-start", - "data": [ - [ "text", " " ], - [ "comment", "# python comment..." ] - ] - }, - { - "state": "python-start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "identifier", "SD" ], - [ "text", "." ], - [ "identifier", "has_key" ], - [ "paren.lparen", "(" ], - [ "string", "\"plan\"" ], - [ "paren.rparen", ")" ], - [ "text", ":" ] - ] - }, - { - "state": "python-start", - "data": [ - [ "text", " " ], - [ "identifier", "plan" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "SD" ], - [ "paren.lparen", "[" ], - [ "string", "\"plan\"" ], - [ "paren.rparen", "]" ] - ] - }, - { - "state": "python-start", - "data": [ - [ "text", " " ], - [ "keyword", "else" ], - [ "text", ":" ] - ] - }, - { - "state": "python-start", - "data": [ - [ "text", " " ], - [ "identifier", "plan" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "plpy" ], - [ "text", "." ], - [ "identifier", "prepare" ], - [ "paren.lparen", "(" ], - [ "string", "\"SELECT 1\"" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "python-start", - "data": [ - [ "text", " " ], - [ "identifier", "SD" ], - [ "paren.lparen", "[" ], - [ "string", "\"plan\"" ], - [ "paren.rparen", "]" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "plan" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "$python$" ], - [ "text", " " ], - [ "keyword", "LANGUAGE" ], - [ "text", " " ], - [ "identifier", "plpythonu" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "-- psql commands" ] - ] - }, - { - "state": "start", - "data": [ - [ "support.buildin", "\\df cash*" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "-- Some string samples." ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword.statementBegin", "select" ], - [ "text", " " ], - [ "string", "'don''t do it now;'" ], - [ "text", " " ], - [ "keyword.operator", "||" ], - [ "text", " " ], - [ "string", "'maybe later'" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword.statementBegin", "select" ], - [ "text", " " ], - [ "identifier", "E" ], - [ "string", "'dont\\'t do it'" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword.statementBegin", "select" ], - [ "text", " " ], - [ "support.function", "length" ], - [ "paren.lparen", "(" ], - [ "string", "'some other''s stuff'" ], - [ "text", " " ], - [ "keyword.operator", "||" ], - [ "text", " " ], - [ "string", "$$cat in hat's stuff $$" ], - [ "paren.rparen", ")" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "dollarStatementString", - "data": [ - [ "keyword.statementBegin", "select" ], - [ "text", " " ], - [ "string", "$$ strings" ] - ] - }, - { - "state": "dollarStatementString", - "data": [ - [ "string", "over multiple " ] - ] - }, - { - "state": "dollarStatementString", - "data": [ - [ "string", "lines - use dollar quotes" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "$$" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword.statementBegin", "END" ], - [ "statementEnd", ";" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "start" +],[ + "start", + ["keyword.statementBegin","BEGIN"], + ["statementEnd",";"] +],[ + "start" +],[ + "doc-start", + ["comment.doc","/**"] +],[ + "doc-start", + ["comment.doc","* Samples from PostgreSQL src/tutorial/basics.source"] +],[ + "start", + ["comment.doc","*/"] +],[ + "statement", + ["keyword.statementBegin","CREATE"], + ["text"," "], + ["keyword","TABLE"], + ["text"," "], + ["identifier","weather"], + ["text"," "], + ["paren.lparen","("] +],[ + "statement", + ["text","\t"], + ["identifier","city"], + ["text","\t\t"], + ["keyword","varchar"], + ["paren.lparen","("], + ["constant.numeric","80"], + ["paren.rparen",")"], + ["text",","] +],[ + "statement", + ["text","\t"], + ["identifier","temp_lo"], + ["text","\t\t"], + ["keyword","int"], + ["text",",\t\t"], + ["comment","-- low temperature"] +],[ + "statement", + ["text","\t"], + ["identifier","temp_hi"], + ["text","\t\t"], + ["keyword","int"], + ["text",",\t\t"], + ["comment","-- high temperature"] +],[ + "statement", + ["text","\t"], + ["identifier","prcp"], + ["text","\t\t"], + ["keyword","real"], + ["text",",\t\t"], + ["comment","-- precipitation"] +],[ + "statement", + ["text","\t"], + ["variable.language","\"date\""], + ["text","\t\t"], + ["keyword","date"] +],[ + "start", + ["paren.rparen",")"], + ["statementEnd",";"] +],[ + "start" +],[ + "statement", + ["keyword.statementBegin","CREATE"], + ["text"," "], + ["keyword","TABLE"], + ["text"," "], + ["identifier","cities"], + ["text"," "], + ["paren.lparen","("] +],[ + "statement", + ["text","\t"], + ["keyword","name"], + ["text","\t\t"], + ["keyword","varchar"], + ["paren.lparen","("], + ["constant.numeric","80"], + ["paren.rparen",")"], + ["text",","] +],[ + "statement", + ["text","\t"], + ["keyword","location"], + ["text","\t"], + ["keyword","point"] +],[ + "start", + ["paren.rparen",")"], + ["statementEnd",";"] +],[ + "start" +],[ + "start" +],[ + "statement", + ["keyword.statementBegin","INSERT"], + ["text"," "], + ["keyword","INTO"], + ["text"," "], + ["identifier","weather"] +],[ + "start", + ["text"," "], + ["keyword","VALUES"], + ["text"," "], + ["paren.lparen","("], + ["string","'San Francisco'"], + ["text",", "], + ["constant.numeric","46"], + ["text",", "], + ["constant.numeric","50"], + ["text",", "], + ["constant.numeric","0.25"], + ["text",", "], + ["string","'1994-11-27'"], + ["paren.rparen",")"], + ["statementEnd",";"] +],[ + "start" +],[ + "statement", + ["keyword.statementBegin","INSERT"], + ["text"," "], + ["keyword","INTO"], + ["text"," "], + ["identifier","cities"] +],[ + "start", + ["text"," "], + ["keyword","VALUES"], + ["text"," "], + ["paren.lparen","("], + ["string","'San Francisco'"], + ["text",", "], + ["string","'(-194.0, 53.0)'"], + ["paren.rparen",")"], + ["statementEnd",";"] +],[ + "start" +],[ + "statement", + ["keyword.statementBegin","INSERT"], + ["text"," "], + ["keyword","INTO"], + ["text"," "], + ["identifier","weather"], + ["text"," "], + ["paren.lparen","("], + ["identifier","city"], + ["text",", "], + ["identifier","temp_lo"], + ["text",", "], + ["identifier","temp_hi"], + ["text",", "], + ["identifier","prcp"], + ["text",", "], + ["variable.language","\"date\""], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["keyword","VALUES"], + ["text"," "], + ["paren.lparen","("], + ["string","'San Francisco'"], + ["text",", "], + ["constant.numeric","43"], + ["text",", "], + ["constant.numeric","57"], + ["text",", "], + ["constant.numeric","0.0"], + ["text",", "], + ["string","'1994-11-29'"], + ["paren.rparen",")"], + ["statementEnd",";"] +],[ + "start" +],[ + "statement", + ["keyword.statementBegin","INSERT"], + ["text"," "], + ["keyword","INTO"], + ["text"," "], + ["identifier","weather"], + ["text"," "], + ["paren.lparen","("], + ["keyword","date"], + ["text",", "], + ["identifier","city"], + ["text",", "], + ["identifier","temp_hi"], + ["text",", "], + ["identifier","temp_lo"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["keyword","VALUES"], + ["text"," "], + ["paren.lparen","("], + ["string","'1994-11-29'"], + ["text",", "], + ["string","'Hayward'"], + ["text",", "], + ["constant.numeric","54"], + ["text",", "], + ["constant.numeric","37"], + ["paren.rparen",")"], + ["statementEnd",";"] +],[ + "start" +],[ + "start" +],[ + "start", + ["keyword.statementBegin","SELECT"], + ["text"," "], + ["identifier","city"], + ["text",", "], + ["paren.lparen","("], + ["identifier","temp_hi"], + ["keyword.operator","+"], + ["identifier","temp_lo"], + ["paren.rparen",")"], + ["keyword.operator","/"], + ["constant.numeric","2"], + ["text"," "], + ["keyword","AS"], + ["text"," "], + ["identifier","temp_avg"], + ["text",", "], + ["variable.language","\"date\""], + ["text"," "], + ["keyword","FROM"], + ["text"," "], + ["identifier","weather"], + ["statementEnd",";"] +],[ + "start" +],[ + "statement", + ["keyword.statementBegin","SELECT"], + ["text"," "], + ["identifier","city"], + ["text",", "], + ["identifier","temp_lo"], + ["text",", "], + ["identifier","temp_hi"], + ["text",", "], + ["identifier","prcp"], + ["text",", "], + ["variable.language","\"date\""], + ["text",", "], + ["keyword","location"] +],[ + "statement", + ["text"," "], + ["keyword","FROM"], + ["text"," "], + ["identifier","weather"], + ["text",", "], + ["identifier","cities"] +],[ + "start", + ["text"," "], + ["keyword","WHERE"], + ["text"," "], + ["identifier","city"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["keyword","name"], + ["statementEnd",";"] +],[ + "start" +],[ + "start" +],[ + "start" +],[ + "doc-start", + ["comment.doc","/**"] +],[ + "doc-start", + ["comment.doc","* Dollar quotes starting at the end of the line are colored as SQL unless"] +],[ + "doc-start", + ["comment.doc","* a special language tag is used. Pearl and Python are currently implemented"] +],[ + "doc-start", + ["comment.doc","* but lots of others are possible."] +],[ + "start", + ["comment.doc","*/"] +],[ + "statement", + ["keyword.statementBegin","create"], + ["text"," "], + ["keyword","or"], + ["text"," "], + ["keyword","replace"], + ["text"," "], + ["keyword","function"], + ["text"," "], + ["identifier","blob_content_chunked"], + ["paren.lparen","("] +],[ + "statement", + ["text"," "], + ["keyword","in"], + ["text"," "], + ["identifier","p_data"], + ["text"," "], + ["keyword","bytea"], + ["text",", "] +],[ + "statement", + ["text"," "], + ["keyword","in"], + ["text"," "], + ["identifier","p_chunk"], + ["text"," "], + ["keyword","integer"], + ["paren.rparen",")"] +],[ + "dollarSql", + ["keyword","returns"], + ["text"," "], + ["keyword","setof"], + ["text"," "], + ["keyword","bytea"], + ["text"," "], + ["keyword","as"], + ["text"," "], + ["string","$$"] +],[ + "dollarSql", + ["comment","-- Still SQL comments"] +],[ + "dollarSql", + ["keyword","declare"] +],[ + "dollarSql", + ["text","\t"], + ["identifier","v_size"], + ["text"," "], + ["keyword","integer"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["support.function","octet_length"], + ["paren.lparen","("], + ["identifier","p_data"], + ["paren.rparen",")"], + ["text",";"] +],[ + "dollarSql", + ["keyword","begin"] +],[ + "dollarSql", + ["text","\t"], + ["keyword","for"], + ["text"," "], + ["identifier","i"], + ["text"," "], + ["keyword","in"], + ["text"," "], + ["constant.numeric","1"], + ["text",".."], + ["identifier","v_size"], + ["text"," "], + ["keyword","by"], + ["text"," "], + ["identifier","p_chunk"], + ["text"," "], + ["identifier","loop"] +],[ + "dollarSql", + ["text","\t\t"], + ["identifier","return"], + ["text"," "], + ["keyword","next"], + ["text"," "], + ["keyword","substring"], + ["paren.lparen","("], + ["identifier","p_data"], + ["text"," "], + ["keyword","from"], + ["text"," "], + ["identifier","i"], + ["text"," "], + ["keyword","for"], + ["text"," "], + ["identifier","p_chunk"], + ["paren.rparen",")"], + ["text",";"] +],[ + "dollarSql", + ["text","\t"], + ["keyword","end"], + ["text"," "], + ["identifier","loop"], + ["text",";"] +],[ + "dollarSql", + ["keyword","end"], + ["text",";"] +],[ + "start", + ["string","$$"], + ["text"," "], + ["keyword","language"], + ["text"," "], + ["identifier","plpgsql"], + ["text"," "], + ["keyword","stable"], + ["statementEnd",";"] +],[ + "start" +],[ + "start" +],[ + "start", + ["comment","-- pl/perl"] +],[ + "perl-start", + ["keyword.statementBegin","CREATE"], + ["text"," "], + ["keyword","FUNCTION"], + ["text"," "], + ["identifier","perl_max"], + ["text"," "], + ["paren.lparen","("], + ["keyword","integer"], + ["text",", "], + ["keyword","integer"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","RETURNS"], + ["text"," "], + ["keyword","integer"], + ["text"," "], + ["keyword","AS"], + ["text"," "], + ["string","$perl$"] +],[ + "perl-start", + ["text"," "], + ["comment","# perl comment..."] +],[ + "perl-start", + ["text"," "], + ["keyword","my"], + ["text"," "], + ["lparen","("], + ["identifier","$x"], + ["keyword.operator",","], + ["identifier","$y"], + ["rparen",")"], + ["text"," "], + ["keyword.operator","="], + ["text"," @"], + ["identifier","_"], + ["text",";"] +],[ + "perl-start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["lparen","("], + ["keyword.operator","!"], + ["text"," "], + ["support.function","defined"], + ["text"," "], + ["identifier","$x"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "perl-start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["lparen","("], + ["keyword.operator","!"], + ["text"," "], + ["support.function","defined"], + ["text"," "], + ["identifier","$y"], + ["rparen",")"], + ["text"," "], + ["lparen","{"], + ["text"," "], + ["support.function","return"], + ["text"," "], + ["support.function","undef"], + ["text","; "], + ["rparen","}"] +],[ + "perl-start", + ["text"," "], + ["support.function","return"], + ["text"," "], + ["identifier","$y"], + ["text",";"] +],[ + "perl-start", + ["text"," "], + ["rparen","}"] +],[ + "perl-start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["lparen","("], + ["keyword.operator","!"], + ["text"," "], + ["support.function","defined"], + ["text"," "], + ["identifier","$y"], + ["rparen",")"], + ["text"," "], + ["lparen","{"], + ["text"," "], + ["support.function","return"], + ["text"," "], + ["identifier","$x"], + ["text","; "], + ["rparen","}"] +],[ + "perl-start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["lparen","("], + ["identifier","$x"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["identifier","$y"], + ["rparen",")"], + ["text"," "], + ["lparen","{"], + ["text"," "], + ["support.function","return"], + ["text"," "], + ["identifier","$x"], + ["text","; "], + ["rparen","}"] +],[ + "perl-start", + ["text"," "], + ["support.function","return"], + ["text"," "], + ["identifier","$y"], + ["text",";"] +],[ + "start", + ["string","$perl$"], + ["text"," "], + ["keyword","LANGUAGE"], + ["text"," "], + ["identifier","plperl"], + ["statementEnd",";"] +],[ + "start" +],[ + "start", + ["comment","-- pl/python"] +],[ + "python-start", + ["keyword.statementBegin","CREATE"], + ["text"," "], + ["keyword","FUNCTION"], + ["text"," "], + ["identifier","usesavedplan"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["keyword","RETURNS"], + ["text"," "], + ["keyword","trigger"], + ["text"," "], + ["keyword","AS"], + ["text"," "], + ["string","$python$"] +],[ + "python-start", + ["text"," "], + ["comment","# python comment..."] +],[ + "python-start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["identifier","SD"], + ["text","."], + ["identifier","has_key"], + ["paren.lparen","("], + ["string","\"plan\""], + ["paren.rparen",")"], + ["text",":"] +],[ + "python-start", + ["text"," "], + ["identifier","plan"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","SD"], + ["paren.lparen","["], + ["string","\"plan\""], + ["paren.rparen","]"] +],[ + "python-start", + ["text"," "], + ["keyword","else"], + ["text",":"] +],[ + "python-start", + ["text"," "], + ["identifier","plan"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","plpy"], + ["text","."], + ["identifier","prepare"], + ["paren.lparen","("], + ["string","\"SELECT 1\""], + ["paren.rparen",")"] +],[ + "python-start", + ["text"," "], + ["identifier","SD"], + ["paren.lparen","["], + ["string","\"plan\""], + ["paren.rparen","]"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","plan"] +],[ + "start", + ["string","$python$"], + ["text"," "], + ["keyword","LANGUAGE"], + ["text"," "], + ["identifier","plpythonu"], + ["statementEnd",";"] +],[ + "start" +],[ + "start" +],[ + "start", + ["comment","-- psql commands"] +],[ + "start", + ["support.buildin","\\df cash*"] +],[ + "start" +],[ + "start" +],[ + "start", + ["comment","-- Some string samples."] +],[ + "start", + ["keyword.statementBegin","select"], + ["text"," "], + ["string","'don''t do it now;'"], + ["text"," "], + ["keyword.operator","||"], + ["text"," "], + ["string","'maybe later'"], + ["statementEnd",";"] +],[ + "start", + ["keyword.statementBegin","select"], + ["text"," "], + ["identifier","E"], + ["string","'dont\\'t do it'"], + ["statementEnd",";"] +],[ + "start", + ["keyword.statementBegin","select"], + ["text"," "], + ["support.function","length"], + ["paren.lparen","("], + ["string","'some other''s stuff'"], + ["text"," "], + ["keyword.operator","||"], + ["text"," "], + ["string","$$cat in hat's stuff $$"], + ["paren.rparen",")"], + ["statementEnd",";"] +],[ + "start" +],[ + "dollarStatementString", + ["keyword.statementBegin","select"], + ["text"," "], + ["string","$$ strings"] +],[ + "dollarStatementString", + ["string","over multiple "] +],[ + "dollarStatementString", + ["string","lines - use dollar quotes"] +],[ + "start", + ["string","$$"], + ["statementEnd",";"] +],[ + "start" +],[ + "start", + ["keyword.statementBegin","END"], + ["statementEnd",";"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_php.json b/lib/ace/mode/_test/tokens_php.json index 39f26df3..ce7ce4b4 100644 --- a/lib/ace/mode/_test/tokens_php.json +++ b/lib/ace/mode/_test/tokens_php.json @@ -1,188 +1,134 @@ -[ - { - "state": "php-start", - "data": [ - [ "support.php_tag", "" ] - ] - } -] \ No newline at end of file +[[ + "php-start", + ["support.php_tag",""] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_powershell.json b/lib/ace/mode/_test/tokens_powershell.json index f3406603..43b77db4 100644 --- a/lib/ace/mode/_test/tokens_powershell.json +++ b/lib/ace/mode/_test/tokens_powershell.json @@ -1,254 +1,184 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "# This is a simple comment" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "function" ], - [ "text", " " ], - [ "identifier", "Hello" ], - [ "lparen", "(" ], - [ "variable.instance", "$name" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "Write-host" ], - [ "text", " " ], - [ "string", "\"Hello $name\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "function" ], - [ "text", " " ], - [ "identifier", "add" ], - [ "lparen", "(" ], - [ "variable.instance", "$left" ], - [ "text", ", " ], - [ "variable.instance", "$right" ], - [ "keyword.operator", "=" ], - [ "constant.numeric", "4" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "variable.instance", "$right" ], - [ "text", " " ], - [ "keyword.operator", "-ne" ], - [ "text", " " ], - [ "constant.numeric", "4" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "return" ], - [ "text", " " ], - [ "variable.instance", "$left" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "rparen", "}" ], - [ "text", " " ], - [ "keyword", "elseif" ], - [ "text", " " ], - [ "lparen", "(" ], - [ "variable.instance", "$left" ], - [ "text", " " ], - [ "keyword.operator", "-eq" ], - [ "text", " " ], - [ "constant.language", "$null" ], - [ "text", " " ], - [ "keyword.operator", "-and" ], - [ "text", " " ], - [ "variable.instance", "$right" ], - [ "text", " " ], - [ "keyword.operator", "-eq" ], - [ "text", " " ], - [ "constant.numeric", "2" ], - [ "rparen", ")" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "return" ], - [ "text", " " ], - [ "constant.numeric", "3" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "rparen", "}" ], - [ "text", " " ], - [ "keyword", "else" ], - [ "text", " " ], - [ "lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "return" ], - [ "text", " " ], - [ "constant.numeric", "2" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable.instance", "$number" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "1" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "constant.numeric", "2" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "variable.instance", "$number" ], - [ "text", " " ], - [ "keyword.operator", "+=" ], - [ "text", " " ], - [ "constant.numeric", "3" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "Write-Host" ], - [ "text", " " ], - [ "identifier", "Hello" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "name" ], - [ "text", " " ], - [ "string", "\"World\"" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable.instance", "$an_array" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " @" ], - [ "lparen", "(" ], - [ "constant.numeric", "1" ], - [ "text", ", " ], - [ "constant.numeric", "2" ], - [ "text", ", " ], - [ "constant.numeric", "3" ], - [ "rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "variable.instance", "$a_hash" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " @" ], - [ "lparen", "{" ], - [ "string", "\"something\"" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string", "\"something else\"" ], - [ "rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword.operator", "&" ], - [ "text", " " ], - [ "identifier", "notepad" ], - [ "text", " .\\" ], - [ "identifier", "readme" ], - [ "text", "." ], - [ "identifier", "md" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "start", + ["comment","# This is a simple comment"] +],[ + "start", + ["keyword","function"], + ["text"," "], + ["identifier","Hello"], + ["lparen","("], + ["variable.instance","$name"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","Write-host"], + ["text"," "], + ["string","\"Hello $name\""] +],[ + "start", + ["rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","function"], + ["text"," "], + ["identifier","add"], + ["lparen","("], + ["variable.instance","$left"], + ["text",", "], + ["variable.instance","$right"], + ["keyword.operator","="], + ["constant.numeric","4"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["lparen","("], + ["variable.instance","$right"], + ["text"," "], + ["keyword.operator","-ne"], + ["text"," "], + ["constant.numeric","4"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","return"], + ["text"," "], + ["variable.instance","$left"] +],[ + "start", + ["text"," "], + ["rparen","}"], + ["text"," "], + ["keyword","elseif"], + ["text"," "], + ["lparen","("], + ["variable.instance","$left"], + ["text"," "], + ["keyword.operator","-eq"], + ["text"," "], + ["constant.language","$null"], + ["text"," "], + ["keyword.operator","-and"], + ["text"," "], + ["variable.instance","$right"], + ["text"," "], + ["keyword.operator","-eq"], + ["text"," "], + ["constant.numeric","2"], + ["rparen",")"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","return"], + ["text"," "], + ["constant.numeric","3"] +],[ + "start", + ["text"," "], + ["rparen","}"], + ["text"," "], + ["keyword","else"], + ["text"," "], + ["lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","return"], + ["text"," "], + ["constant.numeric","2"] +],[ + "start", + ["text"," "], + ["rparen","}"] +],[ + "start", + ["rparen","}"] +],[ + "start" +],[ + "start", + ["variable.instance","$number"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","1"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["constant.numeric","2"], + ["text",";"] +],[ + "start", + ["variable.instance","$number"], + ["text"," "], + ["keyword.operator","+="], + ["text"," "], + ["constant.numeric","3"] +],[ + "start" +],[ + "start", + ["support.function","Write-Host"], + ["text"," "], + ["identifier","Hello"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","name"], + ["text"," "], + ["string","\"World\""] +],[ + "start" +],[ + "start", + ["variable.instance","$an_array"], + ["text"," "], + ["keyword.operator","="], + ["text"," @"], + ["lparen","("], + ["constant.numeric","1"], + ["text",", "], + ["constant.numeric","2"], + ["text",", "], + ["constant.numeric","3"], + ["rparen",")"] +],[ + "start", + ["variable.instance","$a_hash"], + ["text"," "], + ["keyword.operator","="], + ["text"," @"], + ["lparen","{"], + ["string","\"something\""], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","\"something else\""], + ["rparen","}"] +],[ + "start" +],[ + "start", + ["keyword.operator","&"], + ["text"," "], + ["identifier","notepad"], + ["text"," .\\"], + ["identifier","readme"], + ["text","."], + ["identifier","md"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_python.json b/lib/ace/mode/_test/tokens_python.json index 4d67cc4b..bab30374 100644 --- a/lib/ace/mode/_test/tokens_python.json +++ b/lib/ace/mode/_test/tokens_python.json @@ -1,203 +1,148 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "#!/usr/local/bin/python" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "import" ], - [ "text", " " ], - [ "identifier", "string" ], - [ "text", ", " ], - [ "identifier", "sys" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "# If no arguments were given, print a helpful message" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "if" ], - [ "text", " " ], - [ "support.function", "len" ], - [ "paren.lparen", "(" ], - [ "identifier", "sys" ], - [ "text", "." ], - [ "identifier", "argv" ], - [ "paren.rparen", ")" ], - [ "keyword.operator", "==" ], - [ "constant.numeric", "1" ], - [ "text", ":" ] - ] - }, - { - "state": "qstring", - "data": [ - [ "text", " " ], - [ "keyword", "print" ], - [ "text", " " ], - [ "string", "'''Usage:" ] - ] - }, - { - "state": "start", - "data": [ - [ "string", "celsius temp1 temp2 ...'''" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "sys" ], - [ "text", "." ], - [ "identifier", "exit" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "0" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "# Loop over the arguments" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "for" ], - [ "text", " " ], - [ "identifier", "i" ], - [ "text", " " ], - [ "keyword", "in" ], - [ "text", " " ], - [ "identifier", "sys" ], - [ "text", "." ], - [ "identifier", "argv" ], - [ "paren.lparen", "[" ], - [ "constant.numeric", "1" ], - [ "text", ":" ], - [ "paren.rparen", "]" ], - [ "text", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "try" ], - [ "text", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "fahrenheit" ], - [ "keyword.operator", "=" ], - [ "support.function", "float" ], - [ "paren.lparen", "(" ], - [ "identifier", "string" ], - [ "text", "." ], - [ "identifier", "atoi" ], - [ "paren.lparen", "(" ], - [ "identifier", "i" ], - [ "paren.rparen", "))" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "except" ], - [ "text", " " ], - [ "identifier", "string" ], - [ "text", "." ], - [ "identifier", "atoi_error" ], - [ "text", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "print" ], - [ "text", " " ], - [ "support.function", "repr" ], - [ "paren.lparen", "(" ], - [ "identifier", "i" ], - [ "paren.rparen", ")" ], - [ "text", ", " ], - [ "string", "\"not a numeric value\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "else" ], - [ "text", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "celsius" ], - [ "keyword.operator", "=" ], - [ "paren.lparen", "(" ], - [ "identifier", "fahrenheit" ], - [ "keyword.operator", "-" ], - [ "constant.numeric", "32" ], - [ "paren.rparen", ")" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "5.0" ], - [ "keyword.operator", "/" ], - [ "constant.numeric", "9.0" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "print" ], - [ "text", " " ], - [ "string", "'%i\\260F = %i\\260C'" ], - [ "text", " " ], - [ "keyword.operator", "%" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "support.function", "int" ], - [ "paren.lparen", "(" ], - [ "identifier", "fahrenheit" ], - [ "paren.rparen", ")" ], - [ "text", ", " ], - [ "support.function", "int" ], - [ "paren.lparen", "(" ], - [ "identifier", "celsius" ], - [ "keyword.operator", "+" ], - [ "constant.numeric", ".5" ], - [ "paren.rparen", "))" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["comment","#!/usr/local/bin/python"] +],[ + "start" +],[ + "start", + ["keyword","import"], + ["text"," "], + ["identifier","string"], + ["text",", "], + ["identifier","sys"] +],[ + "start" +],[ + "start", + ["comment","# If no arguments were given, print a helpful message"] +],[ + "start", + ["keyword","if"], + ["text"," "], + ["support.function","len"], + ["paren.lparen","("], + ["identifier","sys"], + ["text","."], + ["identifier","argv"], + ["paren.rparen",")"], + ["keyword.operator","=="], + ["constant.numeric","1"], + ["text",":"] +],[ + "qstring", + ["text"," "], + ["keyword","print"], + ["text"," "], + ["string","'''Usage:"] +],[ + "start", + ["string","celsius temp1 temp2 ...'''"] +],[ + "start", + ["text"," "], + ["identifier","sys"], + ["text","."], + ["identifier","exit"], + ["paren.lparen","("], + ["constant.numeric","0"], + ["paren.rparen",")"] +],[ + "start" +],[ + "start", + ["comment","# Loop over the arguments"] +],[ + "start", + ["keyword","for"], + ["text"," "], + ["identifier","i"], + ["text"," "], + ["keyword","in"], + ["text"," "], + ["identifier","sys"], + ["text","."], + ["identifier","argv"], + ["paren.lparen","["], + ["constant.numeric","1"], + ["text",":"], + ["paren.rparen","]"], + ["text",":"] +],[ + "start", + ["text"," "], + ["keyword","try"], + ["text",":"] +],[ + "start", + ["text"," "], + ["identifier","fahrenheit"], + ["keyword.operator","="], + ["support.function","float"], + ["paren.lparen","("], + ["identifier","string"], + ["text","."], + ["identifier","atoi"], + ["paren.lparen","("], + ["identifier","i"], + ["paren.rparen","))"] +],[ + "start", + ["text"," "], + ["keyword","except"], + ["text"," "], + ["identifier","string"], + ["text","."], + ["identifier","atoi_error"], + ["text",":"] +],[ + "start", + ["text"," "], + ["keyword","print"], + ["text"," "], + ["support.function","repr"], + ["paren.lparen","("], + ["identifier","i"], + ["paren.rparen",")"], + ["text",", "], + ["string","\"not a numeric value\""] +],[ + "start", + ["text"," "], + ["keyword","else"], + ["text",":"] +],[ + "start", + ["text"," "], + ["identifier","celsius"], + ["keyword.operator","="], + ["paren.lparen","("], + ["identifier","fahrenheit"], + ["keyword.operator","-"], + ["constant.numeric","32"], + ["paren.rparen",")"], + ["keyword.operator","*"], + ["constant.numeric","5.0"], + ["keyword.operator","/"], + ["constant.numeric","9.0"] +],[ + "start", + ["text"," "], + ["keyword","print"], + ["text"," "], + ["string","'%i\\260F = %i\\260C'"], + ["text"," "], + ["keyword.operator","%"], + ["text"," "], + ["paren.lparen","("], + ["support.function","int"], + ["paren.lparen","("], + ["identifier","fahrenheit"], + ["paren.rparen",")"], + ["text",", "], + ["support.function","int"], + ["paren.lparen","("], + ["identifier","celsius"], + ["keyword.operator","+"], + ["constant.numeric",".5"], + ["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 4b999558..2d446bce 100644 --- a/lib/ace/mode/_test/tokens_r.json +++ b/lib/ace/mode/_test/tokens_r.json @@ -1,296 +1,235 @@ -[ - { - "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", ">|" ], - [ "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", "***" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword.operator", "---" ] - ] - }, - { - "state": "start", - "data": [ - [ "identifier", "Signif" ], - [ "text", ". " ], - [ "identifier", "codes" ], - [ "keyword.operator", ":" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "text", " ‘" ], - [ "keyword.operator", "***" ], - [ "text", "’ " ], - [ "constant.numeric", "0.001" ], - [ "text", " ‘" ], - [ "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", "))" ], - [ "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 +[[ + "start", + ["identifier","Call"], + ["keyword.operator",":"] +],[ + "start", + ["identifier","lm"], + ["paren.keyword.operator","("], + ["identifier","formula"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","y"], + ["text"," "], + ["keyword.operator","~"], + ["text"," "], + ["identifier","x"], + ["paren.keyword.operator",")"] +],[ + "start", + ["text"," "] +],[ + "start", + ["identifier","Residuals"], + ["keyword.operator",":"] +],[ + "start", + ["constant.numeric","1"], + ["text"," "], + ["constant.numeric","2"], + ["text"," "], + ["constant.numeric","3"], + ["text"," "], + ["constant.numeric","4"], + ["text"," "], + ["constant.numeric","5"], + ["text"," "], + ["constant.numeric","6"] +],[ + "start", + ["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"] +],[ + "start", + ["text"," "] +],[ + "start", + ["identifier","Coefficients"], + ["keyword.operator",":"] +],[ + "start", + ["text"," "], + ["identifier","Estimate"], + ["text"," "], + ["identifier","Std"], + ["text",". "], + ["identifier","Error"], + ["text"," "], + ["identifier","t"], + ["text"," "], + ["identifier","value"], + ["text"," "], + ["identifier","Pr"], + ["paren.keyword.operator","("], + ["keyword.operator",">|"], + ["identifier","t"], + ["keyword.operator","|"], + ["paren.keyword.operator",")"] +],[ + "start", + ["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","*"] +],[ + "start", + ["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","***"] +],[ + "start", + ["keyword.operator","---"] +],[ + "start", + ["identifier","Signif"], + ["text",". "], + ["identifier","codes"], + ["keyword.operator",":"], + ["text"," "], + ["constant.numeric","0"], + ["text"," ‘"], + ["keyword.operator","***"], + ["text","’ "], + ["constant.numeric","0.001"], + ["text"," ‘"], + ["keyword.operator","**"], + ["text","’ "], + ["constant.numeric","0.01"], + ["text"," ‘"], + ["keyword.operator","*"], + ["text","’ "], + ["constant.numeric","0.05"], + ["text"," ‘.’ "], + ["constant.numeric","0.1"], + ["text"," ‘ ’ "], + ["constant.numeric","1"] +],[ + "start", + ["text"," "] +],[ + "start", + ["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"] +],[ + "start", + ["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"] +],[ + "start", + ["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"] +],[ + "start", + ["text"," "] +],[ + "start", + ["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","))"], + ["text"," "], + ["comment","# Request 2x2 plot layout"] +],[ + "start", + ["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 index 7e501d65..0c757438 100644 --- a/lib/ace/mode/_test/tokens_rdoc.json +++ b/lib/ace/mode/_test/tokens_rdoc.json @@ -1,623 +1,441 @@ -[ - { - "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", " initial " ], - [ "text", "=" ], - [ "nospell.text", " NULL" ], - [ "text", "," ], - [ "nospell.text", " label " ], - [ "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", "}{" ] - ] - }, - { - "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", "}}" ], - [ "text", ". " ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.keyword.operator", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "\\item" ], - [ "paren.keyword.operator", "{" ], - [ "nospell.text", "initial" ], - [ "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", "}{" ] - ] - }, - { - "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", "}}" ], - [ "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", "}}" ], - [ "text", ", " ], - [ "keyword", "\\code" ], - [ "paren.keyword.operator", "{" ], - [ "keyword", "\\link" ], - [ "paren.keyword.operator", "{" ], - [ "nospell.text", "slider" ], - [ "paren.keyword.operator", "}}" ], - [ "text", ", " ], - [ "keyword", "\\code" ], - [ "paren.keyword.operator", "{" ], - [ "keyword", "\\link" ], - [ "paren.keyword.operator", "{" ], - [ "nospell.text", "checkbox" ], - [ "paren.keyword.operator", "}}" ], - [ "text", ", " ], - [ "keyword", "\\code" ], - [ "paren.keyword.operator", "{" ], - [ "keyword", "\\link" ], - [ "paren.keyword.operator", "{" ], - [ "nospell.text", "button" ], - [ "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", " Filtering data with a picker" ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", "manipulate" ], - [ "paren.keyword.operator", "(" ] - ] - }, - { - "state": "nospell", - "data": [ - [ "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", "])" ], - [ "text", "," ], - [ "nospell.text", " " ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " beside " ], - [ "text", "=" ], - [ "nospell.text", " TRUE" ], - [ "text", "," ], - [ "nospell.text", " main " ], - [ "text", "=" ], - [ "nospell.text", " factor" ], - [ "paren.keyword.operator", ")" ], - [ "text", "," ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " factor " ], - [ "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", "))" ] - ] - }, - { - "state": "nospell", - "data": [] - }, - { - "state": "nospell", - "data": [ - [ "text", "##" ], - [ "nospell.text", " Create a picker with labels" ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", "manipulate" ], - [ "paren.keyword.operator", "(" ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " plot" ], - [ "paren.keyword.operator", "(" ], - [ "nospell.text", "pressure" ], - [ "text", "," ], - [ "nospell.text", " type " ], - [ "text", "=" ], - [ "nospell.text", " type" ], - [ "paren.keyword.operator", ")" ], - [ "text", "," ], - [ "nospell.text", " " ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " type " ], - [ "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", "))" ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " " ] - ] - }, - { - "state": "nospell", - "data": [ - [ "text", "##" ], - [ "nospell.text", " Picker with groups" ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", "manipulate" ], - [ "paren.keyword.operator", "(" ] - ] - }, - { - "state": "nospell", - "data": [ - [ "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", "])" ], - [ "text", "," ], - [ "nospell.text", " beside" ], - [ "text", "=" ], - [ "nospell.text", "TRUE" ], - [ "paren.keyword.operator", ")" ], - [ "text", "," ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " group " ], - [ "text", "=" ], - [ "nospell.text", " picker" ], - [ "paren.keyword.operator", "(" ], - [ "text", "\"" ], - [ "nospell.text", "Group 1" ], - [ "text", "\"" ], - [ "nospell.text", " " ], - [ "text", "=" ], - [ "nospell.text", " 1" ], - [ "text", ":" ], - [ "nospell.text", "11" ], - [ "text", "," ], - [ "nospell.text", " " ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " " ], - [ "text", "\"" ], - [ "nospell.text", "Group 2" ], - [ "text", "\"" ], - [ "nospell.text", " " ], - [ "text", "=" ], - [ "nospell.text", " 12" ], - [ "text", ":" ], - [ "nospell.text", "22" ], - [ "text", "," ], - [ "nospell.text", " " ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " " ], - [ "text", "\"" ], - [ "nospell.text", "Group 3" ], - [ "text", "\"" ], - [ "nospell.text", " " ], - [ "text", "=" ], - [ "nospell.text", " 23" ], - [ "text", ":" ], - [ "nospell.text", "32" ], - [ "paren.keyword.operator", "))" ] - ] - }, - { - "state": "nospell", - "data": [] - }, - { - "state": "nospell", - "data": [ - [ "text", "##" ], - [ "nospell.text", " Histogram w" ], - [ "text", "/" ], - [ "nospell.text", " picker to select 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", " histogram" ], - [ "paren.keyword.operator", "(" ], - [ "text", "~" ], - [ "nospell.text", " height " ], - [ "text", "|" ], - [ "nospell.text", " voice" ], - [ "text", "." ], - [ "nospell.text", "part" ], - [ "text", "," ], - [ "nospell.text", " " ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " data " ], - [ "text", "=" ], - [ "nospell.text", " singer" ], - [ "text", "," ], - [ "nospell.text", " type " ], - [ "text", "=" ], - [ "nospell.text", " type" ], - [ "paren.keyword.operator", ")" ], - [ "text", "," ] - ] - }, - { - "state": "nospell", - "data": [ - [ "nospell.text", " type " ], - [ "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", "))" ] - ] - }, - { - "state": "nospell", - "data": [] - }, - { - "state": "start", - "data": [ - [ "paren.keyword.operator", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.keyword.operator", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["keyword","\\name"], + ["paren.keyword.operator","{"], + ["nospell.text","picker"], + ["paren.keyword.operator","}"] +],[ + "start", + ["keyword","\\alias"], + ["paren.keyword.operator","{"], + ["nospell.text","picker"], + ["paren.keyword.operator","}"] +],[ + "start", + ["keyword","\\title"], + ["paren.keyword.operator","{"], + ["text","Create a picker control"], + ["paren.keyword.operator","}"] +],[ + "start", + ["keyword","\\description"], + ["paren.keyword.operator","{"] +],[ + "start", + ["text"," Create a picker control to enable manipulation of plot variables based on a set of fixed choices."] +],[ + "start", + ["paren.keyword.operator","}"] +],[ + "start" +],[ + "nospell", + ["keyword","\\usage"], + ["paren.keyword.operator","{"] +],[ + "nospell", + ["nospell.text","picker"], + ["paren.keyword.operator","("], + ["text","...,"], + ["nospell.text"," initial "], + ["text","="], + ["nospell.text"," NULL"], + ["text",","], + ["nospell.text"," label "], + ["text","="], + ["nospell.text"," NULL"], + ["paren.keyword.operator",")"] +],[ + "start", + ["paren.keyword.operator","}"] +],[ + "start" +],[ + "start" +],[ + "start", + ["keyword","\\arguments"], + ["paren.keyword.operator","{"] +],[ + "start", + ["text"," "], + ["keyword","\\item"], + ["paren.keyword.operator","{"], + ["keyword","\\dots"], + ["paren.keyword.operator","}{"] +],[ + "start", + ["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","}}"], + ["text",". "] +],[ + "start", + ["paren.keyword.operator","}"] +],[ + "start", + ["text"," "], + ["keyword","\\item"], + ["paren.keyword.operator","{"], + ["nospell.text","initial"], + ["paren.keyword.operator","}{"] +],[ + "start", + ["text"," Initial value for picker. Value must be present in the list of choices specified. If not specified defaults to the first choice."] +],[ + "start", + ["paren.keyword.operator","}"] +],[ + "start", + ["text"," "], + ["keyword","\\item"], + ["paren.keyword.operator","{"], + ["nospell.text","label"], + ["paren.keyword.operator","}{"] +],[ + "start", + ["text"," Display label for picker. Defaults to the variable name if not specified."] +],[ + "start", + ["paren.keyword.operator","}"] +],[ + "start", + ["paren.keyword.operator","}"] +],[ + "start" +],[ + "start", + ["keyword","\\value"], + ["paren.keyword.operator","{"] +],[ + "start", + ["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","}}"], + ["text"," function."] +],[ + "start", + ["paren.keyword.operator","}"] +],[ + "start" +],[ + "start", + ["keyword","\\seealso"], + ["paren.keyword.operator","{"] +],[ + "start", + ["keyword","\\code"], + ["paren.keyword.operator","{"], + ["keyword","\\link"], + ["paren.keyword.operator","{"], + ["nospell.text","manipulate"], + ["paren.keyword.operator","}}"], + ["text",", "], + ["keyword","\\code"], + ["paren.keyword.operator","{"], + ["keyword","\\link"], + ["paren.keyword.operator","{"], + ["nospell.text","slider"], + ["paren.keyword.operator","}}"], + ["text",", "], + ["keyword","\\code"], + ["paren.keyword.operator","{"], + ["keyword","\\link"], + ["paren.keyword.operator","{"], + ["nospell.text","checkbox"], + ["paren.keyword.operator","}}"], + ["text",", "], + ["keyword","\\code"], + ["paren.keyword.operator","{"], + ["keyword","\\link"], + ["paren.keyword.operator","{"], + ["nospell.text","button"], + ["paren.keyword.operator","}}"] +],[ + "start", + ["paren.keyword.operator","}"] +],[ + "start" +],[ + "start" +],[ + "nospell", + ["keyword","\\examples"], + ["paren.keyword.operator","{"] +],[ + "nospell", + ["keyword","\\dontrun"], + ["paren.keyword.operator","{"] +],[ + "nospell" +],[ + "nospell", + ["text","##"], + ["nospell.text"," Filtering data with a picker"] +],[ + "nospell", + ["nospell.text","manipulate"], + ["paren.keyword.operator","("] +],[ + "nospell", + ["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","])"], + ["text",","], + ["nospell.text"," "] +],[ + "nospell", + ["nospell.text"," beside "], + ["text","="], + ["nospell.text"," TRUE"], + ["text",","], + ["nospell.text"," main "], + ["text","="], + ["nospell.text"," factor"], + ["paren.keyword.operator",")"], + ["text",","] +],[ + "nospell", + ["nospell.text"," factor "], + ["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","))"] +],[ + "nospell" +],[ + "nospell", + ["text","##"], + ["nospell.text"," Create a picker with labels"] +],[ + "nospell", + ["nospell.text","manipulate"], + ["paren.keyword.operator","("] +],[ + "nospell", + ["nospell.text"," plot"], + ["paren.keyword.operator","("], + ["nospell.text","pressure"], + ["text",","], + ["nospell.text"," type "], + ["text","="], + ["nospell.text"," type"], + ["paren.keyword.operator",")"], + ["text",","], + ["nospell.text"," "] +],[ + "nospell", + ["nospell.text"," type "], + ["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","))"] +],[ + "nospell", + ["nospell.text"," "] +],[ + "nospell", + ["text","##"], + ["nospell.text"," Picker with groups"] +],[ + "nospell", + ["nospell.text","manipulate"], + ["paren.keyword.operator","("] +],[ + "nospell", + ["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","])"], + ["text",","], + ["nospell.text"," beside"], + ["text","="], + ["nospell.text","TRUE"], + ["paren.keyword.operator",")"], + ["text",","] +],[ + "nospell", + ["nospell.text"," group "], + ["text","="], + ["nospell.text"," picker"], + ["paren.keyword.operator","("], + ["text","\""], + ["nospell.text","Group 1"], + ["text","\""], + ["nospell.text"," "], + ["text","="], + ["nospell.text"," 1"], + ["text",":"], + ["nospell.text","11"], + ["text",","], + ["nospell.text"," "] +],[ + "nospell", + ["nospell.text"," "], + ["text","\""], + ["nospell.text","Group 2"], + ["text","\""], + ["nospell.text"," "], + ["text","="], + ["nospell.text"," 12"], + ["text",":"], + ["nospell.text","22"], + ["text",","], + ["nospell.text"," "] +],[ + "nospell", + ["nospell.text"," "], + ["text","\""], + ["nospell.text","Group 3"], + ["text","\""], + ["nospell.text"," "], + ["text","="], + ["nospell.text"," 23"], + ["text",":"], + ["nospell.text","32"], + ["paren.keyword.operator","))"] +],[ + "nospell" +],[ + "nospell", + ["text","##"], + ["nospell.text"," Histogram w"], + ["text","/"], + ["nospell.text"," picker to select type"] +],[ + "nospell", + ["nospell.text","require"], + ["paren.keyword.operator","("], + ["nospell.text","lattice"], + ["paren.keyword.operator",")"] +],[ + "nospell", + ["nospell.text","require"], + ["paren.keyword.operator","("], + ["nospell.text","stats"], + ["paren.keyword.operator",")"] +],[ + "nospell", + ["nospell.text","manipulate"], + ["paren.keyword.operator","("] +],[ + "nospell", + ["nospell.text"," histogram"], + ["paren.keyword.operator","("], + ["text","~"], + ["nospell.text"," height "], + ["text","|"], + ["nospell.text"," voice"], + ["text","."], + ["nospell.text","part"], + ["text",","], + ["nospell.text"," "] +],[ + "nospell", + ["nospell.text"," data "], + ["text","="], + ["nospell.text"," singer"], + ["text",","], + ["nospell.text"," type "], + ["text","="], + ["nospell.text"," type"], + ["paren.keyword.operator",")"], + ["text",","] +],[ + "nospell", + ["nospell.text"," type "], + ["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","))"] +],[ + "nospell" +],[ + "start", + ["paren.keyword.operator","}"] +],[ + "start", + ["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 index 63d89b8c..e3c1fdf1 100644 --- a/lib/ace/mode/_test/tokens_rhtml.json +++ b/lib/ace/mode/_test/tokens_rhtml.json @@ -1,168 +1,106 @@ -[ - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "html" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "head" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "title" ], - [ "meta.tag.r", ">" ], - [ "text", "Title" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "body" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "p" ], - [ "meta.tag.r", ">" ], - [ "text", "This is an R HTML document. When you click the " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "b" ], - [ "meta.tag.r", ">" ], - [ "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.r", ">" ], - [ "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 +[[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","html"], + ["meta.tag.r",">"] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","head"], + ["meta.tag.r",">"] +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","title"], + ["meta.tag.r",">"], + ["text","Title"], + ["meta.tag",""] +],[ + "start", + ["meta.tag",""] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","body"], + ["meta.tag.r",">"] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"], + ["text","This is an R HTML document. When you click the "], + ["meta.tag","<"], + ["meta.tag.tag-name","b"], + ["meta.tag.r",">"], + ["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",""] +],[ + "start" +],[ + "r-start", + ["support.function.codebegin",""] +],[ + "start" +],[ + "start", + ["meta.tag","<"], + ["meta.tag.tag-name","p"], + ["meta.tag.r",">"], + ["text","You can also embed plots, for example:"], + ["meta.tag",""] +],[ + "start" +],[ + "r-start", + ["support.function.codebegin",""] +],[ + "start" +],[ + "start", + ["meta.tag",""] +],[ + "start", + ["meta.tag",""] +],[ + "start" +]] \ 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 ee4106b7..5f4b9d16 100644 --- a/lib/ace/mode/_test/tokens_ruby.json +++ b/lib/ace/mode/_test/tokens_ruby.json @@ -1,220 +1,154 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "#!/usr/bin/ruby" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "# Program to find the factorial of a number" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "fact" ], - [ "paren.lparen", "(" ], - [ "identifier", "n" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "identifier", "n" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "constant.numeric", "0" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "else" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "n" ], - [ "text", " " ], - [ "keyword.operator", "*" ], - [ "text", " " ], - [ "identifier", "fact" ], - [ "paren.lparen", "(" ], - [ "identifier", "n" ], - [ "constant.numeric", "-1" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "end" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "end" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "puts" ], - [ "text", " " ], - [ "identifier", "fact" ], - [ "paren.lparen", "(" ], - [ "support.class", "ARGV" ], - [ "paren.lparen", "[" ], - [ "constant.numeric", "0" ], - [ "paren.rparen", "]" ], - [ "text", "." ], - [ "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 +[[ + "start", + ["comment","#!/usr/bin/ruby"] +],[ + "start" +],[ + "start", + ["comment","# Program to find the factorial of a number"] +],[ + "start", + ["keyword","def"], + ["text"," "], + ["identifier","fact"], + ["paren.lparen","("], + ["identifier","n"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["identifier","n"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["constant.numeric","0"] +],[ + "start", + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["text"," "], + ["keyword","else"] +],[ + "start", + ["text"," "], + ["identifier","n"], + ["text"," "], + ["keyword.operator","*"], + ["text"," "], + ["identifier","fact"], + ["paren.lparen","("], + ["identifier","n"], + ["constant.numeric","-1"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["keyword","end"] +],[ + "start", + ["keyword","end"] +],[ + "start" +],[ + "start", + ["support.function","puts"], + ["text"," "], + ["identifier","fact"], + ["paren.lparen","("], + ["support.class","ARGV"], + ["paren.lparen","["], + ["constant.numeric","0"], + ["paren.rparen","]"], + ["text","."], + ["identifier","to_i"], + ["paren.rparen",")"] +],[ + "start" +],[ + "start", + ["keyword","class"], + ["text"," "], + ["support.class","Range"] +],[ + "start", + ["text"," "], + ["keyword","def"], + ["text"," "], + ["identifier","to_json"], + ["paren.lparen","("], + ["keyword.operator","*"], + ["identifier","a"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["string","'json_class'"], + ["text"," "], + ["punctuation.separator.key-value","=>"], + ["text"," "], + ["variable.language","self"], + ["text","."], + ["keyword","class"], + ["text","."], + ["identifier","name"], + ["text",", "], + ["comment","# = 'Range'"] +],[ + "start", + ["text"," "], + ["string","'data'"], + ["text"," "], + ["punctuation.separator.key-value","=>"], + ["text"," "], + ["paren.lparen","["], + ["text"," "], + ["identifier","first"], + ["text",", "], + ["identifier","last"], + ["text",", "], + ["identifier","exclude_end"], + ["text","? "], + ["paren.rparen","]"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"], + ["text","."], + ["identifier","to_json"], + ["paren.lparen","("], + ["keyword.operator","*"], + ["identifier","a"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["keyword","end"] +],[ + "start", + ["keyword","end"] +],[ + "start" +],[ + "start", + ["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_scad.json b/lib/ace/mode/_test/tokens_scad.json index 44753261..8f0ff637 100644 --- a/lib/ace/mode/_test/tokens_scad.json +++ b/lib/ace/mode/_test/tokens_scad.json @@ -1,256 +1,194 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "// ace can highlight scad!" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "module" ], - [ "text", " " ], - [ "identifier", "Element" ], - [ "paren.lparen", "(" ], - [ "identifier", "xpos" ], - [ "text", ", " ], - [ "identifier", "ypos" ], - [ "text", ", " ], - [ "identifier", "zpos" ], - [ "paren.rparen", ")" ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "identifier", "translate" ], - [ "paren.lparen", "([" ], - [ "identifier", "xpos" ], - [ "text", "," ], - [ "identifier", "ypos" ], - [ "text", "," ], - [ "identifier", "zpos" ], - [ "paren.rparen", "])" ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "identifier", "union" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t\t" ], - [ "identifier", "cube" ], - [ "paren.lparen", "([" ], - [ "constant.numeric", "10" ], - [ "text", "," ], - [ "constant.numeric", "10" ], - [ "text", "," ], - [ "constant.numeric", "4" ], - [ "paren.rparen", "]" ], - [ "text", "," ], - [ "identifier", "true" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t\t" ], - [ "identifier", "cylinder" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "10" ], - [ "text", "," ], - [ "constant.numeric", "15" ], - [ "text", "," ], - [ "constant.numeric", "5" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t\t" ], - [ "identifier", "translate" ], - [ "paren.lparen", "([" ], - [ "constant.numeric", "0" ], - [ "text", "," ], - [ "constant.numeric", "0" ], - [ "text", "," ], - [ "constant.numeric", "10" ], - [ "paren.rparen", "])" ], - [ "identifier", "sphere" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "5" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "identifier", "union" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "keyword", "for" ], - [ "paren.lparen", "(" ], - [ "identifier", "i" ], - [ "keyword.operator", "=" ], - [ "paren.lparen", "[" ], - [ "constant.numeric", "0" ], - [ "text", ":" ], - [ "constant.numeric", "30" ], - [ "paren.rparen", "])" ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t# " ], - [ "identifier", "Element" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "0" ], - [ "text", "," ], - [ "constant.numeric", "0" ], - [ "text", "," ], - [ "constant.numeric", "0" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "identifier", "Element" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "15" ], - [ "keyword.operator", "*" ], - [ "identifier", "i" ], - [ "text", "," ], - [ "constant.numeric", "0" ], - [ "text", "," ], - [ "constant.numeric", "0" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "for" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "i" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "constant.numeric", "3" ], - [ "text", ", " ], - [ "constant.numeric", "5" ], - [ "text", ", " ], - [ "constant.numeric", "7" ], - [ "text", ", " ], - [ "constant.numeric", "11" ], - [ "paren.rparen", "])" ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "identifier", "rotate" ], - [ "paren.lparen", "([" ], - [ "identifier", "i" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "10" ], - [ "text", "," ], - [ "constant.numeric", "0" ], - [ "text", "," ], - [ "constant.numeric", "0" ], - [ "paren.rparen", "])" ], - [ "identifier", "scale" ], - [ "paren.lparen", "([" ], - [ "constant.numeric", "1" ], - [ "text", "," ], - [ "constant.numeric", "1" ], - [ "text", "," ], - [ "identifier", "i" ], - [ "paren.rparen", "])" ], - [ "identifier", "cube" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "10" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["comment","// ace can highlight scad!"] +],[ + "start", + ["keyword","module"], + ["text"," "], + ["identifier","Element"], + ["paren.lparen","("], + ["identifier","xpos"], + ["text",", "], + ["identifier","ypos"], + ["text",", "], + ["identifier","zpos"], + ["paren.rparen",")"], + ["paren.lparen","{"] +],[ + "start", + ["text","\t"], + ["identifier","translate"], + ["paren.lparen","(["], + ["identifier","xpos"], + ["text",","], + ["identifier","ypos"], + ["text",","], + ["identifier","zpos"], + ["paren.rparen","])"], + ["paren.lparen","{"] +],[ + "start", + ["text","\t\t"], + ["identifier","union"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["paren.lparen","{"] +],[ + "start", + ["text","\t\t\t"], + ["identifier","cube"], + ["paren.lparen","(["], + ["constant.numeric","10"], + ["text",","], + ["constant.numeric","10"], + ["text",","], + ["constant.numeric","4"], + ["paren.rparen","]"], + ["text",","], + ["identifier","true"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text","\t\t\t"], + ["identifier","cylinder"], + ["paren.lparen","("], + ["constant.numeric","10"], + ["text",","], + ["constant.numeric","15"], + ["text",","], + ["constant.numeric","5"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text","\t\t\t"], + ["identifier","translate"], + ["paren.lparen","(["], + ["constant.numeric","0"], + ["text",","], + ["constant.numeric","0"], + ["text",","], + ["constant.numeric","10"], + ["paren.rparen","])"], + ["identifier","sphere"], + ["paren.lparen","("], + ["constant.numeric","5"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text","\t\t"], + ["paren.rparen","}"] +],[ + "start", + ["text","\t"], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["identifier","union"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["paren.lparen","{"] +],[ + "start", + ["text","\t"], + ["keyword","for"], + ["paren.lparen","("], + ["identifier","i"], + ["keyword.operator","="], + ["paren.lparen","["], + ["constant.numeric","0"], + ["text",":"], + ["constant.numeric","30"], + ["paren.rparen","])"], + ["paren.lparen","{"] +],[ + "start", + ["text","\t\t# "], + ["identifier","Element"], + ["paren.lparen","("], + ["constant.numeric","0"], + ["text",","], + ["constant.numeric","0"], + ["text",","], + ["constant.numeric","0"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text","\t\t"], + ["identifier","Element"], + ["paren.lparen","("], + ["constant.numeric","15"], + ["keyword.operator","*"], + ["identifier","i"], + ["text",","], + ["constant.numeric","0"], + ["text",","], + ["constant.numeric","0"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text","\t"], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","for"], + ["text"," "], + ["paren.lparen","("], + ["identifier","i"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","["], + ["constant.numeric","3"], + ["text",", "], + ["constant.numeric","5"], + ["text",", "], + ["constant.numeric","7"], + ["text",", "], + ["constant.numeric","11"], + ["paren.rparen","])"], + ["paren.lparen","{"] +],[ + "start", + ["text","\t"], + ["identifier","rotate"], + ["paren.lparen","(["], + ["identifier","i"], + ["keyword.operator","*"], + ["constant.numeric","10"], + ["text",","], + ["constant.numeric","0"], + ["text",","], + ["constant.numeric","0"], + ["paren.rparen","])"], + ["identifier","scale"], + ["paren.lparen","(["], + ["constant.numeric","1"], + ["text",","], + ["constant.numeric","1"], + ["text",","], + ["identifier","i"], + ["paren.rparen","])"], + ["identifier","cube"], + ["paren.lparen","("], + ["constant.numeric","10"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["paren.rparen","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_scala.json b/lib/ace/mode/_test/tokens_scala.json index 64ee64c0..01dd3ce3 100644 --- a/lib/ace/mode/_test/tokens_scala.json +++ b/lib/ace/mode/_test/tokens_scala.json @@ -1,743 +1,542 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "// http://www.scala-lang.org/node/54" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "package" ], - [ "text", " " ], - [ "identifier", "examples" ], - [ "text", "." ], - [ "identifier", "actors" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "import" ], - [ "text", " " ], - [ "identifier", "scala" ], - [ "text", "." ], - [ "identifier", "actors" ], - [ "text", "." ], - [ "identifier", "Actor" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "import" ], - [ "text", " " ], - [ "identifier", "scala" ], - [ "text", "." ], - [ "identifier", "actors" ], - [ "text", "." ], - [ "identifier", "Actor" ], - [ "text", "." ], - [ "identifier", "_" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "abstract" ], - [ "text", " " ], - [ "keyword", "class" ], - [ "text", " " ], - [ "identifier", "PingMessage" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "case" ], - [ "text", " " ], - [ "keyword", "object" ], - [ "text", " " ], - [ "identifier", "Start" ], - [ "text", " " ], - [ "keyword", "extends" ], - [ "text", " " ], - [ "identifier", "PingMessage" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "case" ], - [ "text", " " ], - [ "keyword", "object" ], - [ "text", " " ], - [ "identifier", "SendPing" ], - [ "text", " " ], - [ "keyword", "extends" ], - [ "text", " " ], - [ "identifier", "PingMessage" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "case" ], - [ "text", " " ], - [ "keyword", "object" ], - [ "text", " " ], - [ "identifier", "Pong" ], - [ "text", " " ], - [ "keyword", "extends" ], - [ "text", " " ], - [ "identifier", "PingMessage" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "abstract" ], - [ "text", " " ], - [ "keyword", "class" ], - [ "text", " " ], - [ "identifier", "PongMessage" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "case" ], - [ "text", " " ], - [ "keyword", "object" ], - [ "text", " " ], - [ "identifier", "Ping" ], - [ "text", " " ], - [ "keyword", "extends" ], - [ "text", " " ], - [ "identifier", "PongMessage" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "case" ], - [ "text", " " ], - [ "keyword", "object" ], - [ "text", " " ], - [ "identifier", "Stop" ], - [ "text", " " ], - [ "keyword", "extends" ], - [ "text", " " ], - [ "identifier", "PongMessage" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "object" ], - [ "text", " " ], - [ "identifier", "pingpong" ], - [ "text", " " ], - [ "keyword", "extends" ], - [ "text", " " ], - [ "identifier", "Application" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "val" ], - [ "text", " " ], - [ "identifier", "pong" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "keyword", "new" ], - [ "text", " " ], - [ "identifier", "Pong" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "val" ], - [ "text", " " ], - [ "identifier", "ping" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "keyword", "new" ], - [ "text", " " ], - [ "identifier", "Ping" ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "100000" ], - [ "text", ", " ], - [ "identifier", "pong" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "ping" ], - [ "text", "." ], - [ "identifier", "start" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "pong" ], - [ "text", "." ], - [ "identifier", "start" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "ping" ], - [ "text", " " ], - [ "keyword.operator", "!" ], - [ "text", " " ], - [ "identifier", "Start" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "class" ], - [ "text", " " ], - [ "identifier", "Ping" ], - [ "paren.lparen", "(" ], - [ "identifier", "count" ], - [ "text", ": " ], - [ "support.function", "Int" ], - [ "text", ", " ], - [ "identifier", "pong" ], - [ "text", ": " ], - [ "identifier", "Actor" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "extends" ], - [ "text", " " ], - [ "identifier", "Actor" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "act" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "println" ], - [ "paren.lparen", "(" ], - [ "string", "\"Ping: Initializing with count \"" ], - [ "keyword.operator", "+" ], - [ "identifier", "count" ], - [ "keyword.operator", "+" ], - [ "string", "\": \"" ], - [ "keyword.operator", "+" ], - [ "identifier", "pong" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "var" ], - [ "text", " " ], - [ "identifier", "pingsLeft" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "count" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "loop" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "react" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "case" ], - [ "text", " " ], - [ "identifier", "Start" ], - [ "text", " " ], - [ "keyword.operator", "=>" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "println" ], - [ "paren.lparen", "(" ], - [ "string", "\"Ping: starting.\"" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "pong" ], - [ "text", " " ], - [ "keyword.operator", "!" ], - [ "text", " " ], - [ "identifier", "Ping" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "pingsLeft" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "pingsLeft" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "case" ], - [ "text", " " ], - [ "identifier", "SendPing" ], - [ "text", " " ], - [ "keyword.operator", "=>" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "pong" ], - [ "text", " " ], - [ "keyword.operator", "!" ], - [ "text", " " ], - [ "identifier", "Ping" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "pingsLeft" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "pingsLeft" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "case" ], - [ "text", " " ], - [ "identifier", "Pong" ], - [ "text", " " ], - [ "keyword.operator", "=>" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "pingsLeft" ], - [ "text", " " ], - [ "keyword.operator", "%" ], - [ "text", " " ], - [ "constant.numeric", "1000" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "println" ], - [ "paren.lparen", "(" ], - [ "string", "\"Ping: pong from: \"" ], - [ "keyword.operator", "+" ], - [ "identifier", "sender" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "pingsLeft" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "self" ], - [ "text", " " ], - [ "keyword.operator", "!" ], - [ "text", " " ], - [ "identifier", "SendPing" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "else" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "println" ], - [ "paren.lparen", "(" ], - [ "string", "\"Ping: Stop.\"" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "pong" ], - [ "text", " " ], - [ "keyword.operator", "!" ], - [ "text", " " ], - [ "identifier", "Stop" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "exit" ], - [ "paren.lparen", "(" ], - [ "symbol.constant", "'stop" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "class" ], - [ "text", " " ], - [ "identifier", "Pong" ], - [ "text", " " ], - [ "keyword", "extends" ], - [ "text", " " ], - [ "identifier", "Actor" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "def" ], - [ "text", " " ], - [ "identifier", "act" ], - [ "paren.lparen", "(" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "var" ], - [ "text", " " ], - [ "identifier", "pongCount" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "constant.numeric", "0" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "loop" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "react" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "case" ], - [ "text", " " ], - [ "identifier", "Ping" ], - [ "text", " " ], - [ "keyword.operator", "=>" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "pongCount" ], - [ "text", " " ], - [ "keyword.operator", "%" ], - [ "text", " " ], - [ "constant.numeric", "1000" ], - [ "text", " " ], - [ "keyword.operator", "==" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "println" ], - [ "paren.lparen", "(" ], - [ "string", "\"Pong: ping \"" ], - [ "keyword.operator", "+" ], - [ "identifier", "pongCount" ], - [ "keyword.operator", "+" ], - [ "string", "\" from \"" ], - [ "keyword.operator", "+" ], - [ "identifier", "sender" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "sender" ], - [ "text", " " ], - [ "keyword.operator", "!" ], - [ "text", " " ], - [ "identifier", "Pong" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "pongCount" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "pongCount" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "case" ], - [ "text", " " ], - [ "identifier", "Stop" ], - [ "text", " " ], - [ "keyword.operator", "=>" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "println" ], - [ "paren.lparen", "(" ], - [ "string", "\"Pong: Stop.\"" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "exit" ], - [ "paren.lparen", "(" ], - [ "symbol.constant", "'stop" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["comment","// http://www.scala-lang.org/node/54"] +],[ + "start" +],[ + "start", + ["keyword","package"], + ["text"," "], + ["identifier","examples"], + ["text","."], + ["identifier","actors"] +],[ + "start" +],[ + "start", + ["keyword","import"], + ["text"," "], + ["identifier","scala"], + ["text","."], + ["identifier","actors"], + ["text","."], + ["identifier","Actor"] +],[ + "start", + ["keyword","import"], + ["text"," "], + ["identifier","scala"], + ["text","."], + ["identifier","actors"], + ["text","."], + ["identifier","Actor"], + ["text","."], + ["identifier","_"] +],[ + "start" +],[ + "start", + ["keyword","abstract"], + ["text"," "], + ["keyword","class"], + ["text"," "], + ["identifier","PingMessage"] +],[ + "start", + ["keyword","case"], + ["text"," "], + ["keyword","object"], + ["text"," "], + ["identifier","Start"], + ["text"," "], + ["keyword","extends"], + ["text"," "], + ["identifier","PingMessage"] +],[ + "start", + ["keyword","case"], + ["text"," "], + ["keyword","object"], + ["text"," "], + ["identifier","SendPing"], + ["text"," "], + ["keyword","extends"], + ["text"," "], + ["identifier","PingMessage"] +],[ + "start", + ["keyword","case"], + ["text"," "], + ["keyword","object"], + ["text"," "], + ["identifier","Pong"], + ["text"," "], + ["keyword","extends"], + ["text"," "], + ["identifier","PingMessage"] +],[ + "start" +],[ + "start", + ["keyword","abstract"], + ["text"," "], + ["keyword","class"], + ["text"," "], + ["identifier","PongMessage"] +],[ + "start", + ["keyword","case"], + ["text"," "], + ["keyword","object"], + ["text"," "], + ["identifier","Ping"], + ["text"," "], + ["keyword","extends"], + ["text"," "], + ["identifier","PongMessage"] +],[ + "start", + ["keyword","case"], + ["text"," "], + ["keyword","object"], + ["text"," "], + ["identifier","Stop"], + ["text"," "], + ["keyword","extends"], + ["text"," "], + ["identifier","PongMessage"] +],[ + "start" +],[ + "start", + ["keyword","object"], + ["text"," "], + ["identifier","pingpong"], + ["text"," "], + ["keyword","extends"], + ["text"," "], + ["identifier","Application"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","val"], + ["text"," "], + ["identifier","pong"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["keyword","new"], + ["text"," "], + ["identifier","Pong"] +],[ + "start", + ["text"," "], + ["keyword","val"], + ["text"," "], + ["identifier","ping"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["keyword","new"], + ["text"," "], + ["identifier","Ping"], + ["paren.lparen","("], + ["constant.numeric","100000"], + ["text",", "], + ["identifier","pong"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["identifier","ping"], + ["text","."], + ["identifier","start"] +],[ + "start", + ["text"," "], + ["identifier","pong"], + ["text","."], + ["identifier","start"] +],[ + "start", + ["text"," "], + ["identifier","ping"], + ["text"," "], + ["keyword.operator","!"], + ["text"," "], + ["identifier","Start"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","class"], + ["text"," "], + ["identifier","Ping"], + ["paren.lparen","("], + ["identifier","count"], + ["text",": "], + ["support.function","Int"], + ["text",", "], + ["identifier","pong"], + ["text",": "], + ["identifier","Actor"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","extends"], + ["text"," "], + ["identifier","Actor"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","def"], + ["text"," "], + ["identifier","act"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","println"], + ["paren.lparen","("], + ["string","\"Ping: Initializing with count \""], + ["keyword.operator","+"], + ["identifier","count"], + ["keyword.operator","+"], + ["string","\": \""], + ["keyword.operator","+"], + ["identifier","pong"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["keyword","var"], + ["text"," "], + ["identifier","pingsLeft"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","count"] +],[ + "start", + ["text"," "], + ["identifier","loop"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","react"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","case"], + ["text"," "], + ["identifier","Start"], + ["text"," "], + ["keyword.operator","=>"] +],[ + "start", + ["text"," "], + ["identifier","println"], + ["paren.lparen","("], + ["string","\"Ping: starting.\""], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["identifier","pong"], + ["text"," "], + ["keyword.operator","!"], + ["text"," "], + ["identifier","Ping"] +],[ + "start", + ["text"," "], + ["identifier","pingsLeft"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","pingsLeft"], + ["text"," "], + ["keyword.operator","-"], + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["text"," "], + ["keyword","case"], + ["text"," "], + ["identifier","SendPing"], + ["text"," "], + ["keyword.operator","=>"] +],[ + "start", + ["text"," "], + ["identifier","pong"], + ["text"," "], + ["keyword.operator","!"], + ["text"," "], + ["identifier","Ping"] +],[ + "start", + ["text"," "], + ["identifier","pingsLeft"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","pingsLeft"], + ["text"," "], + ["keyword.operator","-"], + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["text"," "], + ["keyword","case"], + ["text"," "], + ["identifier","Pong"], + ["text"," "], + ["keyword.operator","=>"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","("], + ["identifier","pingsLeft"], + ["text"," "], + ["keyword.operator","%"], + ["text"," "], + ["constant.numeric","1000"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["constant.numeric","0"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["identifier","println"], + ["paren.lparen","("], + ["string","\"Ping: pong from: \""], + ["keyword.operator","+"], + ["identifier","sender"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","("], + ["identifier","pingsLeft"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["constant.numeric","0"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["identifier","self"], + ["text"," "], + ["keyword.operator","!"], + ["text"," "], + ["identifier","SendPing"] +],[ + "start", + ["text"," "], + ["keyword","else"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","println"], + ["paren.lparen","("], + ["string","\"Ping: Stop.\""], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["identifier","pong"], + ["text"," "], + ["keyword.operator","!"], + ["text"," "], + ["identifier","Stop"] +],[ + "start", + ["text"," "], + ["identifier","exit"], + ["paren.lparen","("], + ["symbol.constant","'stop"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","class"], + ["text"," "], + ["identifier","Pong"], + ["text"," "], + ["keyword","extends"], + ["text"," "], + ["identifier","Actor"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","def"], + ["text"," "], + ["identifier","act"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","var"], + ["text"," "], + ["identifier","pongCount"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0"] +],[ + "start", + ["text"," "], + ["identifier","loop"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","react"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["keyword","case"], + ["text"," "], + ["identifier","Ping"], + ["text"," "], + ["keyword.operator","=>"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","("], + ["identifier","pongCount"], + ["text"," "], + ["keyword.operator","%"], + ["text"," "], + ["constant.numeric","1000"], + ["text"," "], + ["keyword.operator","=="], + ["text"," "], + ["constant.numeric","0"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["identifier","println"], + ["paren.lparen","("], + ["string","\"Pong: ping \""], + ["keyword.operator","+"], + ["identifier","pongCount"], + ["keyword.operator","+"], + ["string","\" from \""], + ["keyword.operator","+"], + ["identifier","sender"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["identifier","sender"], + ["text"," "], + ["keyword.operator","!"], + ["text"," "], + ["identifier","Pong"] +],[ + "start", + ["text"," "], + ["identifier","pongCount"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","pongCount"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["text"," "], + ["keyword","case"], + ["text"," "], + ["identifier","Stop"], + ["text"," "], + ["keyword.operator","=>"] +],[ + "start", + ["text"," "], + ["identifier","println"], + ["paren.lparen","("], + ["string","\"Pong: Stop.\""], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["identifier","exit"], + ["paren.lparen","("], + ["symbol.constant","'stop"], + ["paren.rparen",")"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_scss.json b/lib/ace/mode/_test/tokens_scss.json index 716ce3dd..7e92f153 100644 --- a/lib/ace/mode/_test/tokens_scss.json +++ b/lib/ace/mode/_test/tokens_scss.json @@ -1,180 +1,123 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "/* style.scss */" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable.language", "#navbar" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "$navbar-width" ], - [ "text", ": " ], - [ "constant.numeric", "800px" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "$items" ], - [ "text", ": " ], - [ "constant.numeric", "5" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "$navbar-color" ], - [ "text", ": " ], - [ "constant.numeric", "#ce4dd6" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "width" ], - [ "text", ": " ], - [ "variable", "$navbar-width" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "border-bottom" ], - [ "text", ": " ], - [ "constant.numeric", "2px" ], - [ "text", " " ], - [ "constant.language", "solid" ], - [ "text", " " ], - [ "variable", "$navbar-color" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable.language", "li" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "float" ], - [ "text", ": " ], - [ "support.type", "left" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "width" ], - [ "text", ": " ], - [ "variable", "$navbar-width" ], - [ "text", "/" ], - [ "variable", "$items" ], - [ "text", " " ], - [ "constant", "-" ], - [ "text", " " ], - [ "constant.numeric", "10px" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "background-color" ], - [ "text", ": " ], - [ "support.function", "lighten" ], - [ "paren.lparen", "(" ], - [ "variable", "$navbar-color" ], - [ "text", ", " ], - [ "constant.numeric", "20%" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " &" ], - [ "variable.language", ":hover" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.type", "background-color" ], - [ "text", ": " ], - [ "support.function", "lighten" ], - [ "paren.lparen", "(" ], - [ "variable", "$navbar-color" ], - [ "text", ", " ], - [ "constant.numeric", "10%" ], - [ "paren.rparen", ")" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["comment","/* style.scss */"] +],[ + "start" +],[ + "start", + ["variable.language","#navbar"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["variable","$navbar-width"], + ["text",": "], + ["constant.numeric","800px"], + ["text",";"] +],[ + "start", + ["text"," "], + ["variable","$items"], + ["text",": "], + ["constant.numeric","5"], + ["text",";"] +],[ + "start", + ["text"," "], + ["variable","$navbar-color"], + ["text",": "], + ["constant.numeric","#ce4dd6"], + ["text",";"] +],[ + "start" +],[ + "start", + ["text"," "], + ["support.type","width"], + ["text",": "], + ["variable","$navbar-width"], + ["text",";"] +],[ + "start", + ["text"," "], + ["support.type","border-bottom"], + ["text",": "], + ["constant.numeric","2px"], + ["text"," "], + ["constant.language","solid"], + ["text"," "], + ["variable","$navbar-color"], + ["text",";"] +],[ + "start" +],[ + "start", + ["text"," "], + ["variable.language","li"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["support.type","float"], + ["text",": "], + ["support.type","left"], + ["text",";"] +],[ + "start", + ["text"," "], + ["support.type","width"], + ["text",": "], + ["variable","$navbar-width"], + ["text","/"], + ["variable","$items"], + ["text"," "], + ["constant","-"], + ["text"," "], + ["constant.numeric","10px"], + ["text",";"] +],[ + "start" +],[ + "start", + ["text"," "], + ["support.type","background-color"], + ["text",": "], + ["support.function","lighten"], + ["paren.lparen","("], + ["variable","$navbar-color"], + ["text",", "], + ["constant.numeric","20%"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text"," &"], + ["variable.language",":hover"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["support.type","background-color"], + ["text",": "], + ["support.function","lighten"], + ["paren.lparen","("], + ["variable","$navbar-color"], + ["text",", "], + ["constant.numeric","10%"], + ["paren.rparen",")"], + ["text",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["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 16bbe439..d490692e 100644 --- a/lib/ace/mode/_test/tokens_sh.json +++ b/lib/ace/mode/_test/tokens_sh.json @@ -1,432 +1,320 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "#!/bin/sh" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "comment", "# Script to open a browser to current branch" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "# Repo formats:" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "# ssh git@github.com:richoH/gh_pr.git" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "# http https://richoH@github.com/richoH/gh_pr.git" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "# git git://github.com/richoH/gh_pr.git" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "variable", "username=" ], - [ "text", "`" ], - [ "identifier", "git" ], - [ "text", " " ], - [ "identifier", "config" ], - [ "text", " " ], - [ "keyword.operator", "--" ], - [ "identifier", "get" ], - [ "text", " " ], - [ "identifier", "github" ], - [ "text", "." ], - [ "identifier", "user" ], - [ "text", "`" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "support.function", "get_repo()" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "identifier", "git" ], - [ "text", " " ], - [ "identifier", "remote" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "v" ], - [ "text", " | " ], - [ "identifier", "grep" ], - [ "text", " $" ], - [ "paren.lparen", "{" ], - [ "text", "@:" ], - [ "keyword.operator", "-" ], - [ "variable", "$username" ], - [ "paren.rparen", "}" ], - [ "text", " | " ], - [ "keyword", "while" ], - [ "text", " " ], - [ "keyword", "read" ], - [ "text", " " ], - [ "identifier", "remote" ], - [ "text", "; " ], - [ "keyword", "do" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "variable", "repo=" ], - [ "text", "`" ], - [ "support.function.builtin", "echo" ], - [ "text", " " ], - [ "variable", "$remote" ], - [ "text", " | " ], - [ "identifier", "grep" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "E" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "o" ], - [ "text", " " ], - [ "string", "\"git@github.com:[^ ]*\"" ], - [ "text", "`; " ], - [ "keyword", "then" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "echo" ], - [ "text", " " ], - [ "variable", "$repo" ], - [ "text", " | " ], - [ "identifier", "sed" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "e" ], - [ "text", " " ], - [ "string", "\"s/^git@github\\.com://\"" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "e" ], - [ "text", " " ], - [ "string", "\"s/\\.git$//\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "exit" ], - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "fi" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "variable", "repo=" ], - [ "text", "`" ], - [ "support.function.builtin", "echo" ], - [ "text", " " ], - [ "variable", "$remote" ], - [ "text", " | " ], - [ "identifier", "grep" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "E" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "o" ], - [ "text", " " ], - [ "string", "\"https?://([^@]*@)?github.com/[^ ]*\\.git\"" ], - [ "text", "`; " ], - [ "keyword", "then" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "echo" ], - [ "text", " " ], - [ "variable", "$repo" ], - [ "text", " | " ], - [ "identifier", "sed" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "e" ], - [ "text", " " ], - [ "string", "\"s|^https?://||\"" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "e" ], - [ "text", " " ], - [ "string", "\"s/^.*github\\.com\\///\"" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "e" ], - [ "text", " " ], - [ "string", "\"s/\\.git$//\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "exit" ], - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "fi" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "variable", "repo=" ], - [ "text", "`" ], - [ "support.function.builtin", "echo" ], - [ "text", " " ], - [ "variable", "$remote" ], - [ "text", " | " ], - [ "identifier", "grep" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "E" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "o" ], - [ "text", " " ], - [ "string", "\"git://github.com/[^ ]*\\.git\"" ], - [ "text", "`; " ], - [ "keyword", "then" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "echo" ], - [ "text", " " ], - [ "variable", "$repo" ], - [ "text", " | " ], - [ "identifier", "sed" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "e" ], - [ "text", " " ], - [ "string", "\"s|^git://github.com/||\"" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "e" ], - [ "text", " " ], - [ "string", "\"s/\\.git$//\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "exit" ], - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "fi" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "done" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "text", " " ], - [ "variable.language", "$?" ], - [ "text", " " ], - [ "keyword.operator", "-" ], - [ "identifier", "eq" ], - [ "text", " " ], - [ "constant.numeric", "0" ], - [ "text", " " ], - [ "paren.rparen", "]" ], - [ "text", "; " ], - [ "keyword", "then" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "echo" ], - [ "text", " " ], - [ "string", "\"Couldn't find a valid remote\"" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "support.function", "&2" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "exit" ], - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "fi" ] - ] - }, - { - "state": "start", - "data": [ - [ "paren.rparen", "}" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "if" ], - [ "text", " " ], - [ "variable", "repo=" ], - [ "text", "`" ], - [ "identifier", "get_repo" ], - [ "text", " $@`; " ], - [ "keyword", "then" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "variable", "branch=" ], - [ "text", "`" ], - [ "identifier", "git" ], - [ "text", " " ], - [ "identifier", "symbolic" ], - [ "keyword.operator", "-" ], - [ "identifier", "ref" ], - [ "text", " " ], - [ "identifier", "HEAD" ], - [ "text", " " ], - [ "constant.numeric", "2" ], - [ "keyword.operator", ">/" ], - [ "identifier", "dev" ], - [ "keyword.operator", "/" ], - [ "identifier", "null" ], - [ "text", "`" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "echo" ], - [ "text", " " ], - [ "string", "\"http://github.com/$repo/pull/new/${branch##refs/heads/}\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "else" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "support.function.builtin", "exit" ], - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "fi" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "start", + ["comment","#!/bin/sh"] +],[ + "start" +],[ + "start", + ["comment","# Script to open a browser to current branch"] +],[ + "start", + ["comment","# Repo formats:"] +],[ + "start", + ["comment","# ssh git@github.com:richoH/gh_pr.git"] +],[ + "start", + ["comment","# http https://richoH@github.com/richoH/gh_pr.git"] +],[ + "start", + ["comment","# git git://github.com/richoH/gh_pr.git"] +],[ + "start" +],[ + "start", + ["variable","username="], + ["text","`"], + ["identifier","git"], + ["text"," "], + ["identifier","config"], + ["text"," "], + ["keyword.operator","--"], + ["identifier","get"], + ["text"," "], + ["identifier","github"], + ["text","."], + ["identifier","user"], + ["text","`"] +],[ + "start" +],[ + "start", + ["support.function","get_repo()"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["identifier","git"], + ["text"," "], + ["identifier","remote"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","v"], + ["text"," | "], + ["identifier","grep"], + ["text"," $"], + ["paren.lparen","{"], + ["text","@:"], + ["keyword.operator","-"], + ["variable","$username"], + ["paren.rparen","}"], + ["text"," | "], + ["keyword","while"], + ["text"," "], + ["keyword","read"], + ["text"," "], + ["identifier","remote"], + ["text","; "], + ["keyword","do"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["variable","repo="], + ["text","`"], + ["support.function.builtin","echo"], + ["text"," "], + ["variable","$remote"], + ["text"," | "], + ["identifier","grep"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","E"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","o"], + ["text"," "], + ["string","\"git@github.com:[^ ]*\""], + ["text","`; "], + ["keyword","then"] +],[ + "start", + ["text"," "], + ["support.function.builtin","echo"], + ["text"," "], + ["variable","$repo"], + ["text"," | "], + ["identifier","sed"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","e"], + ["text"," "], + ["string","\"s/^git@github\\.com://\""], + ["text"," "], + ["keyword.operator","-"], + ["identifier","e"], + ["text"," "], + ["string","\"s/\\.git$//\""] +],[ + "start", + ["text"," "], + ["support.function.builtin","exit"], + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["text"," "], + ["keyword","fi"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["variable","repo="], + ["text","`"], + ["support.function.builtin","echo"], + ["text"," "], + ["variable","$remote"], + ["text"," | "], + ["identifier","grep"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","E"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","o"], + ["text"," "], + ["string","\"https?://([^@]*@)?github.com/[^ ]*\\.git\""], + ["text","`; "], + ["keyword","then"] +],[ + "start", + ["text"," "], + ["support.function.builtin","echo"], + ["text"," "], + ["variable","$repo"], + ["text"," | "], + ["identifier","sed"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","e"], + ["text"," "], + ["string","\"s|^https?://||\""], + ["text"," "], + ["keyword.operator","-"], + ["identifier","e"], + ["text"," "], + ["string","\"s/^.*github\\.com\\///\""], + ["text"," "], + ["keyword.operator","-"], + ["identifier","e"], + ["text"," "], + ["string","\"s/\\.git$//\""] +],[ + "start", + ["text"," "], + ["support.function.builtin","exit"], + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["text"," "], + ["keyword","fi"] +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["variable","repo="], + ["text","`"], + ["support.function.builtin","echo"], + ["text"," "], + ["variable","$remote"], + ["text"," | "], + ["identifier","grep"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","E"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","o"], + ["text"," "], + ["string","\"git://github.com/[^ ]*\\.git\""], + ["text","`; "], + ["keyword","then"] +],[ + "start", + ["text"," "], + ["support.function.builtin","echo"], + ["text"," "], + ["variable","$repo"], + ["text"," | "], + ["identifier","sed"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","e"], + ["text"," "], + ["string","\"s|^git://github.com/||\""], + ["text"," "], + ["keyword.operator","-"], + ["identifier","e"], + ["text"," "], + ["string","\"s/\\.git$//\""] +],[ + "start", + ["text"," "], + ["support.function.builtin","exit"], + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["text"," "], + ["keyword","fi"] +],[ + "start", + ["text"," "], + ["keyword","done"] +],[ + "start" +],[ + "start", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","["], + ["text"," "], + ["variable.language","$?"], + ["text"," "], + ["keyword.operator","-"], + ["identifier","eq"], + ["text"," "], + ["constant.numeric","0"], + ["text"," "], + ["paren.rparen","]"], + ["text","; "], + ["keyword","then"] +],[ + "start", + ["text"," "], + ["support.function.builtin","echo"], + ["text"," "], + ["string","\"Couldn't find a valid remote\""], + ["text"," "], + ["keyword.operator",">"], + ["support.function","&2"] +],[ + "start", + ["text"," "], + ["support.function.builtin","exit"], + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["text"," "], + ["keyword","fi"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["keyword","if"], + ["text"," "], + ["variable","repo="], + ["text","`"], + ["identifier","get_repo"], + ["text"," $@`; "], + ["keyword","then"] +],[ + "start", + ["text"," "], + ["variable","branch="], + ["text","`"], + ["identifier","git"], + ["text"," "], + ["identifier","symbolic"], + ["keyword.operator","-"], + ["identifier","ref"], + ["text"," "], + ["identifier","HEAD"], + ["text"," "], + ["constant.numeric","2"], + ["keyword.operator",">/"], + ["identifier","dev"], + ["keyword.operator","/"], + ["identifier","null"], + ["text","`"] +],[ + "start", + ["text"," "], + ["support.function.builtin","echo"], + ["text"," "], + ["string","\"http://github.com/$repo/pull/new/${branch##refs/heads/}\""] +],[ + "start", + ["keyword","else"] +],[ + "start", + ["text"," "], + ["support.function.builtin","exit"], + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["keyword","fi"] +],[ + "start" +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_sql.json b/lib/ace/mode/_test/tokens_sql.json index 525af9d4..09a3ef99 100644 --- a/lib/ace/mode/_test/tokens_sql.json +++ b/lib/ace/mode/_test/tokens_sql.json @@ -1,73 +1,54 @@ -[ - { - "state": "start", - "data": [ - [ "keyword", "SELECT" ], - [ "text", " " ], - [ "identifier", "city" ], - [ "text", ", " ], - [ "support.function", "COUNT" ], - [ "paren.lparen", "(" ], - [ "identifier", "id" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword", "AS" ], - [ "text", " " ], - [ "identifier", "users_count" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "FROM" ], - [ "text", " " ], - [ "identifier", "users" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "WHERE" ], - [ "text", " " ], - [ "identifier", "group_name" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string", "'salesman'" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "AND" ], - [ "text", " " ], - [ "identifier", "created" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "string", "'2011-05-21'" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "GROUP" ], - [ "text", " " ], - [ "keyword", "BY" ], - [ "text", " " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "ORDER" ], - [ "text", " " ], - [ "keyword", "BY" ], - [ "text", " " ], - [ "constant.numeric", "2" ], - [ "text", " " ], - [ "keyword", "DESC" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["keyword","SELECT"], + ["text"," "], + ["identifier","city"], + ["text",", "], + ["support.function","COUNT"], + ["paren.lparen","("], + ["identifier","id"], + ["paren.rparen",")"], + ["text"," "], + ["keyword","AS"], + ["text"," "], + ["identifier","users_count"] +],[ + "start", + ["keyword","FROM"], + ["text"," "], + ["identifier","users"] +],[ + "start", + ["keyword","WHERE"], + ["text"," "], + ["identifier","group_name"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","'salesman'"] +],[ + "start", + ["keyword","AND"], + ["text"," "], + ["identifier","created"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["string","'2011-05-21'"] +],[ + "start", + ["keyword","GROUP"], + ["text"," "], + ["keyword","BY"], + ["text"," "], + ["constant.numeric","1"] +],[ + "start", + ["keyword","ORDER"], + ["text"," "], + ["keyword","BY"], + ["text"," "], + ["constant.numeric","2"], + ["text"," "], + ["keyword","DESC"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_stylus.json b/lib/ace/mode/_test/tokens_stylus.json index d7d6cd94..d7f15758 100644 --- a/lib/ace/mode/_test/tokens_stylus.json +++ b/lib/ace/mode/_test/tokens_stylus.json @@ -1,425 +1,270 @@ -[ - { - "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", " " ], - [ "support.constant", "solid" ], - [ "text", " 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", ": " ], - [ "support.constant", "inline" ] - ] - }, - { - "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", " " ], - [ "support.constant", "inline" ] - ] - }, - { - "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", " " ], - [ "support.constant", "inline" ] - ] - }, - { - "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 +[[ + "start", + ["comment","// I'm a comment!"] +],[ + "start" +],[ + "comment", + ["comment","/*"] +],[ + "comment", + ["comment"," * Adds the given numbers together."] +],[ + "start", + ["comment"," */"] +],[ + "start" +],[ + "start" +],[ + "comment", + ["comment","/*!"] +],[ + "comment", + ["comment"," * Adds the given numbers together."] +],[ + "start", + ["comment"," */"] +],[ + "start" +],[ + "start" +],[ + "start", + ["entity.name.function.stylus","asdasdasdad"], + ["text","(df, ad"], + ["keyword.operator.stylus","="], + ["constant.numeric","23"], + ["text",")"] +],[ + "start" +],[ + "start", + ["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",")"] +],[ + "start", + ["text"," "], + ["entity.name.tag.stylus","a"], + ["text"," "], + ["keyword.operator.stylus","+"], + ["text"," "], + ["entity.name.tag.stylus","b"] +],[ + "start", + ["entity.name.function.stylus","green"], + ["text","("], + ["constant.numeric","#0c0"], + ["text",")"] +],[ + "start", + ["text"," add("], + ["constant.numeric","10"], + ["text",", "], + ["constant.numeric","5"], + ["text",")"] +],[ + "start", + ["text"," "], + ["comment","// => 15"] +],[ + "start" +],[ + "start", + ["text"," add("], + ["constant.numeric","10"], + ["text",")"] +],[ + "start", + ["text"," add("], + ["entity.name.tag.stylus","a"], + ["text",", "], + ["entity.name.tag.stylus","b"], + ["text",")"] +],[ + "start" +],[ + "start", + ["entity.language.stylus"," &"], + ["text","asdasd"] +],[ + "start" +],[ + "start", + ["text"," ("], + ["variable.language.stylus","arguments"], + ["text",")"] +],[ + "start" +],[ + "start", + ["text"," "], + ["keyword.stylus","@sdfsdf"] +],[ + "start", + ["entity.other.attribute-name.class.stylus",".signatures"] +],[ + "start", + ["text"," "], + ["support.type","background-color"], + ["text"," "], + ["constant.numeric","#e0e8e0"] +],[ + "start", + ["text"," "], + ["support.type","border"], + ["text"," "], + ["constant.numeric","1"], + ["keyword","px"], + ["text"," "], + ["support.constant","solid"], + ["text"," grayLighter"] +],[ + "start", + ["text"," "], + ["support.type","box-shadow"], + ["text"," "], + ["constant.numeric","0"], + ["text"," "], + ["constant.numeric","0"], + ["text"," "], + ["constant.numeric","3"], + ["keyword","px"], + ["text"," grayLightest"] +],[ + "start", + ["text"," "], + ["support.type","border-radius"], + ["text"," "], + ["constant.numeric","3"], + ["keyword","px"] +],[ + "start", + ["text"," "], + ["support.type","padding"], + ["text"," "], + ["constant.numeric","3"], + ["keyword","px"], + ["text"," "], + ["constant.numeric","5"], + ["keyword","px"] +],[ + "start", + ["text"," "], + ["string","\"adsads\""] +],[ + "start", + ["text"," "], + ["support.type","margin-left"], + ["text"," "], + ["constant.numeric","0"] +],[ + "start", + ["text"," "], + ["support.type","list-style"], + ["text"," "], + ["support.constant","none"] +],[ + "start", + ["entity.other.attribute-name.class.stylus",".signature"] +],[ + "start", + ["text"," "], + ["support.type","list-style"], + ["text"," "], + ["support.constant","none"] +],[ + "start", + ["text"," "], + ["support.type","display"], + ["text",": "], + ["support.constant","inline"] +],[ + "start", + ["text"," "], + ["support.type","margin-left"], + ["text"," "], + ["constant.numeric","0"] +],[ + "start", + ["text"," "], + ["keyword.operator.stylus",">"], + ["text"," "], + ["entity.name.tag.stylus","li"] +],[ + "start", + ["text"," "], + ["support.type","display"], + ["text"," "], + ["support.constant","inline"] +],[ + "start", + ["keyword.operator.stylus","is"], + ["text"," "], + ["keyword.operator.stylus","not"] +],[ + "start", + ["entity.other.attribute-name.class.stylus",".signature-values"] +],[ + "start", + ["text"," "], + ["support.type","list-style"], + ["text"," "], + ["support.constant","none"] +],[ + "start", + ["text"," "], + ["support.type","display"], + ["text"," "], + ["support.constant","inline"] +],[ + "start", + ["text"," "], + ["support.type","margin-left"], + ["text"," "], + ["constant.numeric","0"] +],[ + "start", + ["entity.language.stylus"," &"], + ["punctuation",":"], + ["entity.other.attribute-name.pseudo-element.css","before"] +],[ + "start", + ["text"," "], + ["support.type","content"], + ["text"," "], + ["string","'→'"] +],[ + "start", + ["text"," "], + ["support.type","margin"], + ["text"," "], + ["constant.numeric","0"], + ["text"," "], + ["constant.numeric","5"], + ["keyword","px"] +],[ + "start", + ["text"," "], + ["keyword.operator.stylus",">"], + ["text"," "], + ["entity.name.tag.stylus","li"] +],[ + "start", + ["text"," "], + ["keyword.control.stylus","!important"] +],[ + "start" +],[ + "start", + ["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 fd8cb5b3..28787337 100644 --- a/lib/ace/mode/_test/tokens_svg.json +++ b/lib/ace/mode/_test/tokens_svg.json @@ -1,929 +1,688 @@ -[ - { - "state": "tag_embed_attribute_list", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "svg" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "width" ], - [ "keyword.operator", "=" ], - [ "string", "\"800\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "height" ], - [ "keyword.operator", "=" ], - [ "string", "\"600\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "xmlns" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://www.w3.org/2000/svg\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "onload" ], - [ "keyword.operator", "=" ], - [ "string", "\"StartAnimation(evt)\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "title" ], - [ "meta.tag.r", ">" ], - [ "text", "Test Tube Progress Bar" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "desc" ], - [ "meta.tag.r", ">" ], - [ "text", "Created for the Web Directions SVG competition" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "script" ], - [ "text", " " ], - [ "entity.other.attribute-name", "type" ], - [ "keyword.operator", "=" ], - [ "string", "\"text/ecmascript\"" ], - [ "meta.tag.r", ">" ], - [ "keyword.operator", "" ], - [ "text", " " ], - [ "identifier", "max_time" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "keyword", "return" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "js-start", - "data": [ - [ "text", " " ], - [ "comment", "// Scale the text string gradually until it is 20 times larger" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "scalefactor" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "timevalue" ], - [ "text", " " ], - [ "keyword.operator", "*" ], - [ "text", " " ], - [ "constant.numeric", "650" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword.operator", "/" ], - [ "text", " " ], - [ "identifier", "max_time" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "js-start", - "data": [] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "timevalue" ], - [ "text", " " ], - [ "keyword.operator", "<" ], - [ "text", " " ], - [ "constant.numeric", "30" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "hickory" ], - [ "punctuation.operator", "." ], - [ "support.function.dom", "setAttribute" ], - [ "paren.lparen", "(" ], - [ "string", "\"display\"" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "string", "\"\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "hickory" ], - [ "punctuation.operator", "." ], - [ "support.function.dom", "setAttribute" ], - [ "paren.lparen", "(" ], - [ "string", "\"transform\"" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "string", "\"translate(\"" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "600" ], - [ "keyword.operator", "+" ], - [ "identifier", "scalefactor" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "3" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "-1" ], - [ "text", " " ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "string", "\", -144 )\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "js-start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "js-start", - "data": [] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "timevalue" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "constant.numeric", "30" ], - [ "text", " " ], - [ "keyword.operator", "&&" ], - [ "text", " " ], - [ "identifier", "timevalue" ], - [ "text", " " ], - [ "keyword.operator", "<" ], - [ "text", " " ], - [ "constant.numeric", "66" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "dickory" ], - [ "punctuation.operator", "." ], - [ "support.function.dom", "setAttribute" ], - [ "paren.lparen", "(" ], - [ "string", "\"display\"" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "string", "\"\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "dickory" ], - [ "punctuation.operator", "." ], - [ "support.function.dom", "setAttribute" ], - [ "paren.lparen", "(" ], - [ "string", "\"transform\"" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "string", "\"translate(\"" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "-795" ], - [ "keyword.operator", "+" ], - [ "identifier", "scalefactor" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "2" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "string", "\", 0 )\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "js-start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "identifier", "timevalue" ], - [ "text", " " ], - [ "keyword.operator", ">" ], - [ "text", " " ], - [ "constant.numeric", "66" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "dock" ], - [ "punctuation.operator", "." ], - [ "support.function.dom", "setAttribute" ], - [ "paren.lparen", "(" ], - [ "string", "\"display\"" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "string", "\"\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "js-regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "dock" ], - [ "punctuation.operator", "." ], - [ "support.function.dom", "setAttribute" ], - [ "paren.lparen", "(" ], - [ "string", "\"transform\"" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "string", "\"translate(\"" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "paren.lparen", "(" ], - [ "constant.numeric", "1450" ], - [ "keyword.operator", "+" ], - [ "identifier", "scalefactor" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "2" ], - [ "keyword.operator", "*" ], - [ "constant.numeric", "-1" ], - [ "paren.rparen", ")" ], - [ "text", " " ], - [ "keyword.operator", "+" ], - [ "text", " " ], - [ "string", "\", 144 )\"" ], - [ "paren.rparen", ")" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "js-start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "js-start", - "data": [] - }, - { - "state": "js-start", - "data": [ - [ "text", " " ], - [ "comment", "// Call ShowAndGrowElement again milliseconds later." ] - ] - }, - { - "state": "js-start", - "data": [ - [ "text", " " ], - [ "identifier", "setTimeout" ], - [ "paren.lparen", "(" ], - [ "string", "\"ShowAndGrowElement()\"" ], - [ "punctuation.operator", "," ], - [ "text", " " ], - [ "identifier", "timer_increment" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "js-start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "js-start", - "data": [ - [ "text", " " ], - [ "variable.language", "window" ], - [ "punctuation.operator", "." ], - [ "identifier", "ShowAndGrowElement" ], - [ "text", " " ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "identifier", "ShowAndGrowElement" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "]]" ], - [ "keyword.operator", ">" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "rect" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "fill" ], - [ "keyword.operator", "=" ], - [ "string", "\"#2e3436\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "fill-rule" ], - [ "keyword.operator", "=" ], - [ "string", "\"nonzero\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "stroke-width" ], - [ "keyword.operator", "=" ], - [ "string", "\"3\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "y" ], - [ "keyword.operator", "=" ], - [ "string", "\"0\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "x" ], - [ "keyword.operator", "=" ], - [ "string", "\"0\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "height" ], - [ "keyword.operator", "=" ], - [ "string", "\"600\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "width" ], - [ "keyword.operator", "=" ], - [ "string", "\"800\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"rect3590\"" ], - [ "meta.tag.r", "/>" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "text" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "style" ], - [ "keyword.operator", "=" ], - [ "string", "\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "x" ], - [ "keyword.operator", "=" ], - [ "string", "\"50\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "y" ], - [ "keyword.operator", "=" ], - [ "string", "\"350\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"hickory\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "display" ], - [ "keyword.operator", "=" ], - [ "string", "\"none\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " Hickory," ], - [ "meta.tag", "" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "text" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "style" ], - [ "keyword.operator", "=" ], - [ "string", "\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "x" ], - [ "keyword.operator", "=" ], - [ "string", "\"50\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "y" ], - [ "keyword.operator", "=" ], - [ "string", "\"350\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"dickory\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "display" ], - [ "keyword.operator", "=" ], - [ "string", "\"none\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " dickory," ], - [ "meta.tag", "" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "text" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "style" ], - [ "keyword.operator", "=" ], - [ "string", "\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "x" ], - [ "keyword.operator", "=" ], - [ "string", "\"50\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "y" ], - [ "keyword.operator", "=" ], - [ "string", "\"350\"" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "id" ], - [ "keyword.operator", "=" ], - [ "string", "\"dock\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "display" ], - [ "keyword.operator", "=" ], - [ "string", "\"none\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " dock!" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - } -] \ No newline at end of file +[[ + "tag_embed_attribute_list", + ["meta.tag","<"], + ["meta.tag.tag-name","svg"] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","width"], + ["keyword.operator","="], + ["string","\"800\""], + ["text"," "], + ["entity.other.attribute-name","height"], + ["keyword.operator","="], + ["string","\"600\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","xmlns"], + ["keyword.operator","="], + ["string","\"http://www.w3.org/2000/svg\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","onload"], + ["keyword.operator","="], + ["string","\"StartAnimation(evt)\""], + ["meta.tag.r",">"] +],[ + "start" +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","title"], + ["meta.tag.r",">"], + ["text","Test Tube Progress Bar"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","desc"], + ["meta.tag.r",">"], + ["text","Created for the Web Directions SVG competition"], + ["meta.tag",""] +],[ + "start" +],[ + "js-regex_allowed", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","script"], + ["text"," "], + ["entity.other.attribute-name","type"], + ["keyword.operator","="], + ["string","\"text/ecmascript\""], + ["meta.tag.r",">"], + ["keyword.operator",""], + ["text"," "], + ["identifier","max_time"], + ["paren.rparen",")"] +],[ + "js-regex_allowed", + ["text"," "], + ["keyword","return"], + ["punctuation.operator",";"] +],[ + "js-start", + ["text"," "], + ["comment","// Scale the text string gradually until it is 20 times larger"] +],[ + "js-regex_allowed", + ["text"," "], + ["identifier","scalefactor"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["paren.lparen","("], + ["identifier","timevalue"], + ["text"," "], + ["keyword.operator","*"], + ["text"," "], + ["constant.numeric","650"], + ["paren.rparen",")"], + ["text"," "], + ["keyword.operator","/"], + ["text"," "], + ["identifier","max_time"], + ["punctuation.operator",";"] +],[ + "js-start" +],[ + "js-regex_allowed", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","("], + ["identifier","timevalue"], + ["text"," "], + ["keyword.operator","<"], + ["text"," "], + ["constant.numeric","30"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "js-regex_allowed", + ["text"," "], + ["identifier","hickory"], + ["punctuation.operator","."], + ["support.function.dom","setAttribute"], + ["paren.lparen","("], + ["string","\"display\""], + ["punctuation.operator",","], + ["text"," "], + ["string","\"\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "js-regex_allowed", + ["text"," "], + ["identifier","hickory"], + ["punctuation.operator","."], + ["support.function.dom","setAttribute"], + ["paren.lparen","("], + ["string","\"transform\""], + ["punctuation.operator",","], + ["text"," "], + ["string","\"translate(\""], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["paren.lparen","("], + ["constant.numeric","600"], + ["keyword.operator","+"], + ["identifier","scalefactor"], + ["keyword.operator","*"], + ["constant.numeric","3"], + ["keyword.operator","*"], + ["constant.numeric","-1"], + ["text"," "], + ["paren.rparen",")"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["string","\", -144 )\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "js-start", + ["text"," "], + ["paren.rparen","}"] +],[ + "js-start" +],[ + "js-regex_allowed", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","("], + ["identifier","timevalue"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["constant.numeric","30"], + ["text"," "], + ["keyword.operator","&&"], + ["text"," "], + ["identifier","timevalue"], + ["text"," "], + ["keyword.operator","<"], + ["text"," "], + ["constant.numeric","66"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "js-regex_allowed", + ["text"," "], + ["identifier","dickory"], + ["punctuation.operator","."], + ["support.function.dom","setAttribute"], + ["paren.lparen","("], + ["string","\"display\""], + ["punctuation.operator",","], + ["text"," "], + ["string","\"\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "js-regex_allowed", + ["text"," "], + ["identifier","dickory"], + ["punctuation.operator","."], + ["support.function.dom","setAttribute"], + ["paren.lparen","("], + ["string","\"transform\""], + ["punctuation.operator",","], + ["text"," "], + ["string","\"translate(\""], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["paren.lparen","("], + ["constant.numeric","-795"], + ["keyword.operator","+"], + ["identifier","scalefactor"], + ["keyword.operator","*"], + ["constant.numeric","2"], + ["paren.rparen",")"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["string","\", 0 )\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "js-start", + ["text"," "], + ["paren.rparen","}"] +],[ + "js-regex_allowed", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","("], + ["identifier","timevalue"], + ["text"," "], + ["keyword.operator",">"], + ["text"," "], + ["constant.numeric","66"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "js-regex_allowed", + ["text"," "], + ["identifier","dock"], + ["punctuation.operator","."], + ["support.function.dom","setAttribute"], + ["paren.lparen","("], + ["string","\"display\""], + ["punctuation.operator",","], + ["text"," "], + ["string","\"\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "js-regex_allowed", + ["text"," "], + ["identifier","dock"], + ["punctuation.operator","."], + ["support.function.dom","setAttribute"], + ["paren.lparen","("], + ["string","\"transform\""], + ["punctuation.operator",","], + ["text"," "], + ["string","\"translate(\""], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["paren.lparen","("], + ["constant.numeric","1450"], + ["keyword.operator","+"], + ["identifier","scalefactor"], + ["keyword.operator","*"], + ["constant.numeric","2"], + ["keyword.operator","*"], + ["constant.numeric","-1"], + ["paren.rparen",")"], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["string","\", 144 )\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "js-start", + ["text"," "], + ["paren.rparen","}"] +],[ + "js-start" +],[ + "js-start", + ["text"," "], + ["comment","// Call ShowAndGrowElement again milliseconds later."] +],[ + "js-start", + ["text"," "], + ["identifier","setTimeout"], + ["paren.lparen","("], + ["string","\"ShowAndGrowElement()\""], + ["punctuation.operator",","], + ["text"," "], + ["identifier","timer_increment"], + ["paren.rparen",")"] +],[ + "js-start", + ["text"," "], + ["paren.rparen","}"] +],[ + "js-start", + ["text"," "], + ["variable.language","window"], + ["punctuation.operator","."], + ["identifier","ShowAndGrowElement"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","ShowAndGrowElement"] +],[ + "start", + ["text"," "], + ["paren.rparen","]]"], + ["keyword.operator",">"], + ["meta.tag",""] +],[ + "start" +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","rect"] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","fill"], + ["keyword.operator","="], + ["string","\"#2e3436\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","fill-rule"], + ["keyword.operator","="], + ["string","\"nonzero\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","stroke-width"], + ["keyword.operator","="], + ["string","\"3\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","y"], + ["keyword.operator","="], + ["string","\"0\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","x"], + ["keyword.operator","="], + ["string","\"0\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","height"], + ["keyword.operator","="], + ["string","\"600\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","width"], + ["keyword.operator","="], + ["string","\"800\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"rect3590\""], + ["meta.tag.r","/>"] +],[ + "start" +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","text"] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","style"], + ["keyword.operator","="], + ["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","x"], + ["keyword.operator","="], + ["string","\"50\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","y"], + ["keyword.operator","="], + ["string","\"350\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"hickory\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","display"], + ["keyword.operator","="], + ["string","\"none\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," Hickory,"], + ["meta.tag",""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","text"] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","style"], + ["keyword.operator","="], + ["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","x"], + ["keyword.operator","="], + ["string","\"50\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","y"], + ["keyword.operator","="], + ["string","\"350\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"dickory\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","display"], + ["keyword.operator","="], + ["string","\"none\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," dickory,"], + ["meta.tag",""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","text"] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","style"], + ["keyword.operator","="], + ["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","x"], + ["keyword.operator","="], + ["string","\"50\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","y"], + ["keyword.operator","="], + ["string","\"350\""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["entity.other.attribute-name","id"], + ["keyword.operator","="], + ["string","\"dock\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","display"], + ["keyword.operator","="], + ["string","\"none\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," dock!"], + ["meta.tag",""] +],[ + "start", + ["meta.tag",""] +]] \ 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 89204036..e3003afe 100644 --- a/lib/ace/mode/_test/tokens_tcl.json +++ b/lib/ace/mode/_test/tokens_tcl.json @@ -1,530 +1,410 @@ -[ - { - "state": "commandItem", - "data": [] - }, - { - "state": "commandItem", - "data": [ - [ "keyword", "proc" ], - [ "text", " " ], - [ "identifier", "dijkstra" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "keyword", "graph" ], - [ "text", " " ], - [ "identifier", "origin" ], - [ "paren.rparen", "}" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "comment", "# Initialize" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", " " ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "for" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "keyword", "vertex" ], - [ "text", " " ], - [ "identifier", "distmap" ], - [ "paren.rparen", "}" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "graph" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "set" ], - [ "text", " " ], - [ "identifier", "dist" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "vertex" ], - [ "text", " " ], - [ "identifier", "Inf" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "set" ], - [ "text", " " ], - [ "identifier", "path" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "vertex" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "text", "}" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", " }" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "set" ], - [ "text", " " ], - [ "identifier", "dist" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "origin" ], - [ "text", " 0" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "set" ], - [ "text", " " ], - [ "identifier", "path" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "origin" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "keyword", "list" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "origin" ], - [ "paren.rparen", "]" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", " " ], - [ "keyword", "while" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "text", "[" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "size" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "graph" ], - [ "paren.rparen", "]}" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "comment", "# Find unhandled node with least weight" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "keyword", "set" ], - [ "text", " " ], - [ "identifier", "d" ], - [ "text", " " ], - [ "identifier", "Inf" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "for" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "keyword", "uu" ], - [ "text", " " ], - [ "support.function", "-" ], - [ "paren.rparen", "}" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "graph" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "variable.instancce", "$" ], - [ "variable.instance", "d" ], - [ "text", " " ], - [ "support.function", ">" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "keyword", "set" ], - [ "text", " " ], - [ "identifier", "dd" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "get" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "dist" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "uu" ], - [ "paren.rparen", "]]}" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "keyword", "set" ], - [ "text", " " ], - [ "identifier", "u" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "uu" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "keyword", "set" ], - [ "text", " " ], - [ "identifier", "d" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "dd" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t }" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t}" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "comment", "# No such node; graph must be disconnected" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "variable.instancce", "$" ], - [ "variable.instance", "d" ], - [ "text", " " ], - [ "support.function", "==" ], - [ "text", " " ], - [ "identifier", "Inf" ], - [ "paren.rparen", "}" ], - [ "text", " " ], - [ "identifier", "break" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "commentfollow", - "data": [ - [ "text", "\t" ], - [ "comment", "# Update the weights for nodes\\" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "\t lead to by the node we've picked" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "for" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "keyword", "v" ], - [ "text", " " ], - [ "identifier", "dd" ], - [ "paren.rparen", "}" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "get" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "graph" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "u" ], - [ "paren.rparen", "]" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t " ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "text", "[" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "exists" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "graph" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "v" ], - [ "paren.rparen", "]}" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t" ], - [ "keyword", "set" ], - [ "text", " " ], - [ "identifier", "alt" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "keyword", "expr" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "variable.instancce", "$" ], - [ "variable.instance", "d" ], - [ "text", " " ], - [ "support.function", "+" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "dd" ], - [ "paren.rparen", "}]" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t\t" ], - [ "keyword", "if" ], - [ "text", " " ], - [ "paren.lparen", "{" ], - [ "variable.instancce", "$" ], - [ "variable.instance", "alt" ], - [ "text", " " ], - [ "support.function", "<" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "get" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "dist" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "v" ], - [ "paren.rparen", "]}" ], - [ "text", " " ], - [ "paren.lparen", "{" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t " ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "set" ], - [ "text", " " ], - [ "identifier", "dist" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "v" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "alt" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t\t " ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "set" ], - [ "text", " " ], - [ "identifier", "path" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "v" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "keyword", "list" ], - [ "text", " " ], - [ "support.function", "{*}" ], - [ "paren.lparen", "[" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "get" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "path" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "u" ], - [ "paren.rparen", "]" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "v" ], - [ "paren.rparen", "]" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t\t}" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t }" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "\t}" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "comment", "# Remove chosen node from graph still to be handled" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "\t" ], - [ "keyword", "dict" ], - [ "text", " " ], - [ "identifier", "unset" ], - [ "text", " " ], - [ "identifier", "graph" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "u" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", " }" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "return" ], - [ "text", " " ], - [ "paren.lparen", "[" ], - [ "keyword", "list" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "dist" ], - [ "text", " " ], - [ "variable.instancce", "$" ], - [ "variable.instance", "path" ], - [ "paren.rparen", "]" ] - ] - }, - { - "state": "commandItem", - "data": [ - [ "text", "}" ] - ] - } -] \ No newline at end of file +[[ + "commandItem" +],[ + "commandItem", + ["keyword","proc"], + ["text"," "], + ["identifier","dijkstra"], + ["text"," "], + ["paren.lparen","{"], + ["keyword","graph"], + ["text"," "], + ["identifier","origin"], + ["paren.rparen","}"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text"," "], + ["comment","# Initialize"] +],[ + "commandItem", + ["text"," "], + ["keyword","dict"], + ["text"," "], + ["identifier","for"], + ["text"," "], + ["paren.lparen","{"], + ["keyword","vertex"], + ["text"," "], + ["identifier","distmap"], + ["paren.rparen","}"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","graph"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text","\t"], + ["keyword","dict"], + ["text"," "], + ["identifier","set"], + ["text"," "], + ["identifier","dist"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","vertex"], + ["text"," "], + ["identifier","Inf"] +],[ + "commandItem", + ["text","\t"], + ["keyword","dict"], + ["text"," "], + ["identifier","set"], + ["text"," "], + ["identifier","path"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","vertex"], + ["text"," "], + ["paren.lparen","{"], + ["text","}"] +],[ + "commandItem", + ["text"," }"] +],[ + "start", + ["text"," "], + ["keyword","dict"], + ["text"," "], + ["identifier","set"], + ["text"," "], + ["identifier","dist"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","origin"], + ["text"," 0"] +],[ + "start", + ["text"," "], + ["keyword","dict"], + ["text"," "], + ["identifier","set"], + ["text"," "], + ["identifier","path"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","origin"], + ["text"," "], + ["paren.lparen","["], + ["keyword","list"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","origin"], + ["paren.rparen","]"] +],[ + "commandItem", + ["text"," "] +],[ + "commandItem", + ["text"," "], + ["keyword","while"], + ["text"," "], + ["paren.lparen","{"], + ["text","["], + ["keyword","dict"], + ["text"," "], + ["identifier","size"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","graph"], + ["paren.rparen","]}"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text","\t"], + ["comment","# Find unhandled node with least weight"] +],[ + "start", + ["text","\t"], + ["keyword","set"], + ["text"," "], + ["identifier","d"], + ["text"," "], + ["identifier","Inf"] +],[ + "commandItem", + ["text","\t"], + ["keyword","dict"], + ["text"," "], + ["identifier","for"], + ["text"," "], + ["paren.lparen","{"], + ["keyword","uu"], + ["text"," "], + ["support.function","-"], + ["paren.rparen","}"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","graph"], + ["text"," "], + ["paren.lparen","{"] +],[ + "commandItem", + ["text","\t "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","{"], + ["variable.instancce","$"], + ["variable.instance","d"], + ["text"," "], + ["support.function",">"], + ["text"," "], + ["paren.lparen","["], + ["keyword","set"], + ["text"," "], + ["identifier","dd"], + ["text"," "], + ["paren.lparen","["], + ["keyword","dict"], + ["text"," "], + ["identifier","get"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","dist"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","uu"], + ["paren.rparen","]]}"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text","\t\t"], + ["keyword","set"], + ["text"," "], + ["identifier","u"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","uu"] +],[ + "start", + ["text","\t\t"], + ["keyword","set"], + ["text"," "], + ["identifier","d"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","dd"] +],[ + "commandItem", + ["text","\t }"] +],[ + "commandItem", + ["text","\t}"] +],[ + "commandItem", + ["text"," "] +],[ + "start", + ["text","\t"], + ["comment","# No such node; graph must be disconnected"] +],[ + "start", + ["text","\t"], + ["keyword","if"], + ["text"," "], + ["paren.lparen","{"], + ["variable.instancce","$"], + ["variable.instance","d"], + ["text"," "], + ["support.function","=="], + ["text"," "], + ["identifier","Inf"], + ["paren.rparen","}"], + ["text"," "], + ["identifier","break"] +],[ + "commandItem", + ["text"," "] +],[ + "commentfollow", + ["text","\t"], + ["comment","# Update the weights for nodes\\"] +],[ + "start", + ["comment","\t lead to by the node we've picked"] +],[ + "commandItem", + ["text","\t"], + ["keyword","dict"], + ["text"," "], + ["identifier","for"], + ["text"," "], + ["paren.lparen","{"], + ["keyword","v"], + ["text"," "], + ["identifier","dd"], + ["paren.rparen","}"], + ["text"," "], + ["paren.lparen","["], + ["keyword","dict"], + ["text"," "], + ["identifier","get"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","graph"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","u"], + ["paren.rparen","]"], + ["text"," "], + ["paren.lparen","{"] +],[ + "commandItem", + ["text","\t "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","{"], + ["text","["], + ["keyword","dict"], + ["text"," "], + ["identifier","exists"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","graph"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","v"], + ["paren.rparen","]}"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text","\t\t"], + ["keyword","set"], + ["text"," "], + ["identifier","alt"], + ["text"," "], + ["paren.lparen","["], + ["keyword","expr"], + ["text"," "], + ["paren.lparen","{"], + ["variable.instancce","$"], + ["variable.instance","d"], + ["text"," "], + ["support.function","+"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","dd"], + ["paren.rparen","}]"] +],[ + "commandItem", + ["text","\t\t"], + ["keyword","if"], + ["text"," "], + ["paren.lparen","{"], + ["variable.instancce","$"], + ["variable.instance","alt"], + ["text"," "], + ["support.function","<"], + ["text"," "], + ["paren.lparen","["], + ["keyword","dict"], + ["text"," "], + ["identifier","get"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","dist"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","v"], + ["paren.rparen","]}"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text","\t\t "], + ["keyword","dict"], + ["text"," "], + ["identifier","set"], + ["text"," "], + ["identifier","dist"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","v"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","alt"] +],[ + "start", + ["text","\t\t "], + ["keyword","dict"], + ["text"," "], + ["identifier","set"], + ["text"," "], + ["identifier","path"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","v"], + ["text"," "], + ["paren.lparen","["], + ["keyword","list"], + ["text"," "], + ["support.function","{*}"], + ["paren.lparen","["], + ["keyword","dict"], + ["text"," "], + ["identifier","get"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","path"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","u"], + ["paren.rparen","]"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","v"], + ["paren.rparen","]"] +],[ + "commandItem", + ["text","\t\t}"] +],[ + "commandItem", + ["text","\t }"] +],[ + "commandItem", + ["text","\t}"] +],[ + "commandItem", + ["text"," "] +],[ + "start", + ["text","\t"], + ["comment","# Remove chosen node from graph still to be handled"] +],[ + "start", + ["text","\t"], + ["keyword","dict"], + ["text"," "], + ["identifier","unset"], + ["text"," "], + ["identifier","graph"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","u"] +],[ + "commandItem", + ["text"," }"] +],[ + "start", + ["text"," "], + ["keyword","return"], + ["text"," "], + ["paren.lparen","["], + ["keyword","list"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","dist"], + ["text"," "], + ["variable.instancce","$"], + ["variable.instance","path"], + ["paren.rparen","]"] +],[ + "commandItem", + ["text","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_tex.json b/lib/ace/mode/_test/tokens_tex.json index fa4499cb..2d023676 100644 --- a/lib/ace/mode/_test/tokens_tex.json +++ b/lib/ace/mode/_test/tokens_tex.json @@ -1,189 +1,130 @@ -[ - { - "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", "}{" ], - [ "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", "}{}" ], - [ "comment", "%" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.keyword.operator", "}" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "keyword", "\\newcommand" ], - [ "paren.keyword.operator", "{" ], - [ "keyword", "\\ee" ], - [ "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", "}{" ], - [ "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 +[[ + "start", + ["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$$"] +],[ + "start", + ["keyword","\\bye"] +],[ + "start" +],[ + "start", + ["keyword","\\makeatletter"] +],[ + "start", + ["text"," "], + ["keyword","\\newcommand"], + ["paren.keyword.operator","{"], + ["keyword","\\be"], + ["paren.keyword.operator","}{"], + ["comment","%"] +],[ + "start", + ["text"," "], + ["keyword","\\begingroup"] +],[ + "start", + ["text"," "], + ["comment","% \\setlength{\\arraycolsep}{2pt}"] +],[ + "start", + ["text"," "], + ["keyword","\\eqnarray"], + ["comment","%"] +],[ + "start", + ["text"," "], + ["keyword","\\@"], + ["text","ifstar"], + ["paren.keyword.operator","{"], + ["keyword","\\nonumber"], + ["paren.keyword.operator","}{}"], + ["comment","%"] +],[ + "start", + ["text"," "], + ["paren.keyword.operator","}"] +],[ + "start", + ["text"," "], + ["keyword","\\newcommand"], + ["paren.keyword.operator","{"], + ["keyword","\\ee"], + ["paren.keyword.operator","}{"], + ["keyword","\\endeqnarray\\endgroup"], + ["paren.keyword.operator","}"] +],[ + "start", + ["text"," "], + ["keyword","\\makeatother"] +],[ + "start" +],[ + "start", + ["text"," "], + ["keyword","\\begin"], + ["paren.keyword.operator","{"], + ["nospell.text","equation"], + ["paren.keyword.operator","}"] +],[ + "start", + ["text"," x="], + ["keyword","\\left\\"], + ["paren.keyword.operator","{"], + ["text"," "], + ["keyword","\\begin"], + ["paren.keyword.operator","{"], + ["nospell.text","array"], + ["paren.keyword.operator","}{"], + ["text","cl"], + ["paren.keyword.operator","}"] +],[ + "start", + ["text"," 0 & "], + ["keyword","\\textrm"], + ["paren.keyword.operator","{"], + ["text","if "], + ["paren.keyword.operator","}"], + ["text","A="], + ["keyword","\\ldots\\\\"] +],[ + "start", + ["text"," 1 & "], + ["keyword","\\textrm"], + ["paren.keyword.operator","{"], + ["text","if "], + ["paren.keyword.operator","}"], + ["text","B="], + ["keyword","\\ldots\\\\"] +],[ + "start", + ["text"," x & "], + ["keyword","\\textrm"], + ["paren.keyword.operator","{"], + ["text","this runs with as much text as you like, but without an raggeright text"] +],[ + "start", + ["text","."], + ["paren.keyword.operator","}"], + ["keyword","\\end"], + ["paren.keyword.operator","{"], + ["nospell.text","array"], + ["paren.keyword.operator","}"], + ["keyword","\\right"], + ["text","."] +],[ + "start", + ["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_text.json b/lib/ace/mode/_test/tokens_text.json index b74923cd..fff7ef42 100644 --- a/lib/ace/mode/_test/tokens_text.json +++ b/lib/ace/mode/_test/tokens_text.json @@ -1,58 +1,29 @@ -[ - { - "state": "start", - "data": [ - [ "text", "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["text","Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."] +],[ + "start" +],[ + "start", + ["text","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat."] +],[ + "start" +],[ + "start", + ["text","Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi."] +],[ + "start" +],[ + "start", + ["text","Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat."] +],[ + "start" +],[ + "start", + ["text","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis."] +],[ + "start" +],[ + "start", + ["text","At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_textile.json b/lib/ace/mode/_test/tokens_textile.json index 2768b4c4..59000ce3 100644 --- a/lib/ace/mode/_test/tokens_textile.json +++ b/lib/ace/mode/_test/tokens_textile.json @@ -1,191 +1,113 @@ -[ - { - "state": "start", - "data": [ - [ "markup.heading.1", "h1" ], - [ "keyword", ". " ], - [ "text", "Textile document" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "h2" ], - [ "keyword", ". " ], - [ "text", "Heading Two" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "markup.heading.3", "h3" ], - [ "keyword", ". " ], - [ "text", "A two-line" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " header" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "markup.heading.2", "h2" ], - [ "keyword", ". " ], - [ "text", "Another two-line" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "header" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "Paragraph:" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "one, two," ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "thee lines!" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "markup.heading", "p" ], - [ "keyword", "(" ], - [ "string", "classone" ], - [ "text", " " ], - [ "string", "two" ], - [ "text", " " ], - [ "string", "three" ], - [ "keyword", "). " ], - [ "text", "This is a paragraph with classes" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "markup.heading", "p" ], - [ "keyword", "(#" ], - [ "string", "id" ], - [ "keyword", "). " ], - [ "text", "(one with an id)" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "markup.heading", "p" ], - [ "keyword", "(" ], - [ "string", "one" ], - [ "text", " " ], - [ "string", "two" ], - [ "text", " " ], - [ "string", "three" ], - [ "keyword", "#" ], - [ "string", "my_id" ], - [ "keyword", "). " ], - [ "text", "..classes + id" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "*" ], - [ "text", " Unordered list" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "**" ], - [ "text", " sublist" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "*" ], - [ "text", " back again!" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "**" ], - [ "text", " sublist again.." ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "#" ], - [ "text", " ordered" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "text", "bg. Blockquote!" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " This is a two-list blockquote..!" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["markup.heading.1","h1"], + ["keyword",". "], + ["text","Textile document"] +],[ + "start" +],[ + "start", + ["markup.heading.2","h2"], + ["keyword",". "], + ["text","Heading Two"] +],[ + "start" +],[ + "start", + ["markup.heading.3","h3"], + ["keyword",". "], + ["text","A two-line"] +],[ + "start", + ["text"," header"] +],[ + "start" +],[ + "start", + ["markup.heading.2","h2"], + ["keyword",". "], + ["text","Another two-line"] +],[ + "start", + ["text","header"] +],[ + "start" +],[ + "start", + ["text","Paragraph:"] +],[ + "start", + ["text","one, two,"] +],[ + "start", + ["text","thee lines!"] +],[ + "start" +],[ + "start", + ["markup.heading","p"], + ["keyword","("], + ["string","classone"], + ["text"," "], + ["string","two"], + ["text"," "], + ["string","three"], + ["keyword","). "], + ["text","This is a paragraph with classes"] +],[ + "start" +],[ + "start", + ["markup.heading","p"], + ["keyword","(#"], + ["string","id"], + ["keyword","). "], + ["text","(one with an id)"] +],[ + "start" +],[ + "start", + ["markup.heading","p"], + ["keyword","("], + ["string","one"], + ["text"," "], + ["string","two"], + ["text"," "], + ["string","three"], + ["keyword","#"], + ["string","my_id"], + ["keyword","). "], + ["text","..classes + id"] +],[ + "start" +],[ + "start", + ["keyword","*"], + ["text"," Unordered list"] +],[ + "start", + ["keyword","**"], + ["text"," sublist"] +],[ + "start", + ["keyword","*"], + ["text"," back again!"] +],[ + "start", + ["keyword","**"], + ["text"," sublist again.."] +],[ + "start" +],[ + "start", + ["keyword","#"], + ["text"," ordered"] +],[ + "start" +],[ + "start", + ["text","bg. Blockquote!"] +],[ + "start", + ["text"," This is a two-list blockquote..!"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_typescript.json b/lib/ace/mode/_test/tokens_typescript.json index eea87ea4..f8402571 100644 --- a/lib/ace/mode/_test/tokens_typescript.json +++ b/lib/ace/mode/_test/tokens_typescript.json @@ -1,765 +1,556 @@ -[ - { - "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", "))" ] - ] - }, - { - "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", "+=" ], - [ "text", " " ], - [ "string", "\" turn continues,\"" ], - [ "punctuation.operator", ";" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "paren.rparen", "}" ] - ] - }, - { - "state": "regex_allowed", - "data": [ - [ "text", " " ], - [ "identifier", "stringBuilder" ], - [ "text", " " ], - [ "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", "+=" ], - [ "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 +[[ + "regex_allowed", + ["keyword.operator.ts","class"], + ["text"," "], + ["identifier","Greeter"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text","\t"], + ["variable.parameter.function.ts","greeting"], + ["text",": "], + ["variable.parameter.function.ts","string"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["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","{"] +],[ + "regex_allowed", + ["text","\t\t"], + ["storage.type.variable.ts","this."], + ["identifier","greeting"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","message"], + ["punctuation.operator",";"] +],[ + "start", + ["text","\t"], + ["paren.rparen","}"] +],[ + "regex_allowed", + ["text","\t"], + ["entity.name.function.ts","greet"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text","\t\t"], + ["keyword","return"], + ["text"," "], + ["string","\"Hello, \""], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["storage.type.variable.ts","this."], + ["identifier","greeting"], + ["punctuation.operator",";"] +],[ + "start", + ["text","\t"], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"], + ["text"," "] +],[ + "start" +],[ + "regex_allowed", + ["storage.type","var"], + ["text"," "], + ["identifier","greeter"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["keyword","new"], + ["text"," "], + ["identifier","Greeter"], + ["paren.lparen","("], + ["string","\"world\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start" +],[ + "start", + ["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",")"] +],[ + "start", + ["identifier","button"], + ["punctuation.operator","."], + ["identifier","innerText"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","\"Say Hello\""] +],[ + "regex_allowed", + ["storage.type","button"], + ["punctuation.operator","."], + ["entity.name.function","onclick"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["storage.type","function"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "start", + ["text","\t"], + ["support.function","alert"], + ["paren.lparen","("], + ["entity.name.function.ts","greeter.greet"], + ["paren.lparen","("], + ["paren.rparen","))"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["variable.language","document"], + ["punctuation.operator","."], + ["identifier","body"], + ["punctuation.operator","."], + ["support.function.dom","appendChild"], + ["paren.lparen","("], + ["identifier","button"], + ["paren.rparen",")"] +],[ + "start" +],[ + "regex_allowed", + ["keyword.operator.ts","class"], + ["text"," "], + ["identifier","Snake"], + ["text"," "], + ["keyword.operator.ts","extends"], + ["text"," "], + ["identifier","Animal"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["entity.name.function.ts","move"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["support.function","alert"], + ["paren.lparen","("], + ["string","\"Slithering...\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["storage.type.variable.ts","super"], + ["text","("], + ["keyword.other.ts","5"], + ["text",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "regex_allowed", + ["keyword.operator.ts","class"], + ["text"," "], + ["identifier","Horse"], + ["text"," "], + ["keyword.operator.ts","extends"], + ["text"," "], + ["identifier","Animal"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["entity.name.function.ts","move"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["support.function","alert"], + ["paren.lparen","("], + ["string","\"Galloping...\""], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","super"], + ["punctuation.operator","."], + ["identifier","move"], + ["paren.lparen","("], + ["constant.numeric","45"], + ["paren.rparen",")"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start" +],[ + "start", + ["keyword.operator.ts","module"], + ["text"," "], + ["variable.parameter.function.ts","Sayings"], + ["text"," {"] +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","export"], + ["text"," "], + ["keyword.operator.ts","class"], + ["text"," "], + ["identifier","Greeter"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["variable.parameter.function.ts","greeting"], + ["text",": "], + ["variable.parameter.function.ts","string"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","constructor"], + ["text"," "], + ["paren.lparen","("], + ["variable.parameter.function.ts","message"], + ["text",": "], + ["variable.parameter.function.ts","string"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["storage.type.variable.ts","this."], + ["identifier","greeting"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","message"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "regex_allowed", + ["text"," "], + ["entity.name.function.ts","greet"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["keyword","return"], + ["text"," "], + ["string","\"Hello, \""], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["storage.type.variable.ts","this."], + ["identifier","greeting"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +],[ + "start", + ["keyword.operator.ts","module"], + ["text"," "], + ["variable.parameter.function.ts","Mankala"], + ["text"," {"] +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","export"], + ["text"," "], + ["keyword.operator.ts","class"], + ["text"," "], + ["identifier","Features"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","public"], + ["text"," "], + ["identifier","turnContinues"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.language.boolean","false"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","public"], + ["text"," "], + ["identifier","seedStoredCount"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","public"], + ["text"," "], + ["identifier","capturedCount"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","public"], + ["text"," "], + ["identifier","spaceCaptured"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","NoSpace"], + ["punctuation.operator",";"] +],[ + "start" +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","public"], + ["text"," "], + ["entity.name.function.ts","clear"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["storage.type.variable.ts","this."], + ["identifier","turnContinues"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.language.boolean","false"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["storage.type.variable.ts","this."], + ["identifier","seedStoredCount"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["storage.type.variable.ts","this."], + ["identifier","capturedCount"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["constant.numeric","0"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["storage.type.variable.ts","this."], + ["identifier","spaceCaptured"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["identifier","NoSpace"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start" +],[ + "regex_allowed", + ["text"," "], + ["keyword.operator.ts","public"], + ["text"," "], + ["entity.name.function.ts","toString"], + ["paren.lparen","("], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["storage.type","var"], + ["text"," "], + ["identifier","stringBuilder"], + ["text"," "], + ["keyword.operator","="], + ["text"," "], + ["string","\"\""], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["text"," "], + ["keyword","if"], + ["text"," "], + ["paren.lparen","("], + ["storage.type.variable.ts","this."], + ["identifier","turnContinues"], + ["paren.rparen",")"], + ["text"," "], + ["paren.lparen","{"] +],[ + "regex_allowed", + ["text"," "], + ["identifier","stringBuilder"], + ["text"," "], + ["keyword.operator","+="], + ["text"," "], + ["string","\" turn continues,\""], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "regex_allowed", + ["text"," "], + ["identifier","stringBuilder"], + ["text"," "], + ["keyword.operator","+="], + ["text"," "], + ["string","\" stores \""], + ["text"," "], + ["keyword.operator","+"], + ["text"," "], + ["storage.type.variable.ts","this."], + ["identifier","seedStoredCount"], + ["punctuation.operator",";"] +],[ + "regex_allowed", + ["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","{"] +],[ + "regex_allowed", + ["text"," "], + ["identifier","stringBuilder"], + ["text"," "], + ["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",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "regex_allowed", + ["text"," "], + ["keyword","return"], + ["text"," "], + ["identifier","stringBuilder"], + ["punctuation.operator",";"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["text"," "], + ["paren.rparen","}"] +],[ + "start", + ["paren.rparen","}"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_vbscript.json b/lib/ace/mode/_test/tokens_vbscript.json new file mode 100644 index 00000000..6a2346d3 --- /dev/null +++ b/lib/ace/mode/_test/tokens_vbscript.json @@ -0,0 +1,249 @@ +[[ + "start", + ["text","myfilename "], + ["keyword.operator.asp","="], + ["text"," "], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp","C:\\Wikipedia - VBScript - Example - Hello World.txt\""] +],[ + "start" +],[ + "start", + ["text","MakeHelloWorldFile myfilename"] +],[ + "start" +],[ + "state_4", + ["meta.leading-space"," "] +],[ + "state_4" +],[ + "start", + ["storage.type.function.asp","Sub"], + ["text"," "], + ["entity.name.function.asp","MakeHelloWorldFile"], + ["text"," "], + ["punctuation.definition.parameters.asp","("], + ["variable.parameter.function.asp","FileName"], + ["punctuation.definition.parameters.asp",")"] +],[ + "start" +],[ + "start", + ["punctuation.definition.comment.asp","'"], + ["comment.line.apostrophe.asp","Create a new file in C: drive or overwrite existing file"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["storage.type.asp","Set"], + ["text"," FSO "], + ["keyword.operator.asp","="], + ["text"," "], + ["support.function.asp","CreateObject"], + ["text","("], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp","Scripting.FileSystemObject\""], + ["text",")"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["keyword.control.asp","If"], + ["text"," FSO."], + ["entity.name.function.asp","FileExists"], + ["text","(FileName) "], + ["keyword.control.asp","Then"], + ["text"," "] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.even-tab.spaces"," "], + ["meta.odd-tab.spaces"," "], + ["text","Answer "], + ["keyword.operator.asp","="], + ["text"," "], + ["support.function.vb.asp","MsgBox"], + ["text"," ("], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp","File \""], + ["text"," "], + ["keyword.operator.asp","&"], + ["text"," FileName "], + ["keyword.operator.asp","&"], + ["text"," "], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp"," exists ... OK to overwrite?\""], + ["text",", vbOKCancel)"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.even-tab.spaces"," "], + ["meta.odd-tab.spaces"," "], + ["punctuation.definition.comment.asp","'"], + ["comment.line.apostrophe.asp","If button selected is not OK, then quit now"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.even-tab.spaces"," "], + ["meta.odd-tab.spaces"," "], + ["punctuation.definition.comment.asp","'"], + ["comment.line.apostrophe.asp","vbOK is a language constant"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.even-tab.spaces"," "], + ["meta.odd-tab.spaces"," "], + ["keyword.control.asp","If"], + ["text"," Answer "], + ["keyword.operator.asp","<>"], + ["text"," vbOK "], + ["keyword.control.asp","Then"], + ["text"," "], + ["keyword.control.asp","Exit Sub"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["keyword.control.asp","Else"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.even-tab.spaces"," "], + ["meta.odd-tab.spaces"," "], + ["punctuation.definition.comment.asp","'"], + ["comment.line.apostrophe.asp","Confirm OK to create"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.even-tab.spaces"," "], + ["meta.odd-tab.spaces"," "], + ["text","Answer "], + ["keyword.operator.asp","="], + ["text"," "], + ["support.function.vb.asp","MsgBox"], + ["text"," ("], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp","File \""], + ["text"," "], + ["keyword.operator.asp","&"], + ["text"," FileName "], + ["keyword.operator.asp","&"], + ["text"," "], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp"," ... OK to create?\""], + ["text",", vbOKCancel)"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.even-tab.spaces"," "], + ["meta.odd-tab.spaces"," "], + ["keyword.control.asp","If"], + ["text"," Answer "], + ["keyword.operator.asp","<>"], + ["text"," vbOK "], + ["keyword.control.asp","Then"], + ["text"," "], + ["keyword.control.asp","Exit Sub"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["keyword.control.asp","End If"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["punctuation.definition.comment.asp","'"], + ["comment.line.apostrophe.asp","Create new file (or replace an existing file)"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["storage.type.asp","Set"], + ["text"," FileObject "], + ["keyword.operator.asp","="], + ["text"," FSO.CreateTextFile (FileName)"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["text","FileObject.WriteLine "], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp","Time ... \""], + ["text"," "], + ["keyword.operator.asp","&"], + ["text"," "], + ["support.function.vb.asp","Now"], + ["text","()"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["text","FileObject.WriteLine "], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp","Hello World\""] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["text","FileObject."], + ["entity.name.function.asp","Close"], + ["text","()"] +],[ + "start" +],[ + "start", + ["meta.odd-tab.spaces"," "], + ["meta.leading-space"," "], + ["support.function.vb.asp","MsgBox"], + ["text"," "], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp","File \""], + ["text"," "], + ["keyword.operator.asp","&"], + ["text"," FileName "], + ["keyword.operator.asp","&"], + ["text"," "], + ["punctuation.definition.string.begin.asp","\""], + ["string.quoted.double.asp"," ... updated.\""] +],[ + "start" +],[ + "start", + ["support.function.asp","End"], + ["text"," "], + ["storage.type.asp","Sub"] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_xml.json b/lib/ace/mode/_test/tokens_xml.json index faeb11e8..19762eca 100644 --- a/lib/ace/mode/_test/tokens_xml.json +++ b/lib/ace/mode/_test/tokens_xml.json @@ -1,705 +1,539 @@ -[ - { - "state": "start", - "data": [ - [ "xml-pe", "" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "query" ], - [ "text", " " ], - [ "entity.other.attribute-name", "xmlns:yahoo" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://www.yahooapis.com/v1/base.rng\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:count" ], - [ "keyword.operator", "=" ], - [ "string", "\"7\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:created" ], - [ "keyword.operator", "=" ], - [ "string", "\"2011-10-11T08:40:23Z\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:lang" ], - [ "keyword.operator", "=" ], - [ "string", "\"en-US\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "diagnostics" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "publiclyCallable" ], - [ "meta.tag.r", ">" ], - [ "text", "true" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "url" ], - [ "text", " " ], - [ "entity.other.attribute-name", "execution-start-time" ], - [ "keyword.operator", "=" ], - [ "string", "\"0\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "execution-stop-time" ], - [ "keyword.operator", "=" ], - [ "string", "\"25\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "execution-time" ], - [ "keyword.operator", "=" ], - [ "string", "\"25\"" ], - [ "meta.tag.r", ">" ], - [ "text", "" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "user-time" ], - [ "meta.tag.r", ">" ], - [ "text", "26" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "service-time" ], - [ "meta.tag.r", ">" ], - [ "text", "25" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "build-version" ], - [ "meta.tag.r", ">" ], - [ "text", "21978" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ], - [ "text", " " ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "results" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "place" ], - [ "text", " " ], - [ "entity.other.attribute-name", "xmlns" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/schema.rng\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "xml:lang" ], - [ "keyword.operator", "=" ], - [ "string", "\"en-US\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:uri" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/place/24865670\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag.r", ">" ], - [ "text", "24865670" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "placeTypeName" ], - [ "text", " " ], - [ "entity.other.attribute-name", "code" ], - [ "keyword.operator", "=" ], - [ "string", "\"29\"" ], - [ "meta.tag.r", ">" ], - [ "text", "Continent" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "name" ], - [ "meta.tag.r", ">" ], - [ "text", "Africa" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "place" ], - [ "text", " " ], - [ "entity.other.attribute-name", "xmlns" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/schema.rng\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "xml:lang" ], - [ "keyword.operator", "=" ], - [ "string", "\"en-US\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:uri" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/place/24865675\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag.r", ">" ], - [ "text", "24865675" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "placeTypeName" ], - [ "text", " " ], - [ "entity.other.attribute-name", "code" ], - [ "keyword.operator", "=" ], - [ "string", "\"29\"" ], - [ "meta.tag.r", ">" ], - [ "text", "Continent" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "name" ], - [ "meta.tag.r", ">" ], - [ "text", "Europe" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "place" ], - [ "text", " " ], - [ "entity.other.attribute-name", "xmlns" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/schema.rng\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "xml:lang" ], - [ "keyword.operator", "=" ], - [ "string", "\"en-US\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:uri" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/place/24865673\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag.r", ">" ], - [ "text", "24865673" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "placeTypeName" ], - [ "text", " " ], - [ "entity.other.attribute-name", "code" ], - [ "keyword.operator", "=" ], - [ "string", "\"29\"" ], - [ "meta.tag.r", ">" ], - [ "text", "Continent" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "name" ], - [ "meta.tag.r", ">" ], - [ "text", "South America" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "place" ], - [ "text", " " ], - [ "entity.other.attribute-name", "xmlns" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/schema.rng\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "xml:lang" ], - [ "keyword.operator", "=" ], - [ "string", "\"en-US\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:uri" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/place/28289421\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag.r", ">" ], - [ "text", "28289421" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "placeTypeName" ], - [ "text", " " ], - [ "entity.other.attribute-name", "code" ], - [ "keyword.operator", "=" ], - [ "string", "\"29\"" ], - [ "meta.tag.r", ">" ], - [ "text", "Continent" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "name" ], - [ "meta.tag.r", ">" ], - [ "text", "Antarctic" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "place" ], - [ "text", " " ], - [ "entity.other.attribute-name", "xmlns" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/schema.rng\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "xml:lang" ], - [ "keyword.operator", "=" ], - [ "string", "\"en-US\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:uri" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/place/24865671\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag.r", ">" ], - [ "text", "24865671" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "placeTypeName" ], - [ "text", " " ], - [ "entity.other.attribute-name", "code" ], - [ "keyword.operator", "=" ], - [ "string", "\"29\"" ], - [ "meta.tag.r", ">" ], - [ "text", "Continent" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "name" ], - [ "meta.tag.r", ">" ], - [ "text", "Asia" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "place" ], - [ "text", " " ], - [ "entity.other.attribute-name", "xmlns" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/schema.rng\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "xml:lang" ], - [ "keyword.operator", "=" ], - [ "string", "\"en-US\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:uri" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/place/24865672\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag.r", ">" ], - [ "text", "24865672" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "placeTypeName" ], - [ "text", " " ], - [ "entity.other.attribute-name", "code" ], - [ "keyword.operator", "=" ], - [ "string", "\"29\"" ], - [ "meta.tag.r", ">" ], - [ "text", "Continent" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "name" ], - [ "meta.tag.r", ">" ], - [ "text", "North America" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "tag_embed_attribute_list", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "place" ], - [ "text", " " ], - [ "entity.other.attribute-name", "xmlns" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/schema.rng\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "entity.other.attribute-name", "xml:lang" ], - [ "keyword.operator", "=" ], - [ "string", "\"en-US\"" ], - [ "text", " " ], - [ "entity.other.attribute-name", "yahoo:uri" ], - [ "keyword.operator", "=" ], - [ "string", "\"http://where.yahooapis.com/v1/place/55949070\"" ], - [ "meta.tag.r", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "woeid" ], - [ "meta.tag.r", ">" ], - [ "text", "55949070" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "placeTypeName" ], - [ "text", " " ], - [ "entity.other.attribute-name", "code" ], - [ "keyword.operator", "=" ], - [ "string", "\"29\"" ], - [ "meta.tag.r", ">" ], - [ "text", "Continent" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "<" ], - [ "meta.tag.tag-name", "name" ], - [ "meta.tag.r", ">" ], - [ "text", "Australia" ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " " ], - [ "meta.tag", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "" ] - ] - } -] \ No newline at end of file +[[ + "start", + ["xml-pe",""] +],[ + "tag_embed_attribute_list", + ["meta.tag","<"], + ["meta.tag.tag-name","query"], + ["text"," "], + ["entity.other.attribute-name","xmlns:yahoo"], + ["keyword.operator","="], + ["string","\"http://www.yahooapis.com/v1/base.rng\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","yahoo:count"], + ["keyword.operator","="], + ["string","\"7\""], + ["text"," "], + ["entity.other.attribute-name","yahoo:created"], + ["keyword.operator","="], + ["string","\"2011-10-11T08:40:23Z\""], + ["text"," "], + ["entity.other.attribute-name","yahoo:lang"], + ["keyword.operator","="], + ["string","\"en-US\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","diagnostics"], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","publiclyCallable"], + ["meta.tag.r",">"], + ["text","true"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","url"], + ["text"," "], + ["entity.other.attribute-name","execution-start-time"], + ["keyword.operator","="], + ["string","\"0\""], + ["text"," "], + ["entity.other.attribute-name","execution-stop-time"], + ["keyword.operator","="], + ["string","\"25\""], + ["text"," "], + ["entity.other.attribute-name","execution-time"], + ["keyword.operator","="], + ["string","\"25\""], + ["meta.tag.r",">"], + ["text",""], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","user-time"], + ["meta.tag.r",">"], + ["text","26"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","service-time"], + ["meta.tag.r",">"], + ["text","25"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","build-version"], + ["meta.tag.r",">"], + ["text","21978"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""], + ["text"," "] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","results"], + ["meta.tag.r",">"] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","place"], + ["text"," "], + ["entity.other.attribute-name","xmlns"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/schema.rng\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","xml:lang"], + ["keyword.operator","="], + ["string","\"en-US\""], + ["text"," "], + ["entity.other.attribute-name","yahoo:uri"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/place/24865670\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","woeid"], + ["meta.tag.r",">"], + ["text","24865670"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","placeTypeName"], + ["text"," "], + ["entity.other.attribute-name","code"], + ["keyword.operator","="], + ["string","\"29\""], + ["meta.tag.r",">"], + ["text","Continent"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","name"], + ["meta.tag.r",">"], + ["text","Africa"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","place"], + ["text"," "], + ["entity.other.attribute-name","xmlns"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/schema.rng\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","xml:lang"], + ["keyword.operator","="], + ["string","\"en-US\""], + ["text"," "], + ["entity.other.attribute-name","yahoo:uri"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/place/24865675\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","woeid"], + ["meta.tag.r",">"], + ["text","24865675"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","placeTypeName"], + ["text"," "], + ["entity.other.attribute-name","code"], + ["keyword.operator","="], + ["string","\"29\""], + ["meta.tag.r",">"], + ["text","Continent"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","name"], + ["meta.tag.r",">"], + ["text","Europe"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","place"], + ["text"," "], + ["entity.other.attribute-name","xmlns"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/schema.rng\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","xml:lang"], + ["keyword.operator","="], + ["string","\"en-US\""], + ["text"," "], + ["entity.other.attribute-name","yahoo:uri"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/place/24865673\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","woeid"], + ["meta.tag.r",">"], + ["text","24865673"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","placeTypeName"], + ["text"," "], + ["entity.other.attribute-name","code"], + ["keyword.operator","="], + ["string","\"29\""], + ["meta.tag.r",">"], + ["text","Continent"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","name"], + ["meta.tag.r",">"], + ["text","South America"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","place"], + ["text"," "], + ["entity.other.attribute-name","xmlns"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/schema.rng\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","xml:lang"], + ["keyword.operator","="], + ["string","\"en-US\""], + ["text"," "], + ["entity.other.attribute-name","yahoo:uri"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/place/28289421\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","woeid"], + ["meta.tag.r",">"], + ["text","28289421"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","placeTypeName"], + ["text"," "], + ["entity.other.attribute-name","code"], + ["keyword.operator","="], + ["string","\"29\""], + ["meta.tag.r",">"], + ["text","Continent"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","name"], + ["meta.tag.r",">"], + ["text","Antarctic"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","place"], + ["text"," "], + ["entity.other.attribute-name","xmlns"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/schema.rng\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","xml:lang"], + ["keyword.operator","="], + ["string","\"en-US\""], + ["text"," "], + ["entity.other.attribute-name","yahoo:uri"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/place/24865671\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","woeid"], + ["meta.tag.r",">"], + ["text","24865671"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","placeTypeName"], + ["text"," "], + ["entity.other.attribute-name","code"], + ["keyword.operator","="], + ["string","\"29\""], + ["meta.tag.r",">"], + ["text","Continent"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","name"], + ["meta.tag.r",">"], + ["text","Asia"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","place"], + ["text"," "], + ["entity.other.attribute-name","xmlns"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/schema.rng\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","xml:lang"], + ["keyword.operator","="], + ["string","\"en-US\""], + ["text"," "], + ["entity.other.attribute-name","yahoo:uri"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/place/24865672\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","woeid"], + ["meta.tag.r",">"], + ["text","24865672"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","placeTypeName"], + ["text"," "], + ["entity.other.attribute-name","code"], + ["keyword.operator","="], + ["string","\"29\""], + ["meta.tag.r",">"], + ["text","Continent"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","name"], + ["meta.tag.r",">"], + ["text","North America"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "tag_embed_attribute_list", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","place"], + ["text"," "], + ["entity.other.attribute-name","xmlns"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/schema.rng\""] +],[ + "start", + ["text"," "], + ["entity.other.attribute-name","xml:lang"], + ["keyword.operator","="], + ["string","\"en-US\""], + ["text"," "], + ["entity.other.attribute-name","yahoo:uri"], + ["keyword.operator","="], + ["string","\"http://where.yahooapis.com/v1/place/55949070\""], + ["meta.tag.r",">"] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","woeid"], + ["meta.tag.r",">"], + ["text","55949070"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","placeTypeName"], + ["text"," "], + ["entity.other.attribute-name","code"], + ["keyword.operator","="], + ["string","\"29\""], + ["meta.tag.r",">"], + ["text","Continent"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag","<"], + ["meta.tag.tag-name","name"], + ["meta.tag.r",">"], + ["text","Australia"], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start", + ["text"," "], + ["meta.tag",""] +],[ + "start", + ["meta.tag",""] +]] \ No newline at end of file diff --git a/lib/ace/mode/_test/tokens_xquery.json b/lib/ace/mode/_test/tokens_xquery.json index 62d9c927..b1e01ab4 100644 --- a/lib/ace/mode/_test/tokens_xquery.json +++ b/lib/ace/mode/_test/tokens_xquery.json @@ -1,64 +1,44 @@ -[ - { - "state": "start", - "data": [ - [ "keyword", "xquery" ], - [ "text", " " ], - [ "keyword", "version" ], - [ "text", " " ], - [ "string", "\"1.0\"" ], - [ "text", ";" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "keyword", "let" ], - [ "text", " " ], - [ "variable", "$message" ], - [ "text", " :" ], - [ "keyword.operator", "=" ], - [ "text", " " ], - [ "string", "\"Hello World!\"" ] - ] - }, - { - "state": "start", - "data": [ - [ "keyword", "return" ], - [ "text", " <" ], - [ "meta.tag", "results" ], - [ "text", ">" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", " <" ], - [ "meta.tag", "message" ], - [ "text", ">" ], - [ "lparen", "{" ], - [ "variable", "$message" ], - [ "rparen", "}" ], - [ "text", "" ] - ] - }, - { - "state": "start", - "data": [ - [ "text", "" ] - ] - }, - { - "state": "start", - "data": [] - } -] \ No newline at end of file +[[ + "start", + ["keyword","xquery"], + ["text"," "], + ["keyword","version"], + ["text"," "], + ["string","\"1.0\""], + ["text",";"] +],[ + "start" +],[ + "start", + ["keyword","let"], + ["text"," "], + ["variable","$message"], + ["text"," "], + ["keyword.operator",":="], + ["text"," "], + ["string","\"Hello World!\""] +],[ + "start", + ["keyword","return"], + ["text"," <"], + ["meta.tag","results"], + ["text",">"] +],[ + "start", + ["text"," <"], + ["meta.tag","message"], + ["text",">"], + ["lparen","{"], + ["variable","$message"], + ["rparen","}"], + ["text",""] +],[ + "start", + ["text",""] +],[ + "start" +]] \ 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 bbfb8aaa..7c9b45f3 100644 --- a/lib/ace/mode/_test/tokens_yaml.json +++ b/lib/ace/mode/_test/tokens_yaml.json @@ -1,253 +1,150 @@ -[ - { - "state": "start", - "data": [ - [ "comment", "# This sample document was taken from wikipedia:" ] - ] - }, - { - "state": "start", - "data": [ - [ "comment", "# http://en.wikipedia.org/wiki/YAML#Sample_document" ] - ] - }, - { - "state": "start", - "data": [ - [ "list.markup", "---" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "receipt" ], - [ "keyword", ": " ], - [ "text", "Oz-Ware Purchase Invoice" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "date" ], - [ "keyword", ": " ], - [ "constant.numeric", "2007-08-06" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "customer" ], - [ "keyword", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " given" ], - [ "keyword", ": " ], - [ "text", "Dorothy" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " family" ], - [ "keyword", ": " ], - [ "text", "Gale" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "items" ], - [ "keyword", ":" ] - ] - }, - { - "state": "start", - "data": [ - [ "list.markup", " - " ], - [ "meta.tag", "part_no" ], - [ "keyword", ": " ], - [ "string", "'A4786'" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " descrip" ], - [ "keyword", ": " ], - [ "text", "Water Bucket " ], - [ "paren.lparen", "(" ], - [ "text", "Filled" ], - [ "paren.rparen", ")" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " price" ], - [ "keyword", ": " ], - [ "constant.numeric", "1.47" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " quantity" ], - [ "keyword", ": " ], - [ "constant.numeric", "4" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "list.markup", " - " ], - [ "meta.tag", "part_no" ], - [ "keyword", ": " ], - [ "string", "'E1628'" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " descrip" ], - [ "keyword", ": " ], - [ "text", "High Heeled " ], - [ "string", "\"Ruby\"" ], - [ "text", " Slippers" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " size" ], - [ "keyword", ": " ], - [ "constant.numeric", "8" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " price" ], - [ "keyword", ": " ], - [ "constant.numeric", "100.27" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " quantity" ], - [ "keyword", ": " ], - [ "constant.numeric", "1" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "bill-to" ], - [ "keyword", ": " ], - [ "constant.language", "&id001" ] - ] - }, - { - "state": "qqstring", - "data": [ - [ "meta.tag", " street" ], - [ "keyword", ": " ], - [ "string", "|" ] - ] - }, - { - "state": "qqstring", - "data": [ - [ "string", " 123 Tornado Alley" ] - ] - }, - { - "state": "qqstring", - "data": [ - [ "string", " Suite 16" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " city" ], - [ "keyword", ": " ], - [ "text", "East Centerville" ] - ] - }, - { - "state": "start", - "data": [ - [ "meta.tag", " state" ], - [ "keyword", ": " ], - [ "text", "KS" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "start", - "data": [ - [ "meta.tag", "ship-to" ], - [ "keyword", ": " ], - [ "constant.language", "*id001" ] - ] - }, - { - "state": "start", - "data": [] - }, - { - "state": "qqstring", - "data": [ - [ "meta.tag", "specialDelivery" ], - [ "keyword", ": " ], - [ "string", ">" ] - ] - }, - { - "state": "qqstring", - "data": [ - [ "string", " Follow the Yellow Brick" ] - ] - }, - { - "state": "qqstring", - "data": [ - [ "string", " Road to the Emerald City." ] - ] - }, - { - "state": "qqstring", - "data": [ - [ "string", " Pay no attention to the" ] - ] - }, - { - "state": "qqstring", - "data": [ - [ "string", " man behind the curtain." ] - ] - }, - { - "state": "qqstring", - "data": [] - } -] \ No newline at end of file +[[ + "start", + ["comment","# This sample document was taken from wikipedia:"] +],[ + "start", + ["comment","# http://en.wikipedia.org/wiki/YAML#Sample_document"] +],[ + "start", + ["list.markup","---"] +],[ + "start", + ["meta.tag","receipt"], + ["keyword",": "], + ["text","Oz-Ware Purchase Invoice"] +],[ + "start", + ["meta.tag","date"], + ["keyword",": "], + ["constant.numeric","2007-08-06"] +],[ + "start", + ["meta.tag","customer"], + ["keyword",":"] +],[ + "start", + ["meta.tag"," given"], + ["keyword",": "], + ["text","Dorothy"] +],[ + "start", + ["meta.tag"," family"], + ["keyword",": "], + ["text","Gale"] +],[ + "start" +],[ + "start", + ["meta.tag","items"], + ["keyword",":"] +],[ + "start", + ["list.markup"," - "], + ["meta.tag","part_no"], + ["keyword",": "], + ["string","'A4786'"] +],[ + "start", + ["meta.tag"," descrip"], + ["keyword",": "], + ["text","Water Bucket "], + ["paren.lparen","("], + ["text","Filled"], + ["paren.rparen",")"] +],[ + "start", + ["meta.tag"," price"], + ["keyword",": "], + ["constant.numeric","1.47"] +],[ + "start", + ["meta.tag"," quantity"], + ["keyword",": "], + ["constant.numeric","4"] +],[ + "start" +],[ + "start", + ["list.markup"," - "], + ["meta.tag","part_no"], + ["keyword",": "], + ["string","'E1628'"] +],[ + "start", + ["meta.tag"," descrip"], + ["keyword",": "], + ["text","High Heeled "], + ["string","\"Ruby\""], + ["text"," Slippers"] +],[ + "start", + ["meta.tag"," size"], + ["keyword",": "], + ["constant.numeric","8"] +],[ + "start", + ["meta.tag"," price"], + ["keyword",": "], + ["constant.numeric","100.27"] +],[ + "start", + ["meta.tag"," quantity"], + ["keyword",": "], + ["constant.numeric","1"] +],[ + "start" +],[ + "start", + ["meta.tag","bill-to"], + ["keyword",": "], + ["constant.language","&id001"] +],[ + "qqstring", + ["meta.tag"," street"], + ["keyword",": "], + ["string","|"] +],[ + "qqstring", + ["string"," 123 Tornado Alley"] +],[ + "qqstring", + ["string"," Suite 16"] +],[ + "start", + ["meta.tag"," city"], + ["keyword",": "], + ["text","East Centerville"] +],[ + "start", + ["meta.tag"," state"], + ["keyword",": "], + ["text","KS"] +],[ + "start" +],[ + "start", + ["meta.tag","ship-to"], + ["keyword",": "], + ["constant.language","*id001"] +],[ + "start" +],[ + "qqstring", + ["meta.tag","specialDelivery"], + ["keyword",": "], + ["string",">"] +],[ + "qqstring", + ["string"," Follow the Yellow Brick"] +],[ + "qqstring", + ["string"," Road to the Emerald City."] +],[ + "qqstring", + ["string"," Pay no attention to the"] +],[ + "qqstring", + ["string"," man behind the curtain."] +],[ + "qqstring" +]] \ No newline at end of file diff --git a/lib/ace/mode/coffee_highlight_rules_test.js b/lib/ace/mode/coffee_highlight_rules_test.js deleted file mode 100644 index 2823cfbb..00000000 --- a/lib/ace/mode/coffee_highlight_rules_test.js +++ /dev/null @@ -1,266 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Distributed under the BSD license: - * - * Copyright (c) 2010, Ajax.org B.V. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Ajax.org B.V. nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * ***** END LICENSE BLOCK ***** */ - -if (typeof process !== "undefined") { - require("amd-loader"); -} - -define(function(require, exports, module) { -"use strict"; - -var Mode = require("./coffee").Mode; -var assert = require("../test/assertions"); - -module.exports = { - setUp : function() { - this.tokenizer = new Mode().getTokenizer(); - this.testTokens = function(tokens, correct) { - assert.equal(tokens.length, correct.length); - correct.forEach(function(type, i) { - assert.equal(tokens[i].type, type); - }); - }; - }, - - "test: tokenize keyword": function() { - var tokens = this.tokenizer.getLineTokens("for", "start").tokens; - assert.equal(tokens.length, 1); - assert.equal(tokens[0].type, "keyword"); - }, - - "test: tokenize regexp": function() { - var tokens = this.tokenizer.getLineTokens('/"[a]/', "start").tokens; - assert.equal(tokens.length, 1); - assert.equal(tokens[0].type, "string.regex"); - }, - - "test: tokenize function: 'foo = ({args}) ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo = ({args}) ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "keyword.operator", "text", - "paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - - tokens = this.tokenizer.getLineTokens("foo = ({a1, a2}) ->", "start").tokens; - this.testTokens(tokens, correct); - - tokens = this.tokenizer.getLineTokens("foo = ({@a1, a2}) ->", "start").tokens; - this.testTokens(tokens, correct); - }, - - "test: tokenize function: 'foo : ({args}) ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo : ({args}) ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "punctuation.operator", "text", - "paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize function: invalid case: 'foo = ({args}) ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo = ({0abc}) ->", "start").tokens; - assert.notEqual(tokens[0].type, "entity.name.function"); - - tokens = this.tokenizer.getLineTokens("foo = ({/abc}) ->", "start").tokens; - assert.notEqual(tokens[0].type, "entity.name.function"); - - tokens = this.tokenizer.getLineTokens("foo = ({abc/}) ->", "start").tokens; - assert.notEqual(tokens[0].type, "entity.name.function"); - - tokens = this.tokenizer.getLineTokens("foo = ({#abc}) ->", "start").tokens; - assert.notEqual(tokens[0].type, "entity.name.function"); - - tokens = this.tokenizer.getLineTokens("foo = ({abc#}) ->", "start").tokens; - assert.notEqual(tokens[0].type, "entity.name.function"); - - tokens = this.tokenizer.getLineTokens("foo = ({)abc}) ->", "start").tokens; - assert.notEqual(tokens[0].type, "entity.name.function"); - - tokens = this.tokenizer.getLineTokens("foo = ({abc)}) ->", "start").tokens; - assert.notEqual(tokens[0].type, "entity.name.function"); - - tokens = this.tokenizer.getLineTokens("foo = ({a{bc}) ->", "start").tokens; - assert.notEqual(tokens[0].type, "entity.name.function"); - }, - - "test: tokenize function: 'foo = ({}) ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo = ({}) ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "keyword.operator", "text", - "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", "text", "paren.rparen", "text", "storage.type" - ]; - assert.equal(tokens.length, 9); - this.testTokens(tokens, correct); - }, - - "test: tokenize function: 'foo : ({}) ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo : ({}) ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "punctuation.operator", "text", - "paren.lparen", "paren.rparen", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize function: 'foo = (args) ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo = (args) ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "keyword.operator", "text", - "paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - - tokens = this.tokenizer.getLineTokens("foo = (arg1, arg2) ->", "start").tokens; - this.testTokens(tokens, correct); - - tokens = this.tokenizer.getLineTokens("foo = (arg1 = 1, arg2 = 'name') ->", "start").tokens; - this.testTokens(tokens, correct); - - tokens = this.tokenizer.getLineTokens("foo = (@arg1 = /abc/, arg2 = 'name') ->", "start").tokens; - this.testTokens(tokens, correct); - }, - - "test: tokenize function: invalid case: 'foo=(args) ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo=(/args) ->", "start").tokens; - assert.notEqual(tokens[0].type, "entity.name.function"); - }, - - "test: tokenize function: 'foo = () ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo = () ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "keyword.operator", "text", - "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", "text", "paren.rparen", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize function: 'foo : () ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo : () ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "punctuation.operator", "text", - "paren.lparen", "paren.rparen", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - - tokens = this.tokenizer.getLineTokens("foo : ( ) ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "punctuation.operator", "text", - "paren.lparen", "text", "paren.rparen", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize function: 'window.foo = (args) ->'": function() { - var tokens = this.tokenizer.getLineTokens("window.foo = (args) ->", "start").tokens; - var correct = [ - "variable.language", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", - "paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize function: 'foo = ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo = ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize function: 'foo : ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo : ->", "start").tokens; - var correct = [ - "entity.name.function", "text", "punctuation.operator", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize callback function: 'foo bar: 1, (args) ->'": function() { - var tokens = this.tokenizer.getLineTokens("foo bar: 1, (args) ->", "start").tokens; - var correct = [ - "identifier", "text", "identifier", "punctuation.operator", "text", "constant.numeric", "punctuation.operator", "text", - "paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize class: 'class Foo'": function() { - var tokens = this.tokenizer.getLineTokens("class Foo", "start").tokens; - var correct = [ - "keyword", "text", "language.support.class" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize class 'class Foo extends Bar'": function() { - var tokens = this.tokenizer.getLineTokens("class Foo extends Bar", "start").tokens; - var correct = [ - "keyword", "text", "language.support.class", "text", "keyword", "text", "language.support.class" - ]; - this.testTokens(tokens, correct); - }, - - "test: tokenize illegal name property: 'foo.static.function'": function() { - var tokens = this.tokenizer.getLineTokens("foo.static.function", "start").tokens; - var correct = [ - "identifier", "punctuation.operator", "identifier", "punctuation.operator", "identifier" - ]; - this.testTokens(tokens, correct); - }, - - // TODO: disable. not yet implemented - "!test tokenize string with interpolation": function() { - var tokens = this.tokenizer.getLineTokens('"#{ 22 / 7 } is a decent approximation of π"', "start").tokens; - console.log(tokens); - assert.equal(tokens.length, 12); - //assert.equal(tokens[0].type, "keyword"); - } -}; - -}); - -if (typeof module !== "undefined" && module === require.main) { - require("asyncjs").test.testcase(module.exports).exec(); -} diff --git a/lib/ace/mode/curly_highlight_rules_test.js b/lib/ace/mode/curly_highlight_rules_test.js deleted file mode 100644 index d63d31d1..00000000 --- a/lib/ace/mode/curly_highlight_rules_test.js +++ /dev/null @@ -1,202 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Distributed under the BSD license: - * - * Copyright (c) 2010, Ajax.org B.V. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Ajax.org B.V. nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * ***** END LICENSE BLOCK ***** */ - -if (typeof process !== "undefined") { - require("amd-loader"); -} - -define(function(require, exports, module) { -"use strict"; - -var CurlyMode = require("./curly").Mode; -var assert = require("../test/assertions"); - -var testData = { - "test: tokenize Curly template" : [{ - text: "{{test}}", - state: ["start", "start"], - tokens: [{ - type: "variable", - value: "{{" - }, { - type: "text", - value: "test" - }, { - type: "variable", - value: "}}" - }] - }], - - "test: tokenize embedded script" : [{ - text: "'123'", - state: ["start", "start"], - tokens: [{ - type: "meta.tag", - value: "<" - }, { - type: "meta.tag.tag-name.script", - value: "script" - }, { - type: "text", - value: " " - }, { - type: "entity.other.attribute-name", - value: "a" - }, { - type: "keyword.operator", - value: "=" - }, { - type: "string", - value: "'a'" - }, { - type: "meta.tag.r", - value: ">" - }, { - type: "storage.type", - value: "var" - }, { - type: "meta.tag", - value: "" - }, { - type: "text", - value: "'123'" - }] - }], - - "test: tokenize multiline attribute value with double quotes": [{ - text: "", - state: [ "tag_qqstring", "start" ], - tokens: [ { - type: "string", - value: "def\"" - }, { - type: "meta.tag.r", - value: ">" - } - ] - }], - - "test: tokenize multiline attribute value with single quotes": [{ - text: "", - state: [ "tag_qstring", "start" ], - tokens: [ { - type: "string", - value: "def\"'" - }, { - type: "meta.tag.r", - value: ">" - } - ] - }] -}; - -function generateTest(exampleData) { - return function testTokenizer() { - for (var i = 0; i < exampleData.length; i++) { - var s = exampleData[i]; - - var lineTokens = tokenizer.getLineTokens(s.text, s.state[0]); - - assert.equal( - JSON.stringify(lineTokens, null, 4), - JSON.stringify({tokens:s.tokens, state: s.state[1]}, null, 4) - ); - } - } -} - -var tokenizer; -module.exports = { - setUp : function() { - tokenizer = new CurlyMode().getTokenizer(); - } -} - -for (var i in testData) { - module.exports[i] = generateTest(testData[i]) -} - -}); - -if (typeof module !== "undefined" && module === require.main) { - require("asyncjs").test.testcase(module.exports).exec(); -} diff --git a/lib/ace/mode/javascript_highlight_rules_test.js b/lib/ace/mode/javascript_highlight_rules_test.js deleted file mode 100644 index e0c61bb1..00000000 --- a/lib/ace/mode/javascript_highlight_rules_test.js +++ /dev/null @@ -1,215 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Distributed under the BSD license: - * - * Copyright (c) 2010, Ajax.org B.V. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Ajax.org B.V. nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * ***** END LICENSE BLOCK ***** */ - -if (typeof process !== "undefined") { - require("amd-loader"); -} - -define(function(require, exports, module) { -"use strict"; - -var JavaScriptMode = require("./javascript").Mode; -var assert = require("../test/assertions"); - -module.exports = { - - name: "JavaScript Tokenizer", - - setUp : function() { - this.tokenizer = new JavaScriptMode().getTokenizer(); - }, - - "test: tokenize1" : function() { - var line = "foo = function"; - - var tokens = this.tokenizer.getLineTokens(line, "start").tokens; - - assert.equal(5, tokens.length); - assert.equal("identifier", tokens[0].type); - assert.equal("text", tokens[1].type); - assert.equal("keyword.operator", tokens[2].type); - assert.equal("text", tokens[3].type); - assert.equal("storage.type", tokens[4].type); - }, - - "test: tokenize 'standard' functions" : function() { - var line = "string.charCodeAt(23); document.getElementById('test'); console.log('Here it is');"; - - var tokens = this.tokenizer.getLineTokens(line, "start").tokens; - - assert.equal(23, tokens.length); - assert.equal("support.function", tokens[2].type); // charCodeAt - assert.equal("support.function.dom", tokens[10].type); // getElementById - assert.equal("support.function.firebug", tokens[18].type); // log - }, - - "test: tokenize doc comment" : function() { - var line = "abc /** de */ fg"; - - var tokens = this.tokenizer.getLineTokens(line, "start").tokens; - - assert.equal(5, tokens.length); - assert.equal("identifier", tokens[0].type); - assert.equal("text", tokens[1].type); - assert.equal("comment.doc", tokens[2].type); - assert.equal("text", tokens[3].type); - assert.equal("identifier", tokens[4].type); - }, - - "test: tokenize doc comment with tag" : function() { - var line = "/** @param {} */"; - - var tokens = this.tokenizer.getLineTokens(line, "start").tokens; - - assert.equal(3, tokens.length); - assert.equal("comment.doc", tokens[0].type); - assert.equal("comment.doc.tag", tokens[1].type); - assert.equal("comment.doc", tokens[2].type); - }, - - "test: tokenize parens" : function() { - var line = "[{( )}]"; - - var tokens = this.tokenizer.getLineTokens(line, "start").tokens; - - // TODO is it useful to keep parens in separate tokens? - assert.equal(3, tokens.length); - assert.equal("paren.lparen", tokens[0].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() { - var tokens = this.tokenizer.getLineTokens("}", "start").tokens; - - assert.equal(1, tokens.length); - assert.equal("paren.rparen", tokens[0].type); - }, - - "test tokenize arithmetic expression which looks like a regexp": function() { - var tokens = this.tokenizer.getLineTokens("a/b/c", "start").tokens; - assert.equal(5, tokens.length); - - var tokens = this.tokenizer.getLineTokens("a/=b/c", "start").tokens; - assert.equal(5, tokens.length); - }, - - "test tokenize reg exps" : function() { - var tokens = this.tokenizer.getLineTokens("a=/b/g", "start").tokens; - assert.equal(3, tokens.length); - assert.equal("string.regexp", tokens[2].type); - - var tokens = this.tokenizer.getLineTokens("a+/b/g", "start").tokens; - assert.equal(3, tokens.length); - assert.equal("string.regexp", tokens[2].type); - - var tokens = this.tokenizer.getLineTokens("a = 1 + /2 + 1/b", "start").tokens; - assert.equal(11, tokens.length); - assert.equal("string.regexp", tokens[8].type); - - var tokens = this.tokenizer.getLineTokens("a=/a/ / /a/", "start").tokens; - assert.equal(7, tokens.length); - assert.equal("string.regexp", tokens[2].type); - assert.equal("string.regexp", tokens[6].type); - - var tokens = this.tokenizer.getLineTokens("case /a/.test(c)", "start").tokens; - assert.equal(8, tokens.length); - assert.equal("string.regexp", tokens[2].type); - }, - - "test tokenize multi-line comment containing a single line comment" : function() { - var tokens = this.tokenizer.getLineTokens("/* foo // bar */", "start").tokens; - assert.equal(1, tokens.length); - assert.equal("comment", tokens[0].type); - - var tokens = this.tokenizer.getLineTokens("/* foo // bar */", "regex_allowed").tokens; - assert.equal(1, tokens.length); - assert.equal("comment", tokens[0].type); - }, - - "test tokenize identifier with umlauts": function() { - var tokens = this.tokenizer.getLineTokens("füße", "start").tokens; - assert.equal(1, tokens.length); - }, - - "test // is not a regexp": function() { - var tokens = this.tokenizer.getLineTokens("{ // 123", "start").tokens; - assert.equal(3, tokens.length); - assert.equal("paren.lparen", tokens[0].type); - assert.equal("text", tokens[1].type); - assert.equal("comment", tokens[2].type); - }, - - "test skipping escaped chars": function() { - var line = "console.log('Meh\\nNeh');" - var tokens = this.tokenizer.getLineTokens(line, "start").tokens; - - assert.equal(9, tokens.length); - assert.equal("constant.language.escape", tokens[5].type); - - line = "console.log('\\u1232Feh');"; - tokens = this.tokenizer.getLineTokens(line, "start").tokens; - - assert.equal(9, tokens.length); - assert.equal("constant.language.escape", tokens[5].type); - }, - - "test multiline strings": function() { - var line = "console.log('Meh\\" - var data = this.tokenizer.getLineTokens(line, "start") - - assert.equal(5, data.tokens.length); - assert.equal(data.state, "qstring"); - - line = "console.log('Meh\\ " - data = this.tokenizer.getLineTokens(line, "start") - - assert.equal(6, data.tokens.length); - assert.equal(data.state, "start"); - - line = 'console.log("\\' - data = this.tokenizer.getLineTokens(line, "start") - - assert.equal(5, data.tokens.length); - assert.equal(data.state, "qqstring"); - - line = 'a="' - data = this.tokenizer.getLineTokens(line, "start") - - assert.equal(3, data.tokens.length); - assert.equal(data.state, "start"); - } -}; - -}); - -if (typeof module !== "undefined" && module === require.main) { - require("asyncjs").test.testcase(module.exports).exec() -} diff --git a/lib/ace/mode/lucene_highlight_rules_test.js b/lib/ace/mode/lucene_highlight_rules_test.js deleted file mode 100644 index 739731e2..00000000 --- a/lib/ace/mode/lucene_highlight_rules_test.js +++ /dev/null @@ -1,99 +0,0 @@ -if (typeof process !== "undefined") { - require("amd-loader"); -} - -define(function(require, exports, module) { -"use strict"; - -var LuceneMode = require("./lucene").Mode; -var assert = require("../test/assertions"); - -module.exports = { - - name: "Lucene Tokenizer", - - setUp : function() { - this.tokenizer = new LuceneMode().getTokenizer(); - }, - - "test: recognises AND as keyword" : function() { - var tokens = this.tokenizer.getLineTokens("AND", "start").tokens; - assert.equal("keyword.operator", tokens[0].type); - }, - - "test: recognises OR as keyword" : function() { - var tokens = this.tokenizer.getLineTokens("OR", "start").tokens; - assert.equal("keyword.operator", tokens[0].type); - }, - - "test: recognises NOT as keyword" : function() { - var tokens = this.tokenizer.getLineTokens("NOT", "start").tokens; - assert.equal("keyword.operator", tokens[0].type); - }, - - 'test: recognises "hello this is dog" as string' : function() { - var tokens = this.tokenizer.getLineTokens('"hello this is dog"', "start").tokens; - assert.equal("string", tokens[0].type); - }, - - 'test: recognises -"hello this is dog" as negation with string' : function() { - var tokens = this.tokenizer.getLineTokens('-"hello this is dog"', "start").tokens; - assert.equal("constant.character.negation", tokens[0].type); - assert.equal("string", tokens[1].type); - }, - - 'test: recognises ~100 as text with proximity' : function() { - var tokens = this.tokenizer.getLineTokens('~100', "start").tokens; - assert.equal("constant.character.proximity", tokens[0].type); - }, - - 'test: recognises "hello this is dog"~100 as string with proximity' : function() { - var tokens = this.tokenizer.getLineTokens('"hello this is dog"~100', "start").tokens; - - assert.equal("string", tokens[0].type); - assert.equal("constant.character.proximity", tokens[1].type); - }, - - 'test: recognises raw:"hello this is dog" as keyword' : function() { - var tokens = this.tokenizer.getLineTokens('raw:"hello this is dog"', "start").tokens; - assert.equal("keyword", tokens[0].type); - }, - - 'test: recognises raw:foo as"keyword' : function() { - var tokens = this.tokenizer.getLineTokens('raw:foo', "start").tokens; - assert.equal("keyword", tokens[0].type); - }, - - 'test: recognises "(" as opening parenthesis' : function() { - var tokens = this.tokenizer.getLineTokens('(', "start").tokens; - assert.equal("paren.lparen", tokens[0].type); - }, - - 'test: recognises ")" as closing parenthesis' : function() { - var tokens = this.tokenizer.getLineTokens(')', "start").tokens; - assert.equal("paren.rparen", tokens[0].type); - }, - - 'test: recognises foo* as text with asterisk' : function() { - var tokens = this.tokenizer.getLineTokens('foo*', "start").tokens; - assert.equal("text", tokens[0].type); - assert.equal("constant.character.asterisk", tokens[1].type); - }, - - 'test: recognises foo? as text with interro' : function() { - var tokens = this.tokenizer.getLineTokens('foo?', "start").tokens; - assert.equal("text", tokens[0].type); - assert.equal("constant.character.interro", tokens[1].type); - }, - - 'test: recognises single word as text' : function() { - var tokens = this.tokenizer.getLineTokens(' foo', "start").tokens; - assert.equal("text", tokens[0].type); - } -}; - -}); - -if (typeof module !== "undefined" && module === require.main) { - require("asyncjs").test.testcase(module.exports).exec(); -} \ No newline at end of file diff --git a/lib/ace/mode/markdown_highlight_rules_test.js b/lib/ace/mode/markdown_highlight_rules_test.js deleted file mode 100644 index 4c828e49..00000000 --- a/lib/ace/mode/markdown_highlight_rules_test.js +++ /dev/null @@ -1,100 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Distributed under the BSD license: - * - * Copyright (c) 2012, Ajax.org B.V. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Ajax.org B.V. nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * - * Contributor(s): - * - * quexer - * - * ***** END LICENSE BLOCK ***** */ - -if (typeof process !== "undefined") { - require("amd-loader"); -} - -define(function(require, exports, module) { -"use strict"; - -var Mode = require("./markdown").Mode; -var assert = require("../test/assertions"); - -module.exports = { - setUp : function() { - this.tokenizer = new Mode().getTokenizer(); - }, - - "test: header 1 ": function() { - var tokens = this.tokenizer.getLineTokens("#f", "start").tokens; - assert.equal(tokens.length, 1); - assert.equal(tokens[0].type, 'markup.heading.1'); - }, - - "test: header 2": function() { - var tokens = this.tokenizer.getLineTokens("## foo", "start").tokens; - assert.equal(tokens.length, 1); - assert.equal(tokens[0].type, 'markup.heading.2'); - }, - - "test: header ends with ' #'": function() { - var tokens = this.tokenizer.getLineTokens("# # # ", "start").tokens; - assert.equal(tokens.length, 1); - assert.equal(tokens[0].type, 'markup.heading.1'); - }, - - "test: header ends with '#'": function() { - var tokens = this.tokenizer.getLineTokens("#foo# ", "start").tokens; - assert.equal(tokens.length, 1); - assert.equal(tokens[0].type, 'markup.heading.1'); - }, - - "test: 6+ #s is not a valid header": function() { - var tokens = this.tokenizer.getLineTokens("####### foo", "start").tokens; - assert.equal(tokens.length, 1); - assert.equal(tokens[0].type, 'text'); - }, - - "test: # followed be only space is not a valid header": function() { - var tokens = this.tokenizer.getLineTokens("# ", "start").tokens; - assert.equal(tokens.length, 1); - assert.equal(tokens[0].type, 'text'); - }, - - - - "test: only space between #s is not a valid header": function() { - var tokens = this.tokenizer.getLineTokens("# #", "start").tokens; - assert.equal(tokens.length, 1); - assert.equal(tokens[0].type, 'text'); - } -}; - -}); - -if (typeof module !== "undefined" && module === require.main) { - require("asyncjs").test.testcase(module.exports).exec(); -} diff --git a/lib/ace/mode/ruby_highlight_rules_test.js b/lib/ace/mode/ruby_highlight_rules_test.js deleted file mode 100644 index 66d7edbd..00000000 --- a/lib/ace/mode/ruby_highlight_rules_test.js +++ /dev/null @@ -1,108 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Distributed under the BSD license: - * - * Copyright (c) 2010, Ajax.org B.V. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Ajax.org B.V. nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * ***** END LICENSE BLOCK ***** */ - -if (typeof process !== "undefined") { - require("amd-loader"); -} - -define(function(require, exports, module) { -"use strict"; - -var RubyMode = require("./ruby").Mode; -var assert = require("../test/assertions"); - -module.exports = { - - name: "Ruby Tokenizer", - - setUp : function() { - this.tokenizer = new RubyMode().getTokenizer(); - }, - - "test: symbol tokenizer" : function() { - // https://gist.github.com/1072693 - assertValidTokens(this.tokenizer, "constant.other.symbol.ruby", - [":@thing", ":$thing", ":_thing", ":thing", ":Thing", ":thing1", ":thing_a", - ":THING", ":thing!", ":thing=", ":thing?", ":t?"]); - assertInvalidTokens(this.tokenizer, "constant.other.symbol.ruby", - [":", ":@", ":$", ":1", ":1thing", ":th?ing", ":thi=ng", ":1thing", - ":th!ing", ":thing#"]); - }, - - "test: namespaces aren't symbols" : function() { - var line = "Namespaced::Class"; - var tokens = this.tokenizer.getLineTokens(line, "start").tokens; - - assert.equal(3, tokens.length); - assert.equal("support.class", tokens[0].type); - assert.equal("text", tokens[1].type); - assert.equal("support.class", tokens[2].type); - }, - - "test: hex tokenizer" : function() { - assertValidTokens(this.tokenizer, "constant.numeric", - ["0x9a", "0XA1", "0x9_a"]); - assertInvalidTokens(this.tokenizer, "constant.numeric", - ["0x", "0x_9a", "0x9a_"]); - }, - - "test: float tokenizer" : function() { - assertValidTokens(this.tokenizer, "constant.numeric", - ["1", "+1", "-1", "12_345", "0.000_1"]); - assertInvalidTokens(this.tokenizer, "constant.numeric", - ["_", "_1", "1_", "1_.0", "0._1"]); - } -}; - -function assertValidTokens(tokenizer, tokenType, validTokens) { - for (var i = 0, length = validTokens.length; i < length; i++) { - var validToken = validTokens[i], - tokens = tokenizer.getLineTokens(validToken, "start").tokens; - assert.equal(tokens[0].value, validToken, - '"' + validToken + '" should be one token'); - assert.equal(tokens[0].type, tokenType, - '"' + validToken + '" should be a "' + tokenType + '" token'); - } -} - -function assertInvalidTokens(tokenizer, tokenType, invalidTokens) { - for (var i = 0, length = invalidTokens.length; i < length; i++) { - var invalidToken = invalidTokens[i], - tokens = tokenizer.getLineTokens(invalidToken, "start").tokens; - assert.ok(tokens[0].type !== tokenType || tokens[0].value !== invalidToken, - '"' + invalidToken + '" is not a valid "' + tokenType + '"'); - } -} - -}); - -if (typeof module !== "undefined" && module === require.main) { - require("asyncjs").test.testcase(module.exports).exec() -} diff --git a/lib/ace/mode/xml_highlight_rules_test.js b/lib/ace/mode/xml_highlight_rules_test.js deleted file mode 100644 index 893c67a5..00000000 --- a/lib/ace/mode/xml_highlight_rules_test.js +++ /dev/null @@ -1,208 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Distributed under the BSD license: - * - * Copyright (c) 2010, Ajax.org B.V. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Ajax.org B.V. nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * ***** END LICENSE BLOCK ***** */ - -if (typeof process !== "undefined") { - require("amd-loader"); -} - -define(function(require, exports, module) { -"use strict"; - -var XmlMode = require("./xml").Mode; -var assert = require("../test/assertions"); - -var testData = { - "test: tokenize1" : [{ - text: "//Juhu Kinners", - state: ["start", "start"], - tokens: [ - { - type: "meta.tag", - value: "<" - }, - { - type: "meta.tag.tag-name", - value: "Juhu" - }, - { - type: "meta.tag.r", - value: ">" - }, - { - type: "text", - value: "//Juhu Kinners" - }, - { - type: "meta.tag", - value: "" - } - ] - }], - - "test: two tags in the same lines should be in separate tokens": [{ - text: "", - state: [ "start", "start"], - tokens: [ - { - type: "meta.tag", - value: "<" - }, - { - type: "meta.tag.tag-name", - value: "Juhu" - }, - { - type: "meta.tag.r", - value: ">" - }, - { - type: "meta.tag", - value: "<" - }, - { - type: "meta.tag.tag-name", - value: "Kinners" - }, - { - type: "meta.tag.r", - value: ">" - } - ] - }], - - "test: multiline attributes": [{ - text: "", - state: ["tag_qqstring", "start"], - tokens: [ - { - type: "string", - value: "}\"" - }, - { - type: "meta.tag.r", - value: "/>" - } - ] - }] -}; - -function generateTest(exampleData) { - return function testTokenizer() { - for (var i = 0; i < exampleData.length; i++) { - var s = exampleData[i]; - var lineTokens = tokenizer.getLineTokens(s.text, s.state[0]); - - assert.equal( - JSON.stringify(lineTokens, null, 4), - JSON.stringify({tokens:s.tokens, state: s.state[1]}, null, 4) - ); - } - } -} - -var tokenizer; -module.exports = { - name: "XML Tokenizer", - - setUp : function() { - tokenizer = new XmlMode().getTokenizer(); - } -} - -for (var i in testData) { - module.exports[i] = generateTest(testData[i]) -} -}); - -if (typeof module !== "undefined" && module === require.main) { - require("asyncjs").test.testcase(module.exports).exec(); -} diff --git a/lib/ace/test/all_browser.js b/lib/ace/test/all_browser.js index 26252049..baa13a1d 100644 --- a/lib/ace/test/all_browser.js +++ b/lib/ace/test/all_browser.js @@ -23,23 +23,15 @@ var testNames = [ "ace/layer/text_test", "ace/lib/event_emitter_test", "ace/mode/coffee/parser_test", - "ace/mode/coffee_highlight_rules_test", "ace/mode/coldfusion_test", "ace/mode/css_test", - "ace/mode/css_highlight_rules_test", "ace/mode/css_worker", "ace/mode/html_test", - "ace/mode/html_highlight_rules_test", "ace/mode/javascript_test", - "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", "ace/mode/xml_test", - "ace/mode/xml_highlight_rules_test", "ace/mode/folding/cstyle_test", "ace/mode/folding/html_test", "ace/mode/folding/pythonic_test",