Merge pull request #1214 from ajaxorg/test_all_modes

tests for all modes
This commit is contained in:
Garen Torikian 2013-01-22 12:02:56 -08:00
commit e7a0a98f94
81 changed files with 18464 additions and 23158 deletions

View file

@ -480,4 +480,13 @@ p.highlight_note a {
/*https://github.com/twitter/bootstrap/issues/5262*/ /*https://github.com/twitter/bootstrap/issues/5262*/
img { img {
max-width: none; max-width: none;
}
.text-logo{
color: black;
font-size: 24px;
font-weight: lighter;
margin-top: 23px;
text-align: center;
text-shadow: 1px 17px 2px gray, 1px 1px 2px gray;
} }

View file

@ -657,50 +657,14 @@ oop.inherits(FoldMode, BaseFoldMode);
</ol> </ol>
<p>Once you set this up, you should see be able to witness a live demonstration of your new highlighter.</p> <p>Once you set this up, you should see be able to witness a live demonstration of your new highlighter.</p>
<h3 id="adding-automated-tests"><a class="heading_anchor" href="#adding-automated-tests"><i class="headerLinkIcon"></i></a>Adding Automated Tests</h3> <h3 id="adding-automated-tests"><a class="heading_anchor" href="#adding-automated-tests"><i class="headerLinkIcon"></i></a>Adding Automated Tests</h3>
<p>It&#39;s also suggested that you go one step further and define some automated tests to test your syntax highlighter. A basic test looks something like this:</p> <p>Adding automated tests for a highlighter is trivial so you are not required to do it, but it can help during development.</p>
<pre><code class="language-javascript"><span class="keyword">if</span> (<span class="keyword">typeof</span> process !== <span class="string">"undefined"</span>) { <p>In <code>lib/ace/mode/_test</code> create a file named <code><pre>text_<span style="color:#AA0D91">&lt;modeName&gt;</span>.txt</pre></code> with some example code. (You can skip this if the document you have added in <code>demo/docs</code> both looks good and covers various edge cases in your language syntax).
require(<span class="string">"amd-loader"</span>); </p>
} <p> Run <code><span style="color:#AA0D91">node</span> <span style="color:#008800">highlight_rules_test.js</span> <span style="color:#000088">-gen</span></code> to preserve current output of your tokenizer in <code>tokens_<span style="color:#AA0D91">&lt;modeName&gt;</span>.json</code>
</p>
define(<span class="keyword">function</span>(require, exports, module) { <p>After this running <code><span style="color:#008800">highlight_rules_test.js</span> <span cstyle="color:#000088">optionalLanguageName</span></code> will compare output of your tokenizer with the correct output you've created.
<span class="string">"use strict"</span>; </p>
<p>Any files ending with the <em>_test.js</em> suffix are automatically run by Ace&#39;s <a href="http://travis-ci.org/#!/ajaxorg/ace">Travis CI</a> server.</p>
<span class="keyword">var</span> MyNewLanguage = require(<span class="string">"./mynewlanguage"</span>).Mode;
<span class="keyword">var</span> assert = require(<span class="string">"../test/assertions"</span>);
module.exports = {
name: <span class="string">"MyNewLanguage Tokenizer"</span>,
setUp : <span class="keyword">function</span>() {
<span class="keyword">this</span>.tokenizer = <span class="keyword">new</span> MyNewLanguage().getTokenizer();
},
<span class="string">"test: my random description"</span> : <span class="keyword">function</span>() {
<span class="keyword">var</span> line = <span class="string">"-12px"</span>;
<span class="keyword">var</span> tokens = <span class="keyword">this</span>.tokenizer.getLineTokens(line, <span class="string">"ruleset"</span>).tokens;
assert.equal(<span class="number">2</span>, tokens.length);
assert.equal(<span class="string">"constant.numeric"</span>, tokens[<span class="number">0</span>].type);
},
<span class="string">"test: tokenize more than one thing"</span> : <span class="keyword">function</span>() {
<span class="keyword">var</span> tokens = <span class="keyword">this</span>.tokenizer.getLineTokens(<span class="string">"{()}"</span>, <span class="string">"start"</span>).tokens;
assert.equal(<span class="number">3</span>, tokens.length);
assert.equal(<span class="string">"paren.lparen"</span>, tokens[<span class="number">0</span>].type);
assert.equal(<span class="string">"text"</span>, tokens[<span class="number">1</span>].type);
assert.equal(<span class="string">"paren.rparen"</span>, tokens[<span class="number">2</span>].type);
},
};
});
<span class="keyword">if</span> (<span class="keyword">typeof</span> module !== <span class="string">"undefined"</span> &amp;&amp; module === require.main) {
require(<span class="string">"asyncjs"</span>).test.testcase(module.exports).exec()
}</code></pre>
<p>All tests contain a string describing what the test is doing. Then, you define an arbitrary line that you want your tokenizer to check. It&#39;s recommended that you test both the number of tokens found, as well as the values of those tokens.</p>
<p>Any file ending with the <em>_test.js</em> suffix are automatically run by Ace&#39;s <a href="http://travis-ci.org/#!/ajaxorg/ace">Travis CI</a> server.</p>
</div> </div>
<div class="tab-pane fade" id="api"> <div class="tab-pane fade" id="api">
<div class="row centerpiece"> <div class="row centerpiece">
@ -912,10 +876,22 @@ module.exports = {
<a href="https://drivenotepad.appspot.com/support">Drive Notepad</a> <a href="https://drivenotepad.appspot.com/support">Drive Notepad</a>
</li> </li>
<li> <li>
<img src="http://phpassist.com/images/logo.png" <img src="http://phpassist.com/images/logo-large.png"
style="position: relative; left: -9px; top: 19px; width: 118px"> style="position: relative; left: 3px; top: -10px; width: 95px">
<a href="http://phpassist.com/">PHP Assist</a> <a href="http://phpassist.com/">PHP Assist</a>
</li> </li>
<li>
<div class="text-logo">Dillinger</div>
<a href="http://dillinger.io/">Dillinger</a>
</li>
<li>
<div class="text-logo">Evaluzio</div>
<a href="http://www.evaluzio.net/editor">Evaluzio</a>
</li>
<li>
<div class="text-logo">Edicy</div>
<a href="http://www.edicy.com/blog/new-code-editor-for-creating-unique-website-designs">Edicy</a>
</li>
<li> <li>
<a href="http://orbit.bonsaijs.org/">BonsaiJS playground</a> <a href="http://orbit.bonsaijs.org/">BonsaiJS playground</a>
</li> </li>
@ -941,6 +917,7 @@ module.exports = {
<a href="http://www.pythonanywhere.com/">PythonAnywhere</a> <a href="http://www.pythonanywhere.com/">PythonAnywhere</a>
</li> </li>
<li> <li>
<div class="text-logo">ShareJS</div>
<a href="http://sharejs.org/hello-ace.html">ShareJS</a> <a href="http://sharejs.org/hello-ace.html">ShareJS</a>
</li> </li>
<li> <li>
@ -953,6 +930,7 @@ module.exports = {
<a href="http://neutronide.com/">Neutron IDE</a> <a href="http://neutronide.com/">Neutron IDE</a>
</li> </li>
<li> <li>
<div class="text-logo">tmpltr</div>
<a href="http://rocktronica.github.com/tmpltr/">tmpltr</a> <a href="http://rocktronica.github.com/tmpltr/">tmpltr</a>
</li> </li>
<li> <li>

View file

@ -0,0 +1,9 @@
`tokens_<modeName>.json` files keep information about correct tokens and tokenizer states for all modes supported by ace.
They are generated from `text_<modeName>.txt` or `demo/kitchen-sink/doc/*` with
```sh
node highlight_rules_test.js -gen
```
command.

View file

@ -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)

View file

@ -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);

View file

@ -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

View file

@ -0,0 +1,9 @@
tokenize Curly template{{test}}
tokenize embedded script
<script a='a'>var</script>'123'
tokenize multiline attribute value with double quotes
<a href="abc{{xyz}}
def">
tokenize multiline attribute value with single quotes
<a href='abc
def\"'>

View file

@ -0,0 +1,8 @@
<html>
<script a='a'>var</script>'123'
<a href="abc
def">
<a href='abc
def\'>
</html>

View file

@ -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) { function foo(items, nada) {
for (var i=0; i<items.length; i++) { for (var i=0; i<items.length; i++) {
alert(items[i] + "juhu\n"); alert(items[i] + "juhu\n");

View file

@ -0,0 +1,16 @@
test: recognises AND as keyword
test: recognises OR as keyword
test: recognises NOT as keyword
test: recognises "hello this is dog" as string
test: recognises -"hello this is dog" as negation with string
test: recognises ~100 as text with proximity
test: recognises "hello this is dog"~100 as string with proximity
test: recognises raw:"hello this is dog" as keyword
test: recognises raw:foo as"keyword'
test: recognises "(" as opening parenthesis
test: recognises ")" as closing parenthesis
test: recognises foo* as text with asterisk
test: recognises foo? as text with interro
test: recognises single word as text
foo

View file

@ -0,0 +1,13 @@
test: header 1
#f
test: header 2
## foo
test: header ends with ' #'
# # #
test: header ends with '#'
#foo#
test: 6+ #s is not a valid header
####### foo
test: # followed be only space is not a valid header
test: only space between #s is not a valid header
# #

View file

@ -0,0 +1,15 @@
#test: symbol tokenizer
[:@thing, :$thing, :_thing, :thing, :Thing, :thing1, :thing_a,
:THING, :thing!, :thing=, :thing?, :t?,
:, :@, :$, :1, :1thing, :th?ing, :thi=ng, :1thing,
:th!ing, :thing#
]
#test: namespaces aren't symbols" : function() {
Namespaced::Class
#test: hex tokenizer
0x9a, 0XA1, 0x9_a, 0x, 0x_9a, 0x9a_,
#test: float tokenizer
[1, +1, -1, 12_345, 0.000_1,
_, 3_1, 1_2, 1_.0, 0._1];

View file

@ -0,0 +1,7 @@
<Juhu>//Juhu Kinners</Kinners>
test: two tags in the same lines should be in separate tokens"
<Juhu><Kinners>
test: multiline attributes"
<copy set="{
}" undo="{
}"/>

View file

@ -1,294 +1,189 @@
[ [[
{ "start",
"state": "start", ["doc.comment","***************************************"]
"data": [ ],[
[ "doc.comment", "***************************************" ] "start",
] ["doc.comment","** Program: EXAMPLE **"]
}, ],[
{ "start",
"state": "start", ["doc.comment","** Author: Joe Byte, 07-Jul-2007 **"]
"data": [ ],[
[ "doc.comment", "** Program: EXAMPLE **" ] "start",
] ["doc.comment","***************************************"]
}, ],[
{ "start",
"state": "start", ["text"," "]
"data": [ ],[
[ "doc.comment", "** Author: Joe Byte, 07-Jul-2007 **" ] "start",
] ["keyword","REPORT"],
}, ["text"," BOOKINGS"],
{ ["keyword.operator","."]
"state": "start", ],[
"data": [ "start",
[ "doc.comment", "***************************************" ] ["text"," "]
] ],[
}, "start",
{ ["doc.comment","* Read flight bookings from the database"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ] ["keyword","SELECT"],
] ["keyword.operator"," * "],
}, ["keyword","FROM"],
{ ["text"," FLIGHTINFO"]
"state": "start", ],[
"data": [ "start",
[ "keyword", "REPORT" ], ["text"," "],
[ "text", " BOOKINGS" ], ["keyword","WHERE"],
[ "keyword.operator", "." ] ["text"," "],
] ["keyword","CLASS"],
}, ["keyword.operator"," = "],
{ ["string","'Y'"],
"state": "start", ["text"," "],
"data": [ ["comment","\"Y = economy"]
[ "text", " " ] ],[
] "start",
}, ["text"," "],
{ ["keyword","OR"],
"state": "start", ["text"," "],
"data": [ ["keyword","CLASS"],
[ "doc.comment", "* Read flight bookings from the database" ] ["keyword.operator"," = "],
] ["string","'C'"],
}, ["keyword.operator","."],
{ ["text"," "],
"state": "start", ["comment","\"C = business"]
"data": [ ],[
[ "keyword", "SELECT" ], "start",
[ "keyword.operator", " * " ], ["paren.lparen","("],
[ "keyword", "FROM" ], ["invalid","..."],
[ "text", " FLIGHTINFO" ] ["paren.rparen",")"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["keyword","REPORT"],
[ "text", " " ], ["text"," TEST"],
[ "keyword", "WHERE" ], ["keyword.operator","."]
[ "text", " " ], ],[
[ "keyword", "CLASS" ], "start",
[ "keyword.operator", " = " ], ["keyword","WRITE"],
[ "string", "'Y'" ], ["text"," "],
[ "text", " " ], ["string","'Hello World'"],
[ "comment", "\"Y = economy" ] ["keyword.operator","."]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["text","USERPROMPT"],
[ "text", " " ], ["keyword.operator"," = "],
[ "keyword", "OR" ], ["string","'Please double-click on a line in the output list '"],
[ "text", " " ], ["text"," "],
[ "keyword", "CLASS" ], ["keyword.operator","&"]
[ "keyword.operator", " = " ], ],[
[ "string", "'C'" ], "start",
[ "keyword.operator", "." ], ["text"," "],
[ "text", " " ], ["string","'to see the complete details of the transaction.'"],
[ "comment", "\"C = business" ] ["keyword.operator","."]
] ],[
}, "start"
{ ],[
"state": "start", "start"
"data": [ ],[
[ "paren.lparen", "(" ], "start",
[ "invalid", "..." ], ["keyword","DATA"],
[ "paren.rparen", ")" ] ["text"," LAST_EOM "],
] ["keyword","TYPE"],
}, ["text"," "],
{ ["support.type","D"],
"state": "start", ["keyword.operator","."],
"data": [] ["text"," "],
}, ["comment","\"last end-of-month date"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "]
[ "keyword", "REPORT" ], ],[
[ "text", " TEST" ], "start",
[ "keyword.operator", "." ] ["doc.comment","* Start from today's date"]
] ],[
}, "start",
{ ["text"," LAST_EOM"],
"state": "start", ["keyword.operator"," = "],
"data": [ ["variable.parameter","SY"],
[ "keyword", "WRITE" ], ["keyword.operator","-"],
[ "text", " " ], ["text","DATUM"],
[ "string", "'Hello World'" ], ["keyword.operator","."]
[ "keyword.operator", "." ] ],[
] "start",
}, ["doc.comment","* Set characters 6 and 7 (0-relative) of the YYYYMMDD string to \"01\","]
{ ],[
"state": "start", "start",
"data": [] ["doc.comment","* giving the first day of the current month"]
}, ],[
{ "start",
"state": "start", ["text"," LAST_EOM"],
"data": [ ["constant.numeric","+6"],
[ "text", "USERPROMPT" ], ["paren.lparen","("],
[ "keyword.operator", " = " ], ["constant.numeric","2"],
[ "string", "'Please double-click on a line in the output list '" ], ["paren.rparen",")"],
[ "text", " " ], ["keyword.operator"," = "],
[ "keyword.operator", "&" ] ["string","'01'"],
] ["keyword.operator","."]
}, ],[
{ "start",
"state": "start", ["doc.comment","* Subtract one day"]
"data": [ ],[
[ "text", " " ], "start",
[ "string", "'to see the complete details of the transaction.'" ], ["text"," LAST_EOM"],
[ "keyword.operator", "." ] ["keyword.operator"," = "],
] ["text","LAST_EOM"],
}, ["keyword.operator"," - "],
{ ["constant.numeric","1"],
"state": "start", ["keyword.operator","."]
"data": [] ],[
}, "start",
{ ["text"," "]
"state": "start", ],[
"data": [] "start",
}, ["text"," "],
{ ["keyword","WRITE"],
"state": "start", ["keyword.operator",":"],
"data": [ ["text"," "],
[ "keyword", "DATA" ], ["string","'Last day of previous month was'"],
[ "text", " LAST_EOM " ], ["keyword.operator",","],
[ "keyword", "TYPE" ], ["text"," LAST_EOM"],
[ "text", " " ], ["keyword.operator","."]
[ "support.type", "D" ], ],[
[ "keyword.operator", "." ], "start",
[ "text", " " ], ["text"," "]
[ "comment", "\"last end-of-month date" ] ],[
] "start",
}, ["keyword","DATA"],
{ ["text"," "],
"state": "start", ["keyword.operator",":"],
"data": [ ["text"," "],
[ "text", " " ] ["keyword","BEGIN OF"],
] ["text"," I_VBRK "],
}, ["keyword","OCCURS"],
{ ["text"," "],
"state": "start", ["constant.numeric","0"],
"data": [ ["keyword.operator",","]
[ "doc.comment", "* Start from today's date" ] ],[
] "start",
}, ["text"," VBELN "],
{ ["keyword","LIKE"],
"state": "start", ["text"," "],
"data": [ ["variable.parameter","VBRK-VBELN"],
[ "text", " LAST_EOM" ], ["keyword.operator",","]
[ "keyword.operator", " = " ], ],[
[ "variable.parameter", "SY" ], "start",
[ "keyword.operator", "-" ], ["text"," ZUONR "],
[ "text", "DATUM" ], ["keyword","LIKE"],
[ "keyword.operator", "." ] ["text"," "],
] ["variable.parameter","VBRK-ZUONR"],
}, ["keyword.operator",","]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "doc.comment", "* Set characters 6 and 7 (0-relative) of the YYYYMMDD string to \"01\"," ] ["keyword","END OF"],
] ["text"," I_VBRK"],
}, ["keyword.operator","."]
{ ]]
"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", "." ]
]
}
]

File diff suppressed because it is too large Load diff

View file

@ -1,160 +1,89 @@
[ [[
{ "start",
"state": "start", ["text","Searching for 'var' in /workspace/configs"]
"data": [ ],[
[ "text", "Searching for 'var' in /workspace/configs" ] "start"
] ],[
}, "start",
{ ["string","configs/default.js"],
"state": "start", ["text",":"]
"data": [] ],[
}, "start",
{ ["c9searchresults.constant.numeric"," 1"],
"state": "start", ["c9searchresults.text",": var fs = require(\"fs\");"]
"data": [ ],[
[ "string", "configs/default.js" ], "start",
[ "text", ":" ] ["c9searchresults.constant.numeric","\t2"],
] ["c9searchresults.text",": var argv = require('optimist').argv;"]
}, ],[
{ "start",
"state": "start", ["c9searchresults.constant.numeric","\t3"],
"data": [ ["c9searchresults.text",": var path = require(\"path\");"]
[ "c9searchresults.constant.numeric", " 1" ], ],[
[ "c9searchresults.text", ": var fs = require(\"fs\");" ] "start",
] ["c9searchresults.constant.numeric","\t5"],
}, ["c9searchresults.text",": var clientExtensions = {};"]
{ ],[
"state": "start", "start",
"data": [ ["c9searchresults.constant.numeric","\t6"],
[ "c9searchresults.constant.numeric", "\t2" ], ["c9searchresults.text",": var clientDirs = fs.readdirSync(__dirname + \"/../plugins-client\");"]
[ "c9searchresults.text", ": var argv = require('optimist').argv;" ] ],[
] "start",
}, ["c9searchresults.constant.numeric","\t7"],
{ ["c9searchresults.text",": for (var i = 0; i < clientDirs.length; i++) {"]
"state": "start", ],[
"data": [ "start",
[ "c9searchresults.constant.numeric", "\t3" ], ["c9searchresults.constant.numeric","\t8"],
[ "c9searchresults.text", ": var path = require(\"path\");" ] ["c9searchresults.text",": var dir = clientDirs[i];"]
] ],[
}, "start",
{ ["c9searchresults.constant.numeric","\t12"],
"state": "start", ["c9searchresults.text",": var name = dir.split(\".\")[1];"]
"data": [ ],[
[ "c9searchresults.constant.numeric", "\t5" ], "start",
[ "c9searchresults.text", ": var clientExtensions = {};" ] ["c9searchresults.constant.numeric","\t16"],
] ["c9searchresults.text",": var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();"]
}, ],[
{ "start",
"state": "start", ["c9searchresults.constant.numeric","\t17"],
"data": [ ["c9searchresults.text",": var fsUrl = \"/workspace\";"]
[ "c9searchresults.constant.numeric", "\t6" ], ],[
[ "c9searchresults.text", ": var clientDirs = fs.readdirSync(__dirname + \"/../plugins-client\");" ] "start",
] ["c9searchresults.constant.numeric","\t19"],
}, ["c9searchresults.text",": var port = argv.p || process.env.PORT || 3131;"]
{ ],[
"state": "start", "start",
"data": [ ["c9searchresults.constant.numeric","\t20"],
[ "c9searchresults.constant.numeric", "\t7" ], ["c9searchresults.text",": var host = argv.l || \"localhost\";"]
[ "c9searchresults.text", ": for (var i = 0; i < clientDirs.length; i++) {" ] ],[
] "start",
}, ["c9searchresults.constant.numeric","\t22"],
{ ["c9searchresults.text",": var config = {"]
"state": "start", ],[
"data": [ "start"
[ "c9searchresults.constant.numeric", "\t8" ], ],[
[ "c9searchresults.text", ": var dir = clientDirs[i];" ] "start",
] ["string","configs/local.js"],
}, ["text",":"]
{ ],[
"state": "start", "start",
"data": [ ["c9searchresults.constant.numeric","\t2"],
[ "c9searchresults.constant.numeric", "\t12" ], ["c9searchresults.text",": var config = require(\"./default\");"]
[ "c9searchresults.text", ": var name = dir.split(\".\")[1];" ] ],[
] "start"
}, ],[
{ "start",
"state": "start", ["string","configs/packed.js"],
"data": [ ["text",":"]
[ "c9searchresults.constant.numeric", "\t16" ], ],[
[ "c9searchresults.text", ": var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();" ] "start",
] ["c9searchresults.constant.numeric","\t1"],
}, ["c9searchresults.text",": var config = require(\"./default\");"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "c9searchresults.constant.numeric", "\t17" ], "start"
[ "c9searchresults.text", ": var fsUrl = \"/workspace\";" ] ],[
] "start",
}, ["text","Found 15 matches in 3 files"]
{ ]]
"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" ]
]
}
]

View file

@ -1,273 +1,166 @@
[ [[
{ "start",
"state": "start", ["comment","// compound assignment operators"]
"data": [ ],[
[ "comment", "// compound assignment operators" ] "start"
] ],[
}, "start",
{ ["keyword","#include"],
"state": "start", ["constant.other"," <iostream>"]
"data": [] ],[
}, "start"
{ ],[
"state": "start", "directive",
"data": [ ["keyword","#include"],
[ "keyword", "#include" ], ["constant.other.multiline"," \\"]
[ "constant.other", " <iostream>" ] ],[
] "start",
}, ["constant.other"," <iostream>"]
{ ],[
"state": "start", "start"
"data": [] ],[
}, "directive",
{ ["keyword","#include"],
"state": "directive", ["constant.other.multiline"," \\"]
"data": [ ],[
[ "keyword", "#include" ], "directive",
[ "constant.other.multiline", " \\" ] ["constant.other.multiline"," \\"]
] ],[
}, "start",
{ ["constant.other"," <iostream>"]
"state": "start", ],[
"data": [ "start"
[ "constant.other", " <iostream>" ] ],[
] "directive",
}, ["keyword","#include"],
{ ["constant.other.multiline"," \\"]
"state": "start", ],[
"data": [] "directive",
}, ["constant.other.multiline"," \\"]
{ ],[
"state": "directive", "start",
"data": [ ["constant.other"," \"iostream\""]
[ "keyword", "#include" ], ],[
[ "constant.other.multiline", " \\" ] "start"
] ],[
}, "start",
{ ["keyword","#include"],
"state": "directive", ["constant.other"," <boost/asio/io_service.hpp>"]
"data": [ ],[
[ "constant.other.multiline", " \\" ] "start",
] ["keyword","#include"],
}, ["constant.other"," \"boost/asio/io_service.hpp\""]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "constant.other", " <iostream>" ] "start",
] ["keyword.control","using"],
}, ["text"," "],
{ ["keyword.operator","namespace"],
"state": "start", ["text"," "],
"data": [] ["identifier","std"],
}, ["punctuation.operator",";"]
{ ],[
"state": "directive", "start"
"data": [ ],[
[ "keyword", "#include" ], "start",
[ "constant.other.multiline", " \\" ] ["storage.type","int"],
] ["text"," "],
}, ["identifier","main"],
{ ["text"," "],
"state": "directive", ["paren.lparen","("],
"data": [ ["paren.rparen",")"]
[ "constant.other.multiline", " \\" ] ],[
] "start",
}, ["paren.lparen","{"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "constant.other", " \"iostream\"" ] ["storage.type","int"],
] ["text"," "],
}, ["identifier","a"],
{ ["punctuation.operator",","],
"state": "start", ["text"," "],
"data": [] ["identifier","b"],
}, ["keyword.operator","="],
{ ["constant.numeric","3"],
"state": "start", ["punctuation.operator",";"],
"data": [ ["text"," "],
[ "keyword", "#include" ], ["comment","/* foobar */"]
[ "constant.other", " <boost/asio/io_service.hpp>" ] ],[
] "start",
}, ["text"," "],
{ ["identifier","a"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator","="],
[ "keyword", "#include" ], ["text"," "],
[ "constant.other", " \"boost/asio/io_service.hpp\"" ] ["identifier","b"],
] ["punctuation.operator",";"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [] ["identifier","a"],
}, ["keyword.operator","+="],
{ ["constant.numeric","2"],
"state": "start", ["punctuation.operator",";"],
"data": [ ["text"," "],
[ "keyword.control", "using" ], ["comment","// equivalent to a=a+2"]
[ "text", " " ], ],[
[ "keyword.operator", "namespace" ], "start",
[ "text", " " ], ["text"," "],
[ "identifier", "std" ], ["identifier","cout"],
[ "punctuation.operator", ";" ] ["text"," "],
] ["keyword.operator","<<"],
}, ["text"," "],
{ ["identifier","a"],
"state": "start", ["punctuation.operator",";"]
"data": [] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword","#if"],
"data": [ ["constant.other"," VERBOSE >= 2"]
[ "storage.type", "int" ], ],[
[ "text", " " ], "start",
[ "identifier", "main" ], ["text"," "],
[ "text", " " ], ["identifier","prints"],
[ "paren.lparen", "(" ], ["paren.lparen","("],
[ "paren.rparen", ")" ] ["string","\"trace message\""],
] ["paren.rparen",")"],
}, ["punctuation.operator",";"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "paren.lparen", "{" ] ["keyword","#endif"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword.control","return"],
"data": [ ["text"," "],
[ "text", " " ], ["constant.numeric","0"],
[ "storage.type", "int" ], ["punctuation.operator",";"]
[ "text", " " ], ],[
[ "identifier", "a" ], "start",
[ "punctuation.operator", "," ], ["paren.rparen","}"]
[ "text", " " ], ],[
[ "identifier", "b" ], "start"
[ "keyword.operator", "=" ], ],[
[ "constant.numeric", "3" ], "start",
[ "punctuation.operator", ";" ], ["comment","/* Print an error message and get out */"]
[ "text", " " ], ],[
[ "comment", "/* foobar */" ] "directive",
] ["keyword","#define"],
}, ["constant.other.multiline"," ABORT \\"]
{ ],[
"state": "start", "directive",
"data": [ ["constant.other.multiline"," do { \\"]
[ "text", " " ], ],[
[ "identifier", "a" ], "directive",
[ "text", " " ], ["constant.other.multiline"," print( \"Abort\\n\" ); \\"]
[ "keyword.operator", "=" ], ],[
[ "text", " " ], "directive",
[ "identifier", "b" ], ["constant.other.multiline"," exit(8); \\"]
[ "punctuation.operator", ";" ] ],[
] "start",
}, ["constant.other","} while (0) "],
{ ["comment","/* Note: No semicolon */"]
"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 */" ]
]
}
]

View file

@ -1,219 +1,162 @@
[ [[
{ "start",
"state": "start", ["keyword","("],
"data": [ ["support.function","defn"],
[ "keyword", "(" ], ["text"," "],
[ "support.function", "defn" ], ["identifier","parting"]
[ "text", " " ], ],[
[ "identifier", "parting" ] "start",
] ["text"," "],
}, ["string","\"returns a String parting in a given language\""]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["keyword","([]"],
[ "string", "\"returns a String parting in a given language\"" ] ["text"," "],
] ["keyword","("],
}, ["identifier","parting"],
{ ["text"," "],
"state": "start", ["string","\"World\""],
"data": [ ["keyword","))"]
[ "text", " " ], ],[
[ "keyword", "([]" ], "start",
[ "text", " " ], ["text"," "],
[ "keyword", "(" ], ["keyword","(["],
[ "identifier", "parting" ], ["support.function","name"],
[ "text", " " ], ["keyword","]"],
[ "string", "\"World\"" ], ["text"," "],
[ "keyword", "))" ] ["keyword","("],
] ["identifier","parting"],
}, ["text"," "],
{ ["support.function","name"],
"state": "start", ["text"," "],
"data": [ ["string","\"en\""],
[ "text", " " ], ["keyword","))"]
[ "keyword", "([" ], ],[
[ "support.function", "name" ], "start",
[ "keyword", "]" ], ["text"," "],
[ "text", " " ], ["keyword","(["],
[ "keyword", "(" ], ["support.function","name"],
[ "identifier", "parting" ], ["text"," "],
[ "text", " " ], ["identifier","language"],
[ "support.function", "name" ], ["keyword","]"]
[ "text", " " ], ],[
[ "string", "\"en\"" ], "start",
[ "keyword", "))" ] ["text"," "],
] ["comment","; condp is similar to a case statement in other languages."]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["comment","; It is described in more detail later."]
[ "text", " " ], ],[
[ "keyword", "([" ], "start",
[ "support.function", "name" ], ["text"," "],
[ "text", " " ], ["comment","; It is used here to take different actions based on whether the"]
[ "identifier", "language" ], ],[
[ "keyword", "]" ] "start",
] ["text"," "],
}, ["comment","; parameter \"language\" is set to \"en\", \"es\" or something else."]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["keyword","("],
[ "comment", "; condp is similar to a case statement in other languages." ] ["support.function","condp"],
] ["text"," "],
}, ["constant.language","="],
{ ["text"," "],
"state": "start", ["identifier","language"]
"data": [ ],[
[ "text", " " ], "start",
[ "comment", "; It is described in more detail later." ] ["text"," "],
] ["string","\"en\""],
}, ["text"," "],
{ ["keyword","("],
"state": "start", ["support.function","str"],
"data": [ ["text"," "],
[ "text", " " ], ["string","\"Goodbye, \""],
[ "comment", "; It is used here to take different actions based on whether the" ] ["text"," "],
] ["support.function","name"],
}, ["keyword",")"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["string","\"es\""],
[ "comment", "; parameter \"language\" is set to \"en\", \"es\" or something else." ] ["text"," "],
] ["keyword","("],
}, ["support.function","str"],
{ ["text"," "],
"state": "start", ["string","\"Adios, \""],
"data": [ ["text"," "],
[ "text", " " ], ["support.function","name"],
[ "keyword", "(" ], ["keyword",")"]
[ "support.function", "condp" ], ],[
[ "text", " " ], "start",
[ "constant.language", "=" ], ["text"," "],
[ "text", " " ], ["keyword","(throw"],
[ "identifier", "language" ] ["text"," "],
] ["keyword","("],
}, ["identifier","IllegalArgumentException"],
{ ["text","."]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["text"," "],
[ "string", "\"en\"" ], ["keyword","("],
[ "text", " " ], ["support.function","str"],
[ "keyword", "(" ], ["text"," "],
[ "support.function", "str" ], ["string","\"unsupported language \""],
[ "text", " " ], ["text"," "],
[ "string", "\"Goodbye, \"" ], ["identifier","language"],
[ "text", " " ], ["keyword","))))))"]
[ "support.function", "name" ], ],[
[ "keyword", ")" ] "start"
] ],[
}, "start",
{ ["keyword","("],
"state": "start", ["support.function","println"],
"data": [ ["text"," "],
[ "text", " " ], ["keyword","("],
[ "string", "\"es\"" ], ["identifier","parting"],
[ "text", " " ], ["keyword","))"],
[ "keyword", "(" ], ["text"," "],
[ "support.function", "str" ], ["comment","; -> Goodbye, World"]
[ "text", " " ], ],[
[ "string", "\"Adios, \"" ], "start",
[ "text", " " ], ["keyword","("],
[ "support.function", "name" ], ["support.function","println"],
[ "keyword", ")" ] ["text"," "],
] ["keyword","("],
}, ["identifier","parting"],
{ ["text"," "],
"state": "start", ["string","\"Mark\""],
"data": [ ["keyword","))"],
[ "text", " " ], ["text"," "],
[ "keyword", "(throw" ], ["comment","; -> Goodbye, Mark"]
[ "text", " " ], ],[
[ "keyword", "(" ], "start",
[ "identifier", "IllegalArgumentException" ], ["keyword","("],
[ "text", "." ] ["support.function","println"],
] ["text"," "],
}, ["keyword","("],
{ ["identifier","parting"],
"state": "start", ["text"," "],
"data": [ ["string","\"Mark\""],
[ "text", " " ], ["text"," "],
[ "keyword", "(" ], ["string","\"es\""],
[ "support.function", "str" ], ["keyword","))"],
[ "text", " " ], ["text"," "],
[ "string", "\"unsupported language \"" ], ["comment","; -> Adios, Mark"]
[ "text", " " ], ],[
[ "identifier", "language" ], "start",
[ "keyword", "))))))" ] ["keyword","("],
] ["support.function","println"],
}, ["text"," "],
{ ["keyword","("],
"state": "start", ["identifier","parting"],
"data": [] ["text"," "],
}, ["string","\"Mark\""],
{ ["text",", "],
"state": "start", ["string","\"xy\""],
"data": [ ["keyword","))"],
[ "keyword", "(" ], ["text"," "],
[ "support.function", "println" ], ["comment","; -> java.lang.IllegalArgumentException: unsupported language xy"]
[ "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" ]
]
}
]

View file

@ -1,190 +1,483 @@
[ [[
{ "start",
"state": "start", ["comment","#test: tokenize keyword"]
"data": [ ],[
[ "comment", "#!/usr/bin/env coffee" ] "start",
] ["text"," "],
}, ["keyword","for"],
{ ["text"," "],
"state": "start", ["paren.lparen","("],
"data": [] ["identifier","i"],
}, ["text"," "],
{ ["constant.numeric","1"],
"state": "start", ["punctuation.operator","."],
"data": [ ["constant.numeric",".2"],
[ "keyword", "try" ] ["paren.rparen",")"]
] ],[
}, "start",
{ ["comment","#test: tokenize regexp"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["string.regex","/\"[a]/"]
[ "keyword", "throw" ], ],[
[ "text", " " ], "start",
[ "language.support.class", "URIError" ], ["comment","#test: tokenize functions"]
[ "text", " " ], ],[
[ "language.support.function", "decodeURI" ], "start",
[ "paren.lparen", "(" ], ["entity.name.function","foo"],
[ "constant.numeric", "0xC0ffee" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "keyword.operator", "*" ], ["text"," "],
[ "text", " " ], ["paren.lparen","({"],
[ "constant.numeric", "123456.7e-8" ], ["variable.parameter","args"],
[ "text", " " ], ["paren.rparen","})"],
[ "keyword.operator", "/" ], ["text"," "],
[ "text", " " ], ["storage.type","->"]
[ "constant.numeric", ".9" ], ],[
[ "paren.rparen", ")" ] "start",
] ["text"," "],
}, ["entity.name.function","foo"],
{ ["text"," "],
"state": "start", ["keyword.operator","="],
"data": [ ["text"," "],
[ "keyword", "catch" ], ["paren.lparen","({"],
[ "text", " " ], ["variable.parameter","a1, a2"],
[ "identifier", "e" ] ["paren.rparen","})"],
] ["text"," "],
}, ["storage.type","->"]
{ ],[
"state": "qdoc", "start",
"data": [ ["text"," "],
[ "text", " " ], ["entity.name.function","foo"],
[ "identifier", "console" ], ["text"," "],
[ "punctuation.operator", "." ], ["keyword.operator","="],
[ "identifier", "log" ], ["text"," "],
[ "text", " " ], ["paren.lparen","({"],
[ "string", "'qstring'" ], ["variable.parameter","@a1, a2"],
[ "text", " " ], ["paren.rparen","})"],
[ "keyword.operator", "+" ], ["text"," "],
[ "text", " " ], ["storage.type","->"]
[ "string", "\"qqstring\"" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "+" ], ["text"," "],
[ "text", " " ], ["entity.name.function","foo"],
[ "string", "'''" ] ["text"," "],
] ["punctuation.operator",":"],
}, ["text"," "],
{ ["paren.lparen","({"],
"state": "qdoc", ["variable.parameter","args"],
"data": [ ["paren.rparen","})"],
[ "string", " qdoc" ] ["text"," "],
] ["storage.type","->"]
}, ],[
{ "start",
"state": "qqdoc", ["text"," "],
"data": [ ["entity.name.function","foo"],
[ "string", " '''" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "keyword.operator", "+" ], ["text"," "],
[ "text", " " ], ["paren.lparen","({"],
[ "string", "\"\"\"" ] ["variable.parameter","args"],
] ["paren.rparen","})"],
}, ["text"," "],
{ ["storage.type","->"]
"state": "qqdoc", ],[
"data": [ "start",
[ "string", " qqdoc" ] ["text"," "],
] ["identifier","foo"],
}, ["text"," "],
{ ["keyword.operator","="],
"state": "start", ["text"," "],
"data": [ ["paren.lparen","({"],
[ "string", " \"\"\"" ] ["constant.numeric","0"],
] ["identifier","abc"],
}, ["paren.rparen","})"],
{ ["text"," "],
"state": "start", ["storage.type","->"]
"data": [] ],[
}, "start",
{ ["text"," "],
"state": "start", ["identifier","foo"],
"data": [ ["text"," "],
[ "keyword", "do" ], ["keyword.operator","="],
[ "text", " " ], ["text"," "],
[ "storage.type", "->" ] ["paren.lparen","({"],
] ["keyword.operator","/"],
}, ["identifier","abc"],
{ ["paren.rparen","})"],
"state": "comment", ["text"," "],
"data": [ ["storage.type","=>"]
[ "text", " " ], ],[
[ "comment", "###" ] "start",
] ["text"," "],
}, ["identifier","foo"],
{ ["text"," "],
"state": "comment", ["keyword.operator","="],
"data": [ ["text"," "],
[ "comment", " herecomment" ] ["paren.lparen","({"],
] ["identifier","abc"],
}, ["keyword.operator","/"],
{ ["paren.rparen","})"],
"state": "start", ["text"," "],
"data": [ ["storage.type","->"]
[ "comment", " ###" ] ],[
] "start",
}, ["text"," "],
{ ["identifier","foo"],
"state": "heregex", ["text"," "],
"data": [ ["keyword.operator","="],
[ "text", " " ], ["text"," "],
[ "identifier", "re" ], ["paren.lparen","({"],
[ "text", " " ], ["comment","#abc}) ->"]
[ "keyword.operator", "=" ], ],[
[ "text", " " ], "start",
[ "string.regex", "/regex/imgy" ], ["text"," "],
[ "punctuation.operator", "." ], ["identifier","foo"],
[ "identifier", "test" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "string.regex", "///" ] ["text"," "],
] ["paren.lparen","({"],
}, ["identifier","abc"],
{ ["comment","#}) ->"]
"state": "heregex", ],[
"data": [ "start",
[ "comment.regex", " " ], ["text"," "],
[ "string.regex", "heregex" ], ["identifier","foo"],
[ "comment.regex", " # comment" ] ["text"," "],
] ["keyword.operator","="],
}, ["text"," "],
{ ["paren.lparen","({"],
"state": "start", ["paren.rparen",")"],
"data": [ ["identifier","abc"],
[ "string.regex", " ///imgy" ] ["paren.rparen","})"],
] ["text"," "],
}, ["storage.type","->"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["identifier","foo"],
[ "keyword", "this" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "keyword", "isnt" ], ["text"," "],
[ "punctuation.operator", ":" ], ["paren.lparen","({"],
[ "text", " " ], ["identifier","abc"],
[ "string", "`just JavaScript`" ] ["paren.rparen",")})"],
] ["text"," "],
}, ["storage.type","->"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["identifier","foo"],
[ "constant.language", "undefined" ] ["text"," "],
] ["keyword.operator","="],
}, ["text"," "],
{ ["paren.lparen","({"],
"state": "start", ["identifier","a"],
"data": [ ["paren.lparen","{"],
[ "text", " " ] ["identifier","bc"],
] ["paren.rparen","})"],
}, ["text"," "],
{ ["storage.type","->"]
"state": "start", ],[
"data": [ "start",
[ "identifier", "sentence" ], ["text"," "],
[ "text", " " ], ["entity.name.function","foo"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "string", "\"#{ 22 / 7 } is a decent approximation of π\"" ] ["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"
]]

View file

@ -1,40 +1,26 @@
[ [[
{ "start",
"state": "start", ["comment","<!--- hello world --->"]
"data": [ ],[
[ "comment", "<!--- hello world --->" ] "start"
] ],[
}, "start",
{ ["meta.tag","<"],
"state": "start", ["meta.tag.tag-name","cfset"],
"data": [] ["text"," "],
}, ["entity.other.attribute-name","welcome"],
{ ["keyword.operator","="],
"state": "start", ["string","\"Hello World!\""],
"data": [ ["meta.tag.r",">"]
[ "meta.tag", "<" ], ],[
[ "meta.tag.tag-name", "cfset" ], "start"
[ "text", " " ], ],[
[ "entity.other.attribute-name", "welcome" ], "start",
[ "keyword.operator", "=" ], ["meta.tag","<"],
[ "string", "\"Hello World!\"" ], ["meta.tag.tag-name","cfoutput"],
[ "meta.tag.r", ">" ] ["meta.tag.r",">"],
] ["text","#welcome#"],
}, ["meta.tag","</"],
{ ["meta.tag.tag-name","cfoutput"],
"state": "start", ["meta.tag.r",">"]
"data": [] ]]
},
{
"state": "start",
"data": [
[ "meta.tag", "<" ],
[ "meta.tag.tag-name", "cfoutput" ],
[ "meta.tag.r", ">" ],
[ "text", "#welcome#" ],
[ "meta.tag", "</" ],
[ "meta.tag.tag-name", "cfoutput" ],
[ "meta.tag.r", ">" ]
]
}
]

View file

@ -1,42 +1,29 @@
[ [[
{ "start",
"state": "start", ["keyword","public"],
"data": [ ["text"," "],
[ "keyword", "public" ], ["keyword","void"],
[ "text", " " ], ["text"," "],
[ "keyword", "void" ], ["identifier","HelloWorld"],
[ "text", " " ], ["paren.lparen","("],
[ "identifier", "HelloWorld" ], ["paren.rparen",")"],
[ "paren.lparen", "(" ], ["text"," "],
[ "paren.rparen", ")" ], ["paren.lparen","{"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ] "start",
] ["text"," "],
}, ["comment","//Say Hello!"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["identifier","Console"],
[ "comment", "//Say Hello!" ] ["punctuation.operator","."],
] ["identifier","WriteLine"],
}, ["paren.lparen","("],
{ ["string","\"Hello World\""],
"state": "start", ["paren.rparen",")"],
"data": [ ["punctuation.operator",";"]
[ "text", " " ], ],[
[ "identifier", "Console" ], "start",
[ "punctuation.operator", "." ], ["paren.rparen","}"]
[ "identifier", "WriteLine" ], ]]
[ "paren.lparen", "(" ],
[ "string", "\"Hello World\"" ],
[ "paren.rparen", ")" ],
[ "punctuation.operator", ";" ]
]
},
{
"state": "start",
"data": [
[ "paren.rparen", "}" ]
]
}
]

View file

@ -1,231 +1,148 @@
[ [[
{ "ruleset",
"state": "ruleset", ["variable",".text-layer"],
"data": [ ["text"," "],
[ "variable", ".text-layer" ], ["paren.lparen","{"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ] "ruleset",
] ["text"," "],
}, ["support.type","font-family"],
{ ["text",": Monaco, "],
"state": "ruleset", ["string","\"Courier New\""],
"data": [ ["text",", "],
[ "text", " " ], ["support.constant.fonts","monospace"],
[ "support.type", "font-family" ], ["text",";"]
[ "text", ": Monaco, " ], ],[
[ "string", "\"Courier New\"" ], "ruleset",
[ "text", ", " ], ["text"," "],
[ "support.constant.fonts", "monospace" ], ["support.type","font-size"],
[ "text", ";" ] ["text",": "],
] ["constant.numeric","12"],
}, ["keyword","px"],
{ ["text",";"]
"state": "ruleset", ],[
"data": [ "ruleset",
[ "text", " " ], ["text"," "],
[ "support.type", "font-size" ], ["support.type","cursor"],
[ "text", ": " ], ["text",": "],
[ "constant.numeric", "12" ], ["support.constant","text"],
[ "keyword", "px" ], ["text",";"]
[ "text", ";" ] ],[
] "start",
}, ["paren.rparen","}"]
{ ],[
"state": "ruleset", "start"
"data": [ ],[
[ "text", " " ], "ruleset",
[ "support.type", "cursor" ], ["variable",".blinker"],
[ "text", ": " ], ["text"," "],
[ "support.constant", "text" ], ["paren.lparen","{"]
[ "text", ";" ] ],[
] "ruleset",
}, ["text"," "],
{ ["support.type","animation-duration"],
"state": "start", ["text",": "],
"data": [ ["constant.numeric","1"],
[ "paren.rparen", "}" ] ["keyword","s"],
] ["text",";"]
}, ],[
{ "ruleset",
"state": "start", ["text"," "],
"data": [] ["support.type","animation-name"],
}, ["text",": blink;"]
{ ],[
"state": "ruleset", "ruleset",
"data": [ ["text"," "],
[ "variable", ".blinker" ], ["support.type","animation-iteration-count"],
[ "text", " " ], ["text",": infinite;"]
[ "paren.lparen", "{" ] ],[
] "ruleset",
}, ["text"," "],
{ ["support.type","animation-direction"],
"state": "ruleset", ["text",": alternate;"]
"data": [ ],[
[ "text", " " ], "ruleset",
[ "support.type", "animation-duration" ], ["text"," "],
[ "text", ": " ], ["support.type","animation-timing-function"],
[ "constant.numeric", "1" ], ["text",": "],
[ "keyword", "s" ], ["support.constant","linear"],
[ "text", ";" ] ["text",";"]
] ],[
}, "start",
{ ["paren.rparen","}"]
"state": "ruleset", ],[
"data": [ "start"
[ "text", " " ], ],[
[ "support.type", "animation-name" ], "media",
[ "text", ": blink;" ] ["string","@keyframes blink {"]
] ],[
}, "media_ruleset",
{ ["text"," "],
"state": "ruleset", ["constant","0"],
"data": [ ["text","% "],
[ "text", " " ], ["paren.lparen","{"]
[ "support.type", "animation-iteration-count" ], ],[
[ "text", ": infinite;" ] "media_ruleset",
] ["text"," "],
}, ["support.type","opacity"],
{ ["text",": "],
"state": "ruleset", ["constant.numeric","0"],
"data": [ ["text",";"]
[ "text", " " ], ],[
[ "support.type", "animation-direction" ], "media",
[ "text", ": alternate;" ] ["text"," "],
] ["paren.rparen","}"]
}, ],[
{ "media_ruleset",
"state": "ruleset", ["text"," "],
"data": [ ["constant","40"],
[ "text", " " ], ["text","% "],
[ "support.type", "animation-timing-function" ], ["paren.lparen","{"]
[ "text", ": " ], ],[
[ "support.constant", "linear" ], "media_ruleset",
[ "text", ";" ] ["text"," "],
] ["support.type","opacity"],
}, ["text",": "],
{ ["constant.numeric","0"],
"state": "start", ["text",";"]
"data": [ ],[
[ "paren.rparen", "}" ] "media",
] ["text"," "],
}, ["paren.rparen","}"]
{ ],[
"state": "start", "media_ruleset",
"data": [] ["text"," "],
}, ["constant","40"],
{ ["variable",".5"],
"state": "media", ["text","% "],
"data": [ ["paren.lparen","{"]
[ "string", "@keyframes blink {" ] ],[
] "media_ruleset",
}, ["text"," "],
{ ["support.type","opacity"],
"state": "media_ruleset", ["text",": "],
"data": [ ["constant.numeric","1"]
[ "text", " " ], ],[
[ "constant", "0" ], "media",
[ "text", "% " ], ["text"," "],
[ "paren.lparen", "{" ] ["paren.rparen","}"]
] ],[
}, "media_ruleset",
{ ["text"," "],
"state": "media_ruleset", ["constant","100"],
"data": [ ["text","% "],
[ "text", " " ], ["paren.lparen","{"]
[ "support.type", "opacity" ], ],[
[ "text", ": " ], "media_ruleset",
[ "constant.numeric", "0" ], ["text"," "],
[ "text", ";" ] ["support.type","opacity"],
] ["text",": "],
}, ["constant.numeric","1"]
{ ],[
"state": "media", "media",
"data": [ ["text"," "],
[ "text", " " ], ["paren.rparen","}"]
[ "paren.rparen", "}" ] ],[
] "start",
}, ["string","}"]
{ ]]
"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", "}" ]
]
}
]

View file

@ -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","</"],
["meta.tag.tag-name.style","style"],
["meta.tag.r",">"]
],[
"start"
],[
"start",
["text"," "],
["meta.tag","</"],
["meta.tag.tag-name","head"],
["meta.tag.r",">"]
],[
"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","</"],
["meta.tag.tag-name","h1"],
["meta.tag.r",">"]
],[
"start",
["text"," "],
["meta.tag","</"],
["meta.tag.tag-name","body"],
["meta.tag.r",">"]
],[
"start",
["meta.tag","</"],
["meta.tag.tag-name","html"],
["meta.tag.r",">"]
],[
"start"
]]

View file

@ -1,537 +1,368 @@
[ [[
{ "start",
"state": "start", ["identifier","main"],
"data": [ ["text","() {"]
[ "identifier", "main" ], ],[
[ "text", "() {" ] "start",
] ["text"," "],
}, ["identifier","print"],
{ ["text","("],
"state": "start", ["string","'Hello World!'"],
"data": [ ["text",");"]
[ "text", " " ], ],[
[ "identifier", "print" ], "start",
[ "text", "(" ], ["text","}"]
[ "string", "'Hello World!'" ], ],[
[ "text", ");" ] "start"
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["storage.type.primitive.dart","int"],
[ "text", "}" ] ["text"," "],
] ["identifier","fib"],
}, ["text","("],
{ ["storage.type.primitive.dart","int"],
"state": "start", ["text"," "],
"data": [] ["identifier","n"],
}, ["text",") "],
{ ["keyword.operator.assignment.dart","="],
"state": "start", ["keyword.operator.comparison.dart",">"],
"data": [] ["text"," ("],
}, ["identifier","n"],
{ ["text"," "],
"state": "start", ["keyword.operator.comparison.dart",">"],
"data": [ ["text"," "],
[ "storage.type.primitive.dart", "int" ], ["constant.numeric","1"],
[ "text", " " ], ["text",") "],
[ "identifier", "fib" ], ["keyword.control.ternary.dart","?"],
[ "text", "(" ], ["text"," ("],
[ "storage.type.primitive.dart", "int" ], ["identifier","fib"],
[ "text", " " ], ["text","("],
[ "identifier", "n" ], ["identifier","n"],
[ "text", ") " ], ["text"," "],
[ "keyword.operator.assignment.dart", "=" ], ["keyword.operator.arithmetic.dart","-"],
[ "keyword.operator.comparison.dart", ">" ], ["text"," "],
[ "text", " (" ], ["constant.numeric","1"],
[ "identifier", "n" ], ["text",") "],
[ "text", " " ], ["keyword.operator.arithmetic.dart","+"],
[ "keyword.operator.comparison.dart", ">" ], ["text"," "],
[ "text", " " ], ["identifier","fib"],
[ "constant.numeric", "1" ], ["text","("],
[ "text", ") " ], ["identifier","n"],
[ "keyword.control.ternary.dart", "?" ], ["text"," "],
[ "text", " (" ], ["keyword.operator.arithmetic.dart","-"],
[ "identifier", "fib" ], ["text"," "],
[ "text", "(" ], ["constant.numeric","2"],
[ "identifier", "n" ], ["text",")) "],
[ "text", " " ], ["keyword.control.ternary.dart",":"],
[ "keyword.operator.arithmetic.dart", "-" ], ["text"," "],
[ "text", " " ], ["identifier","n"],
[ "constant.numeric", "1" ], ["text",";"]
[ "text", ") " ], ],[
[ "keyword.operator.arithmetic.dart", "+" ], "start",
[ "text", " " ], ["identifier","main"],
[ "identifier", "fib" ], ["text","() {"]
[ "text", "(" ], ],[
[ "identifier", "n" ], "start",
[ "text", " " ], ["text"," "],
[ "keyword.operator.arithmetic.dart", "-" ], ["identifier","print"],
[ "text", " " ], ["text","("],
[ "constant.numeric", "2" ], ["string","'fib(20) = ${fib(20)}'"],
[ "text", ")) " ], ["text",");"]
[ "keyword.control.ternary.dart", ":" ], ],[
[ "text", " " ], "start",
[ "identifier", "n" ], ["text","}"]
[ "text", ";" ] ],[
] "comment",
}, ["comment","/*asd"]
{ ],[
"state": "start", "comment",
"data": [ ["comment","asdad"]
[ "identifier", "main" ], ],[
[ "text", "() {" ] "start",
] ["comment","*/"]
}, ],[
{ "start",
"state": "start", ["constant.numeric","0.67"]
"data": [ ],[
[ "text", " " ], "start",
[ "identifier", "print" ], ["constant.numeric","77"]
[ "text", "(" ], ],[
[ "string", "'fib(20) = ${fib(20)}'" ], "start",
[ "text", ");" ] ["text","."],
] ["constant.numeric","86"]
}, ],[
{ "start"
"state": "start", ],[
"data": [ "start",
[ "text", "}" ] ["keyword.other.import.dart","#import"],
] ["text","("],
}, ["string","\"http://dartwatch.com/myOtherLibrary.dart\""],
{ ["text",");"]
"state": "comment", ],[
"data": [ "start",
[ "comment", "/*asd" ] ["keyword.other.import.dart","#import"],
] ["text","("],
}, ["string","\"myOtherLibrary.dart\""],
{ ["text",", "],
"state": "comment", ["keyword.other.import.dart","prefix"],
"data": [ ["text",":"],
[ "comment", "asdad" ] ["string","\"lib1\""],
] ["text",");"]
}, ],[
{ "start"
"state": "start", ],[
"data": [ "qqdoc",
[ "comment", "*/" ] ["string","\"\"\"asdasdads"]
] ],[
}, "qqdoc",
{ ["string","asdadsadsasd"]
"state": "start", ],[
"data": [ "start",
[ "constant.numeric", "0.67" ] ["string","asdasdasdad\"\"\""]
] ],[
}, "start",
{ ["text"," "]
"state": "start", ],[
"data": [ "start",
[ "constant.numeric", "77" ] ["string","'23424'"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["constant.numeric","0x234"]
[ "text", "." ], ],[
[ "constant.numeric", "86" ] "start"
] ],[
}, "start",
{ ["identifier","foo"],
"state": "start", ["text"," "],
"data": [] ["keyword.operator.dart","is"],
}, ["text"," "],
{ ["identifier","bar"]
"state": "start", ],[
"data": [ "start"
[ "keyword.other.import.dart", "#import" ], ],[
[ "text", "(" ], "start",
[ "string", "\"http://dartwatch.com/myOtherLibrary.dart\"" ], ["storage.type.primitive.dart","int"],
[ "text", ");" ] ["text"," "],
] ["identifier","x"],
}, ["text"," "],
{ ["keyword.operator.assignment.dart","="],
"state": "start", ["text"," "],
"data": [ ["constant.numeric","4"],
[ "keyword.other.import.dart", "#import" ], ["text"," "],
[ "text", "(" ], ["keyword.operator.bitwise.dart","<<"],
[ "string", "\"myOtherLibrary.dart\"" ], ["text"," "],
[ "text", ", " ], ["constant.numeric","10"],
[ "keyword.other.import.dart", "prefix" ], ["text"," "]
[ "text", ":" ], ],[
[ "string", "\"lib1\"" ], "start",
[ "text", ");" ] ["comment","// Create a class for Point."]
] ],[
}, "start",
{ ["keyword.declaration.dart","class"],
"state": "start", ["text"," "],
"data": [] ["identifier","Point"],
}, ["text"," {"]
{ ],[
"state": "qqdoc", "start",
"data": [ ["text"," "]
[ "string", "\"\"\"asdasdads" ] ],[
] "start",
}, ["text"," "],
{ ["comment","// Final variables cannot be changed once they are assigned."]
"state": "qqdoc", ],[
"data": [ "start",
[ "string", "asdadsadsasd" ] ["text"," "],
] ["comment","// Create two instance variables."]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["storage.modifier.dart","final"],
[ "string", "asdasdasdad\"\"\"" ] ["text"," "],
] ["storage.type.primitive.dart","num"],
}, ["text"," "],
{ ["identifier","x"],
"state": "start", ["text",", "],
"data": [ ["identifier","y"],
[ "text", " " ] ["text",";"]
] ],[
}, "start",
{ ["text"," "]
"state": "start", ],[
"data": [ "start",
[ "string", "'23424'" ] ["text"," "],
] ["comment","// A constructor, with syntactic sugar for setting instance variables."]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [] ["identifier","Point"],
}, ["text","("],
{ ["variable.language.dart","this"],
"state": "start", ["text","."],
"data": [ ["identifier","x"],
[ "constant.numeric", "0x234" ] ["text",", "],
] ["variable.language.dart","this"],
}, ["text","."],
{ ["identifier","y"],
"state": "start", ["text",");"]
"data": [] ],[
}, "start",
{ ["text"," "]
"state": "start", ],[
"data": [ "start",
[ "identifier", "foo" ], ["text"," "],
[ "text", " " ], ["comment","// A named constructor with an initializer list."]
[ "keyword.operator.dart", "is" ], ],[
[ "text", " " ], "start",
[ "identifier", "bar" ] ["text"," "],
] ["identifier","Point"],
}, ["text","."],
{ ["identifier","origin"],
"state": "start", ["text","() "],
"data": [] ["keyword.control.ternary.dart",":"],
}, ["text"," "],
{ ["identifier","x"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator.assignment.dart","="],
[ "storage.type.primitive.dart", "int" ], ["text"," "],
[ "text", " " ], ["constant.numeric","0"],
[ "identifier", "x" ], ["text",", "],
[ "text", " " ], ["identifier","y"],
[ "keyword.operator.assignment.dart", "=" ], ["text"," "],
[ "text", " " ], ["keyword.operator.assignment.dart","="],
[ "constant.numeric", "4" ], ["text"," "],
[ "text", " " ], ["constant.numeric","0"],
[ "keyword.operator.bitwise.dart", "<<" ], ["text",";"]
[ "text", " " ], ],[
[ "constant.numeric", "10" ], "start",
[ "text", " " ] ["text"," "]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["comment","// A method."]
"data": [ ],[
[ "comment", "// Create a class for Point." ] "start",
] ["text"," "],
}, ["storage.type.primitive.dart","num"],
{ ["text"," "],
"state": "start", ["identifier","distanceTo"],
"data": [ ["text","("],
[ "keyword.declaration.dart", "class" ], ["identifier","Point"],
[ "text", " " ], ["text"," "],
[ "identifier", "Point" ], ["identifier","other"],
[ "text", " {" ] ["text",") {"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["storage.type.primitive.dart","var"],
"data": [ ["text"," "],
[ "text", " " ] ["identifier","dx"],
] ["text"," "],
}, ["keyword.operator.assignment.dart","="],
{ ["text"," "],
"state": "start", ["identifier","x"],
"data": [ ["text"," "],
[ "text", " " ], ["keyword.operator.arithmetic.dart","-"],
[ "comment", "// Final variables cannot be changed once they are assigned." ] ["text"," "],
] ["identifier","other"],
}, ["text","."],
{ ["identifier","x"],
"state": "start", ["text",";"]
"data": [ ],[
[ "text", " " ], "start",
[ "comment", "// Create two instance variables." ] ["text"," "],
] ["storage.type.primitive.dart","var"],
}, ["text"," "],
{ ["identifier","dy"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator.assignment.dart","="],
[ "text", " " ], ["text"," "],
[ "storage.modifier.dart", "final" ], ["identifier","y"],
[ "text", " " ], ["text"," "],
[ "storage.type.primitive.dart", "num" ], ["keyword.operator.arithmetic.dart","-"],
[ "text", " " ], ["text"," "],
[ "identifier", "x" ], ["identifier","other"],
[ "text", ", " ], ["text","."],
[ "identifier", "y" ], ["identifier","y"],
[ "text", ";" ] ["text",";"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword.control.dart","return"],
"data": [ ["text"," "],
[ "text", " " ] ["identifier","sqrt"],
] ["text","("],
}, ["identifier","dx"],
{ ["text"," "],
"state": "start", ["keyword.operator.arithmetic.dart","*"],
"data": [ ["text"," "],
[ "text", " " ], ["identifier","dx"],
[ "comment", "// A constructor, with syntactic sugar for setting instance variables." ] ["text"," "],
] ["keyword.operator.arithmetic.dart","+"],
}, ["text"," "],
{ ["identifier","dy"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator.arithmetic.dart","*"],
[ "text", " " ], ["text"," "],
[ "identifier", "Point" ], ["identifier","dy"],
[ "text", "(" ], ["text",");"]
[ "variable.language.dart", "this" ], ],[
[ "text", "." ], "start",
[ "identifier", "x" ], ["text"," }"]
[ "text", ", " ], ],[
[ "variable.language.dart", "this" ], "start",
[ "text", "." ], ["text","}"]
[ "identifier", "y" ], ],[
[ "text", ");" ] "start",
] ["text"," "]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["comment","// Check for null."]
[ "text", " " ] ],[
] "start",
}, ["storage.type.primitive.dart","var"],
{ ["text"," "],
"state": "start", ["identifier","unicorn"],
"data": [ ["text",";"]
[ "text", " " ], ],[
[ "comment", "// A named constructor with an initializer list." ] "start",
] ["identifier","assert"],
}, ["text","("],
{ ["identifier","unicorn"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator.comparison.dart","=="],
[ "text", " " ], ["text"," "],
[ "identifier", "Point" ], ["constant.language.dart","null"],
[ "text", "." ], ["text",");"]
[ "identifier", "origin" ], ],[
[ "text", "() " ], "start"
[ "keyword.control.ternary.dart", ":" ], ],[
[ "text", " " ], "start",
[ "identifier", "x" ], ["comment","// Check for NaN."]
[ "text", " " ], ],[
[ "keyword.operator.assignment.dart", "=" ], "start",
[ "text", " " ], ["storage.type.primitive.dart","var"],
[ "constant.numeric", "0" ], ["text"," "],
[ "text", ", " ], ["identifier","iMeantToDoThis"],
[ "identifier", "y" ], ["text"," "],
[ "text", " " ], ["keyword.operator.assignment.dart","="],
[ "keyword.operator.assignment.dart", "=" ], ["text"," "],
[ "text", " " ], ["constant.numeric","0"],
[ "constant.numeric", "0" ], ["keyword.operator.arithmetic.dart","/"],
[ "text", ";" ] ["constant.numeric","0"],
] ["text",";"]
}, ],[
{ "start",
"state": "start", ["identifier","assert"],
"data": [ ["text","("],
[ "text", " " ] ["identifier","iMeantToDoThis"],
] ["text","."],
}, ["identifier","isNaN"],
{ ["text","());"]
"state": "start", ],[
"data": [ "start"
[ "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": []
}
]

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,185 +1,127 @@
[ [[
{ "start",
"state": "start", ["keyword","uniform"],
"data": [ ["text"," "],
[ "keyword", "uniform" ], ["keyword","float"],
[ "text", " " ], ["text"," "],
[ "keyword", "float" ], ["identifier","amplitude"],
[ "text", " " ], ["punctuation.operator",";"]
[ "identifier", "amplitude" ], ],[
[ "punctuation.operator", ";" ] "start",
] ["keyword","attribute"],
}, ["text"," "],
{ ["keyword","float"],
"state": "start", ["text"," "],
"data": [ ["identifier","displacement"],
[ "keyword", "attribute" ], ["punctuation.operator",";"]
[ "text", " " ], ],[
[ "keyword", "float" ], "start",
[ "text", " " ], ["keyword","varying"],
[ "identifier", "displacement" ], ["text"," "],
[ "punctuation.operator", ";" ] ["keyword","vec3"],
] ["text"," "],
}, ["identifier","vNormal"],
{ ["punctuation.operator",";"]
"state": "start", ],[
"data": [ "start"
[ "keyword", "varying" ], ],[
[ "text", " " ], "start",
[ "keyword", "vec3" ], ["keyword","void"],
[ "text", " " ], ["text"," "],
[ "identifier", "vNormal" ], ["identifier","main"],
[ "punctuation.operator", ";" ] ["paren.lparen","("],
] ["paren.rparen",")"],
}, ["text"," "],
{ ["paren.lparen","{"]
"state": "start", ],[
"data": [] "start"
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["identifier","vNormal"],
[ "keyword", "void" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "identifier", "main" ], ["text"," "],
[ "paren.lparen", "(" ], ["identifier","normal"],
[ "paren.rparen", ")" ], ["punctuation.operator",";"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ] "start",
] ["text"," "]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [] ["comment","// multiply our displacement by the"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["comment","// amplitude. The amp will get animated"]
[ "text", " " ], ],[
[ "identifier", "vNormal" ], "start",
[ "text", " " ], ["text"," "],
[ "keyword.operator", "=" ], ["comment","// so we'll have animated displacement"]
[ "text", " " ], ],[
[ "identifier", "normal" ], "start",
[ "punctuation.operator", ";" ] ["text"," "],
] ["keyword","vec3"],
}, ["text"," "],
{ ["identifier","newPosition"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator","="],
[ "text", " " ] ["text"," "],
] ["identifier","position"],
}, ["text"," "],
{ ["keyword.operator","+"],
"state": "start", ["text"," "]
"data": [ ],[
[ "text", " " ], "start",
[ "comment", "// multiply our displacement by the" ] ["text"," "],
] ["identifier","normal"],
}, ["text"," "],
{ ["keyword.operator","*"],
"state": "start", ["text"," "]
"data": [ ],[
[ "text", " " ], "start",
[ "comment", "// amplitude. The amp will get animated" ] ["text"," "],
] ["keyword","vec3"],
}, ["paren.lparen","("],
{ ["identifier","displacement"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator","*"]
[ "text", " " ], ],[
[ "comment", "// so we'll have animated displacement" ] "start",
] ["text"," "],
}, ["identifier","amplitude"],
{ ["paren.rparen",")"],
"state": "start", ["punctuation.operator",";"]
"data": [ ],[
[ "text", " " ], "start"
[ "keyword", "vec3" ], ],[
[ "text", " " ], "start",
[ "identifier", "newPosition" ], ["text"," "],
[ "text", " " ], ["constant.language","gl_Position"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "identifier", "position" ], ["text"," "],
[ "text", " " ], ["identifier","projectionMatrix"],
[ "keyword.operator", "+" ], ["text"," "],
[ "text", " " ] ["keyword.operator","*"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["identifier","modelViewMatrix"],
"data": [ ["text"," "],
[ "text", " " ], ["keyword.operator","*"]
[ "identifier", "normal" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "*" ], ["text"," "],
[ "text", " " ] ["keyword","vec4"],
] ["paren.lparen","("],
}, ["identifier","newPosition"],
{ ["punctuation.operator",","],
"state": "start", ["constant.numeric","1.0"],
"data": [ ["paren.rparen",")"],
[ "text", " " ], ["punctuation.operator",";"]
[ "keyword", "vec3" ], ],[
[ "paren.lparen", "(" ], "start",
[ "identifier", "displacement" ], ["paren.rparen","}"]
[ "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", "}" ]
]
}
]

View file

@ -1,357 +1,256 @@
[ [[
{ "start",
"state": "start", ["comment","// Concurrent computation of pi."]
"data": [ ],[
[ "comment", "// Concurrent computation of pi." ] "start",
] ["comment","// See http://goo.gl/ZuTZM."]
}, ],[
{ "start",
"state": "start", ["comment","//"]
"data": [ ],[
[ "comment", "// See http://goo.gl/ZuTZM." ] "start",
] ["comment","// This demonstrates Go's ability to handle"]
}, ],[
{ "start",
"state": "start", ["comment","// large numbers of concurrent processes."]
"data": [ ],[
[ "comment", "//" ] "start",
] ["comment","// It is an unreasonable way to calculate pi."]
}, ],[
{ "start",
"state": "start", ["keyword","package"],
"data": [ ["text"," "],
[ "comment", "// This demonstrates Go's ability to handle" ] ["identifier","main"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["keyword","import"],
[ "comment", "// large numbers of concurrent processes." ] ["text"," "],
] ["paren.lparen","("]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["string","\"fmt\""]
[ "comment", "// It is an unreasonable way to calculate pi." ] ],[
] "start",
}, ["text"," "],
{ ["string","\"math\""]
"state": "start", ],[
"data": [ "start",
[ "keyword", "package" ], ["paren.rparen",")"]
[ "text", " " ], ],[
[ "identifier", "main" ] "start"
] ],[
}, "start",
{ ["keyword","func"],
"state": "start", ["text"," "],
"data": [] ["identifier","main"],
}, ["paren.lparen","("],
{ ["paren.rparen",")"],
"state": "start", ["text"," "],
"data": [ ["paren.lparen","{"]
[ "keyword", "import" ], ],[
[ "text", " " ], "start",
[ "paren.lparen", "(" ] ["text"," "],
] ["identifier","fmt"],
}, ["punctuation.operator","."],
{ ["identifier","Println"],
"state": "start", ["paren.lparen","("],
"data": [ ["identifier","pi"],
[ "text", " " ], ["paren.lparen","("],
[ "string", "\"fmt\"" ] ["constant.numeric","5000"],
] ["paren.rparen","))"]
}, ],[
{ "start",
"state": "start", ["paren.rparen","}"]
"data": [ ],[
[ "text", " " ], "start"
[ "string", "\"math\"" ] ],[
] "start",
}, ["comment","// pi launches n goroutines to compute an"]
{ ],[
"state": "start", "start",
"data": [ ["comment","// approximation of pi."]
[ "paren.rparen", ")" ] ],[
] "start",
}, ["keyword","func"],
{ ["text"," "],
"state": "start", ["identifier","pi"],
"data": [] ["paren.lparen","("],
}, ["identifier","n"],
{ ["text"," "],
"state": "start", ["identifier","int"],
"data": [ ["paren.rparen",")"],
[ "keyword", "func" ], ["text"," "],
[ "text", " " ], ["identifier","float64"],
[ "identifier", "main" ], ["text"," "],
[ "paren.lparen", "(" ], ["paren.lparen","{"]
[ "paren.rparen", ")" ], ],[
[ "text", " " ], "start",
[ "paren.lparen", "{" ] ["text"," "],
] ["identifier","ch"],
}, ["text"," "],
{ ["punctuation.operator",":"],
"state": "start", ["keyword.operator","="],
"data": [ ["text"," "],
[ "text", " " ], ["identifier","make"],
[ "identifier", "fmt" ], ["paren.lparen","("],
[ "punctuation.operator", "." ], ["keyword","chan"],
[ "identifier", "Println" ], ["text"," "],
[ "paren.lparen", "(" ], ["identifier","float64"],
[ "identifier", "pi" ], ["paren.rparen",")"]
[ "paren.lparen", "(" ], ],[
[ "constant.numeric", "5000" ], "start",
[ "paren.rparen", "))" ] ["text"," "],
] ["keyword","for"],
}, ["text"," "],
{ ["identifier","k"],
"state": "start", ["text"," "],
"data": [ ["punctuation.operator",":"],
[ "paren.rparen", "}" ] ["keyword.operator","="],
] ["text"," "],
}, ["constant.numeric","0"],
{ ["punctuation.operator",";"],
"state": "start", ["text"," "],
"data": [] ["identifier","k"],
}, ["text"," "],
{ ["keyword.operator","<="],
"state": "start", ["text"," "],
"data": [ ["identifier","n"],
[ "comment", "// pi launches n goroutines to compute an" ] ["punctuation.operator",";"],
] ["text"," "],
}, ["identifier","k"],
{ ["keyword.operator","++"],
"state": "start", ["text"," "],
"data": [ ["paren.lparen","{"]
[ "comment", "// approximation of pi." ] ],[
] "start",
}, ["text"," "],
{ ["keyword","go"],
"state": "start", ["text"," "],
"data": [ ["identifier","term"],
[ "keyword", "func" ], ["paren.lparen","("],
[ "text", " " ], ["identifier","ch"],
[ "identifier", "pi" ], ["punctuation.operator",","],
[ "paren.lparen", "(" ], ["text"," "],
[ "identifier", "n" ], ["identifier","float64"],
[ "text", " " ], ["paren.lparen","("],
[ "identifier", "int" ], ["identifier","k"],
[ "paren.rparen", ")" ], ["paren.rparen","))"]
[ "text", " " ], ],[
[ "identifier", "float64" ], "start",
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ] ["paren.rparen","}"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["identifier","f"],
"data": [ ["text"," "],
[ "text", " " ], ["punctuation.operator",":"],
[ "identifier", "ch" ], ["keyword.operator","="],
[ "text", " " ], ["text"," "],
[ "punctuation.operator", ":" ], ["constant.numeric","0.0"]
[ "keyword.operator", "=" ], ],[
[ "text", " " ], "start",
[ "identifier", "make" ], ["text"," "],
[ "paren.lparen", "(" ], ["keyword","for"],
[ "keyword", "chan" ], ["text"," "],
[ "text", " " ], ["identifier","k"],
[ "identifier", "float64" ], ["text"," "],
[ "paren.rparen", ")" ] ["punctuation.operator",":"],
] ["keyword.operator","="],
}, ["text"," "],
{ ["constant.numeric","0"],
"state": "start", ["punctuation.operator",";"],
"data": [ ["text"," "],
[ "text", " " ], ["identifier","k"],
[ "keyword", "for" ], ["text"," "],
[ "text", " " ], ["keyword.operator","<="],
[ "identifier", "k" ], ["text"," "],
[ "text", " " ], ["identifier","n"],
[ "punctuation.operator", ":" ], ["punctuation.operator",";"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["identifier","k"],
[ "constant.numeric", "0" ], ["keyword.operator","++"],
[ "punctuation.operator", ";" ], ["text"," "],
[ "text", " " ], ["paren.lparen","{"]
[ "identifier", "k" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "<=" ], ["text"," "],
[ "text", " " ], ["identifier","f"],
[ "identifier", "n" ], ["text"," "],
[ "punctuation.operator", ";" ], ["keyword.operator","+="],
[ "text", " " ], ["text"," "],
[ "identifier", "k" ], ["keyword.operator","<-"],
[ "keyword.operator", "++" ], ["identifier","ch"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ] "start",
] ["text"," "],
}, ["paren.rparen","}"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["keyword","return"],
[ "keyword", "go" ], ["text"," "],
[ "text", " " ], ["identifier","f"]
[ "identifier", "term" ], ],[
[ "paren.lparen", "(" ], "start",
[ "identifier", "ch" ], ["paren.rparen","}"]
[ "punctuation.operator", "," ], ],[
[ "text", " " ], "start"
[ "identifier", "float64" ], ],[
[ "paren.lparen", "(" ], "start",
[ "identifier", "k" ], ["keyword","func"],
[ "paren.rparen", "))" ] ["text"," "],
] ["identifier","term"],
}, ["paren.lparen","("],
{ ["identifier","ch"],
"state": "start", ["text"," "],
"data": [ ["keyword","chan"],
[ "text", " " ], ["text"," "],
[ "paren.rparen", "}" ] ["identifier","float64"],
] ["punctuation.operator",","],
}, ["text"," "],
{ ["identifier","k"],
"state": "start", ["text"," "],
"data": [ ["identifier","float64"],
[ "text", " " ], ["paren.rparen",")"],
[ "identifier", "f" ], ["text"," "],
[ "text", " " ], ["paren.lparen","{"]
[ "punctuation.operator", ":" ], ],[
[ "keyword.operator", "=" ], "start",
[ "text", " " ], ["text"," "],
[ "constant.numeric", "0.0" ] ["identifier","ch"],
] ["text"," "],
}, ["keyword.operator","<-"],
{ ["text"," "],
"state": "start", ["constant.numeric","4"],
"data": [ ["text"," "],
[ "text", " " ], ["keyword.operator","*"],
[ "keyword", "for" ], ["text"," "],
[ "text", " " ], ["identifier","math"],
[ "identifier", "k" ], ["punctuation.operator","."],
[ "text", " " ], ["identifier","Pow"],
[ "punctuation.operator", ":" ], ["paren.lparen","("],
[ "keyword.operator", "=" ], ["constant.numeric","-1"],
[ "text", " " ], ["punctuation.operator",","],
[ "constant.numeric", "0" ], ["text"," "],
[ "punctuation.operator", ";" ], ["identifier","k"],
[ "text", " " ], ["paren.rparen",")"],
[ "identifier", "k" ], ["text"," / "],
[ "text", " " ], ["paren.lparen","("],
[ "keyword.operator", "<=" ], ["constant.numeric","2"],
[ "text", " " ], ["keyword.operator","*"],
[ "identifier", "n" ], ["identifier","k"],
[ "punctuation.operator", ";" ], ["text"," "],
[ "text", " " ], ["keyword.operator","+"],
[ "identifier", "k" ], ["text"," "],
[ "keyword.operator", "++" ], ["constant.numeric","1"],
[ "text", " " ], ["paren.rparen",")"]
[ "paren.lparen", "{" ] ],[
] "start",
}, ["paren.rparen","}"]
{ ],[
"state": "start", "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": []
}
]

View file

@ -1,523 +1,410 @@
[ [[
{ "start",
"state": "start", ["comment","//http://groovy.codehaus.org/Martin+Fowler%27s+closure+examples+in+Groovy"]
"data": [ ],[
[ "comment", "//http://groovy.codehaus.org/Martin+Fowler%27s+closure+examples+in+Groovy" ] "start"
] ],[
}, "start",
{ ["keyword","class"],
"state": "start", ["text"," "],
"data": [] ["identifier","Employee"],
}, ["text"," "],
{ ["lparen","{"]
"state": "start", ],[
"data": [ "start",
[ "keyword", "class" ], ["text"," "],
[ "text", " " ], ["keyword","def"],
[ "identifier", "Employee" ], ["text"," "],
[ "text", " " ], ["identifier","name"],
[ "lparen", "{" ] ["text",", "],
] ["identifier","salary"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["keyword","boolean"],
[ "text", " " ], ["text"," "],
[ "keyword", "def" ], ["identifier","manager"]
[ "text", " " ], ],[
[ "identifier", "name" ], "start",
[ "text", ", " ], ["text"," "],
[ "identifier", "salary" ] ["support.function","String"],
] ["text"," "],
}, ["identifier","toString"],
{ ["lparen","("],
"state": "start", ["rparen",")"],
"data": [ ["text"," "],
[ "text", " " ], ["lparen","{"],
[ "keyword", "boolean" ], ["text"," "],
[ "text", " " ], ["keyword","return"],
[ "identifier", "manager" ] ["text"," "],
] ["identifier","name"],
}, ["text"," "],
{ ["rparen","}"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["rparen","}"]
[ "support.function", "String" ], ],[
[ "text", " " ], "start"
[ "identifier", "toString" ], ],[
[ "lparen", "(" ], "start",
[ "rparen", ")" ], ["keyword","def"],
[ "text", " " ], ["text"," "],
[ "lparen", "{" ], ["identifier","emps"],
[ "text", " " ], ["text"," "],
[ "keyword", "return" ], ["keyword.operator","="],
[ "text", " " ], ["text"," "],
[ "identifier", "name" ], ["lparen","["],
[ "text", " " ], ["keyword","new"],
[ "rparen", "}" ] ["text"," "],
] ["identifier","Employee"],
}, ["lparen","("],
{ ["identifier","name"],
"state": "start", ["text",":"],
"data": [ ["string","'Guillaume'"],
[ "rparen", "}" ] ["text",", "],
] ["identifier","manager"],
}, ["text",":"],
{ ["constant.language.boolean","true"],
"state": "start", ["text",", "],
"data": [] ["identifier","salary"],
}, ["text",":"],
{ ["constant.numeric","200"],
"state": "start", ["rparen",")"],
"data": [ ["text",","]
[ "keyword", "def" ], ],[
[ "text", " " ], "start",
[ "identifier", "emps" ], ["text"," "],
[ "text", " " ], ["keyword","new"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["identifier","Employee"],
[ "lparen", "[" ], ["lparen","("],
[ "keyword", "new" ], ["identifier","name"],
[ "text", " " ], ["text",":"],
[ "identifier", "Employee" ], ["string","'Graeme'"],
[ "lparen", "(" ], ["text",", "],
[ "identifier", "name" ], ["identifier","manager"],
[ "text", ":" ], ["text",":"],
[ "string", "'Guillaume'" ], ["constant.language.boolean","true"],
[ "text", ", " ], ["text",", "],
[ "identifier", "manager" ], ["identifier","salary"],
[ "text", ":" ], ["text",":"],
[ "constant.language.boolean", "true" ], ["constant.numeric","200"],
[ "text", ", " ], ["rparen",")"],
[ "identifier", "salary" ], ["text",","]
[ "text", ":" ], ],[
[ "constant.numeric", "200" ], "start",
[ "rparen", ")" ], ["text"," "],
[ "text", "," ] ["keyword","new"],
] ["text"," "],
}, ["identifier","Employee"],
{ ["lparen","("],
"state": "start", ["identifier","name"],
"data": [ ["text",":"],
[ "text", " " ], ["string","'Dierk'"],
[ "keyword", "new" ], ["text",", "],
[ "text", " " ], ["identifier","manager"],
[ "identifier", "Employee" ], ["text",":"],
[ "lparen", "(" ], ["constant.language.boolean","false"],
[ "identifier", "name" ], ["text",", "],
[ "text", ":" ], ["identifier","salary"],
[ "string", "'Graeme'" ], ["text",":"],
[ "text", ", " ], ["constant.numeric","151"],
[ "identifier", "manager" ], ["rparen",")"],
[ "text", ":" ], ["text",","]
[ "constant.language.boolean", "true" ], ],[
[ "text", ", " ], "start",
[ "identifier", "salary" ], ["text"," "],
[ "text", ":" ], ["keyword","new"],
[ "constant.numeric", "200" ], ["text"," "],
[ "rparen", ")" ], ["identifier","Employee"],
[ "text", "," ] ["lparen","("],
] ["identifier","name"],
}, ["text",":"],
{ ["string","'Bernd'"],
"state": "start", ["text",", "],
"data": [ ["identifier","manager"],
[ "text", " " ], ["text",":"],
[ "keyword", "new" ], ["constant.language.boolean","false"],
[ "text", " " ], ["text",", "],
[ "identifier", "Employee" ], ["identifier","salary"],
[ "lparen", "(" ], ["text",":"],
[ "identifier", "name" ], ["constant.numeric","50"],
[ "text", ":" ], ["rparen",")]"]
[ "string", "'Dierk'" ], ],[
[ "text", ", " ], "start"
[ "identifier", "manager" ], ],[
[ "text", ":" ], "start",
[ "constant.language.boolean", "false" ], ["keyword","def"],
[ "text", ", " ], ["text"," "],
[ "identifier", "salary" ], ["identifier","managers"],
[ "text", ":" ], ["lparen","("],
[ "constant.numeric", "151" ], ["identifier","emps"],
[ "rparen", ")" ], ["rparen",")"],
[ "text", "," ] ["text"," "],
] ["lparen","{"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["identifier","emps"],
[ "text", " " ], ["text","."],
[ "keyword", "new" ], ["identifier","findAll"],
[ "text", " " ], ["text"," "],
[ "identifier", "Employee" ], ["lparen","{"],
[ "lparen", "(" ], ["text"," "],
[ "identifier", "name" ], ["identifier","e"],
[ "text", ":" ], ["text"," "],
[ "string", "'Bernd'" ], ["keyword.operator","->"],
[ "text", ", " ], ["text"," "],
[ "identifier", "manager" ], ["identifier","e"],
[ "text", ":" ], ["text","."],
[ "constant.language.boolean", "false" ], ["identifier","isManager"],
[ "text", ", " ], ["lparen","("],
[ "identifier", "salary" ], ["rparen",")"],
[ "text", ":" ], ["text"," "],
[ "constant.numeric", "50" ], ["rparen","}"]
[ "rparen", ")]" ] ],[
] "start",
}, ["rparen","}"]
{ ],[
"state": "start", "start"
"data": [] ],[
}, "start",
{ ["keyword","assert"],
"state": "start", ["text"," "],
"data": [ ["identifier","emps"],
[ "keyword", "def" ], ["lparen","["],
[ "text", " " ], ["constant.numeric","0"],
[ "identifier", "managers" ], ["text",".."],
[ "lparen", "(" ], ["constant.numeric","1"],
[ "identifier", "emps" ], ["rparen","]"],
[ "rparen", ")" ], ["text"," "],
[ "text", " " ], ["keyword.operator","=="],
[ "lparen", "{" ] ["text"," "],
] ["identifier","managers"],
}, ["lparen","("],
{ ["identifier","emps"],
"state": "start", ["rparen",")"],
"data": [ ["text"," "],
[ "text", " " ], ["comment","// [Guillaume, Graeme]"]
[ "identifier", "emps" ], ],[
[ "text", "." ], "start"
[ "identifier", "findAll" ], ],[
[ "text", " " ], "start",
[ "lparen", "{" ], ["keyword","def"],
[ "text", " " ], ["text"," "],
[ "identifier", "e" ], ["identifier","highPaid"],
[ "text", " " ], ["lparen","("],
[ "keyword.operator", "->" ], ["identifier","emps"],
[ "text", " " ], ["rparen",")"],
[ "identifier", "e" ], ["text"," "],
[ "text", "." ], ["lparen","{"]
[ "identifier", "isManager" ], ],[
[ "lparen", "(" ], "start",
[ "rparen", ")" ], ["text"," "],
[ "text", " " ], ["identifier","threshold"],
[ "rparen", "}" ] ["text"," "],
] ["keyword.operator","="],
}, ["text"," "],
{ ["constant.numeric","150"]
"state": "start", ],[
"data": [ "start",
[ "rparen", "}" ] ["text"," "],
] ["identifier","emps"],
}, ["text","."],
{ ["identifier","findAll"],
"state": "start", ["text"," "],
"data": [] ["lparen","{"],
}, ["text"," "],
{ ["identifier","e"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator","->"],
[ "keyword", "assert" ], ["text"," "],
[ "text", " " ], ["identifier","e"],
[ "identifier", "emps" ], ["text","."],
[ "lparen", "[" ], ["identifier","salary"],
[ "constant.numeric", "0" ], ["text"," "],
[ "text", ".." ], ["keyword.operator",">"],
[ "constant.numeric", "1" ], ["text"," "],
[ "rparen", "]" ], ["identifier","threshold"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "==" ], ["rparen","}"]
[ "text", " " ], ],[
[ "identifier", "managers" ], "start",
[ "lparen", "(" ], ["rparen","}"]
[ "identifier", "emps" ], ],[
[ "rparen", ")" ], "start"
[ "text", " " ], ],[
[ "comment", "// [Guillaume, Graeme]" ] "start",
] ["keyword","assert"],
}, ["text"," "],
{ ["identifier","emps"],
"state": "start", ["lparen","["],
"data": [] ["constant.numeric","0"],
}, ["text",".."],
{ ["constant.numeric","2"],
"state": "start", ["rparen","]"],
"data": [ ["text"," "],
[ "keyword", "def" ], ["keyword.operator","=="],
[ "text", " " ], ["text"," "],
[ "identifier", "highPaid" ], ["identifier","highPaid"],
[ "lparen", "(" ], ["lparen","("],
[ "identifier", "emps" ], ["identifier","emps"],
[ "rparen", ")" ], ["rparen",")"],
[ "text", " " ], ["text"," "],
[ "lparen", "{" ] ["comment","// [Guillaume, Graeme, Dierk]"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["keyword","def"],
[ "text", " " ], ["text"," "],
[ "identifier", "threshold" ], ["identifier","paidMore"],
[ "text", " " ], ["lparen","("],
[ "keyword.operator", "=" ], ["identifier","amount"],
[ "text", " " ], ["rparen",")"],
[ "constant.numeric", "150" ] ["text"," "],
] ["lparen","{"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["lparen","{"],
[ "text", " " ], ["text"," "],
[ "identifier", "emps" ], ["identifier","e"],
[ "text", "." ], ["text"," "],
[ "identifier", "findAll" ], ["keyword.operator","->"],
[ "text", " " ], ["text"," "],
[ "lparen", "{" ], ["identifier","e"],
[ "text", " " ], ["text","."],
[ "identifier", "e" ], ["identifier","salary"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "->" ], ["keyword.operator",">"],
[ "text", " " ], ["text"," "],
[ "identifier", "e" ], ["identifier","amount"],
[ "text", "." ], ["rparen","}"]
[ "identifier", "salary" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", ">" ], ["rparen","}"]
[ "text", " " ], ],[
[ "identifier", "threshold" ], "start",
[ "text", " " ], ["keyword","def"],
[ "rparen", "}" ] ["text"," "],
] ["identifier","highPaid"],
}, ["text"," "],
{ ["keyword.operator","="],
"state": "start", ["text"," "],
"data": [ ["identifier","paidMore"],
[ "rparen", "}" ] ["lparen","("],
] ["constant.numeric","150"],
}, ["rparen",")"]
{ ],[
"state": "start", "start"
"data": [] ],[
}, "start",
{ ["keyword","assert"],
"state": "start", ["text"," "],
"data": [ ["identifier","highPaid"],
[ "keyword", "assert" ], ["lparen","("],
[ "text", " " ], ["identifier","emps"],
[ "identifier", "emps" ], ["lparen","["],
[ "lparen", "[" ], ["constant.numeric","0"],
[ "constant.numeric", "0" ], ["rparen","])"],
[ "text", ".." ], ["text"," "],
[ "constant.numeric", "2" ], ["comment","// true"]
[ "rparen", "]" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "==" ], ["keyword","assert"],
[ "text", " " ], ["text"," "],
[ "identifier", "highPaid" ], ["identifier","emps"],
[ "lparen", "(" ], ["lparen","["],
[ "identifier", "emps" ], ["constant.numeric","0"],
[ "rparen", ")" ], ["text",".."],
[ "text", " " ], ["constant.numeric","2"],
[ "comment", "// [Guillaume, Graeme, Dierk]" ] ["rparen","]"],
] ["text"," "],
}, ["keyword.operator","=="],
{ ["text"," "],
"state": "start", ["identifier","emps"],
"data": [] ["text","."],
}, ["identifier","findAll"],
{ ["lparen","("],
"state": "start", ["identifier","highPaid"],
"data": [ ["rparen",")"]
[ "keyword", "def" ], ],[
[ "text", " " ], "start"
[ "identifier", "paidMore" ], ],[
[ "lparen", "(" ], "start",
[ "identifier", "amount" ], ["keyword","def"],
[ "rparen", ")" ], ["text"," "],
[ "text", " " ], ["identifier","filename"],
[ "lparen", "{" ] ["text"," "],
] ["keyword.operator","="],
}, ["text"," "],
{ ["string","'test.txt'"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["keyword","new"],
[ "lparen", "{" ], ["text"," "],
[ "text", " " ], ["identifier","File"],
[ "identifier", "e" ], ["lparen","("],
[ "text", " " ], ["identifier","filename"],
[ "keyword.operator", "->" ], ["rparen",")"],
[ "text", " " ], ["text","."],
[ "identifier", "e" ], ["identifier","withReader"],
[ "text", "." ], ["lparen","{"],
[ "identifier", "salary" ], ["text"," "],
[ "text", " " ], ["identifier","reader"],
[ "keyword.operator", ">" ], ["text"," "],
[ "text", " " ], ["keyword.operator","->"],
[ "identifier", "amount" ], ["text"," "],
[ "rparen", "}" ] ["identifier","doSomethingWith"],
] ["lparen","("],
}, ["identifier","reader"],
{ ["rparen",")"],
"state": "start", ["text"," "],
"data": [ ["rparen","}"]
[ "rparen", "}" ] ],[
] "start"
}, ],[
{ "start",
"state": "start", ["keyword","def"],
"data": [ ["text"," "],
[ "keyword", "def" ], ["identifier","readersText"]
[ "text", " " ], ],[
[ "identifier", "highPaid" ], "start",
[ "text", " " ], ["keyword","def"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["identifier","doSomethingWith"],
[ "identifier", "paidMore" ], ["lparen","("],
[ "lparen", "(" ], ["identifier","reader"],
[ "constant.numeric", "150" ], ["rparen",")"],
[ "rparen", ")" ] ["text"," "],
] ["lparen","{"],
}, ["text"," "],
{ ["identifier","readersText"],
"state": "start", ["text"," "],
"data": [] ["keyword.operator","="],
}, ["text"," "],
{ ["identifier","reader"],
"state": "start", ["text","."],
"data": [ ["identifier","text"],
[ "keyword", "assert" ], ["text"," "],
[ "text", " " ], ["rparen","}"]
[ "identifier", "highPaid" ], ],[
[ "lparen", "(" ], "start"
[ "identifier", "emps" ], ],[
[ "lparen", "[" ], "start",
[ "constant.numeric", "0" ], ["keyword","assert"],
[ "rparen", "])" ], ["text"," "],
[ "text", " " ], ["keyword","new"],
[ "comment", "// true" ] ["text"," "],
] ["identifier","File"],
}, ["lparen","("],
{ ["identifier","filename"],
"state": "start", ["rparen",")"],
"data": [ ["text","."],
[ "keyword", "assert" ], ["identifier","text"],
[ "text", " " ], ["text"," "],
[ "identifier", "emps" ], ["keyword.operator","=="],
[ "lparen", "[" ], ["text"," "],
[ "constant.numeric", "0" ], ["identifier","readersText"]
[ "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" ]
]
}
]

View file

@ -1,280 +1,174 @@
[ [[
{ "start",
"state": "start", ["keyword.other.doctype","!!!5"]
"data": [ ],[
[ "keyword.other.doctype", "!!!5" ] "start"
] ],[
}, "start",
{ ["punctuation.section.comment","# <!--[if lt IE 7]> <html class=\"no-js lt-ie9 lt-ie8 lt-ie7\" lang=\"en\"> <![endif]-->"]
"state": "start", ],[
"data": [] "start",
}, ["punctuation.section.comment","# <!--[if IE 7]> <html class=\"no-js lt-ie9 lt-ie8\" lang=\"en\"> <![endif]-->"]
{ ],[
"state": "start", "start",
"data": [ ["punctuation.section.comment","# <!--[if IE 8]> <html class=\"no-js lt-ie9\" lang=\"en\"> <![endif]-->"]
[ "punctuation.section.comment", "# <!--[if lt IE 7]> <html class=\"no-js lt-ie9 lt-ie8 lt-ie7\" lang=\"en\"> <![endif]-->" ] ],[
] "start",
}, ["punctuation.section.comment","# <!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\"> <!--<![endif]-->"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "punctuation.section.comment", "# <!--[if IE 7]> <html class=\"no-js lt-ie9 lt-ie8\" lang=\"en\"> <![endif]-->" ] "start"
] ],[
}, "start",
{ ["punctuation.section.comment","/adasdasdad"]
"state": "start", ],[
"data": [ "start",
[ "punctuation.section.comment", "# <!--[if IE 8]> <html class=\"no-js lt-ie9\" lang=\"en\"> <![endif]-->" ] ["entity.name.tag.haml","%div"],
] ["punctuation.section","{"],
}, ["constant.other.symbol.ruby",":id"],
{ ["text"," => "],
"state": "start", ["string","\"#{@item.type}_#{@item.number}\""],
"data": [ ["text",", "],
[ "punctuation.section.comment", "# <!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\"> <!--<![endif]-->" ] ["constant.other.symbol.ruby",":class"],
] ["text"," => "],
}, ["string","'#{@item.type} #{@item.urgency}'"],
{ ["text",", "],
"state": "start", ["constant.other.symbol.ruby",":phoney"],
"data": [] ["text"," => "],
}, ["string","`asdasdasd`"],
{ ["punctuation.section","}"]
"state": "start", ],[
"data": [] "start",
}, ["punctuation.section.comment","/ file: app/views/movies/index.html.haml"]
{ ],[
"state": "start", "start",
"data": [ ["meta.escape.haml","\\d"]
[ "punctuation.section.comment", "/adasdasdad" ] ],[
] "start",
}, ["entity.name.tag.haml","%ads:"],
{ ["punctuation.section","{"],
"state": "start", ["constant.other.symbol.ruby",":bleh"],
"data": [ ["text"," => "],
[ "entity.name.tag.haml", "%div" ], ["constant.numeric","33"],
[ "punctuation.section", "{" ], ["punctuation.section","}"]
[ "constant.other.symbol.ruby", ":id" ], ],[
[ "text", " => " ], "embedded_ruby",
[ "string", "\"#{@item.type}_#{@item.number}\"" ], ["entity.name.tag.haml","%p"],
[ "text", ", " ], ["text","==ddd=="]
[ "constant.other.symbol.ruby", ":class" ], ],[
[ "text", " => " ], "start",
[ "string", "'#{@item.type} #{@item.urgency}'" ], ["text"," Date/Time:"]
[ "text", ", " ], ],[
[ "constant.other.symbol.ruby", ":phoney" ], "embedded_ruby",
[ "text", " => " ], ["text"," - "],
[ "string", "`asdasdasd`" ], ["identifier","now"],
[ "punctuation.section", "}" ] ["text"," = "],
] ["support.class","DateTime"],
}, ["text","."],
{ ["identifier","now"],
"state": "start", ["text"," "]
"data": [ ],[
[ "punctuation.section.comment", "/ file: app/views/movies/index.html.haml" ] "start",
] ["entity.name.tag.haml"," %strong"],
}, ["text","= now"]
{ ],[
"state": "start", "embedded_ruby",
"data": [ ["text"," = "],
[ "meta.escape.haml", "\\d" ] ["keyword","if"],
] ["text"," "],
}, ["identifier","now"],
{ ["text"," "],
"state": "start", ["support.class","DateTime"],
"data": [ ["text","."],
[ "entity.name.tag.haml", "%ads:" ], ["identifier","parse"],
[ "punctuation.section", "{" ], ["text","(\""],
[ "constant.other.symbol.ruby", ":bleh" ], ["support.class","December"],
[ "text", " => " ], ["text"," "],
[ "constant.numeric", "33" ], ["constant.numeric","31"],
[ "punctuation.section", "}" ] ["text",", "],
] ["constant.numeric","2006"],
}, ["text","\")"]
{ ],[
"state": "embedded_ruby", "embedded_ruby",
"data": [ ["text"," = \""],
[ "entity.name.tag.haml", "%p" ], ["support.class","Happy"],
[ "text", "==ddd==" ] ["text"," "],
] ["identifier","new"],
}, ["text"," \" + \""],
{ ["identifier","year"],
"state": "start", ["text","!\""]
"data": [ ],[
[ "text", " Date/Time:" ] "start",
] ["entity.name.tag.haml","%sfd"],
}, ["entity.other.attribute-name.class.haml",".dfdfg"]
{ ],[
"state": "embedded_ruby", "start",
"data": [ ["punctuation.section.comment","#content"]
[ "text", " - " ], ],[
[ "identifier", "now" ], "start",
[ "text", " = " ], ["text"," .title"]
[ "support.class", "DateTime" ], ],[
[ "text", "." ], "start",
[ "identifier", "now" ], ["entity.name.tag.haml"," %h1"],
[ "text", " " ] ["text","= @title"]
] ],[
}, "embedded_ruby",
{ ["text"," = "],
"state": "start", ["support.function","link_to"],
"data": [ ["text"," '"],
[ "entity.name.tag.haml", " %strong" ], ["support.class","Home"],
[ "text", "= now" ] ["text","', "],
] ["identifier","home_url"]
}, ],[
{ "start"
"state": "embedded_ruby", ],[
"data": [ "start",
[ "text", " = " ], ["punctuation.section.comment"," #contents"]
[ "keyword", "if" ], ],[
[ "text", " " ], "start",
[ "identifier", "now" ], ["entity.name.tag.haml","%div"],
[ "text", " " ], ["entity.other.attribute-name.id.haml","#content"]
[ "support.class", "DateTime" ], ],[
[ "text", "." ], "start",
[ "identifier", "parse" ], ["entity.name.tag.haml"," %div"],
[ "text", "(\"" ], ["entity.other.attribute-name.class.haml",".articles"]
[ "support.class", "December" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "31" ], ["entity.name.tag.haml"," %div"],
[ "text", ", " ], ["entity.other.attribute-name.class.haml",".article.title"],
[ "constant.numeric", "2006" ], ["text"," Blah"]
[ "text", "\")" ] ],[
] "start",
}, ["entity.name.tag.haml"," %div"],
{ ["entity.other.attribute-name.class.haml",".article.date"],
"state": "embedded_ruby", ["text"," "],
"data": [ ["constant.numeric","2006-11-05"]
[ "text", " = \"" ], ],[
[ "support.class", "Happy" ], "start",
[ "text", " " ], ["entity.name.tag.haml"," %div"],
[ "identifier", "new" ], ["entity.other.attribute-name.class.haml",".article.entry"]
[ "text", " \" + \"" ], ],[
[ "identifier", "year" ], "start",
[ "text", "!\"" ] ["text"," Neil Patrick Harris "]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["entity.name.tag.haml","%div"],
[ "entity.name.tag.haml", "%sfd" ], ["text","[@user, "],
[ "entity.other.attribute-name.class.haml", ".dfdfg" ] ["constant.other.symbol.ruby",":greeting"],
] ["text","]"]
}, ],[
{ "start",
"state": "start", ["entity.name.tag.haml"," %bar"],
"data": [ ["text","["],
[ "punctuation.section.comment", "#content" ] ["constant.numeric","290"],
] ["text","]/"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["string.quoted.double","==Hello!=="]
[ "text", " .title" ] ],[
] "start"
}, ]]
{
"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": []
}
]

View file

@ -1,195 +1,143 @@
[ [[
{ "start",
"state": "start", ["keyword","class"],
"data": [ ["text"," "],
[ "keyword", "class" ], ["identifier","Haxe"],
[ "text", " " ], ["text"," "]
[ "identifier", "Haxe" ], ],[
[ "text", " " ] "start",
] ["paren.lparen","{"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["keyword","public"],
[ "paren.lparen", "{" ] ["text"," "],
] ["keyword","static"],
}, ["text"," "],
{ ["keyword","function"],
"state": "start", ["text"," "],
"data": [ ["identifier","main"],
[ "text", " " ], ["paren.lparen","("],
[ "keyword", "public" ], ["paren.rparen",")"],
[ "text", " " ], ["text"," "]
[ "keyword", "static" ], ],[
[ "text", " " ], "start",
[ "keyword", "function" ], ["text"," "],
[ "text", " " ], ["paren.lparen","{"]
[ "identifier", "main" ], ],[
[ "paren.lparen", "(" ], "start",
[ "paren.rparen", ")" ], ["text"," "],
[ "text", " " ] ["comment","// Say Hello!"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword","var"],
"data": [ ["text"," "],
[ "text", " " ], ["identifier","greeting"],
[ "paren.lparen", "{" ] ["punctuation.operator",":"],
] ["keyword","String"],
}, ["text"," "],
{ ["keyword.operator","="],
"state": "start", ["text"," "],
"data": [ ["string","\"Hello World\""],
[ "text", " " ], ["punctuation.operator",";"]
[ "comment", "// Say Hello!" ] ],[
] "start",
}, ["text"," "],
{ ["keyword","trace"],
"state": "start", ["paren.lparen","("],
"data": [ ["identifier","greeting"],
[ "text", " " ], ["paren.rparen",")"],
[ "keyword", "var" ], ["punctuation.operator",";"]
[ "text", " " ], ],[
[ "identifier", "greeting" ], "start",
[ "punctuation.operator", ":" ], ["text"," "]
[ "keyword", "String" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["keyword","var"],
[ "string", "\"Hello World\"" ], ["text"," "],
[ "punctuation.operator", ";" ] ["identifier","targets"],
] ["punctuation.operator",":"],
}, ["keyword","Array"],
{ ["keyword.operator","<"],
"state": "start", ["keyword","String"],
"data": [ ["keyword.operator",">"],
[ "text", " " ], ["text"," "],
[ "keyword", "trace" ], ["keyword.operator","="],
[ "paren.lparen", "(" ], ["text"," "],
[ "identifier", "greeting" ], ["paren.lparen","["],
[ "paren.rparen", ")" ], ["string","\"Flash\""],
[ "punctuation.operator", ";" ] ["punctuation.operator",","],
] ["string","\"Javascript\""],
}, ["punctuation.operator",","],
{ ["string","\"PHP\""],
"state": "start", ["punctuation.operator",","],
"data": [ ["string","\"Neko\""],
[ "text", " " ] ["punctuation.operator",","],
] ["string","\"C++\""],
}, ["punctuation.operator",","],
{ ["string","\"iOS\""],
"state": "start", ["punctuation.operator",","],
"data": [ ["string","\"Android\""],
[ "text", " " ], ["punctuation.operator",","],
[ "keyword", "var" ], ["string","\"webOS\""],
[ "text", " " ], ["paren.rparen","]"],
[ "identifier", "targets" ], ["punctuation.operator",";"]
[ "punctuation.operator", ":" ], ],[
[ "keyword", "Array" ], "start",
[ "keyword.operator", "<" ], ["text"," "],
[ "keyword", "String" ], ["keyword","trace"],
[ "keyword.operator", ">" ], ["paren.lparen","("],
[ "text", " " ], ["string","\"Haxe is a great language that can target:\""],
[ "keyword.operator", "=" ], ["paren.rparen",")"],
[ "text", " " ], ["punctuation.operator",";"]
[ "paren.lparen", "[" ], ],[
[ "string", "\"Flash\"" ], "start",
[ "punctuation.operator", "," ], ["text"," "],
[ "string", "\"Javascript\"" ], ["keyword","for"],
[ "punctuation.operator", "," ], ["text"," "],
[ "string", "\"PHP\"" ], ["paren.lparen","("],
[ "punctuation.operator", "," ], ["identifier","target"],
[ "string", "\"Neko\"" ], ["text"," "],
[ "punctuation.operator", "," ], ["keyword","in"],
[ "string", "\"C++\"" ], ["text"," "],
[ "punctuation.operator", "," ], ["identifier","targets"],
[ "string", "\"iOS\"" ], ["paren.rparen",")"]
[ "punctuation.operator", "," ], ],[
[ "string", "\"Android\"" ], "start",
[ "punctuation.operator", "," ], ["text"," "],
[ "string", "\"webOS\"" ], ["paren.lparen","{"]
[ "paren.rparen", "]" ], ],[
[ "punctuation.operator", ";" ] "start",
] ["text"," "],
}, ["keyword","trace"],
{ ["text"," "],
"state": "start", ["paren.lparen","("],
"data": [ ["string","\" - \""],
[ "text", " " ], ["text"," "],
[ "keyword", "trace" ], ["keyword.operator","+"],
[ "paren.lparen", "(" ], ["text"," "],
[ "string", "\"Haxe is a great language that can target:\"" ], ["identifier","target"],
[ "paren.rparen", ")" ], ["paren.rparen",")"],
[ "punctuation.operator", ";" ] ["punctuation.operator",";"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["paren.rparen","}"]
"data": [ ],[
[ "text", " " ], "start",
[ "keyword", "for" ], ["text"," "],
[ "text", " " ], ["keyword","trace"],
[ "paren.lparen", "(" ], ["paren.lparen","("],
[ "identifier", "target" ], ["string","\"And many more!\""],
[ "text", " " ], ["paren.rparen",")"],
[ "keyword", "in" ], ["punctuation.operator",";"]
[ "text", " " ], ],[
[ "identifier", "targets" ], "start",
[ "paren.rparen", ")" ] ["text"," "],
] ["paren.rparen","}"]
}, ],[
{ "start",
"state": "start", ["paren.rparen","}"]
"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", "}" ]
]
}
]

View file

@ -1,150 +1,103 @@
[ [[
{ "start",
"state": "start", ["meta.tag","<"],
"data": [ ["meta.tag.tag-name","html"],
[ "meta.tag", "<" ], ["meta.tag.r",">"]
[ "meta.tag.tag-name", "html" ], ],[
[ "meta.tag.r", ">" ] "start",
] ["text"," "],
}, ["meta.tag","<"],
{ ["meta.tag.tag-name","head"],
"state": "start", ["meta.tag.r",">"]
"data": [ ],[
[ "text", " " ], "start"
[ "meta.tag", "<" ], ],[
[ "meta.tag.tag-name", "head" ], "css-start",
[ "meta.tag.r", ">" ] ["text"," "],
] ["meta.tag","<"],
}, ["meta.tag.tag-name.style","style"],
{ ["text"," "],
"state": "start", ["entity.other.attribute-name","type"],
"data": [] ["keyword.operator","="],
}, ["string","\"text/css\""],
{ ["meta.tag.r",">"]
"state": "css-start", ],[
"data": [ "css-ruleset",
[ "text", " " ], ["text"," "],
[ "meta.tag", "<" ], ["variable",".text-layer"],
[ "meta.tag.tag-name.style", "style" ], ["text"," "],
[ "text", " " ], ["paren.lparen","{"]
[ "entity.other.attribute-name", "type" ], ],[
[ "keyword.operator", "=" ], "css-ruleset",
[ "string", "\"text/css\"" ], ["text"," "],
[ "meta.tag.r", ">" ] ["support.type","font-family"],
] ["text",": Monaco, "],
}, ["string","\"Courier New\""],
{ ["text",", "],
"state": "css-ruleset", ["support.constant.fonts","monospace"],
"data": [ ["text",";"]
[ "text", " " ], ],[
[ "variable", ".text-layer" ], "css-ruleset",
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ] ["support.type","font-size"],
] ["text",": "],
}, ["constant.numeric","12"],
{ ["keyword","px"],
"state": "css-ruleset", ["text",";"]
"data": [ ],[
[ "text", " " ], "css-ruleset",
[ "support.type", "font-family" ], ["text"," "],
[ "text", ": Monaco, " ], ["support.type","cursor"],
[ "string", "\"Courier New\"" ], ["text",": "],
[ "text", ", " ], ["support.constant","text"],
[ "support.constant.fonts", "monospace" ], ["text",";"]
[ "text", ";" ] ],[
] "css-start",
}, ["text"," "],
{ ["paren.rparen","}"]
"state": "css-ruleset", ],[
"data": [ "start",
[ "text", " " ], ["text"," "],
[ "support.type", "font-size" ], ["meta.tag","</"],
[ "text", ": " ], ["meta.tag.tag-name.style","style"],
[ "constant.numeric", "12" ], ["meta.tag.r",">"]
[ "keyword", "px" ], ],[
[ "text", ";" ] "start"
] ],[
}, "start",
{ ["text"," "],
"state": "css-ruleset", ["meta.tag","</"],
"data": [ ["meta.tag.tag-name","head"],
[ "text", " " ], ["meta.tag.r",">"]
[ "support.type", "cursor" ], ],[
[ "text", ": " ], "start",
[ "support.constant", "text" ], ["text"," "],
[ "text", ";" ] ["meta.tag","<"],
] ["meta.tag.tag-name","body"],
}, ["meta.tag.r",">"]
{ ],[
"state": "css-start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["meta.tag","<"],
[ "paren.rparen", "}" ] ["meta.tag.tag-name","h1"],
] ["text"," "],
}, ["entity.other.attribute-name","style"],
{ ["keyword.operator","="],
"state": "start", ["string","\"color:red\""],
"data": [ ["meta.tag.r",">"],
[ "text", " " ], ["text","Juhu Kinners"],
[ "meta.tag", "</" ], ["meta.tag","</"],
[ "meta.tag.tag-name.style", "style" ], ["meta.tag.tag-name","h1"],
[ "meta.tag.r", ">" ] ["meta.tag.r",">"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["meta.tag","</"],
"data": [] ["meta.tag.tag-name","body"],
}, ["meta.tag.r",">"]
{ ],[
"state": "start", "start",
"data": [ ["meta.tag","</"],
[ "text", " " ], ["meta.tag.tag-name","html"],
[ "meta.tag", "</" ], ["meta.tag.r",">"]
[ "meta.tag.tag-name", "head" ], ]]
[ "meta.tag.r", ">" ]
]
},
{
"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", "</" ],
[ "meta.tag.tag-name", "h1" ],
[ "meta.tag.r", ">" ]
]
},
{
"state": "start",
"data": [
[ "text", " " ],
[ "meta.tag", "</" ],
[ "meta.tag.tag-name", "body" ],
[ "meta.tag.r", ">" ]
]
},
{
"state": "start",
"data": [
[ "meta.tag", "</" ],
[ "meta.tag.tag-name", "html" ],
[ "meta.tag.r", ">" ]
]
}
]

View file

@ -1,309 +1,187 @@
[ [[
{ "start",
"state": "start", ["keyword.other.doctype.jade","!!!doctype"]
"data": [ ],[
[ "keyword.other.doctype.jade", "!!!doctype" ] "start",
] ["keyword.other.doctype.jade","!!!5"]
}, ],[
{ "start",
"state": "start", ["keyword.other.doctype.jade","!!!"]
"data": [ ],[
[ "keyword.other.doctype.jade", "!!!5" ] "start"
] ],[
}, "start",
{ ["keyword.control.import.include.jade","include"],
"state": "start", ["text"," something"]
"data": [ ],[
[ "keyword.other.doctype.jade", "!!!" ] "start"
] ],[
}, "start",
{ ["keyword.control.import.include.jade"," include"],
"state": "start", ["text"," another_thing"]
"data": [] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["punctuation.section.comment"," // let's talk about it"]
[ "keyword.control.import.include.jade", "include" ], ],[
[ "text", " something" ] "start"
] ],[
}, "comment_block",
{ ["punctuation.section.comment","//"]
"state": "start", ],[
"data": [] "comment_block",
}, ["comment.block.jade"," here it is. a block comment!"]
{ ],[
"state": "start", "comment_block",
"data": [ ["comment.block.jade"," and another row!"]
[ "keyword.control.import.include.jade", " include" ], ],[
[ "text", " another_thing" ] "start",
] ["text","but not here."]
}, ],[
{ "start"
"state": "start", ],[
"data": [] "comment_block",
}, ["punctuation.section.comment"," // "]
{ ],[
"state": "start", "comment_block",
"data": [ ["comment.block.jade"," a far spaced"]
[ "punctuation.section.comment", " // let's talk about it" ] ],[
] "comment_block",
}, ["comment.block.jade"," should be lack of block"]
{ ],[
"state": "start", "start"
"data": [] ],[
}, "start",
{ ["punctuation.section.comment"," // also not a comment"]
"state": "comment_block", ],[
"data": [ "start",
[ "punctuation.section.comment", "//" ] ["meta.tag.any.jade"," div"],
] ["entity.other.attribute-name.class.jade",".attemptAtBlock"]
}, ],[
{ "start",
"state": "comment_block", ["text"," "]
"data": [ ],[
[ "comment.block.jade", " here it is. a block comment!" ] "start",
] ["meta.tag.any.jade"," span"],
}, ["entity.other.attribute-name.id.jade","#myName"]
{ ],[
"state": "comment_block", "start"
"data": [ ],[
[ "comment.block.jade", " and another row!" ] "start",
] ["text"," "],
}, ["string.interpolated.jade","#{implicit}"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", "but not here." ] ["string.interpolated.jade","!{more_explicit}"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [] ["text"," "],
}, ["suport.type.attribute.id.jade","#idDiv"]
{ ],[
"state": "comment_block", "start"
"data": [ ],[
[ "punctuation.section.comment", " // " ] "start",
] ["text"," "],
}, ["suport.type.attribute.class.jade",".idDiv"]
{ ],[
"state": "comment_block", "start"
"data": [ ],[
[ "comment.block.jade", " a far spaced" ] "start",
] ["meta.tag.any.jade"," test"],
}, ["punctuation","("],
{ ["entity.other.attribute-name.jade","id"],
"state": "comment_block", ["text","="],
"data": [ ["string","\"tag\""],
[ "comment.block.jade", " should be lack of block" ] ["punctuation",")"]
] ],[
}, "start",
{ ["meta.tag.any.jade"," header"],
"state": "start", ["punctuation","("],
"data": [] ["entity.other.attribute-name.jade","id"],
}, ["text","="],
{ ["string","\"tag\""],
"state": "start", ["text",", "],
"data": [ ["entity.other.attribute-name.jade","blah"],
[ "punctuation.section.comment", " // also not a comment" ] ["text","="],
] ["string","\"foo\""],
}, ["text",", "],
{ ["entity.other.attribute-name.jade","meh"],
"state": "start", ["text","="],
"data": [ ["string","\"aads\""],
[ "meta.tag.any.jade", " div" ], ["punctuation",")"]
[ "entity.other.attribute-name.class.jade", ".attemptAtBlock" ] ],[
] "start",
}, ["storage.type.function.jade","mixin"],
{ ["entity.name.function.jade"," article"],
"state": "start", ["punctuation.definition.parameters.begin.jade","("],
"data": [ ["variable.parameter.function.jade","obj, parents"],
[ "text", " " ] ["punctuation.definition.parameters.end.jade",")"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["storage.type.function.jade"," mixin"],
[ "meta.tag.any.jade", " span" ], ["entity.name.function.jade"," bleh"],
[ "entity.other.attribute-name.id.jade", "#myName" ] ["punctuation.definition.parameters.begin.jade","("],
] ["punctuation.definition.parameters.end.jade",")"]
}, ],[
{ "start"
"state": "start", ],[
"data": [] "start",
}, ["storage.type.function.jade"," mixin"],
{ ["entity.name.function.jade"," clever-name"]
"state": "start", ],[
"data": [ "start"
[ "text", " " ], ],[
[ "string.interpolated.jade", "#{implicit}" ] "start",
] ["source.js.embedded.jade"," -"],
}, ["storage.type","var"],
{ ["text"," "],
"state": "start", ["identifier","x"],
"data": [ ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "string.interpolated.jade", "!{more_explicit}" ] ["text"," "],
] ["string","\"0\""],
}, ["text",";"]
{ ],[
"state": "start", "start",
"data": [] ["source.js.embedded.jade"," -"],
}, ["text"," "],
{ ["identifier","y"],
"state": "start", ["text"," "],
"data": [ ["identifier","each"],
[ "text", " " ], ["text"," z"]
[ "suport.type.attribute.id.jade", "#idDiv" ] ],[
] "start"
}, ],[
{ "start",
"state": "start", ["source.js.embedded.jade"," -"],
"data": [] ["text"," "],
}, ["storage.type","var"],
{ ["text"," "],
"state": "start", ["identifier","items"],
"data": [ ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "suport.type.attribute.class.jade", ".idDiv" ] ["text"," "],
] ["paren.lparen","["],
}, ["string","\"one\""],
{ ["punctuation.operator",","],
"state": "start", ["text"," "],
"data": [] ["string","\"two\""],
}, ["punctuation.operator",","],
{ ["text"," "],
"state": "start", ["string","\"three\""],
"data": [ ["text","]"]
[ "meta.tag.any.jade", " test" ], ],[
[ "punctuation", "(" ], "start",
[ "entity.other.attribute-name.jade", "id" ], ["meta.tag.any.jade"," each"],
[ "text", "=" ], ["text"," item in items"]
[ "string", "\"tag\"" ], ],[
[ "punctuation", ")" ] "start",
] ["meta.tag.any.jade"," li"],
}, ["text","= item"]
{ ]]
"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" ]
]
}
]

View file

@ -1,139 +1,95 @@
[ [[
{ "start",
"state": "start", ["keyword","public"],
"data": [ ["text"," "],
[ "keyword", "public" ], ["keyword","class"],
[ "text", " " ], ["text"," "],
[ "keyword", "class" ], ["identifier","InfiniteLoop"],
[ "text", " " ], ["text"," "],
[ "identifier", "InfiniteLoop" ], ["lparen","{"]
[ "text", " " ], ],[
[ "lparen", "{" ] "start"
] ],[
}, "comment",
{ ["text"," "],
"state": "start", ["comment","/*"]
"data": [] ],[
}, "comment",
{ ["comment"," * This will cause the program to hang..."]
"state": "comment", ],[
"data": [ "comment",
[ "text", " " ], ["comment"," *"]
[ "comment", "/*" ] ],[
] "comment",
}, ["comment"," * Taken from:"]
{ ],[
"state": "comment", "comment",
"data": [ ["comment"," * http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/"]
[ "comment", " * This will cause the program to hang..." ] ],[
] "start",
}, ["comment"," */"]
{ ],[
"state": "comment", "start",
"data": [ ["text"," "],
[ "comment", " *" ] ["keyword","public"],
] ["text"," "],
}, ["keyword","static"],
{ ["text"," "],
"state": "comment", ["keyword","void"],
"data": [ ["text"," "],
[ "comment", " * Taken from:" ] ["identifier","main"],
] ["lparen","("],
}, ["support.function","String"],
{ ["lparen","["],
"state": "comment", ["rparen","]"],
"data": [ ["text"," "],
[ "comment", " * http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/" ] ["identifier","args"],
] ["rparen",")"],
}, ["text"," "],
{ ["lparen","{"]
"state": "start", ],[
"data": [ "start",
[ "comment", " */" ] ["text"," "],
] ["keyword","double"],
}, ["text"," "],
{ ["identifier","d"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator","="],
[ "text", " " ], ["text"," "],
[ "keyword", "public" ], ["support.function","Double"],
[ "text", " " ], ["text","."],
[ "keyword", "static" ], ["identifier","parseDouble"],
[ "text", " " ], ["lparen","("],
[ "keyword", "void" ], ["string","\"2.2250738585072012e-308\""],
[ "text", " " ], ["rparen",")"],
[ "identifier", "main" ], ["text",";"]
[ "lparen", "(" ], ],[
[ "support.function", "String" ], "start"
[ "lparen", "[" ], ],[
[ "rparen", "]" ], "start",
[ "text", " " ], ["text"," "],
[ "identifier", "args" ], ["comment","// unreachable code"]
[ "rparen", ")" ], ],[
[ "text", " " ], "start",
[ "lparen", "{" ] ["text"," "],
] ["support.function","System"],
}, ["text","."],
{ ["identifier","out"],
"state": "start", ["text","."],
"data": [ ["identifier","println"],
[ "text", " " ], ["lparen","("],
[ "keyword", "double" ], ["string","\"Value: \""],
[ "text", " " ], ["text"," "],
[ "identifier", "d" ], ["keyword.operator","+"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "=" ], ["identifier","d"],
[ "text", " " ], ["rparen",")"],
[ "support.function", "Double" ], ["text",";"]
[ "text", "." ], ],[
[ "identifier", "parseDouble" ], "start",
[ "lparen", "(" ], ["text"," "],
[ "string", "\"2.2250738585072012e-308\"" ], ["rparen","}"]
[ "rparen", ")" ], ],[
[ "text", ";" ] "start",
] ["rparen","}"]
}, ]]
{
"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", "}" ]
]
}
]

View file

@ -1,545 +1,397 @@
[ [[
{ "regex_allowed",
"state": "regex_allowed", ["storage.type","function"],
"data": [ ["text"," "],
[ "storage.type", "function" ], ["entity.name.function","foo"],
[ "text", " " ], ["paren.lparen","("],
[ "entity.name.function", "foo" ], ["variable.parameter","items"],
[ "paren.lparen", "(" ], ["punctuation.operator",", "],
[ "variable.parameter", "items" ], ["variable.parameter","nada"],
[ "punctuation.operator", ", " ], ["paren.rparen",")"],
[ "variable.parameter", "nada" ], ["text"," "],
[ "paren.rparen", ")" ], ["paren.lparen","{"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ] "regex_allowed",
] ["text"," "],
}, ["keyword","for"],
{ ["text"," "],
"state": "regex_allowed", ["paren.lparen","("],
"data": [ ["storage.type","var"],
[ "text", " " ], ["text"," "],
[ "keyword", "for" ], ["identifier","i"],
[ "text", " " ], ["keyword.operator","="],
[ "paren.lparen", "(" ], ["constant.numeric","0"],
[ "storage.type", "var" ], ["punctuation.operator",";"],
[ "text", " " ], ["text"," "],
[ "identifier", "i" ], ["identifier","i"],
[ "keyword.operator", "=" ], ["keyword.operator","<"],
[ "constant.numeric", "0" ], ["identifier","items"],
[ "punctuation.operator", ";" ], ["punctuation.operator","."],
[ "text", " " ], ["support.constant","length"],
[ "identifier", "i" ], ["punctuation.operator",";"],
[ "keyword.operator", "<" ], ["text"," "],
[ "identifier", "items" ], ["identifier","i"],
[ "punctuation.operator", "." ], ["keyword.operator","++"],
[ "support.constant", "length" ], ["paren.rparen",")"],
[ "punctuation.operator", ";" ], ["text"," "],
[ "text", " " ], ["paren.lparen","{"]
[ "identifier", "i" ], ],[
[ "keyword.operator", "++" ], "regex_allowed",
[ "paren.rparen", ")" ], ["text"," "],
[ "text", " " ], ["support.function","alert"],
[ "paren.lparen", "{" ] ["paren.lparen","("],
] ["identifier","items"],
}, ["paren.lparen","["],
{ ["identifier","i"],
"state": "regex_allowed", ["paren.rparen","]"],
"data": [ ["text"," "],
[ "text", " " ], ["keyword.operator","+"],
[ "support.function", "alert" ], ["text"," "],
[ "paren.lparen", "(" ], ["string","\"juhu"],
[ "identifier", "items" ], ["constant.language.escape","\\n"],
[ "paren.lparen", "[" ], ["string","\""],
[ "identifier", "i" ], ["paren.rparen",")"],
[ "paren.rparen", "]" ], ["punctuation.operator",";"]
[ "text", " " ], ],[
[ "keyword.operator", "+" ], "start",
[ "text", " " ], ["text"," "],
[ "string", "\"juhu" ], ["paren.rparen","}"],
[ "constant.language.escape", "\\n" ], ["text","\t"],
[ "string", "\"" ], ["comment","// Real Tab."]
[ "paren.rparen", ")" ], ],[
[ "punctuation.operator", ";" ] "start",
] ["paren.rparen","}"]
}, ],[
{ "start"
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["identifier","regexp"],
[ "paren.rparen", "}" ], ["text"," "],
[ "text", "\t" ], ["keyword.operator","="],
[ "comment", "// Real Tab." ] ["text"," "],
] ["string.regexp","/p"],
}, ["constant.language.escape","|"],
{ ["string.regexp","p/"],
"state": "start", ["text"," "],
"data": [ ["comment","// ends here"]
[ "paren.rparen", "}" ] ],[
] "start"
}, ],[
{ "start",
"state": "start", ["identifier","r"],
"data": [] ["text"," "],
}, ["keyword.operator","="],
{ ["text"," "],
"state": "start", ["string.regexp","/d"],
"data": [ ["constant.language.escape","{1,2}?"],
[ "identifier", "regexp" ], ["string.regexp","f{e}"],
[ "text", " " ], ["invalid","++"],
[ "keyword.operator", "=" ], ["string.regexp","r"],
[ "text", " " ], ["constant.language.escape","*?"],
[ "string.regexp", "/p" ], ["regexp.keyword.operator","\\d"],
[ "constant.language.escape", "|" ], ["constant.language.escape","+?[]"],
[ "string.regexp", "p/" ], ["string.regexp","r"],
[ "text", " " ], ["constant.language.escape","[^"],
[ "comment", "// ends here" ] ["string.regexp.charachterclass","r"],
] ["constant.language.escape","-"],
}, ["string.regexp.charachterclass","o"],
{ ["regexp.keyword.operator","\\f\\f"],
"state": "start", ["string.regexp.charachterclass","["],
"data": [] ["regexp.keyword.operator","\\f"],
}, ["constant.language.escape","]?"],
{ ["string.regexp","r"],
"state": "start", ["invalid","{7}+"],
"data": [ ["string.regexp","r"],
[ "identifier", "r" ], ["regexp.keyword.operator","\\{"],
[ "text", " " ], ["string.regexp","7}"],
[ "keyword.operator", "=" ], ["constant.language.escape","+"],
[ "text", " " ], ["string.regexp","rr--rr"],
[ "string.regexp", "/d" ], ["constant.language.escape","$^(?:"],
[ "constant.language.escape", "{1,2}?" ], ["string.regexp","d"],
[ "string.regexp", "f{e}" ], ["constant.language.escape","|"],
[ "invalid", "++" ], ["string.regexp","s"],
[ "string.regexp", "r" ], ["constant.language.escape",")(?="],
[ "constant.language.escape", "*?" ], ["string.regexp","a"],
[ "regexp.keyword.operator", "\\d" ], ["constant.language.escape","|)(?!"],
[ "constant.language.escape", "+?[]" ], ["string.regexp","y"],
[ "string.regexp", "r" ], ["constant.language.escape",")[]|"],
[ "constant.language.escape", "[^" ], ["invalid","$?"],
[ "string.regexp.charachterclass", "r" ], ["constant.language.escape","|"],
[ "constant.language.escape", "-" ], ["invalid","^*"],
[ "string.regexp.charachterclass", "o" ], ["string.regexp","/"],
[ "regexp.keyword.operator", "\\f\\f" ], ["text"," "],
[ "string.regexp.charachterclass", "[" ], ["identifier","o"]
[ "regexp.keyword.operator", "\\f" ], ],[
[ "constant.language.escape", "]?" ], "start",
[ "string.regexp", "r" ], ["identifier","a"],
[ "invalid", "{7}+" ], ["keyword.operator","="],
[ "string.regexp", "r" ], ["string.regexp","/a/"],
[ "regexp.keyword.operator", "\\{" ], ["text"," "],
[ "string.regexp", "7}" ], ["identifier","jk"],
[ "constant.language.escape", "+" ], ["text"," "],
[ "string.regexp", "rr--rr" ], ["keyword.operator","="],
[ "constant.language.escape", "$^(?:" ], ["text"," "],
[ "string.regexp", "d" ], ["string.regexp","/ /"],
[ "constant.language.escape", "|" ], ["text"," "],
[ "string.regexp", "s" ], ["keyword.operator","/"],
[ "constant.language.escape", ")(?=" ], ["text"," "],
[ "string.regexp", "a" ], ["string.regexp","/ /"]
[ "constant.language.escape", "|)(?!" ], ],[
[ "string.regexp", "y" ], "start",
[ "constant.language.escape", ")[]|" ], ["text"," "],
[ "invalid", "$?" ], ["comment.doc","/************************************/"]
[ "constant.language.escape", "|" ], ],[
[ "invalid", "^*" ], "start",
[ "string.regexp", "/" ], ["comment.doc","/** total mess, tricky to highlight**/"]
[ "text", " " ], ],[
[ "identifier", "o" ] "start"
] ],[
}, "regex_allowed",
{ ["storage.type","function"],
"state": "start", ["text"," "],
"data": [ ["paren.lparen","("],
[ "identifier", "a" ], ["paren.rparen",")"],
[ "keyword.operator", "=" ], ["text"," "],
[ "string.regexp", "/a/" ], ["paren.lparen","{"]
[ "text", " " ], ],[
[ "identifier", "jk" ], "doc-start",
[ "text", " " ], ["text","\t"],
[ "keyword.operator", "=" ], ["comment.doc","/**"]
[ "text", " " ], ],[
[ "string.regexp", "/ /" ], "doc-start",
[ "text", " " ], ["comment.doc","\t * docComment"]
[ "keyword.operator", "/" ], ],[
[ "text", " " ], "start",
[ "string.regexp", "/ /" ] ["comment.doc","\t **/"]
] ],[
}, "start",
{ ["text","\t"],
"state": "start", ["identifier","r"],
"data": [ ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "comment.doc", "/************************************/" ] ["text"," "],
] ["string.regexp","/u"],
}, ["regexp.keyword.operator","\\t"],
{ ["constant.language.escape","*"],
"state": "start", ["string.regexp","/"]
"data": [ ],[
[ "comment.doc", "/** total mess, tricky to highlight**/" ] "start",
] ["text","\t"],
}, ["identifier","g"],
{ ["text"," "],
"state": "start", ["keyword.operator","="],
"data": [] ["text"," "],
}, ["constant.numeric","1."],
{ ["text","00"],
"state": "regex_allowed", ["identifier","E"],
"data": [ ["text","^"],
[ "storage.type", "function" ], ["constant.numeric","1"],
[ "text", " " ], ["punctuation.operator",","],
[ "paren.lparen", "(" ], ["text"," "],
[ "paren.rparen", ")" ], ["identifier","y"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ] ["keyword.operator","="],
] ["text"," "],
}, ["constant.numeric","1.2"],
{ ["text"," "],
"state": "doc-start", ["keyword.operator","+"],
"data": [ ["text"," "],
[ "text", "\t" ], ["punctuation.operator","."],
[ "comment.doc", "/**" ] ["constant.numeric","2"],
] ["text"," "],
}, ["keyword.operator","+"],
{ ["text"," "],
"state": "doc-start", ["constant.numeric","052"],
"data": [ ["text"," "],
[ "comment.doc", "\t * docComment" ] ["keyword.operator","+"],
] ["text"," "],
}, ["constant.numeric","0x25"]
{ ],[
"state": "start", "start",
"data": [ ["text","\t"],
[ "comment.doc", "\t **/" ] ["identifier","t"],
] ["text"," "],
}, ["keyword.operator","="],
{ ["text"," "],
"state": "start", ["paren.lparen","["],
"data": [ ["string","'d'"],
[ "text", "\t" ], ["punctuation.operator",","],
[ "identifier", "r" ], ["text"," "],
[ "text", " " ], ["string","''"],
[ "keyword.operator", "=" ], ["paren.rparen","]"]
[ "text", " " ], ],[
[ "string.regexp", "/u" ], "start",
[ "regexp.keyword.operator", "\\t" ], ["paren.rparen","}"]
[ "constant.language.escape", "*" ], ],[
[ "string.regexp", "/" ] "regex_allowed",
] ["storage.type","function"],
}, ["text"," "],
{ ["paren.lparen","("],
"state": "start", ["paren.rparen",")"],
"data": [ ["text"," "],
[ "text", "\t" ], ["paren.lparen","{"]
[ "identifier", "g" ], ],[
[ "text", " " ], "regex_allowed",
[ "keyword.operator", "=" ], ["text","\t"],
[ "text", " " ], ["comment","/* eee */"]
[ "constant.numeric", "1." ], ],[
[ "text", "00" ], "start",
[ "identifier", "E" ], ["paren.rparen","}"]
[ "text", "^" ], ],[
[ "constant.numeric", "1" ], "start"
[ "punctuation.operator", "," ], ],[
[ "text", " " ], "qqstring",
[ "identifier", "y" ], ["string","\"s\\"]
[ "text", " " ], ],[
[ "keyword.operator", "=" ], "start",
[ "text", " " ], ["string","s"],
[ "constant.numeric", "1.2" ], ["constant.language.escape","\\u7824"],
[ "text", " " ], ["string","sss"],
[ "keyword.operator", "+" ], ["constant.language.escape","\\u"],
[ "text", " " ], ["string","1\""]
[ "punctuation.operator", "." ], ],[
[ "constant.numeric", "2" ], "start"
[ "text", " " ], ],[
[ "keyword.operator", "+" ], "qstring",
[ "text", " " ], ["string","'\\"]
[ "constant.numeric", "052" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "+" ], ["string","string'"]
[ "text", " " ], ],[
[ "constant.numeric", "0x25" ] "start"
] ],[
}, "start",
{ ["text","'"]
"state": "start", ],[
"data": [ "start",
[ "text", "\t" ], ["identifier","string"],
[ "identifier", "t" ], ["text","'"]
[ "text", " " ], ],[
[ "keyword.operator", "=" ], "start"
[ "text", " " ], ],[
[ "paren.lparen", "[" ], "start",
[ "string", "'d'" ], ["string","\"trailing space"],
[ "punctuation.operator", "," ], ["constant.language.escape","\\ "],
[ "text", " " ], ["string"," "]
[ "string", "''" ], ],[
[ "paren.rparen", "]" ] "start",
] ["string","\" \""],
}, ["text"," "],
{ ["keyword.operator","/"],
"state": "start", ["identifier","not"],
"data": [ ["text"," "],
[ "paren.rparen", "}" ] ["identifier","a"],
] ["text"," "],
}, ["identifier","regexp"],
{ ["keyword.operator","/"],
"state": "regex_allowed", ["identifier","g"]
"data": [ ],[
[ "storage.type", "function" ], "start"
[ "text", " " ], ],[
[ "paren.lparen", "(" ], "doc-start",
[ "paren.rparen", ")" ], ["comment.doc","/**"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ] "doc-start",
] ["comment.doc"," *doc"]
}, ],[
{ "start",
"state": "regex_allowed", ["comment.doc"," */"]
"data": [ ],[
[ "text", "\t" ], "start"
[ "comment", "/* eee */" ] ],[
] "regex_allowed",
}, ["identifier","a"],
{ ["text"," "],
"state": "start", ["keyword.operator","="],
"data": [ ["text"," "],
[ "paren.rparen", "}" ] ["paren.lparen","{"]
] ],[
}, "regex_allowed",
{ ["text","\t"],
"state": "start", ["string","'a'"],
"data": [] ["punctuation.operator",":"],
}, ["text"," "],
{ ["identifier","b"],
"state": "qqstring", ["punctuation.operator",","]
"data": [ ],[
[ "string", "\"s\\" ] "start",
] ["text","\t"],
}, ["string","'g'"],
{ ["text",": "],
"state": "start", ["storage.type","function"],
"data": [ ["paren.lparen","("],
[ "string", "s" ], ["variable.parameter","t"],
[ "constant.language.escape", "\\u7824" ], ["paren.rparen",")"]
[ "string", "sss" ], ],[
[ "constant.language.escape", "\\u" ], "start",
[ "string", "1\"" ] ["text","\t"],
] ["entity.name.function","gta"],
}, ["punctuation.operator",":"],
{ ["storage.type","function"],
"state": "start", ["paren.lparen","("],
"data": [] ["variable.parameter","a"],
}, ["punctuation.operator",","],
{ ["variable.parameter","b"],
"state": "qstring", ["paren.rparen",")"]
"data": [ ],[
[ "string", "'\\" ] "start",
] ["paren.rparen","}"]
}, ],[
{ "start"
"state": "start", ],[
"data": [ "start"
[ "string", "string'" ] ],[
] "function_arguments",
}, ["identifier","foo"],
{ ["punctuation.operator","."],
"state": "start", ["storage.type","protoype"],
"data": [] ["punctuation.operator","."],
}, ["entity.name.function","d"],
{ ["text"," "],
"state": "start", ["keyword.operator","="],
"data": [ ["text"," "],
[ "text", "'" ] ["storage.type","function"],
] ["paren.lparen","("],
}, ["variable.parameter","a"],
{ ["punctuation.operator",", "],
"state": "start", ["variable.parameter","b"],
"data": [ ["punctuation.operator",","]
[ "identifier", "string" ], ],[
[ "text", "'" ] "start",
] ["punctuation.operator"," "],
}, ["variable.parameter","c"],
{ ["punctuation.operator",", "],
"state": "start", ["variable.parameter","d"],
"data": [] ["paren.rparen",")"]
}, ],[
{ "start",
"state": "start", ["storage.type","foo"],
"data": [ ["punctuation.operator","."],
[ "string", "\"trailing space" ], ["entity.name.function","d"],
[ "constant.language.escape", "\\ " ], ["text"," "],
[ "string", " " ] ["keyword.operator","="],
] ["storage.type","function"],
}, ["paren.lparen","("],
{ ["variable.parameter","a"],
"state": "start", ["punctuation.operator",", "],
"data": [ ["variable.parameter","b"],
[ "string", "\" \"" ], ["paren.rparen",")"]
[ "text", " " ], ],[
[ "keyword.operator", "/" ], "start",
[ "identifier", "not" ], ["storage.type","foo"],
[ "text", " " ], ["punctuation.operator","."],
[ "identifier", "a" ], ["entity.name.function","d"],
[ "text", " " ], ["text"," "],
[ "identifier", "regexp" ], ["keyword.operator","="],
[ "keyword.operator", "/" ], ["storage.type","function"],
[ "identifier", "g" ] ["paren.lparen","("],
] ["variable.parameter","a"],
}, ["punctuation.operator",", "],
{ ["comment.doc","/*****/"],
"state": "start", ["text"," "],
"data": [] ["identifier","d"],
}, ["string","\"string\""],
{ ["text"," "]
"state": "doc-start", ],[
"data": [ "start"
[ "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": []
}
]

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,79 +1,51 @@
[ [[
{ "comment",
"state": "comment", ["comment","/*EXPECTED"]
"data": [ ],[
[ "comment", "/*EXPECTED" ] "comment",
] ["comment","hello world!"]
}, ],[
{ "start",
"state": "comment", ["comment","*/"]
"data": [ ],[
[ "comment", "hello world!" ] "start",
] ["keyword","class"],
}, ["text"," "],
{ ["language.support.class","Test"],
"state": "start", ["text"," "],
"data": [ ["paren.lparen","{"]
[ "comment", "*/" ] ],[
] "start",
}, ["text"," "],
{ ["keyword","static"],
"state": "start", ["text"," "],
"data": [ ["storage.type","function"],
[ "keyword", "class" ], ["text"," "],
[ "text", " " ], ["entity.name.function","run"],
[ "language.support.class", "Test" ], ["paren.lparen","("],
[ "text", " " ], ["paren.rparen",")"],
[ "paren.lparen", "{" ] ["text"," "],
] ["punctuation.operator",":"],
}, ["text"," "],
{ ["keyword","void"],
"state": "start", ["text"," "],
"data": [ ["paren.lparen","{"]
[ "text", " " ], ],[
[ "keyword", "static" ], "start",
[ "text", " " ], ["text"," "],
[ "storage.type", "function" ], ["comment","// console.log(\"hello world!\");"]
[ "text", " " ], ],[
[ "entity.name.function", "run" ], "start",
[ "paren.lparen", "(" ], ["text"," "],
[ "paren.rparen", ")" ], ["keyword","log"],
[ "text", " " ], ["text"," "],
[ "punctuation.operator", ":" ], ["string","\"hello world!\""],
[ "text", " " ], ["punctuation.operator",";"]
[ "keyword", "void" ], ],[
[ "text", " " ], "start",
[ "paren.lparen", "{" ] ["text"," "],
] ["paren.rparen","}"]
}, ],[
{ "start",
"state": "start", ["paren.rparen","}"]
"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", "}" ]
]
}
]

View file

@ -1,194 +1,127 @@
[ [[
{ "start",
"state": "start", ["keyword","\\usepackage"],
"data": [ ["lparen","{"],
[ "keyword", "\\usepackage" ], ["text","amsmath"],
[ "lparen", "{" ], ["rparen","}"]
[ "text", "amsmath" ], ],[
[ "rparen", "}" ] "start",
] ["keyword","\\title"],
}, ["lparen","{"],
{ ["keyword","\\LaTeX"],
"state": "start", ["rparen","}"]
"data": [ ],[
[ "keyword", "\\title" ], "start",
[ "lparen", "{" ], ["keyword","\\date"],
[ "keyword", "\\LaTeX" ], ["lparen","{"],
[ "rparen", "}" ] ["rparen","}"]
] ],[
}, "start",
{ ["keyword","\\begin"],
"state": "start", ["lparen","{"],
"data": [ ["text","document"],
[ "keyword", "\\date" ], ["rparen","}"]
[ "lparen", "{" ], ],[
[ "rparen", "}" ] "start",
] ["text"," "],
}, ["keyword","\\maketitle"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "keyword", "\\begin" ], ["keyword","\\LaTeX"],
[ "lparen", "{" ], ["lparen","{"],
[ "text", "document" ], ["rparen","}"],
[ "rparen", "}" ] ["text"," is a document preparation system for the "],
] ["keyword","\\TeX"],
}, ["lparen","{"],
{ ["rparen","}"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["text"," typesetting program. It offers programmable desktop publishing"]
[ "keyword", "\\maketitle" ] ],[
] "start",
}, ["text"," features and extensive facilities for automating most aspects of"]
{ ],[
"state": "start", "start",
"data": [ ["text"," typesetting and desktop publishing, including numbering and"]
[ "text", " " ], ],[
[ "keyword", "\\LaTeX" ], "start",
[ "lparen", "{" ], ["text"," cross-referencing, tables and figures, page layout, bibliographies,"]
[ "rparen", "}" ], ],[
[ "text", " is a document preparation system for the " ], "start",
[ "keyword", "\\TeX" ], ["text"," and much more. "],
[ "lparen", "{" ], ["keyword","\\LaTeX"],
[ "rparen", "}" ] ["lparen","{"],
] ["rparen","}"],
}, ["text"," was originally written in 1984 by Leslie"]
{ ],[
"state": "start", "start",
"data": [ ["text"," Lamport and has become the dominant method for using "],
[ "text", " typesetting program. It offers programmable desktop publishing" ] ["keyword","\\TeX"],
] ["text","; few"]
}, ],[
{ "start",
"state": "start", ["text"," people write in plain "],
"data": [ ["keyword","\\TeX"],
[ "text", " features and extensive facilities for automating most aspects of" ] ["lparen","{"],
] ["rparen","}"],
}, ["text"," anymore. The current version is"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " typesetting and desktop publishing, including numbering and" ] ["keyword","\\LaTeXe"],
] ["text","."]
}, ],[
{ "start",
"state": "start", ["text"," "]
"data": [ ],[
[ "text", " cross-referencing, tables and figures, page layout, bibliographies," ] "start",
] ["text"," "],
}, ["comment","% This is a comment; it will not be shown in the final output."]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " and much more. " ], ["comment","% The following shows a little of the typesetting power of LaTeX:"]
[ "keyword", "\\LaTeX" ], ],[
[ "lparen", "{" ], "start",
[ "rparen", "}" ], ["text"," "],
[ "text", " was originally written in 1984 by Leslie" ] ["keyword","\\begin"],
] ["lparen","{"],
}, ["text","align"],
{ ["rparen","}"]
"state": "start", ],[
"data": [ "start",
[ "text", " Lamport and has become the dominant method for using " ], ["text"," E &= mc^2 "],
[ "keyword", "\\TeX" ], ["keyword","\\\\"]
[ "text", "; few" ] ],[
] "start",
}, ["text"," m &= "],
{ ["keyword","\\frac"],
"state": "start", ["lparen","{"],
"data": [ ["text","m_0"],
[ "text", " people write in plain " ], ["rparen","}"],
[ "keyword", "\\TeX" ], ["lparen","{"],
[ "lparen", "{" ], ["keyword","\\sqrt"],
[ "rparen", "}" ], ["lparen","{"],
[ "text", " anymore. The current version is" ] ["text","1-"],
] ["keyword","\\frac"],
}, ["lparen","{"],
{ ["text","v^2"],
"state": "start", ["rparen","}"],
"data": [ ["lparen","{"],
[ "text", " " ], ["text","c^2"],
[ "keyword", "\\LaTeXe" ], ["rparen","}}}"]
[ "text", "." ] ],[
] "start",
}, ["text"," "],
{ ["keyword","\\end"],
"state": "start", ["lparen","{"],
"data": [ ["text","align"],
[ "text", " " ] ["rparen","}"]
] ],[
}, "start",
{ ["keyword","\\end"],
"state": "start", ["lparen","{"],
"data": [ ["text","document"],
[ "text", " " ], ["rparen","}"]
[ "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", "}" ]
]
}
]

View file

@ -1,288 +1,204 @@
[ [[
{ "start",
"state": "start", ["comment","/* styles.less */"]
"data": [ ],[
[ "comment", "/* styles.less */" ] "start"
] ],[
}, "start",
{ ["variable","@base"],
"state": "start", ["text",": "],
"data": [] ["constant.numeric","#f938ab"],
}, ["text",";"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "variable", "@base" ], "start",
[ "text", ": " ], ["variable.language",".box-shadow"],
[ "constant.numeric", "#f938ab" ], ["paren.lparen","("],
[ "text", ";" ] ["variable","@style"],
] ["text",", "],
}, ["variable","@c"],
{ ["paren.rparen",")"],
"state": "start", ["text"," "],
"data": [] ["keyword","when"],
}, ["text"," "],
{ ["paren.lparen","("],
"state": "start", ["support.function","iscolor"],
"data": [ ["paren.lparen","("],
[ "variable.language", ".box-shadow" ], ["variable","@c"],
[ "paren.lparen", "(" ], ["paren.rparen","))"],
[ "variable", "@style" ], ["text"," "],
[ "text", ", " ], ["paren.lparen","{"]
[ "variable", "@c" ], ],[
[ "paren.rparen", ")" ], "start",
[ "text", " " ], ["text"," box-shadow: "],
[ "keyword", "when" ], ["variable","@style"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "(" ], ["variable","@c"],
[ "support.function", "iscolor" ], ["text",";"]
[ "paren.lparen", "(" ], ],[
[ "variable", "@c" ], "start",
[ "paren.rparen", "))" ], ["text"," -webkit-box-shadow: "],
[ "text", " " ], ["variable","@style"],
[ "paren.lparen", "{" ] ["text"," "],
] ["variable","@c"],
}, ["text",";"]
{ ],[
"state": "start", "start",
"data": [ ["text"," -moz-box-shadow: "],
[ "text", " box-shadow: " ], ["variable","@style"],
[ "variable", "@style" ], ["text"," "],
[ "text", " " ], ["variable","@c"],
[ "variable", "@c" ], ["text",";"]
[ "text", ";" ] ],[
] "start",
}, ["paren.rparen","}"]
{ ],[
"state": "start", "start",
"data": [ ["variable.language",".box-shadow"],
[ "text", " -webkit-box-shadow: " ], ["paren.lparen","("],
[ "variable", "@style" ], ["variable","@style"],
[ "text", " " ], ["text",", "],
[ "variable", "@c" ], ["variable","@alpha"],
[ "text", ";" ] ["text",": "],
] ["constant.numeric","50%"],
}, ["paren.rparen",")"],
{ ["text"," "],
"state": "start", ["keyword","when"],
"data": [ ["text"," "],
[ "text", " -moz-box-shadow: " ], ["paren.lparen","("],
[ "variable", "@style" ], ["support.function","isnumber"],
[ "text", " " ], ["paren.lparen","("],
[ "variable", "@c" ], ["variable","@alpha"],
[ "text", ";" ] ["paren.rparen","))"],
] ["text"," "],
}, ["paren.lparen","{"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "paren.rparen", "}" ] ["variable.language",".box-shadow"],
] ["paren.lparen","("],
}, ["variable","@style"],
{ ["text",", "],
"state": "start", ["support.function","rgba"],
"data": [ ["paren.lparen","("],
[ "variable.language", ".box-shadow" ], ["constant.numeric","0"],
[ "paren.lparen", "(" ], ["text",", "],
[ "variable", "@style" ], ["constant.numeric","0"],
[ "text", ", " ], ["text",", "],
[ "variable", "@alpha" ], ["constant.numeric","0"],
[ "text", ": " ], ["text",", "],
[ "constant.numeric", "50%" ], ["variable","@alpha"],
[ "paren.rparen", ")" ], ["paren.rparen","))"],
[ "text", " " ], ["text",";"]
[ "keyword", "when" ], ],[
[ "text", " " ], "start",
[ "paren.lparen", "(" ], ["paren.rparen","}"]
[ "support.function", "isnumber" ], ],[
[ "paren.lparen", "(" ], "start"
[ "variable", "@alpha" ], ],[
[ "paren.rparen", "))" ], "start",
[ "text", " " ], ["comment","// Box styles"]
[ "paren.lparen", "{" ] ],[
] "start",
}, ["variable.language",".box"],
{ ["text"," "],
"state": "start", ["paren.lparen","{"],
"data": [ ["text"," "]
[ "text", " " ], ],[
[ "variable.language", ".box-shadow" ], "start",
[ "paren.lparen", "(" ], ["text"," "],
[ "variable", "@style" ], ["support.type","color"],
[ "text", ", " ], ["text",": "],
[ "support.function", "rgba" ], ["support.function","saturate"],
[ "paren.lparen", "(" ], ["paren.lparen","("],
[ "constant.numeric", "0" ], ["variable","@base"],
[ "text", ", " ], ["text",", "],
[ "constant.numeric", "0" ], ["constant.numeric","5%"],
[ "text", ", " ], ["paren.rparen",")"],
[ "constant.numeric", "0" ], ["text",";"]
[ "text", ", " ], ],[
[ "variable", "@alpha" ], "start",
[ "paren.rparen", "))" ], ["text"," "],
[ "text", ";" ] ["support.type","border-color"],
] ["text",": "],
}, ["support.function","lighten"],
{ ["paren.lparen","("],
"state": "start", ["variable","@base"],
"data": [ ["text",", "],
[ "paren.rparen", "}" ] ["constant.numeric","30%"],
] ["paren.rparen",")"],
}, ["text",";"]
{ ],[
"state": "start", "start",
"data": [] ["text"," "]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["variable.language","div"],
[ "comment", "// Box styles" ] ["text"," "],
] ["paren.lparen","{"],
}, ["text"," "],
{ ["variable.language",".box-shadow"],
"state": "start", ["paren.lparen","("],
"data": [ ["constant.numeric","0"],
[ "variable.language", ".box" ], ["text"," "],
[ "text", " " ], ["constant.numeric","0"],
[ "paren.lparen", "{" ], ["text"," "],
[ "text", " " ] ["constant.numeric","5px"],
] ["text",", "],
}, ["constant.numeric","30%"],
{ ["paren.rparen",")"],
"state": "start", ["text"," "],
"data": [ ["paren.rparen","}"]
[ "text", " " ], ],[
[ "support.type", "color" ], "start",
[ "text", ": " ], ["text"," "]
[ "support.function", "saturate" ], ],[
[ "paren.lparen", "(" ], "start",
[ "variable", "@base" ], ["text"," "],
[ "text", ", " ], ["variable.language","a"],
[ "constant.numeric", "5%" ], ["text"," "],
[ "paren.rparen", ")" ], ["paren.lparen","{"]
[ "text", ";" ] ],[
] "start",
}, ["text"," "],
{ ["support.type","color"],
"state": "start", ["text",": "],
"data": [ ["variable","@base"],
[ "text", " " ], ["text",";"]
[ "support.type", "border-color" ], ],[
[ "text", ": " ], "start",
[ "support.function", "lighten" ], ["text"," "]
[ "paren.lparen", "(" ], ],[
[ "variable", "@base" ], "start",
[ "text", ", " ], ["text"," &"],
[ "constant.numeric", "30%" ], ["variable.language",":hover"],
[ "paren.rparen", ")" ], ["text"," "],
[ "text", ";" ] ["paren.lparen","{"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["support.type","color"],
"data": [ ["text",": "],
[ "text", " " ] ["support.function","lighten"],
] ["paren.lparen","("],
}, ["variable","@base"],
{ ["text",", "],
"state": "start", ["constant.numeric","50%"],
"data": [ ["paren.rparen",")"],
[ "text", " " ], ["text",";"]
[ "variable.language", "div" ], ],[
[ "text", " " ], "start",
[ "paren.lparen", "{" ], ["text"," "],
[ "text", " " ], ["paren.rparen","}"]
[ "variable.language", ".box-shadow" ], ],[
[ "paren.lparen", "(" ], "start",
[ "constant.numeric", "0" ], ["text"," "],
[ "text", " " ], ["paren.rparen","}"]
[ "constant.numeric", "0" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "5px" ], ["paren.rparen","}"]
[ "text", ", " ], ],[
[ "constant.numeric", "30%" ], "start"
[ "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": []
}
]

File diff suppressed because it is too large Load diff

View file

@ -1,314 +1,248 @@
[ [[
{ "start",
"state": "start", ["text","("],
"data": [ ["storage.type.function-type.lisp","defun"],
[ "text", "(" ], ["text"," "],
[ "storage.type.function-type.lisp", "defun" ], ["entity.name.function.lisp","prompt-for-cd"],
[ "text", " " ], ["text"," ()"]
[ "entity.name.function.lisp", "prompt-for-cd" ], ],[
[ "text", " ()" ] "start",
] ["text"," "],
}, ["string","\"Prompts"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["identifier","for"],
[ "string", "\"Prompts" ] ["text"," "],
] ["identifier","CD"],
}, ["text","\""]
{ ],[
"state": "start", "start",
"data": [ ["text"," ("],
[ "text", " " ], ["identifier","prompt"],
[ "identifier", "for" ], ["text","-"],
[ "text", " " ], ["identifier","read"],
[ "identifier", "CD" ], ["text"," "],
[ "text", "\"" ] ["string","\"Title\""],
] ["text"," "],
}, ["constant.numeric","1.53"],
{ ["text"," "],
"state": "start", ["constant.numeric","1"],
"data": [ ["text"," "],
[ "text", " (" ], ["constant.numeric","2"],
[ "identifier", "prompt" ], ["text","/"],
[ "text", "-" ], ["constant.numeric","4"],
[ "identifier", "read" ], ["text"," "],
[ "text", " " ], ["constant.numeric","1.7"],
[ "string", "\"Title\"" ], ["text"," "],
[ "text", " " ], ["constant.numeric","1.7e0"],
[ "constant.numeric", "1.53" ], ["text"," "],
[ "text", " " ], ["constant.numeric","2.9E-4"],
[ "constant.numeric", "1" ], ["text"," "],
[ "text", " " ], ["constant.numeric","+42"],
[ "constant.numeric", "2" ], ["text"," "],
[ "text", "/" ], ["constant.numeric","-7"],
[ "constant.numeric", "4" ], ["text"," "],
[ "text", " " ], ["punctuation.definition.constant.character.lisp","#"],
[ "constant.numeric", "1.7" ], ["constant.character.lisp","b001"],
[ "text", " " ], ["text"," "],
[ "constant.numeric", "1.7e0" ], ["punctuation.definition.constant.character.lisp","#"],
[ "text", " " ], ["constant.character.lisp","b001/100"],
[ "constant.numeric", "2.9E-4" ], ["text"," "],
[ "text", " " ], ["punctuation.definition.constant.character.lisp","#"],
[ "constant.numeric", "+42" ], ["constant.character.lisp","o777"],
[ "text", " " ], ["text"," "],
[ "constant.numeric", "-7" ], ["punctuation.definition.constant.character.lisp","#"],
[ "text", " " ], ["constant.character.lisp","O777"],
[ "punctuation.definition.constant.character.lisp", "#" ], ["text"," "],
[ "constant.character.lisp", "b001" ], ["punctuation.definition.constant.character.lisp","#"],
[ "text", " " ], ["constant.character.lisp","xabc55"],
[ "punctuation.definition.constant.character.lisp", "#" ], ["text"," "],
[ "constant.character.lisp", "b001/100" ], ["punctuation.definition.constant.character.lisp","#"],
[ "text", " " ], ["constant.character.lisp","c"],
[ "punctuation.definition.constant.character.lisp", "#" ], ["text","("],
[ "constant.character.lisp", "o777" ], ["constant.numeric","0"],
[ "text", " " ], ["text"," "],
[ "punctuation.definition.constant.character.lisp", "#" ], ["constant.numeric","-5.6"],
[ "constant.character.lisp", "O777" ], ["text","))"]
[ "text", " " ], ],[
[ "punctuation.definition.constant.character.lisp", "#" ], "start",
[ "constant.character.lisp", "xabc55" ], ["text"," ("],
[ "text", " " ], ["identifier","prompt"],
[ "punctuation.definition.constant.character.lisp", "#" ], ["text","-"],
[ "constant.character.lisp", "c" ], ["identifier","read"],
[ "text", "(" ], ["text"," "],
[ "constant.numeric", "0" ], ["string","\"Artist\""],
[ "text", " " ], ["text"," &"],
[ "constant.numeric", "-5.6" ], ["identifier","rest"],
[ "text", "))" ] ["text",")"]
] ],[
}, "start",
{ ["text"," ("],
"state": "start", ["keyword.operator","or"],
"data": [ ["text"," ("],
[ "text", " (" ], ["identifier","parse"],
[ "identifier", "prompt" ], ["text","-"],
[ "text", "-" ], ["identifier","integer"],
[ "identifier", "read" ], ["text"," ("],
[ "text", " " ], ["identifier","prompt"],
[ "string", "\"Artist\"" ], ["text","-"],
[ "text", " &" ], ["identifier","read"],
[ "identifier", "rest" ], ["text"," "],
[ "text", ")" ] ["string","\"Rating\""],
] ["text",") :"],
}, ["identifier","junk"],
{ ["text","-"],
"state": "start", ["identifier","allowed"],
"data": [ ["text"," "],
[ "text", " (" ], ["support.function","t"],
[ "keyword.operator", "or" ], ["text",") "],
[ "text", " (" ], ["constant.numeric","0"],
[ "identifier", "parse" ], ["text",")"]
[ "text", "-" ], ],[
[ "identifier", "integer" ], "start",
[ "text", " (" ], ["text"," ("],
[ "identifier", "prompt" ], ["keyword.control","if"],
[ "text", "-" ], ["text"," "],
[ "identifier", "read" ], ["identifier","x"],
[ "text", " " ], ["text"," ("],
[ "string", "\"Rating\"" ], ["support.function","format"],
[ "text", ") :" ], ["text"," "],
[ "identifier", "junk" ], ["support.function","t"],
[ "text", "-" ], ["text"," "],
[ "identifier", "allowed" ], ["string","\"yes\""],
[ "text", " " ], ["text",") ("],
[ "support.function", "t" ], ["support.function","format"],
[ "text", ") " ], ["text"," "],
[ "constant.numeric", "0" ], ["support.function","t"],
[ "text", ")" ] ["text"," "],
] ["string","\"no\""],
}, ["text"," "],
{ ["constant.language","nil"],
"state": "start", ["text",") "],
"data": [ ["comment",";and here comment"]
[ "text", " (" ], ],[
[ "keyword.control", "if" ], "start",
[ "text", " " ], ["text"," ) "],
[ "identifier", "x" ], ["constant.numeric","0xFFLL"],
[ "text", " (" ], ["text"," "],
[ "support.function", "format" ], ["constant.numeric","-23ull"]
[ "text", " " ], ],[
[ "support.function", "t" ], "start",
[ "text", " " ], ["text"," "],
[ "string", "\"yes\"" ], ["comment",";; second line comment"]
[ "text", ") (" ], ],[
[ "support.function", "format" ], "start",
[ "text", " " ], ["text"," '(+ "],
[ "support.function", "t" ], ["constant.numeric","1"],
[ "text", " " ], ["text"," "],
[ "string", "\"no\"" ], ["constant.numeric","2"],
[ "text", " " ], ["text",")"]
[ "constant.language", "nil" ], ],[
[ "text", ") " ], "start",
[ "comment", ";and here comment" ] ["text"," ("],
] ["identifier","defvar"],
}, ["text"," "],
{ ["punctuation.definition.variable.lisp","*"],
"state": "start", ["variable.other.global.lisp","lines"],
"data": [ ["punctuation.definition.variable.lisp","*"],
[ "text", " ) " ], ["text",") "],
[ "constant.numeric", "0xFFLL" ], ["comment","; list of all lines"]
[ "text", " " ], ],[
[ "constant.numeric", "-23ull" ] "start",
] ["text"," ("],
}, ["identifier","position"],
{ ["text","-"],
"state": "start", ["keyword.control","if"],
"data": [ ["text","-"],
[ "text", " " ], ["identifier","not"],
[ "comment", ";; second line comment" ] ["text"," "],
] ["punctuation.definition.constant.character.lisp","#"],
}, ["constant.character.lisp","'sys::whitespacep"],
{ ["text"," "],
"state": "start", ["identifier","line"],
"data": [ ["text"," :"],
[ "text", " '(+ " ], ["identifier","start"],
[ "constant.numeric", "1" ], ["text"," "],
[ "text", " " ], ["identifier","beg"],
[ "constant.numeric", "2" ], ["text","))"]
[ "text", ")" ] ],[
] "start",
}, ["text"," ("],
{ ["support.function","quote"],
"state": "start", ["text"," ("],
"data": [ ["identifier","privet"],
[ "text", " (" ], ["text"," "],
[ "identifier", "defvar" ], ["constant.numeric","1"],
[ "text", " " ], ["text"," "],
[ "punctuation.definition.variable.lisp", "*" ], ["constant.numeric","2"],
[ "variable.other.global.lisp", "lines" ], ["text"," "],
[ "punctuation.definition.variable.lisp", "*" ], ["constant.numeric","3"],
[ "text", ") " ], ["text","))"]
[ "comment", "; list of all lines" ] ],[
] "start",
}, ["text"," '("],
{ ["identifier","hello"],
"state": "start", ["text"," "],
"data": [ ["identifier","world"],
[ "text", " (" ], ["text",")"]
[ "identifier", "position" ], ],[
[ "text", "-" ], "start",
[ "keyword.control", "if" ], ["text"," (* "],
[ "text", "-" ], ["constant.numeric","5"],
[ "identifier", "not" ], ["text"," "],
[ "text", " " ], ["constant.numeric","7"],
[ "punctuation.definition.constant.character.lisp", "#" ], ["text",")"]
[ "constant.character.lisp", "'sys::whitespacep" ], ],[
[ "text", " " ], "start",
[ "identifier", "line" ], ["text"," ("],
[ "text", " :" ], ["constant.numeric","1"],
[ "identifier", "start" ], ["text"," "],
[ "text", " " ], ["constant.numeric","2"],
[ "identifier", "beg" ], ["text"," "],
[ "text", "))" ] ["constant.numeric","34"],
] ["text"," "],
}, ["constant.numeric","5"],
{ ["text",")"]
"state": "start", ],[
"data": [ "start",
[ "text", " (" ], ["text"," (:"],
[ "support.function", "quote" ], ["identifier","use"],
[ "text", " (" ], ["text"," "],
[ "identifier", "privet" ], ["string","\"aaaa\""],
[ "text", " " ], ["text",")"]
[ "constant.numeric", "1" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "2" ], ["text"," ("],
[ "text", " " ], ["keyword.control","let"],
[ "constant.numeric", "3" ], ["text"," (("],
[ "text", "))" ] ["identifier","x"],
] ["text"," "],
}, ["constant.numeric","10"],
{ ["text",") ("],
"state": "start", ["identifier","y"],
"data": [ ["text"," "],
[ "text", " '(" ], ["constant.numeric","20"],
[ "identifier", "hello" ], ["text","))"]
[ "text", " " ], ],[
[ "identifier", "world" ], "start",
[ "text", ")" ] ["text"," ("],
] ["identifier","print"],
}, ["text"," (+ "],
{ ["identifier","x"],
"state": "start", ["text"," "],
"data": [ ["identifier","y"],
[ "text", " (* " ], ["text","))"]
[ "constant.numeric", "5" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "7" ], ["text"," ) "],
[ "text", ")" ] ["support.function","LAmbDa"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " (" ], ["string","\"asdad"],
[ "constant.numeric", "1" ], ["constant.character.escape.lisp","\\0"],
[ "text", " " ], ["string","eqweqe\""]
[ "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\"" ]
]
}
]

View file

@ -1,444 +1,340 @@
[ [[
{ "qcomment",
"state": "qcomment", ["comment","--[[--"]
"data": [ ],[
[ "comment", "--[[--" ] "qcomment",
] ["comment","num_args takes in 5.1 byte code and extracts the number of arguments"]
}, ],[
{ "qcomment",
"state": "qcomment", ["comment","from its function header."]
"data": [ ],[
[ "comment", "num_args takes in 5.1 byte code and extracts the number of arguments" ] "start",
] ["comment","--]]--"]
}, ],[
{ "start"
"state": "qcomment", ],[
"data": [ "start",
[ "comment", "from its function header." ] ["keyword","function"],
] ["text"," "],
}, ["identifier","int"],
{ ["paren.lparen","("],
"state": "start", ["identifier","t"],
"data": [ ["paren.rparen",")"]
[ "comment", "--]]--" ] ],[
] "start",
}, ["text","\t"],
{ ["keyword","return"],
"state": "start", ["text"," "],
"data": [] ["identifier","t"],
}, ["keyword.operator",":"],
{ ["support.function","byte"],
"state": "start", ["paren.lparen","("],
"data": [ ["constant.numeric","1"],
[ "keyword", "function" ], ["paren.rparen",")"],
[ "text", " " ], ["keyword.operator","+"],
[ "identifier", "int" ], ["identifier","t"],
[ "paren.lparen", "(" ], ["keyword.operator",":"],
[ "identifier", "t" ], ["support.function","byte"],
[ "paren.rparen", ")" ] ["paren.lparen","("],
] ["constant.numeric","2"],
}, ["paren.rparen",")"],
{ ["keyword.operator","*"],
"state": "start", ["constant.numeric","0x100"],
"data": [ ["keyword.operator","+"],
[ "text", "\t" ], ["identifier","t"],
[ "keyword", "return" ], ["keyword.operator",":"],
[ "text", " " ], ["support.function","byte"],
[ "identifier", "t" ], ["paren.lparen","("],
[ "keyword.operator", ":" ], ["constant.numeric","3"],
[ "support.function", "byte" ], ["paren.rparen",")"],
[ "paren.lparen", "(" ], ["keyword.operator","*"],
[ "constant.numeric", "1" ], ["constant.numeric","0x10000"],
[ "paren.rparen", ")" ], ["keyword.operator","+"],
[ "keyword.operator", "+" ], ["identifier","t"],
[ "identifier", "t" ], ["keyword.operator",":"],
[ "keyword.operator", ":" ], ["support.function","byte"],
[ "support.function", "byte" ], ["paren.lparen","("],
[ "paren.lparen", "(" ], ["constant.numeric","4"],
[ "constant.numeric", "2" ], ["paren.rparen",")"],
[ "paren.rparen", ")" ], ["keyword.operator","*"],
[ "keyword.operator", "*" ], ["constant.numeric","0x1000000"]
[ "constant.numeric", "0x100" ], ],[
[ "keyword.operator", "+" ], "start",
[ "identifier", "t" ], ["keyword","end"]
[ "keyword.operator", ":" ], ],[
[ "support.function", "byte" ], "start"
[ "paren.lparen", "(" ], ],[
[ "constant.numeric", "3" ], "start",
[ "paren.rparen", ")" ], ["keyword","function"],
[ "keyword.operator", "*" ], ["text"," "],
[ "constant.numeric", "0x10000" ], ["identifier","num_args"],
[ "keyword.operator", "+" ], ["paren.lparen","("],
[ "identifier", "t" ], ["identifier","func"],
[ "keyword.operator", ":" ], ["paren.rparen",")"]
[ "support.function", "byte" ], ],[
[ "paren.lparen", "(" ], "start",
[ "constant.numeric", "4" ], ["text","\t"],
[ "paren.rparen", ")" ], ["keyword","local"],
[ "keyword.operator", "*" ], ["text"," "],
[ "constant.numeric", "0x1000000" ] ["support.function","dump"],
] ["text"," "],
}, ["keyword.operator","="],
{ ["text"," "],
"state": "start", ["constant.library","string"],
"data": [ ["text","."],
[ "keyword", "end" ] ["support.function","dump"],
] ["paren.lparen","("],
}, ["identifier","func"],
{ ["paren.rparen",")"]
"state": "start", ],[
"data": [] "start",
}, ["text","\t"],
{ ["keyword","local"],
"state": "start", ["text"," "],
"data": [ ["identifier","offset"],
[ "keyword", "function" ], ["text",", "],
[ "text", " " ], ["identifier","cursor"],
[ "identifier", "num_args" ], ["text"," "],
[ "paren.lparen", "(" ], ["keyword.operator","="],
[ "identifier", "func" ], ["text"," "],
[ "paren.rparen", ")" ] ["identifier","int"],
] ["paren.lparen","("],
}, ["support.function","dump"],
{ ["keyword.operator",":"],
"state": "start", ["support.function","sub"],
"data": [ ["paren.lparen","("],
[ "text", "\t" ], ["constant.numeric","13"],
[ "keyword", "local" ], ["paren.rparen","))"],
[ "text", " " ], ["text",", "],
[ "support.function", "dump" ], ["identifier","offset"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "=" ], ["keyword.operator","+"],
[ "text", " " ], ["text"," "],
[ "constant.library", "string" ], ["constant.numeric","26"]
[ "text", "." ], ],[
[ "support.function", "dump" ], "start",
[ "paren.lparen", "(" ], ["text","\t"],
[ "identifier", "func" ], ["comment","--Get the params and var flag (whether there's a ... in the param)"]
[ "paren.rparen", ")" ] ],[
] "start",
}, ["text","\t"],
{ ["keyword","return"],
"state": "start", ["text"," "],
"data": [ ["support.function","dump"],
[ "text", "\t" ], ["keyword.operator",":"],
[ "keyword", "local" ], ["support.function","sub"],
[ "text", " " ], ["paren.lparen","("],
[ "identifier", "offset" ], ["identifier","cursor"],
[ "text", ", " ], ["paren.rparen",")"],
[ "identifier", "cursor" ], ["keyword.operator",":"],
[ "text", " " ], ["support.function","byte"],
[ "keyword.operator", "=" ], ["paren.lparen","("],
[ "text", " " ], ["paren.rparen",")"],
[ "identifier", "int" ], ["text",", "],
[ "paren.lparen", "(" ], ["support.function","dump"],
[ "support.function", "dump" ], ["keyword.operator",":"],
[ "keyword.operator", ":" ], ["support.function","sub"],
[ "support.function", "sub" ], ["paren.lparen","("],
[ "paren.lparen", "(" ], ["identifier","cursor"],
[ "constant.numeric", "13" ], ["keyword.operator","+"],
[ "paren.rparen", "))" ], ["constant.numeric","1"],
[ "text", ", " ], ["paren.rparen",")"],
[ "identifier", "offset" ], ["keyword.operator",":"],
[ "text", " " ], ["support.function","byte"],
[ "keyword.operator", "+" ], ["paren.lparen","("],
[ "text", " " ], ["paren.rparen",")"]
[ "constant.numeric", "26" ] ],[
] "start",
}, ["keyword","end"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "text", "\t" ], "start",
[ "comment", "--Get the params and var flag (whether there's a ... in the param)" ] ["comment","-- Usage:"]
] ],[
}, "start",
{ ["identifier","num_args"],
"state": "start", ["paren.lparen","("],
"data": [ ["keyword","function"],
[ "text", "\t" ], ["paren.lparen","("],
[ "keyword", "return" ], ["identifier","a"],
[ "text", " " ], ["text",","],
[ "support.function", "dump" ], ["identifier","b"],
[ "keyword.operator", ":" ], ["text",","],
[ "support.function", "sub" ], ["identifier","c"],
[ "paren.lparen", "(" ], ["text",","],
[ "identifier", "cursor" ], ["identifier","d"],
[ "paren.rparen", ")" ], ["text",", "],
[ "keyword.operator", ":" ], ["keyword.operator","..."],
[ "support.function", "byte" ], ["paren.rparen",")"],
[ "paren.lparen", "(" ], ["text"," "],
[ "paren.rparen", ")" ], ["keyword","end"],
[ "text", ", " ], ["paren.rparen",")"],
[ "support.function", "dump" ], ["text"," "],
[ "keyword.operator", ":" ], ["comment","-- return 4, 7"]
[ "support.function", "sub" ], ],[
[ "paren.lparen", "(" ], "start"
[ "identifier", "cursor" ], ],[
[ "keyword.operator", "+" ], "start",
[ "constant.numeric", "1" ], ["comment","-- Python styled string format operator"]
[ "paren.rparen", ")" ], ],[
[ "keyword.operator", ":" ], "start",
[ "support.function", "byte" ], ["keyword","local"],
[ "paren.lparen", "(" ], ["text"," "],
[ "paren.rparen", ")" ] ["identifier","gm"],
] ["text"," "],
}, ["keyword.operator","="],
{ ["text"," "],
"state": "start", ["constant.library","debug"],
"data": [ ["text","."],
[ "keyword", "end" ] ["support.function","getmetatable"],
] ["paren.lparen","("],
}, ["string","\"\""],
{ ["paren.rparen",")"]
"state": "start", ],[
"data": [] "start"
}, ],[
{ "start",
"state": "start", ["identifier","gm"],
"data": [ ["text","."],
[ "comment", "-- Usage:" ] ["support.function","__mod"],
] ["keyword.operator","="],
}, ["keyword","function"],
{ ["paren.lparen","("],
"state": "start", ["identifier","self"],
"data": [ ["text",", "],
[ "identifier", "num_args" ], ["identifier","other"],
[ "paren.lparen", "(" ], ["paren.rparen",")"]
[ "keyword", "function" ], ],[
[ "paren.lparen", "(" ], "start",
[ "identifier", "a" ], ["text"," "],
[ "text", "," ], ["keyword","if"],
[ "identifier", "b" ], ["text"," "],
[ "text", "," ], ["support.function","type"],
[ "identifier", "c" ], ["paren.lparen","("],
[ "text", "," ], ["identifier","other"],
[ "identifier", "d" ], ["paren.rparen",")"],
[ "text", ", " ], ["text"," "],
[ "keyword.operator", "..." ], ["keyword.operator","~="],
[ "paren.rparen", ")" ], ["text"," "],
[ "text", " " ], ["string","\"table\""],
[ "keyword", "end" ], ["text"," "],
[ "paren.rparen", ")" ], ["keyword","then"],
[ "text", " " ], ["text"," "],
[ "comment", "-- return 4, 7" ] ["identifier","other"],
] ["text"," "],
}, ["keyword.operator","="],
{ ["text"," "],
"state": "start", ["paren.lparen","{"],
"data": [] ["identifier","other"],
}, ["paren.rparen","}"],
{ ["text"," "],
"state": "start", ["keyword","end"]
"data": [ ],[
[ "comment", "-- Python styled string format operator" ] "start",
] ["text"," "],
}, ["keyword","for"],
{ ["text"," "],
"state": "start", ["identifier","i"],
"data": [ ["text",","],
[ "keyword", "local" ], ["identifier","v"],
[ "text", " " ], ["text"," "],
[ "identifier", "gm" ], ["keyword","in"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "=" ], ["support.function","ipairs"],
[ "text", " " ], ["paren.lparen","("],
[ "constant.library", "debug" ], ["identifier","other"],
[ "text", "." ], ["paren.rparen",")"],
[ "support.function", "getmetatable" ], ["text"," "],
[ "paren.lparen", "(" ], ["keyword","do"],
[ "string", "\"\"" ], ["text"," "],
[ "paren.rparen", ")" ] ["identifier","other"],
] ["paren.lparen","["],
}, ["identifier","i"],
{ ["paren.rparen","]"],
"state": "start", ["text"," "],
"data": [] ["keyword.operator","="],
}, ["text"," "],
{ ["support.function","tostring"],
"state": "start", ["paren.lparen","("],
"data": [ ["identifier","v"],
[ "identifier", "gm" ], ["paren.rparen",")"],
[ "text", "." ], ["text"," "],
[ "support.function", "__mod" ], ["keyword","end"]
[ "keyword.operator", "=" ], ],[
[ "keyword", "function" ], "start",
[ "paren.lparen", "(" ], ["text"," "],
[ "identifier", "self" ], ["keyword","return"],
[ "text", ", " ], ["text"," "],
[ "identifier", "other" ], ["identifier","self"],
[ "paren.rparen", ")" ] ["keyword.operator",":"],
] ["support.function","format"],
}, ["paren.lparen","("],
{ ["support.function","unpack"],
"state": "start", ["paren.lparen","("],
"data": [ ["identifier","other"],
[ "text", " " ], ["paren.rparen","))"]
[ "keyword", "if" ], ],[
[ "text", " " ], "start",
[ "support.function", "type" ], ["keyword","end"]
[ "paren.lparen", "(" ], ],[
[ "identifier", "other" ], "start"
[ "paren.rparen", ")" ], ],[
[ "text", " " ], "qstring3",
[ "keyword.operator", "~=" ], ["support.function","print"],
[ "text", " " ], ["paren.lparen","("],
[ "string", "\"table\"" ], ["string","[===["]
[ "text", " " ], ],[
[ "keyword", "then" ], "qstring3",
[ "text", " " ], ["string"," blah blah %s, (%d %d)"]
[ "identifier", "other" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "=" ], ["string","]===]"],
[ "text", " " ], ["keyword.operator","%"],
[ "paren.lparen", "{" ], ["paren.lparen","{"],
[ "identifier", "other" ], ["string","\"blah\""],
[ "paren.rparen", "}" ], ["text",", "],
[ "text", " " ], ["identifier","num_args"],
[ "keyword", "end" ] ["paren.lparen","("],
] ["identifier","int"],
}, ["paren.rparen",")})"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "text", " " ], "qcomment1",
[ "keyword", "for" ], ["comment","--[=[--"]
[ "text", " " ], ],[
[ "identifier", "i" ], "qcomment1",
[ "text", "," ], ["comment","table.maxn is deprecated, use # instead."]
[ "identifier", "v" ], ],[
[ "text", " " ], "start",
[ "keyword", "in" ], ["comment","--]=]--"]
[ "text", " " ], ],[
[ "support.function", "ipairs" ], "start",
[ "paren.lparen", "(" ], ["support.function","print"],
[ "identifier", "other" ], ["paren.lparen","("],
[ "paren.rparen", ")" ], ["constant.library","table"],
[ "text", " " ], ["text","."],
[ "keyword", "do" ], ["invalid.deprecated","maxn"],
[ "text", " " ], ["paren.lparen","{"],
[ "identifier", "other" ], ["constant.numeric","1"],
[ "paren.lparen", "[" ], ["text",","],
[ "identifier", "i" ], ["constant.numeric","2"],
[ "paren.rparen", "]" ], ["text",","],
[ "text", " " ], ["paren.lparen","["],
[ "keyword.operator", "=" ], ["constant.numeric","4"],
[ "text", " " ], ["paren.rparen","]"],
[ "support.function", "tostring" ], ["keyword.operator","="],
[ "paren.lparen", "(" ], ["constant.numeric","4"],
[ "identifier", "v" ], ["text",","],
[ "paren.rparen", ")" ], ["paren.lparen","["],
[ "text", " " ], ["constant.numeric","8"],
[ "keyword", "end" ] ["paren.rparen","]"],
] ["keyword.operator","="],
}, ["constant.numeric","8"],
{ ["paren.rparen",")"],
"state": "start", ["text"," "],
"data": [ ["comment","-- outputs 8 instead of 2"]
[ "text", " " ], ],[
[ "keyword", "return" ], "start"
[ "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": []
}
]

File diff suppressed because it is too large Load diff

View file

@ -1,21 +1,17 @@
[ [[
{ "start",
"state": "start", ["paren.lparen","("],
"data": [ ["keyword","title:"],
[ "paren.lparen", "(" ], ["string","\"foo bar\""],
[ "keyword", "title:" ], ["text"," "],
[ "string", "\"foo bar\"" ], ["keyword.operator","AND"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "AND" ], ["keyword","body:"],
[ "text", " " ], ["string","\"quick fox\""],
[ "keyword", "body:" ], ["paren.rparen",")"],
[ "string", "\"quick fox\"" ], ["text"," "],
[ "paren.rparen", ")" ], ["keyword.operator","OR"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "OR" ], ["keyword","title:"],
[ "text", " " ], ["text","fox"]
[ "keyword", "title:" ], ]]
[ "text", "fox" ]
]
}
]

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,252 +1,200 @@
[ [[
{ "comment",
"state": "comment", ["comment","(*"]
"data": [ ],[
[ "comment", "(*" ] "comment",
] ["comment"," * Example of early return implementation taken from"]
}, ],[
{ "comment",
"state": "comment", ["comment"," * http://ocaml.janestreet.com/?q=node/91"]
"data": [ ],[
[ "comment", " * Example of early return implementation taken from" ] "start",
] ["comment"," *)"]
}, ],[
{ "start"
"state": "comment", ],[
"data": [ "start",
[ "comment", " * http://ocaml.janestreet.com/?q=node/91" ] ["keyword","let"],
] ["text"," "],
}, ["identifier","with_return"],
{ ["text"," "],
"state": "start", ["paren.lparen","("],
"data": [ ["keyword","type"],
[ "comment", " *)" ] ["text"," "],
] ["identifier","t"],
}, ["paren.rparen",")"],
{ ["text"," "],
"state": "start", ["paren.lparen","("],
"data": [] ["identifier","f"],
}, ["text"," : "],
{ ["identifier","_"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator","->"],
[ "keyword", "let" ], ["text"," "],
[ "text", " " ], ["identifier","t"],
[ "identifier", "with_return" ], ["paren.rparen",")"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "(" ], ["keyword.operator","="]
[ "keyword", "type" ], ],[
[ "text", " " ], "start",
[ "identifier", "t" ], ["text"," "],
[ "paren.rparen", ")" ], ["keyword","let"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "(" ], ["keyword","module"],
[ "identifier", "f" ], ["text"," "],
[ "text", " : " ], ["identifier","M"],
[ "identifier", "_" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="]
[ "keyword.operator", "->" ], ],[
[ "text", " " ], "start",
[ "identifier", "t" ], ["text"," "],
[ "paren.rparen", ")" ], ["keyword","struct"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "=" ] ["keyword","exception"],
] ["text"," "],
}, ["identifier","Return"],
{ ["text"," "],
"state": "start", ["keyword","of"],
"data": [ ["text"," "],
[ "text", " " ], ["identifier","t"],
[ "keyword", "let" ], ["text"," "],
[ "text", " " ], ["keyword","end"]
[ "keyword", "module" ], ],[
[ "text", " " ], "start",
[ "identifier", "M" ], ["text"," "],
[ "text", " " ], ["keyword","in"]
[ "keyword.operator", "=" ] ],[
] "start",
}, ["text"," "],
{ ["keyword","let"],
"state": "start", ["text"," "],
"data": [ ["identifier","return"],
[ "text", " " ], ["text"," "],
[ "keyword", "struct" ], ["keyword.operator","="],
[ "text", " " ], ["text"," "],
[ "keyword", "exception" ], ["paren.lparen","{"],
[ "text", " " ], ["text"," "],
[ "identifier", "Return" ], ["identifier","return"],
[ "text", " " ], ["text"," "],
[ "keyword", "of" ], ["keyword.operator","="],
[ "text", " " ], ["text"," "],
[ "identifier", "t" ], ["paren.lparen","("],
[ "text", " " ], ["keyword","fun"],
[ "keyword", "end" ] ["text"," "],
] ["identifier","x"],
}, ["text"," "],
{ ["keyword.operator","->"],
"state": "start", ["text"," "],
"data": [ ["support.function","raise"],
[ "text", " " ], ["text"," "],
[ "keyword", "in" ] ["paren.lparen","("],
] ["identifier","M"],
}, ["text","."],
{ ["identifier","Return"],
"state": "start", ["text"," "],
"data": [ ["identifier","x"],
[ "text", " " ], ["paren.rparen","))"],
[ "keyword", "let" ], ["text","; "],
[ "text", " " ], ["paren.rparen","}"],
[ "identifier", "return" ], ["text"," "],
[ "text", " " ], ["keyword","in"]
[ "keyword.operator", "=" ], ],[
[ "text", " " ], "start",
[ "paren.lparen", "{" ], ["text"," "],
[ "text", " " ], ["keyword","try"],
[ "identifier", "return" ], ["text"," "],
[ "text", " " ], ["identifier","f"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["identifier","return"],
[ "paren.lparen", "(" ], ["text"," "],
[ "keyword", "fun" ], ["keyword","with"],
[ "text", " " ], ["text"," "],
[ "identifier", "x" ], ["identifier","M"],
[ "text", " " ], ["text","."],
[ "keyword.operator", "->" ], ["identifier","Return"],
[ "text", " " ], ["text"," "],
[ "support.function", "raise" ], ["identifier","x"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "(" ], ["keyword.operator","->"],
[ "identifier", "M" ], ["text"," "],
[ "text", "." ], ["identifier","x"]
[ "identifier", "Return" ], ],[
[ "text", " " ], "start"
[ "identifier", "x" ], ],[
[ "paren.rparen", "))" ], "start"
[ "text", "; " ], ],[
[ "paren.rparen", "}" ], "start",
[ "text", " " ], ["comment","(* Function that uses the 'early return' functionality provided by `with_return` *)"]
[ "keyword", "in" ] ],[
] "start",
}, ["keyword","let"],
{ ["text"," "],
"state": "start", ["identifier","sum_until_first_negative"],
"data": [ ["text"," "],
[ "text", " " ], ["support.function","list"],
[ "keyword", "try" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="]
[ "identifier", "f" ], ],[
[ "text", " " ], "start",
[ "identifier", "return" ], ["text"," "],
[ "text", " " ], ["identifier","with_return"],
[ "keyword", "with" ], ["text"," "],
[ "text", " " ], ["paren.lparen","("],
[ "identifier", "M" ], ["keyword","fun"],
[ "text", "." ], ["text"," "],
[ "identifier", "Return" ], ["identifier","r"],
[ "text", " " ], ["text"," "],
[ "identifier", "x" ], ["keyword.operator","->"]
[ "text", " " ], ],[
[ "keyword.operator", "->" ], "start",
[ "text", " " ], ["text"," "],
[ "identifier", "x" ] ["support.function","List"],
] ["text","."],
}, ["support.function","fold"],
{ ["text"," "],
"state": "start", ["support.function","list"],
"data": [] ["text"," "],
}, ["keyword.operator","~"],
{ ["support.function","init"],
"state": "start", ["text",":"],
"data": [] ["constant.numeric","0"],
}, ["text"," "],
{ ["keyword.operator","~"],
"state": "start", ["identifier","f"],
"data": [ ["text",":"],
[ "comment", "(* Function that uses the 'early return' functionality provided by `with_return` *)" ] ["paren.lparen","("],
] ["keyword","fun"],
}, ["text"," "],
{ ["identifier","acc"],
"state": "start", ["text"," "],
"data": [ ["identifier","x"],
[ "keyword", "let" ], ["text"," "],
[ "text", " " ], ["keyword.operator","->"]
[ "identifier", "sum_until_first_negative" ], ],[
[ "text", " " ], "start",
[ "support.function", "list" ], ["text"," "],
[ "text", " " ], ["keyword","if"],
[ "keyword.operator", "=" ] ["text"," "],
] ["identifier","x"],
}, ["text"," "],
{ ["keyword.operator",">="],
"state": "start", ["text"," "],
"data": [ ["constant.numeric","0"],
[ "text", " " ], ["text"," "],
[ "identifier", "with_return" ], ["keyword","then"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "(" ], ["identifier","acc"],
[ "keyword", "fun" ], ["text"," "],
[ "text", " " ], ["keyword.operator","+"],
[ "identifier", "r" ], ["text"," "],
[ "text", " " ], ["identifier","x"],
[ "keyword.operator", "->" ] ["text"," "],
] ["keyword","else"],
}, ["text"," "],
{ ["identifier","r"],
"state": "start", ["text","."],
"data": [ ["identifier","return"],
[ "text", " " ], ["text"," "],
[ "support.function", "List" ], ["identifier","acc"],
[ "text", "." ], ["paren.rparen","))"]
[ "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", "))" ]
]
}
]

View file

@ -1,309 +1,214 @@
[ [[
{ "start",
"state": "start", ["comment","#!/usr/bin/perl"]
"data": [ ],[
[ "comment", "#!/usr/bin/perl" ] "start",
] ["keyword","use"],
}, ["text"," "],
{ ["identifier","strict"],
"state": "start", ["text",";"]
"data": [ ],[
[ "keyword", "use" ], "start",
[ "text", " " ], ["keyword","use"],
[ "identifier", "strict" ], ["text"," "],
[ "text", ";" ] ["identifier","warnings"],
] ["text",";"]
}, ],[
{ "start",
"state": "start", ["keyword","my"],
"data": [ ["text"," "],
[ "keyword", "use" ], ["identifier","$num_primes"],
[ "text", " " ], ["text"," "],
[ "identifier", "warnings" ], ["keyword.operator","="],
[ "text", ";" ] ["text"," "],
] ["constant.numeric","0"],
}, ["text",";"]
{ ],[
"state": "start", "start",
"data": [ ["keyword","my"],
[ "keyword", "my" ], ["text"," @"],
[ "text", " " ], ["identifier","primes"],
[ "identifier", "$num_primes" ], ["text",";"]
[ "text", " " ], ],[
[ "keyword.operator", "=" ], "start"
[ "text", " " ], ],[
[ "constant.numeric", "0" ], "start",
[ "text", ";" ] ["comment","# Put 2 as the first prime so we won't have an empty array"]
] ],[
}, "start",
{ ["identifier","$primes"],
"state": "start", ["lparen","["],
"data": [ ["identifier","$num_primes"],
[ "keyword", "my" ], ["rparen","]"],
[ "text", " @" ], ["text"," "],
[ "identifier", "primes" ], ["keyword.operator","="],
[ "text", ";" ] ["text"," "],
] ["constant.numeric","2"],
}, ["text",";"]
{ ],[
"state": "start", "start",
"data": [] ["identifier","$num_primes"],
}, ["keyword.operator","++"],
{ ["text",";"]
"state": "start", ],[
"data": [ "start"
[ "comment", "# Put 2 as the first prime so we won't have an empty array" ] ],[
] "start",
}, ["identifier","MAIN_LOOP"],
{ ["text",":"]
"state": "start", ],[
"data": [ "start",
[ "identifier", "$primes" ], ["keyword","for"],
[ "lparen", "[" ], ["text"," "],
[ "identifier", "$num_primes" ], ["keyword","my"],
[ "rparen", "]" ], ["text"," "],
[ "text", " " ], ["identifier","$number_to_check"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["lparen","("],
[ "constant.numeric", "2" ], ["constant.numeric","3"],
[ "text", ";" ] ["text"," "],
] ["keyword.operator",".."],
}, ["text"," "],
{ ["constant.numeric","200"],
"state": "start", ["rparen",")"]
"data": [ ],[
[ "identifier", "$num_primes" ], "start",
[ "keyword.operator", "++" ], ["lparen","{"]
[ "text", ";" ] ],[
] "start",
}, ["text"," "],
{ ["keyword","for"],
"state": "start", ["text"," "],
"data": [] ["keyword","my"],
}, ["text"," "],
{ ["identifier","$p"],
"state": "start", ["text"," "],
"data": [ ["lparen","("],
[ "identifier", "MAIN_LOOP" ], ["constant.numeric","0"],
[ "text", ":" ] ["text"," "],
] ["keyword.operator",".."],
}, ["text"," "],
{ ["lparen","("],
"state": "start", ["identifier","$num_primes"],
"data": [ ["constant.numeric","-1"],
[ "keyword", "for" ], ["rparen","))"]
[ "text", " " ], ],[
[ "keyword", "my" ], "start",
[ "text", " " ], ["text"," "],
[ "identifier", "$number_to_check" ], ["lparen","{"]
[ "text", " " ], ],[
[ "lparen", "(" ], "start",
[ "constant.numeric", "3" ], ["text"," "],
[ "text", " " ], ["keyword","if"],
[ "keyword.operator", ".." ], ["text"," "],
[ "text", " " ], ["lparen","("],
[ "constant.numeric", "200" ], ["identifier","$number_to_check"],
[ "rparen", ")" ] ["text"," "],
] ["keyword.operator","%"],
}, ["text"," "],
{ ["identifier","$primes"],
"state": "start", ["lparen","["],
"data": [ ["identifier","$p"],
[ "lparen", "{" ] ["rparen","]"],
] ["text"," "],
}, ["keyword.operator","=="],
{ ["text"," "],
"state": "start", ["constant.numeric","0"],
"data": [ ["rparen",")"]
[ "text", " " ], ],[
[ "keyword", "for" ], "start",
[ "text", " " ], ["text"," "],
[ "keyword", "my" ], ["lparen","{"]
[ "text", " " ], ],[
[ "identifier", "$p" ], "start",
[ "text", " " ], ["text"," "],
[ "lparen", "(" ], ["keyword","next"],
[ "constant.numeric", "0" ], ["text"," "],
[ "text", " " ], ["identifier","MAIN_LOOP"],
[ "keyword.operator", ".." ], ["text",";"]
[ "text", " " ], ],[
[ "lparen", "(" ], "start",
[ "identifier", "$num_primes" ], ["text"," "],
[ "constant.numeric", "-1" ], ["rparen","}"]
[ "rparen", "))" ] ],[
] "start",
}, ["text"," "],
{ ["rparen","}"]
"state": "start", ],[
"data": [ "start"
[ "text", " " ], ],[
[ "lparen", "{" ] "start",
] ["text"," "],
}, ["comment","# If we reached this point it means $number_to_check is not"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["comment","# divisable by any prime number that came before it."]
[ "keyword", "if" ], ],[
[ "text", " " ], "start",
[ "lparen", "(" ], ["text"," "],
[ "identifier", "$number_to_check" ], ["identifier","$primes"],
[ "text", " " ], ["lparen","["],
[ "keyword.operator", "%" ], ["identifier","$num_primes"],
[ "text", " " ], ["rparen","]"],
[ "identifier", "$primes" ], ["text"," "],
[ "lparen", "[" ], ["keyword.operator","="],
[ "identifier", "$p" ], ["text"," "],
[ "rparen", "]" ], ["identifier","$number_to_check"],
[ "text", " " ], ["text",";"]
[ "keyword.operator", "==" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "0" ], ["text"," "],
[ "rparen", ")" ] ["identifier","$num_primes"],
] ["keyword.operator","++"],
}, ["text",";"]
{ ],[
"state": "start", "start",
"data": [ ["rparen","}"]
[ "text", " " ], ],[
[ "lparen", "{" ] "start"
] ],[
}, "start",
{ ["keyword","for"],
"state": "start", ["text"," "],
"data": [ ["keyword","my"],
[ "text", " " ], ["text"," "],
[ "keyword", "next" ], ["identifier","$p"],
[ "text", " " ], ["text"," "],
[ "identifier", "MAIN_LOOP" ], ["lparen","("],
[ "text", ";" ] ["constant.numeric","0"],
] ["text"," "],
}, ["keyword.operator",".."],
{ ["text"," "],
"state": "start", ["lparen","("],
"data": [ ["identifier","$num_primes"],
[ "text", " " ], ["constant.numeric","-1"],
[ "rparen", "}" ] ["rparen","))"]
] ],[
}, "start",
{ ["lparen","{"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["text"," "],
[ "rparen", "}" ] ["support.function","print"],
] ["text"," "],
}, ["identifier","$primes"],
{ ["lparen","["],
"state": "start", ["identifier","$p"],
"data": [] ["rparen","]"],
}, ["keyword.operator",","],
{ ["text"," "],
"state": "start", ["string","\", \""],
"data": [ ["text",";"]
[ "text", " " ], ],[
[ "comment", "# If we reached this point it means $number_to_check is not" ] "start",
] ["rparen","}"]
}, ],[
{ "start",
"state": "start", ["support.function","print"],
"data": [ ["text"," "],
[ "text", " " ], ["string","\"\\n\""],
[ "comment", "# divisable by any prime number that came before it." ] ["text",";"]
] ],[
}, "start"
{ ]]
"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": []
}
]

File diff suppressed because it is too large Load diff

View file

@ -1,188 +1,134 @@
[ [[
{ "php-start",
"state": "php-start", ["support.php_tag","<?php"]
"data": [ ],[
[ "support.php_tag", "<?php" ] "php-start"
] ],[
}, "php-start",
{ ["keyword","function"],
"state": "php-start", ["text"," "],
"data": [] ["identifier","nfact"],
}, ["lparen","("],
{ ["variable","$n"],
"state": "php-start", ["rparen",")"],
"data": [ ["text"," "],
[ "keyword", "function" ], ["lparen","{"]
[ "text", " " ], ],[
[ "identifier", "nfact" ], "php-start",
[ "lparen", "(" ], ["text"," "],
[ "variable", "$n" ], ["keyword","if"],
[ "rparen", ")" ], ["text"," "],
[ "text", " " ], ["lparen","("],
[ "lparen", "{" ] ["variable","$n"],
] ["text"," "],
}, ["keyword.operator","=="],
{ ["text"," "],
"state": "php-start", ["constant.numeric","0"],
"data": [ ["rparen",")"],
[ "text", " " ], ["text"," "],
[ "keyword", "if" ], ["lparen","{"]
[ "text", " " ], ],[
[ "lparen", "(" ], "php-start",
[ "variable", "$n" ], ["text"," "],
[ "text", " " ], ["support.function","return"],
[ "keyword.operator", "==" ], ["text"," "],
[ "text", " " ], ["constant.numeric","1"],
[ "constant.numeric", "0" ], ["text",";"]
[ "rparen", ")" ], ],[
[ "text", " " ], "php-start",
[ "lparen", "{" ] ["text"," "],
] ["rparen","}"]
}, ],[
{ "php-start",
"state": "php-start", ["text"," "],
"data": [ ["keyword","else"],
[ "text", " " ], ["text"," "],
[ "support.function", "return" ], ["lparen","{"]
[ "text", " " ], ],[
[ "constant.numeric", "1" ], "php-start",
[ "text", ";" ] ["text"," "],
] ["support.function","return"],
}, ["text"," "],
{ ["variable","$n"],
"state": "php-start", ["text"," "],
"data": [ ["keyword.operator","*"],
[ "text", " " ], ["text"," "],
[ "rparen", "}" ] ["identifier","nfact"],
] ["lparen","("],
}, ["variable","$n"],
{ ["text"," "],
"state": "php-start", ["keyword.operator","-"],
"data": [ ["text"," "],
[ "text", " " ], ["constant.numeric","1"],
[ "keyword", "else" ], ["rparen",")"],
[ "text", " " ], ["text",";"]
[ "lparen", "{" ] ],[
] "php-start",
}, ["text"," "],
{ ["rparen","}"]
"state": "php-start", ],[
"data": [ "php-start",
[ "text", " " ], ["rparen","}"]
[ "support.function", "return" ], ],[
[ "text", " " ], "php-start"
[ "variable", "$n" ], ],[
[ "text", " " ], "php-start",
[ "keyword.operator", "*" ], ["support.function","echo"],
[ "text", " " ], ["text"," "],
[ "identifier", "nfact" ], ["string","\""],
[ "lparen", "(" ], ["constant.language.escape","\\n\\n"],
[ "variable", "$n" ], ["string","Please enter a whole number ... \""],
[ "text", " " ], ["text",";"]
[ "keyword.operator", "-" ], ],[
[ "text", " " ], "php-start",
[ "constant.numeric", "1" ], ["variable","$num"],
[ "rparen", ")" ], ["text"," "],
[ "text", ";" ] ["keyword.operator","="],
] ["text"," "],
}, ["support.function","trim"],
{ ["lparen","("],
"state": "php-start", ["support.function","fgets"],
"data": [ ["lparen","("],
[ "text", " " ], ["constant.language","STDIN"],
[ "rparen", "}" ] ["rparen","))"],
] ["text",";"]
}, ],[
{ "php-start"
"state": "php-start", ],[
"data": [ "php-start",
[ "rparen", "}" ] ["comment","// ===== PROCESS - Determing the factorial of the input number ====="]
] ],[
}, "php-start",
{ ["variable","$output"],
"state": "php-start", ["text"," "],
"data": [] ["keyword.operator","="],
}, ["text"," "],
{ ["string","\""],
"state": "php-start", ["constant.language.escape","\\n\\n"],
"data": [ ["string","Factorial \""],
[ "support.function", "echo" ], ["text"," . "],
[ "text", " " ], ["variable","$num"],
[ "string", "\"" ], ["text"," . "],
[ "constant.language.escape", "\\n\\n" ], ["string","\" = \""],
[ "string", "Please enter a whole number ... \"" ], ["text"," . "],
[ "text", ";" ] ["identifier","nfact"],
] ["lparen","("],
}, ["variable","$num"],
{ ["rparen",")"],
"state": "php-start", ["text"," . "],
"data": [ ["string","\""],
[ "variable", "$num" ], ["constant.language.escape","\\n\\n"],
[ "text", " " ], ["string","\""],
[ "keyword.operator", "=" ], ["text",";"]
[ "text", " " ], ],[
[ "support.function", "trim" ], "php-start",
[ "lparen", "(" ], ["support.function","echo"],
[ "support.function", "fgets" ], ["text"," "],
[ "lparen", "(" ], ["variable","$output"],
[ "constant.language", "STDIN" ], ["text",";"]
[ "rparen", "))" ], ],[
[ "text", ";" ] "php-start"
] ],[
}, "start",
{ ["support.php_tag","?>"]
"state": "php-start", ]]
"data": []
},
{
"state": "php-start",
"data": [
[ "comment", "// ===== PROCESS - Determing the factorial of the input number =====" ]
]
},
{
"state": "php-start",
"data": [
[ "variable", "$output" ],
[ "text", " " ],
[ "keyword.operator", "=" ],
[ "text", " " ],
[ "string", "\"" ],
[ "constant.language.escape", "\\n\\n" ],
[ "string", "Factorial \"" ],
[ "text", " . " ],
[ "variable", "$num" ],
[ "text", " . " ],
[ "string", "\" = \"" ],
[ "text", " . " ],
[ "identifier", "nfact" ],
[ "lparen", "(" ],
[ "variable", "$num" ],
[ "rparen", ")" ],
[ "text", " . " ],
[ "string", "\"" ],
[ "constant.language.escape", "\\n\\n" ],
[ "string", "\"" ],
[ "text", ";" ]
]
},
{
"state": "php-start",
"data": [
[ "support.function", "echo" ],
[ "text", " " ],
[ "variable", "$output" ],
[ "text", ";" ]
]
},
{
"state": "php-start",
"data": []
},
{
"state": "start",
"data": [
[ "support.php_tag", "?>" ]
]
}
]

View file

@ -1,254 +1,184 @@
[ [[
{ "start",
"state": "start", ["comment","# This is a simple comment"]
"data": [ ],[
[ "comment", "# This is a simple comment" ] "start",
] ["keyword","function"],
}, ["text"," "],
{ ["identifier","Hello"],
"state": "start", ["lparen","("],
"data": [ ["variable.instance","$name"],
[ "keyword", "function" ], ["rparen",")"],
[ "text", " " ], ["text"," "],
[ "identifier", "Hello" ], ["lparen","{"]
[ "lparen", "(" ], ],[
[ "variable.instance", "$name" ], "start",
[ "rparen", ")" ], ["text"," "],
[ "text", " " ], ["identifier","Write-host"],
[ "lparen", "{" ] ["text"," "],
] ["string","\"Hello $name\""]
}, ],[
{ "start",
"state": "start", ["rparen","}"]
"data": [ ],[
[ "text", " " ], "start"
[ "identifier", "Write-host" ], ],[
[ "text", " " ], "start",
[ "string", "\"Hello $name\"" ] ["keyword","function"],
] ["text"," "],
}, ["identifier","add"],
{ ["lparen","("],
"state": "start", ["variable.instance","$left"],
"data": [ ["text",", "],
[ "rparen", "}" ] ["variable.instance","$right"],
] ["keyword.operator","="],
}, ["constant.numeric","4"],
{ ["rparen",")"],
"state": "start", ["text"," "],
"data": [] ["lparen","{"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["keyword","if"],
[ "keyword", "function" ], ["text"," "],
[ "text", " " ], ["lparen","("],
[ "identifier", "add" ], ["variable.instance","$right"],
[ "lparen", "(" ], ["text"," "],
[ "variable.instance", "$left" ], ["keyword.operator","-ne"],
[ "text", ", " ], ["text"," "],
[ "variable.instance", "$right" ], ["constant.numeric","4"],
[ "keyword.operator", "=" ], ["rparen",")"],
[ "constant.numeric", "4" ], ["text"," "],
[ "rparen", ")" ], ["lparen","{"]
[ "text", " " ], ],[
[ "lparen", "{" ] "start",
] ["text"," "],
}, ["keyword","return"],
{ ["text"," "],
"state": "start", ["variable.instance","$left"]
"data": [ ],[
[ "text", " " ], "start",
[ "keyword", "if" ], ["text"," "],
[ "text", " " ], ["rparen","}"],
[ "lparen", "(" ], ["text"," "],
[ "variable.instance", "$right" ], ["keyword","elseif"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "-ne" ], ["lparen","("],
[ "text", " " ], ["variable.instance","$left"],
[ "constant.numeric", "4" ], ["text"," "],
[ "rparen", ")" ], ["keyword.operator","-eq"],
[ "text", " " ], ["text"," "],
[ "lparen", "{" ] ["constant.language","$null"],
] ["text"," "],
}, ["keyword.operator","-and"],
{ ["text"," "],
"state": "start", ["variable.instance","$right"],
"data": [ ["text"," "],
[ "text", " " ], ["keyword.operator","-eq"],
[ "keyword", "return" ], ["text"," "],
[ "text", " " ], ["constant.numeric","2"],
[ "variable.instance", "$left" ] ["rparen",")"],
] ["text"," "],
}, ["lparen","{"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["keyword","return"],
[ "rparen", "}" ], ["text"," "],
[ "text", " " ], ["constant.numeric","3"]
[ "keyword", "elseif" ], ],[
[ "text", " " ], "start",
[ "lparen", "(" ], ["text"," "],
[ "variable.instance", "$left" ], ["rparen","}"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "-eq" ], ["keyword","else"],
[ "text", " " ], ["text"," "],
[ "constant.language", "$null" ], ["lparen","{"]
[ "text", " " ], ],[
[ "keyword.operator", "-and" ], "start",
[ "text", " " ], ["text"," "],
[ "variable.instance", "$right" ], ["keyword","return"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "-eq" ], ["constant.numeric","2"]
[ "text", " " ], ],[
[ "constant.numeric", "2" ], "start",
[ "rparen", ")" ], ["text"," "],
[ "text", " " ], ["rparen","}"]
[ "lparen", "{" ] ],[
] "start",
}, ["rparen","}"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "text", " " ], "start",
[ "keyword", "return" ], ["variable.instance","$number"],
[ "text", " " ], ["text"," "],
[ "constant.numeric", "3" ] ["keyword.operator","="],
] ["text"," "],
}, ["constant.numeric","1"],
{ ["text"," "],
"state": "start", ["keyword.operator","+"],
"data": [ ["text"," "],
[ "text", " " ], ["constant.numeric","2"],
[ "rparen", "}" ], ["text",";"]
[ "text", " " ], ],[
[ "keyword", "else" ], "start",
[ "text", " " ], ["variable.instance","$number"],
[ "lparen", "{" ] ["text"," "],
] ["keyword.operator","+="],
}, ["text"," "],
{ ["constant.numeric","3"]
"state": "start", ],[
"data": [ "start"
[ "text", " " ], ],[
[ "keyword", "return" ], "start",
[ "text", " " ], ["support.function","Write-Host"],
[ "constant.numeric", "2" ] ["text"," "],
] ["identifier","Hello"],
}, ["text"," "],
{ ["keyword.operator","-"],
"state": "start", ["identifier","name"],
"data": [ ["text"," "],
[ "text", " " ], ["string","\"World\""]
[ "rparen", "}" ] ],[
] "start"
}, ],[
{ "start",
"state": "start", ["variable.instance","$an_array"],
"data": [ ["text"," "],
[ "rparen", "}" ] ["keyword.operator","="],
] ["text"," @"],
}, ["lparen","("],
{ ["constant.numeric","1"],
"state": "start", ["text",", "],
"data": [] ["constant.numeric","2"],
}, ["text",", "],
{ ["constant.numeric","3"],
"state": "start", ["rparen",")"]
"data": [ ],[
[ "variable.instance", "$number" ], "start",
[ "text", " " ], ["variable.instance","$a_hash"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["keyword.operator","="],
[ "constant.numeric", "1" ], ["text"," @"],
[ "text", " " ], ["lparen","{"],
[ "keyword.operator", "+" ], ["string","\"something\""],
[ "text", " " ], ["text"," "],
[ "constant.numeric", "2" ], ["keyword.operator","="],
[ "text", ";" ] ["text"," "],
] ["string","\"something else\""],
}, ["rparen","}"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "variable.instance", "$number" ], "start",
[ "text", " " ], ["keyword.operator","&"],
[ "keyword.operator", "+=" ], ["text"," "],
[ "text", " " ], ["identifier","notepad"],
[ "constant.numeric", "3" ] ["text"," .\\"],
] ["identifier","readme"],
}, ["text","."],
{ ["identifier","md"]
"state": "start", ],[
"data": [] "start"
}, ]]
{
"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": []
}
]

View file

@ -1,203 +1,148 @@
[ [[
{ "start",
"state": "start", ["comment","#!/usr/local/bin/python"]
"data": [ ],[
[ "comment", "#!/usr/local/bin/python" ] "start"
] ],[
}, "start",
{ ["keyword","import"],
"state": "start", ["text"," "],
"data": [] ["identifier","string"],
}, ["text",", "],
{ ["identifier","sys"]
"state": "start", ],[
"data": [ "start"
[ "keyword", "import" ], ],[
[ "text", " " ], "start",
[ "identifier", "string" ], ["comment","# If no arguments were given, print a helpful message"]
[ "text", ", " ], ],[
[ "identifier", "sys" ] "start",
] ["keyword","if"],
}, ["text"," "],
{ ["support.function","len"],
"state": "start", ["paren.lparen","("],
"data": [] ["identifier","sys"],
}, ["text","."],
{ ["identifier","argv"],
"state": "start", ["paren.rparen",")"],
"data": [ ["keyword.operator","=="],
[ "comment", "# If no arguments were given, print a helpful message" ] ["constant.numeric","1"],
] ["text",":"]
}, ],[
{ "qstring",
"state": "start", ["text"," "],
"data": [ ["keyword","print"],
[ "keyword", "if" ], ["text"," "],
[ "text", " " ], ["string","'''Usage:"]
[ "support.function", "len" ], ],[
[ "paren.lparen", "(" ], "start",
[ "identifier", "sys" ], ["string","celsius temp1 temp2 ...'''"]
[ "text", "." ], ],[
[ "identifier", "argv" ], "start",
[ "paren.rparen", ")" ], ["text"," "],
[ "keyword.operator", "==" ], ["identifier","sys"],
[ "constant.numeric", "1" ], ["text","."],
[ "text", ":" ] ["identifier","exit"],
] ["paren.lparen","("],
}, ["constant.numeric","0"],
{ ["paren.rparen",")"]
"state": "qstring", ],[
"data": [ "start"
[ "text", " " ], ],[
[ "keyword", "print" ], "start",
[ "text", " " ], ["comment","# Loop over the arguments"]
[ "string", "'''Usage:" ] ],[
] "start",
}, ["keyword","for"],
{ ["text"," "],
"state": "start", ["identifier","i"],
"data": [ ["text"," "],
[ "string", "celsius temp1 temp2 ...'''" ] ["keyword","in"],
] ["text"," "],
}, ["identifier","sys"],
{ ["text","."],
"state": "start", ["identifier","argv"],
"data": [ ["paren.lparen","["],
[ "text", " " ], ["constant.numeric","1"],
[ "identifier", "sys" ], ["text",":"],
[ "text", "." ], ["paren.rparen","]"],
[ "identifier", "exit" ], ["text",":"]
[ "paren.lparen", "(" ], ],[
[ "constant.numeric", "0" ], "start",
[ "paren.rparen", ")" ] ["text"," "],
] ["keyword","try"],
}, ["text",":"]
{ ],[
"state": "start", "start",
"data": [] ["text"," "],
}, ["identifier","fahrenheit"],
{ ["keyword.operator","="],
"state": "start", ["support.function","float"],
"data": [ ["paren.lparen","("],
[ "comment", "# Loop over the arguments" ] ["identifier","string"],
] ["text","."],
}, ["identifier","atoi"],
{ ["paren.lparen","("],
"state": "start", ["identifier","i"],
"data": [ ["paren.rparen","))"]
[ "keyword", "for" ], ],[
[ "text", " " ], "start",
[ "identifier", "i" ], ["text"," "],
[ "text", " " ], ["keyword","except"],
[ "keyword", "in" ], ["text"," "],
[ "text", " " ], ["identifier","string"],
[ "identifier", "sys" ], ["text","."],
[ "text", "." ], ["identifier","atoi_error"],
[ "identifier", "argv" ], ["text",":"]
[ "paren.lparen", "[" ], ],[
[ "constant.numeric", "1" ], "start",
[ "text", ":" ], ["text"," "],
[ "paren.rparen", "]" ], ["keyword","print"],
[ "text", ":" ] ["text"," "],
] ["support.function","repr"],
}, ["paren.lparen","("],
{ ["identifier","i"],
"state": "start", ["paren.rparen",")"],
"data": [ ["text",", "],
[ "text", " " ], ["string","\"not a numeric value\""]
[ "keyword", "try" ], ],[
[ "text", ":" ] "start",
] ["text"," "],
}, ["keyword","else"],
{ ["text",":"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["text"," "],
[ "identifier", "fahrenheit" ], ["identifier","celsius"],
[ "keyword.operator", "=" ], ["keyword.operator","="],
[ "support.function", "float" ], ["paren.lparen","("],
[ "paren.lparen", "(" ], ["identifier","fahrenheit"],
[ "identifier", "string" ], ["keyword.operator","-"],
[ "text", "." ], ["constant.numeric","32"],
[ "identifier", "atoi" ], ["paren.rparen",")"],
[ "paren.lparen", "(" ], ["keyword.operator","*"],
[ "identifier", "i" ], ["constant.numeric","5.0"],
[ "paren.rparen", "))" ] ["keyword.operator","/"],
] ["constant.numeric","9.0"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["keyword","print"],
[ "text", " " ], ["text"," "],
[ "keyword", "except" ], ["string","'%i\\260F = %i\\260C'"],
[ "text", " " ], ["text"," "],
[ "identifier", "string" ], ["keyword.operator","%"],
[ "text", "." ], ["text"," "],
[ "identifier", "atoi_error" ], ["paren.lparen","("],
[ "text", ":" ] ["support.function","int"],
] ["paren.lparen","("],
}, ["identifier","fahrenheit"],
{ ["paren.rparen",")"],
"state": "start", ["text",", "],
"data": [ ["support.function","int"],
[ "text", " " ], ["paren.lparen","("],
[ "keyword", "print" ], ["identifier","celsius"],
[ "text", " " ], ["keyword.operator","+"],
[ "support.function", "repr" ], ["constant.numeric",".5"],
[ "paren.lparen", "(" ], ["paren.rparen","))"]
[ "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", "))" ]
]
}
]

View file

@ -1,296 +1,235 @@
[ [[
{ "start",
"state": "start", ["identifier","Call"],
"data": [ ["keyword.operator",":"]
[ "identifier", "Call" ], ],[
[ "keyword.operator", ":" ] "start",
] ["identifier","lm"],
}, ["paren.keyword.operator","("],
{ ["identifier","formula"],
"state": "start", ["text"," "],
"data": [ ["keyword.operator","="],
[ "identifier", "lm" ], ["text"," "],
[ "paren.keyword.operator", "(" ], ["identifier","y"],
[ "identifier", "formula" ], ["text"," "],
[ "text", " " ], ["keyword.operator","~"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["identifier","x"],
[ "identifier", "y" ], ["paren.keyword.operator",")"]
[ "text", " " ], ],[
[ "keyword.operator", "~" ], "start",
[ "text", " " ], ["text"," "]
[ "identifier", "x" ], ],[
[ "paren.keyword.operator", ")" ] "start",
] ["identifier","Residuals"],
}, ["keyword.operator",":"]
{ ],[
"state": "start", "start",
"data": [ ["constant.numeric","1"],
[ "text", " " ] ["text"," "],
] ["constant.numeric","2"],
}, ["text"," "],
{ ["constant.numeric","3"],
"state": "start", ["text"," "],
"data": [ ["constant.numeric","4"],
[ "identifier", "Residuals" ], ["text"," "],
[ "keyword.operator", ":" ] ["constant.numeric","5"],
] ["text"," "],
}, ["constant.numeric","6"]
{ ],[
"state": "start", "start",
"data": [ ["constant.numeric","3.3333"],
[ "constant.numeric", "1" ], ["text"," "],
[ "text", " " ], ["keyword.operator","-"],
[ "constant.numeric", "2" ], ["constant.numeric","0.6667"],
[ "text", " " ], ["text"," "],
[ "constant.numeric", "3" ], ["keyword.operator","-"],
[ "text", " " ], ["constant.numeric","2.6667"],
[ "constant.numeric", "4" ], ["text"," "],
[ "text", " " ], ["keyword.operator","-"],
[ "constant.numeric", "5" ], ["constant.numeric","2.6667"],
[ "text", " " ], ["text"," "],
[ "constant.numeric", "6" ] ["keyword.operator","-"],
] ["constant.numeric","0.6667"],
}, ["text"," "],
{ ["constant.numeric","3.3333"]
"state": "start", ],[
"data": [ "start",
[ "constant.numeric", "3.3333" ], ["text"," "]
[ "text", " " ], ],[
[ "keyword.operator", "-" ], "start",
[ "constant.numeric", "0.6667" ], ["identifier","Coefficients"],
[ "text", " " ], ["keyword.operator",":"]
[ "keyword.operator", "-" ], ],[
[ "constant.numeric", "2.6667" ], "start",
[ "text", " " ], ["text"," "],
[ "keyword.operator", "-" ], ["identifier","Estimate"],
[ "constant.numeric", "2.6667" ], ["text"," "],
[ "text", " " ], ["identifier","Std"],
[ "keyword.operator", "-" ], ["text",". "],
[ "constant.numeric", "0.6667" ], ["identifier","Error"],
[ "text", " " ], ["text"," "],
[ "constant.numeric", "3.3333" ] ["identifier","t"],
] ["text"," "],
}, ["identifier","value"],
{ ["text"," "],
"state": "start", ["identifier","Pr"],
"data": [ ["paren.keyword.operator","("],
[ "text", " " ] ["keyword.operator",">|"],
] ["identifier","t"],
}, ["keyword.operator","|"],
{ ["paren.keyword.operator",")"]
"state": "start", ],[
"data": [ "start",
[ "identifier", "Coefficients" ], ["paren.keyword.operator","("],
[ "keyword.operator", ":" ] ["identifier","Intercept"],
] ["paren.keyword.operator",")"],
}, ["text"," "],
{ ["keyword.operator","-"],
"state": "start", ["constant.numeric","9.3333"],
"data": [ ["text"," "],
[ "text", " " ], ["constant.numeric","2.8441"],
[ "identifier", "Estimate" ], ["text"," "],
[ "text", " " ], ["keyword.operator","-"],
[ "identifier", "Std" ], ["constant.numeric","3.282"],
[ "text", ". " ], ["text"," "],
[ "identifier", "Error" ], ["constant.numeric","0.030453"],
[ "text", " " ], ["text"," "],
[ "identifier", "t" ], ["keyword.operator","*"]
[ "text", " " ], ],[
[ "identifier", "value" ], "start",
[ "text", " " ], ["identifier","x"],
[ "identifier", "Pr" ], ["text"," "],
[ "paren.keyword.operator", "(" ], ["constant.numeric","7.0000"],
[ "keyword.operator", ">|" ], ["text"," "],
[ "identifier", "t" ], ["constant.numeric","0.7303"],
[ "keyword.operator", "|" ], ["text"," "],
[ "paren.keyword.operator", ")" ] ["constant.numeric","9.585"],
] ["text"," "],
}, ["constant.numeric","0.000662"],
{ ["text"," "],
"state": "start", ["keyword.operator","***"]
"data": [ ],[
[ "paren.keyword.operator", "(" ], "start",
[ "identifier", "Intercept" ], ["keyword.operator","---"]
[ "paren.keyword.operator", ")" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "-" ], ["identifier","Signif"],
[ "constant.numeric", "9.3333" ], ["text",". "],
[ "text", " " ], ["identifier","codes"],
[ "constant.numeric", "2.8441" ], ["keyword.operator",":"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "-" ], ["constant.numeric","0"],
[ "constant.numeric", "3.282" ], ["text"," ‘"],
[ "text", " " ], ["keyword.operator","***"],
[ "constant.numeric", "0.030453" ], ["text","’ "],
[ "text", " " ], ["constant.numeric","0.001"],
[ "keyword.operator", "*" ] ["text"," ‘"],
] ["keyword.operator","**"],
}, ["text","’ "],
{ ["constant.numeric","0.01"],
"state": "start", ["text"," ‘"],
"data": [ ["keyword.operator","*"],
[ "identifier", "x" ], ["text","’ "],
[ "text", " " ], ["constant.numeric","0.05"],
[ "constant.numeric", "7.0000" ], ["text"," ‘.’ "],
[ "text", " " ], ["constant.numeric","0.1"],
[ "constant.numeric", "0.7303" ], ["text"," ‘ ’ "],
[ "text", " " ], ["constant.numeric","1"]
[ "constant.numeric", "9.585" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "0.000662" ], ["text"," "]
[ "text", " " ], ],[
[ "keyword.operator", "***" ] "start",
] ["identifier","Residual"],
}, ["text"," "],
{ ["identifier","standard"],
"state": "start", ["text"," "],
"data": [ ["identifier","error"],
[ "keyword.operator", "---" ] ["keyword.operator",":"],
] ["text"," "],
}, ["constant.numeric","3.055"],
{ ["text"," "],
"state": "start", ["identifier","on"],
"data": [ ["text"," "],
[ "identifier", "Signif" ], ["constant.numeric","4"],
[ "text", ". " ], ["text"," "],
[ "identifier", "codes" ], ["identifier","degrees"],
[ "keyword.operator", ":" ], ["text"," "],
[ "text", " " ], ["identifier","of"],
[ "constant.numeric", "0" ], ["text"," "],
[ "text", " ‘" ], ["identifier","freedom"]
[ "keyword.operator", "***" ], ],[
[ "text", "’ " ], "start",
[ "constant.numeric", "0.001" ], ["identifier","Multiple"],
[ "text", " ‘" ], ["text"," "],
[ "keyword.operator", "**" ], ["identifier","R"],
[ "text", "’ " ], ["keyword.operator","-"],
[ "constant.numeric", "0.01" ], ["identifier","squared"],
[ "text", " ‘" ], ["keyword.operator",":"],
[ "keyword.operator", "*" ], ["text"," "],
[ "text", "’ " ], ["constant.numeric","0.9583"],
[ "constant.numeric", "0.05" ], ["text",", "],
[ "text", " ‘.’ " ], ["identifier","Adjusted"],
[ "constant.numeric", "0.1" ], ["text"," "],
[ "text", " ‘ ’ " ], ["identifier","R"],
[ "constant.numeric", "1" ] ["keyword.operator","-"],
] ["identifier","squared"],
}, ["keyword.operator",":"],
{ ["text"," "],
"state": "start", ["constant.numeric","0.9478"]
"data": [ ],[
[ "text", " " ] "start",
] ["constant.language.boolean","F"],
}, ["keyword.operator","-"],
{ ["identifier","statistic"],
"state": "start", ["keyword.operator",":"],
"data": [ ["text"," "],
[ "identifier", "Residual" ], ["constant.numeric","91.88"],
[ "text", " " ], ["text"," "],
[ "identifier", "standard" ], ["identifier","on"],
[ "text", " " ], ["text"," "],
[ "identifier", "error" ], ["constant.numeric","1"],
[ "keyword.operator", ":" ], ["text"," "],
[ "text", " " ], ["identifier","and"],
[ "constant.numeric", "3.055" ], ["text"," "],
[ "text", " " ], ["constant.numeric","4"],
[ "identifier", "on" ], ["text"," "],
[ "text", " " ], ["identifier","DF"],
[ "constant.numeric", "4" ], ["text",", "],
[ "text", " " ], ["identifier","p"],
[ "identifier", "degrees" ], ["keyword.operator","-"],
[ "text", " " ], ["identifier","value"],
[ "identifier", "of" ], ["keyword.operator",":"],
[ "text", " " ], ["text"," "],
[ "identifier", "freedom" ] ["constant.numeric","0.000662"]
] ],[
}, "start",
{ ["text"," "]
"state": "start", ],[
"data": [ "start",
[ "identifier", "Multiple" ], ["keyword.operator",">"],
[ "text", " " ], ["text"," "],
[ "identifier", "R" ], ["identifier","par"],
[ "keyword.operator", "-" ], ["paren.keyword.operator","("],
[ "identifier", "squared" ], ["identifier","mfrow"],
[ "keyword.operator", ":" ], ["keyword.operator","="],
[ "text", " " ], ["identifier","c"],
[ "constant.numeric", "0.9583" ], ["paren.keyword.operator","("],
[ "text", ", " ], ["constant.numeric","2"],
[ "identifier", "Adjusted" ], ["text",", "],
[ "text", " " ], ["constant.numeric","2"],
[ "identifier", "R" ], ["paren.keyword.operator","))"],
[ "keyword.operator", "-" ], ["text"," "],
[ "identifier", "squared" ], ["comment","# Request 2x2 plot layout"]
[ "keyword.operator", ":" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "0.9478" ] ["keyword.operator",">"],
] ["text"," "],
}, ["identifier","plot"],
{ ["paren.keyword.operator","("],
"state": "start", ["identifier","lm_1"],
"data": [ ["paren.keyword.operator",")"],
[ "constant.language.boolean", "F" ], ["text"," "],
[ "keyword.operator", "-" ], ["comment","# Diagnostic plot of regression model"]
[ "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" ]
]
}
]

File diff suppressed because it is too large Load diff

View file

@ -1,168 +1,106 @@
[ [[
{ "start",
"state": "start", ["meta.tag","<"],
"data": [ ["meta.tag.tag-name","html"],
[ "meta.tag", "<" ], ["meta.tag.r",">"]
[ "meta.tag.tag-name", "html" ], ],[
[ "meta.tag.r", ">" ] "start"
] ],[
}, "start",
{ ["meta.tag","<"],
"state": "start", ["meta.tag.tag-name","head"],
"data": [] ["meta.tag.r",">"]
}, ],[
{ "start",
"state": "start", ["meta.tag","<"],
"data": [ ["meta.tag.tag-name","title"],
[ "meta.tag", "<" ], ["meta.tag.r",">"],
[ "meta.tag.tag-name", "head" ], ["text","Title"],
[ "meta.tag.r", ">" ] ["meta.tag","</"],
] ["meta.tag.tag-name","title"],
}, ["meta.tag.r",">"]
{ ],[
"state": "start", "start",
"data": [ ["meta.tag","</"],
[ "meta.tag", "<" ], ["meta.tag.tag-name","head"],
[ "meta.tag.tag-name", "title" ], ["meta.tag.r",">"]
[ "meta.tag.r", ">" ], ],[
[ "text", "Title" ], "start"
[ "meta.tag", "</" ], ],[
[ "meta.tag.tag-name", "title" ], "start",
[ "meta.tag.r", ">" ] ["meta.tag","<"],
] ["meta.tag.tag-name","body"],
}, ["meta.tag.r",">"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "meta.tag", "</" ], "start",
[ "meta.tag.tag-name", "head" ], ["meta.tag","<"],
[ "meta.tag.r", ">" ] ["meta.tag.tag-name","p"],
] ["meta.tag.r",">"],
}, ["text","This is an R HTML document. When you click the "],
{ ["meta.tag","<"],
"state": "start", ["meta.tag.tag-name","b"],
"data": [] ["meta.tag.r",">"],
}, ["text","Knit HTML"],
{ ["meta.tag","</"],
"state": "start", ["meta.tag.tag-name","b"],
"data": [ ["meta.tag.r",">"],
[ "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.tag-name", "body" ], ["meta.tag","</"],
[ "meta.tag.r", ">" ] ["meta.tag.tag-name","p"],
] ["meta.tag.r",">"]
}, ],[
{ "start"
"state": "start", ],[
"data": [] "r-start",
}, ["support.function.codebegin","<!--begin.rcode"]
{ ],[
"state": "start", "r-start",
"data": [ ["identifier","summary"],
[ "meta.tag", "<" ], ["paren.keyword.operator","("],
[ "meta.tag.tag-name", "p" ], ["identifier","cars"],
[ "meta.tag.r", ">" ], ["paren.keyword.operator",")"]
[ "text", "This is an R HTML document. When you click the " ], ],[
[ "meta.tag", "<" ], "start",
[ "meta.tag.tag-name", "b" ], ["support.function.codeend","end.rcode-->"]
[ "meta.tag.r", ">" ], ],[
[ "text", "Knit HTML" ], "start"
[ "meta.tag", "</" ], ],[
[ "meta.tag.tag-name", "b" ], "start",
[ "meta.tag.r", ">" ], ["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.tag-name","p"],
[ "meta.tag", "</" ], ["meta.tag.r",">"],
[ "meta.tag.tag-name", "p" ], ["text","You can also embed plots, for example:"],
[ "meta.tag.r", ">" ] ["meta.tag","</"],
] ["meta.tag.tag-name","p"],
}, ["meta.tag.r",">"]
{ ],[
"state": "start", "start"
"data": [] ],[
}, "r-start",
{ ["support.function.codebegin","<!--begin.rcode fig.width=7, fig.height=6"]
"state": "r-start", ],[
"data": [ "r-start",
[ "support.function.codebegin", "<!--begin.rcode" ] ["identifier","plot"],
] ["paren.keyword.operator","("],
}, ["identifier","cars"],
{ ["paren.keyword.operator",")"]
"state": "r-start", ],[
"data": [ "start",
[ "identifier", "summary" ], ["support.function.codeend","end.rcode-->"]
[ "paren.keyword.operator", "(" ], ],[
[ "identifier", "cars" ], "start"
[ "paren.keyword.operator", ")" ] ],[
] "start",
}, ["meta.tag","</"],
{ ["meta.tag.tag-name","body"],
"state": "start", ["meta.tag.r",">"]
"data": [ ],[
[ "support.function.codeend", "end.rcode-->" ] "start",
] ["meta.tag","</"],
}, ["meta.tag.tag-name","html"],
{ ["meta.tag.r",">"]
"state": "start", ],[
"data": [] "start"
}, ]]
{
"state": "start",
"data": [
[ "meta.tag", "<" ],
[ "meta.tag.tag-name", "p" ],
[ "meta.tag.r", ">" ],
[ "text", "You can also embed plots, for example:" ],
[ "meta.tag", "</" ],
[ "meta.tag.tag-name", "p" ],
[ "meta.tag.r", ">" ]
]
},
{
"state": "start",
"data": []
},
{
"state": "r-start",
"data": [
[ "support.function.codebegin", "<!--begin.rcode fig.width=7, fig.height=6" ]
]
},
{
"state": "r-start",
"data": [
[ "identifier", "plot" ],
[ "paren.keyword.operator", "(" ],
[ "identifier", "cars" ],
[ "paren.keyword.operator", ")" ]
]
},
{
"state": "start",
"data": [
[ "support.function.codeend", "end.rcode-->" ]
]
},
{
"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", "html" ],
[ "meta.tag.r", ">" ]
]
},
{
"state": "start",
"data": []
}
]

View file

@ -1,220 +1,154 @@
[ [[
{ "start",
"state": "start", ["comment","#!/usr/bin/ruby"]
"data": [ ],[
[ "comment", "#!/usr/bin/ruby" ] "start"
] ],[
}, "start",
{ ["comment","# Program to find the factorial of a number"]
"state": "start", ],[
"data": [] "start",
}, ["keyword","def"],
{ ["text"," "],
"state": "start", ["identifier","fact"],
"data": [ ["paren.lparen","("],
[ "comment", "# Program to find the factorial of a number" ] ["identifier","n"],
] ["paren.rparen",")"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["keyword","if"],
[ "keyword", "def" ], ["text"," "],
[ "text", " " ], ["identifier","n"],
[ "identifier", "fact" ], ["text"," "],
[ "paren.lparen", "(" ], ["keyword.operator","=="],
[ "identifier", "n" ], ["text"," "],
[ "paren.rparen", ")" ] ["constant.numeric","0"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["constant.numeric","1"]
"data": [ ],[
[ "text", " " ], "start",
[ "keyword", "if" ], ["text"," "],
[ "text", " " ], ["keyword","else"]
[ "identifier", "n" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "==" ], ["text"," "],
[ "text", " " ], ["identifier","n"],
[ "constant.numeric", "0" ] ["text"," "],
] ["keyword.operator","*"],
}, ["text"," "],
{ ["identifier","fact"],
"state": "start", ["paren.lparen","("],
"data": [ ["identifier","n"],
[ "text", " " ], ["constant.numeric","-1"],
[ "constant.numeric", "1" ] ["paren.rparen",")"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword","end"]
"data": [ ],[
[ "text", " " ], "start",
[ "keyword", "else" ] ["keyword","end"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["support.function","puts"],
[ "text", " " ], ["text"," "],
[ "identifier", "n" ], ["identifier","fact"],
[ "text", " " ], ["paren.lparen","("],
[ "keyword.operator", "*" ], ["support.class","ARGV"],
[ "text", " " ], ["paren.lparen","["],
[ "identifier", "fact" ], ["constant.numeric","0"],
[ "paren.lparen", "(" ], ["paren.rparen","]"],
[ "identifier", "n" ], ["text","."],
[ "constant.numeric", "-1" ], ["identifier","to_i"],
[ "paren.rparen", ")" ] ["paren.rparen",")"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["keyword","class"],
[ "text", " " ], ["text"," "],
[ "keyword", "end" ] ["support.class","Range"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword","def"],
"data": [ ["text"," "],
[ "keyword", "end" ] ["identifier","to_json"],
] ["paren.lparen","("],
}, ["keyword.operator","*"],
{ ["identifier","a"],
"state": "start", ["paren.rparen",")"]
"data": [] ],[
}, "start",
{ ["text"," "],
"state": "start", ["paren.lparen","{"]
"data": [ ],[
[ "support.function", "puts" ], "start",
[ "text", " " ], ["text"," "],
[ "identifier", "fact" ], ["string","'json_class'"],
[ "paren.lparen", "(" ], ["text"," "],
[ "support.class", "ARGV" ], ["punctuation.separator.key-value","=>"],
[ "paren.lparen", "[" ], ["text"," "],
[ "constant.numeric", "0" ], ["variable.language","self"],
[ "paren.rparen", "]" ], ["text","."],
[ "text", "." ], ["keyword","class"],
[ "identifier", "to_i" ], ["text","."],
[ "paren.rparen", ")" ] ["identifier","name"],
] ["text",", "],
}, ["comment","# = 'Range'"]
{ ],[
"state": "start", "start",
"data": [] ["text"," "],
}, ["string","'data'"],
{ ["text"," "],
"state": "start", ["punctuation.separator.key-value","=>"],
"data": [ ["text"," "],
[ "keyword", "class" ], ["paren.lparen","["],
[ "text", " " ], ["text"," "],
[ "support.class", "Range" ] ["identifier","first"],
] ["text",", "],
}, ["identifier","last"],
{ ["text",", "],
"state": "start", ["identifier","exclude_end"],
"data": [ ["text","? "],
[ "text", " " ], ["paren.rparen","]"]
[ "keyword", "def" ], ],[
[ "text", " " ], "start",
[ "identifier", "to_json" ], ["text"," "],
[ "paren.lparen", "(" ], ["paren.rparen","}"],
[ "keyword.operator", "*" ], ["text","."],
[ "identifier", "a" ], ["identifier","to_json"],
[ "paren.rparen", ")" ] ["paren.lparen","("],
] ["keyword.operator","*"],
}, ["identifier","a"],
{ ["paren.rparen",")"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ] ["keyword","end"]
] ],[
}, "start",
{ ["keyword","end"]
"state": "start", ],[
"data": [ "start"
[ "text", " " ], ],[
[ "string", "'json_class'" ], "start",
[ "text", " " ], ["paren.lparen","{"],
[ "punctuation.separator.key-value", "=>" ], ["constant.other.symbol.ruby",":id"],
[ "text", " " ], ["text"," "],
[ "variable.language", "self" ], ["punctuation.separator.key-value","=>"],
[ "text", "." ], ["text"," "],
[ "keyword", "class" ], ["constant.numeric","34"],
[ "text", "." ], ["text",", "],
[ "identifier", "name" ], ["constant.other.symbol.ruby",":sdfasdfasdf"],
[ "text", ", " ], ["text"," "],
[ "comment", "# = 'Range'" ] ["punctuation.separator.key-value","=>"],
] ["text"," "],
}, ["string","\"asdasdads\""],
{ ["paren.rparen","}"]
"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", "}" ]
]
}
]

View file

@ -1,256 +1,194 @@
[ [[
{ "start",
"state": "start", ["comment","// ace can highlight scad!"]
"data": [ ],[
[ "comment", "// ace can highlight scad!" ] "start",
] ["keyword","module"],
}, ["text"," "],
{ ["identifier","Element"],
"state": "start", ["paren.lparen","("],
"data": [ ["identifier","xpos"],
[ "keyword", "module" ], ["text",", "],
[ "text", " " ], ["identifier","ypos"],
[ "identifier", "Element" ], ["text",", "],
[ "paren.lparen", "(" ], ["identifier","zpos"],
[ "identifier", "xpos" ], ["paren.rparen",")"],
[ "text", ", " ], ["paren.lparen","{"]
[ "identifier", "ypos" ], ],[
[ "text", ", " ], "start",
[ "identifier", "zpos" ], ["text","\t"],
[ "paren.rparen", ")" ], ["identifier","translate"],
[ "paren.lparen", "{" ] ["paren.lparen","(["],
] ["identifier","xpos"],
}, ["text",","],
{ ["identifier","ypos"],
"state": "start", ["text",","],
"data": [ ["identifier","zpos"],
[ "text", "\t" ], ["paren.rparen","])"],
[ "identifier", "translate" ], ["paren.lparen","{"]
[ "paren.lparen", "([" ], ],[
[ "identifier", "xpos" ], "start",
[ "text", "," ], ["text","\t\t"],
[ "identifier", "ypos" ], ["identifier","union"],
[ "text", "," ], ["paren.lparen","("],
[ "identifier", "zpos" ], ["paren.rparen",")"],
[ "paren.rparen", "])" ], ["paren.lparen","{"]
[ "paren.lparen", "{" ] ],[
] "start",
}, ["text","\t\t\t"],
{ ["identifier","cube"],
"state": "start", ["paren.lparen","(["],
"data": [ ["constant.numeric","10"],
[ "text", "\t\t" ], ["text",","],
[ "identifier", "union" ], ["constant.numeric","10"],
[ "paren.lparen", "(" ], ["text",","],
[ "paren.rparen", ")" ], ["constant.numeric","4"],
[ "paren.lparen", "{" ] ["paren.rparen","]"],
] ["text",","],
}, ["identifier","true"],
{ ["paren.rparen",")"],
"state": "start", ["text",";"]
"data": [ ],[
[ "text", "\t\t\t" ], "start",
[ "identifier", "cube" ], ["text","\t\t\t"],
[ "paren.lparen", "([" ], ["identifier","cylinder"],
[ "constant.numeric", "10" ], ["paren.lparen","("],
[ "text", "," ], ["constant.numeric","10"],
[ "constant.numeric", "10" ], ["text",","],
[ "text", "," ], ["constant.numeric","15"],
[ "constant.numeric", "4" ], ["text",","],
[ "paren.rparen", "]" ], ["constant.numeric","5"],
[ "text", "," ], ["paren.rparen",")"],
[ "identifier", "true" ], ["text",";"]
[ "paren.rparen", ")" ], ],[
[ "text", ";" ] "start",
] ["text","\t\t\t"],
}, ["identifier","translate"],
{ ["paren.lparen","(["],
"state": "start", ["constant.numeric","0"],
"data": [ ["text",","],
[ "text", "\t\t\t" ], ["constant.numeric","0"],
[ "identifier", "cylinder" ], ["text",","],
[ "paren.lparen", "(" ], ["constant.numeric","10"],
[ "constant.numeric", "10" ], ["paren.rparen","])"],
[ "text", "," ], ["identifier","sphere"],
[ "constant.numeric", "15" ], ["paren.lparen","("],
[ "text", "," ], ["constant.numeric","5"],
[ "constant.numeric", "5" ], ["paren.rparen",")"],
[ "paren.rparen", ")" ], ["text",";"]
[ "text", ";" ] ],[
] "start",
}, ["text","\t\t"],
{ ["paren.rparen","}"]
"state": "start", ],[
"data": [ "start",
[ "text", "\t\t\t" ], ["text","\t"],
[ "identifier", "translate" ], ["paren.rparen","}"]
[ "paren.lparen", "([" ], ],[
[ "constant.numeric", "0" ], "start",
[ "text", "," ], ["paren.rparen","}"]
[ "constant.numeric", "0" ], ],[
[ "text", "," ], "start"
[ "constant.numeric", "10" ], ],[
[ "paren.rparen", "])" ], "start",
[ "identifier", "sphere" ], ["identifier","union"],
[ "paren.lparen", "(" ], ["paren.lparen","("],
[ "constant.numeric", "5" ], ["paren.rparen",")"],
[ "paren.rparen", ")" ], ["paren.lparen","{"]
[ "text", ";" ] ],[
] "start",
}, ["text","\t"],
{ ["keyword","for"],
"state": "start", ["paren.lparen","("],
"data": [ ["identifier","i"],
[ "text", "\t\t" ], ["keyword.operator","="],
[ "paren.rparen", "}" ] ["paren.lparen","["],
] ["constant.numeric","0"],
}, ["text",":"],
{ ["constant.numeric","30"],
"state": "start", ["paren.rparen","])"],
"data": [ ["paren.lparen","{"]
[ "text", "\t" ], ],[
[ "paren.rparen", "}" ] "start",
] ["text","\t\t# "],
}, ["identifier","Element"],
{ ["paren.lparen","("],
"state": "start", ["constant.numeric","0"],
"data": [ ["text",","],
[ "paren.rparen", "}" ] ["constant.numeric","0"],
] ["text",","],
}, ["constant.numeric","0"],
{ ["paren.rparen",")"],
"state": "start", ["text",";"]
"data": [] ],[
}, "start",
{ ["text","\t\t"],
"state": "start", ["identifier","Element"],
"data": [ ["paren.lparen","("],
[ "identifier", "union" ], ["constant.numeric","15"],
[ "paren.lparen", "(" ], ["keyword.operator","*"],
[ "paren.rparen", ")" ], ["identifier","i"],
[ "paren.lparen", "{" ] ["text",","],
] ["constant.numeric","0"],
}, ["text",","],
{ ["constant.numeric","0"],
"state": "start", ["paren.rparen",")"],
"data": [ ["text",";"]
[ "text", "\t" ], ],[
[ "keyword", "for" ], "start",
[ "paren.lparen", "(" ], ["text","\t"],
[ "identifier", "i" ], ["paren.rparen","}"]
[ "keyword.operator", "=" ], ],[
[ "paren.lparen", "[" ], "start",
[ "constant.numeric", "0" ], ["paren.rparen","}"]
[ "text", ":" ], ],[
[ "constant.numeric", "30" ], "start"
[ "paren.rparen", "])" ], ],[
[ "paren.lparen", "{" ] "start",
] ["keyword","for"],
}, ["text"," "],
{ ["paren.lparen","("],
"state": "start", ["identifier","i"],
"data": [ ["text"," "],
[ "text", "\t\t# " ], ["keyword.operator","="],
[ "identifier", "Element" ], ["text"," "],
[ "paren.lparen", "(" ], ["paren.lparen","["],
[ "constant.numeric", "0" ], ["constant.numeric","3"],
[ "text", "," ], ["text",", "],
[ "constant.numeric", "0" ], ["constant.numeric","5"],
[ "text", "," ], ["text",", "],
[ "constant.numeric", "0" ], ["constant.numeric","7"],
[ "paren.rparen", ")" ], ["text",", "],
[ "text", ";" ] ["constant.numeric","11"],
] ["paren.rparen","])"],
}, ["paren.lparen","{"]
{ ],[
"state": "start", "start",
"data": [ ["text","\t"],
[ "text", "\t\t" ], ["identifier","rotate"],
[ "identifier", "Element" ], ["paren.lparen","(["],
[ "paren.lparen", "(" ], ["identifier","i"],
[ "constant.numeric", "15" ], ["keyword.operator","*"],
[ "keyword.operator", "*" ], ["constant.numeric","10"],
[ "identifier", "i" ], ["text",","],
[ "text", "," ], ["constant.numeric","0"],
[ "constant.numeric", "0" ], ["text",","],
[ "text", "," ], ["constant.numeric","0"],
[ "constant.numeric", "0" ], ["paren.rparen","])"],
[ "paren.rparen", ")" ], ["identifier","scale"],
[ "text", ";" ] ["paren.lparen","(["],
] ["constant.numeric","1"],
}, ["text",","],
{ ["constant.numeric","1"],
"state": "start", ["text",","],
"data": [ ["identifier","i"],
[ "text", "\t" ], ["paren.rparen","])"],
[ "paren.rparen", "}" ] ["identifier","cube"],
] ["paren.lparen","("],
}, ["constant.numeric","10"],
{ ["paren.rparen",")"],
"state": "start", ["text",";"]
"data": [ ],[
[ "paren.rparen", "}" ] "start",
] ["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", "}" ]
]
}
]

File diff suppressed because it is too large Load diff

View file

@ -1,180 +1,123 @@
[ [[
{ "start",
"state": "start", ["comment","/* style.scss */"]
"data": [ ],[
[ "comment", "/* style.scss */" ] "start"
] ],[
}, "start",
{ ["variable.language","#navbar"],
"state": "start", ["text"," "],
"data": [] ["paren.lparen","{"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["variable","$navbar-width"],
[ "variable.language", "#navbar" ], ["text",": "],
[ "text", " " ], ["constant.numeric","800px"],
[ "paren.lparen", "{" ] ["text",";"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["variable","$items"],
"data": [ ["text",": "],
[ "text", " " ], ["constant.numeric","5"],
[ "variable", "$navbar-width" ], ["text",";"]
[ "text", ": " ], ],[
[ "constant.numeric", "800px" ], "start",
[ "text", ";" ] ["text"," "],
] ["variable","$navbar-color"],
}, ["text",": "],
{ ["constant.numeric","#ce4dd6"],
"state": "start", ["text",";"]
"data": [ ],[
[ "text", " " ], "start"
[ "variable", "$items" ], ],[
[ "text", ": " ], "start",
[ "constant.numeric", "5" ], ["text"," "],
[ "text", ";" ] ["support.type","width"],
] ["text",": "],
}, ["variable","$navbar-width"],
{ ["text",";"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["text"," "],
[ "variable", "$navbar-color" ], ["support.type","border-bottom"],
[ "text", ": " ], ["text",": "],
[ "constant.numeric", "#ce4dd6" ], ["constant.numeric","2px"],
[ "text", ";" ] ["text"," "],
] ["constant.language","solid"],
}, ["text"," "],
{ ["variable","$navbar-color"],
"state": "start", ["text",";"]
"data": [] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["variable.language","li"],
[ "support.type", "width" ], ["text"," "],
[ "text", ": " ], ["paren.lparen","{"]
[ "variable", "$navbar-width" ], ],[
[ "text", ";" ] "start",
] ["text"," "],
}, ["support.type","float"],
{ ["text",": "],
"state": "start", ["support.type","left"],
"data": [ ["text",";"]
[ "text", " " ], ],[
[ "support.type", "border-bottom" ], "start",
[ "text", ": " ], ["text"," "],
[ "constant.numeric", "2px" ], ["support.type","width"],
[ "text", " " ], ["text",": "],
[ "constant.language", "solid" ], ["variable","$navbar-width"],
[ "text", " " ], ["text","/"],
[ "variable", "$navbar-color" ], ["variable","$items"],
[ "text", ";" ] ["text"," "],
] ["constant","-"],
}, ["text"," "],
{ ["constant.numeric","10px"],
"state": "start", ["text",";"]
"data": [] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["support.type","background-color"],
[ "variable.language", "li" ], ["text",": "],
[ "text", " " ], ["support.function","lighten"],
[ "paren.lparen", "{" ] ["paren.lparen","("],
] ["variable","$navbar-color"],
}, ["text",", "],
{ ["constant.numeric","20%"],
"state": "start", ["paren.rparen",")"],
"data": [ ["text",";"]
[ "text", " " ], ],[
[ "support.type", "float" ], "start",
[ "text", ": " ], ["text"," &"],
[ "support.type", "left" ], ["variable.language",":hover"],
[ "text", ";" ] ["text"," "],
] ["paren.lparen","{"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["support.type","background-color"],
[ "text", " " ], ["text",": "],
[ "support.type", "width" ], ["support.function","lighten"],
[ "text", ": " ], ["paren.lparen","("],
[ "variable", "$navbar-width" ], ["variable","$navbar-color"],
[ "text", "/" ], ["text",", "],
[ "variable", "$items" ], ["constant.numeric","10%"],
[ "text", " " ], ["paren.rparen",")"],
[ "constant", "-" ], ["text",";"]
[ "text", " " ], ],[
[ "constant.numeric", "10px" ], "start",
[ "text", ";" ] ["text"," "],
] ["paren.rparen","}"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [] ["paren.rparen","}"]
}, ],[
{ "start",
"state": "start", ["paren.rparen","}"]
"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", "}" ]
]
}
]

View file

@ -1,432 +1,320 @@
[ [[
{ "start",
"state": "start", ["comment","#!/bin/sh"]
"data": [ ],[
[ "comment", "#!/bin/sh" ] "start"
] ],[
}, "start",
{ ["comment","# Script to open a browser to current branch"]
"state": "start", ],[
"data": [] "start",
}, ["comment","# Repo formats:"]
{ ],[
"state": "start", "start",
"data": [ ["comment","# ssh git@github.com:richoH/gh_pr.git"]
[ "comment", "# Script to open a browser to current branch" ] ],[
] "start",
}, ["comment","# http https://richoH@github.com/richoH/gh_pr.git"]
{ ],[
"state": "start", "start",
"data": [ ["comment","# git git://github.com/richoH/gh_pr.git"]
[ "comment", "# Repo formats:" ] ],[
] "start"
}, ],[
{ "start",
"state": "start", ["variable","username="],
"data": [ ["text","`"],
[ "comment", "# ssh git@github.com:richoH/gh_pr.git" ] ["identifier","git"],
] ["text"," "],
}, ["identifier","config"],
{ ["text"," "],
"state": "start", ["keyword.operator","--"],
"data": [ ["identifier","get"],
[ "comment", "# http https://richoH@github.com/richoH/gh_pr.git" ] ["text"," "],
] ["identifier","github"],
}, ["text","."],
{ ["identifier","user"],
"state": "start", ["text","`"]
"data": [ ],[
[ "comment", "# git git://github.com/richoH/gh_pr.git" ] "start"
] ],[
}, "start",
{ ["support.function","get_repo()"],
"state": "start", ["text"," "],
"data": [] ["paren.lparen","{"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["identifier","git"],
[ "variable", "username=" ], ["text"," "],
[ "text", "`" ], ["identifier","remote"],
[ "identifier", "git" ], ["text"," "],
[ "text", " " ], ["keyword.operator","-"],
[ "identifier", "config" ], ["identifier","v"],
[ "text", " " ], ["text"," | "],
[ "keyword.operator", "--" ], ["identifier","grep"],
[ "identifier", "get" ], ["text"," $"],
[ "text", " " ], ["paren.lparen","{"],
[ "identifier", "github" ], ["text","@:"],
[ "text", "." ], ["keyword.operator","-"],
[ "identifier", "user" ], ["variable","$username"],
[ "text", "`" ] ["paren.rparen","}"],
] ["text"," | "],
}, ["keyword","while"],
{ ["text"," "],
"state": "start", ["keyword","read"],
"data": [] ["text"," "],
}, ["identifier","remote"],
{ ["text","; "],
"state": "start", ["keyword","do"]
"data": [ ],[
[ "support.function", "get_repo()" ], "start",
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ] ["keyword","if"],
] ["text"," "],
}, ["variable","repo="],
{ ["text","`"],
"state": "start", ["support.function.builtin","echo"],
"data": [ ["text"," "],
[ "text", " " ], ["variable","$remote"],
[ "identifier", "git" ], ["text"," | "],
[ "text", " " ], ["identifier","grep"],
[ "identifier", "remote" ], ["text"," "],
[ "text", " " ], ["keyword.operator","-"],
[ "keyword.operator", "-" ], ["identifier","E"],
[ "identifier", "v" ], ["text"," "],
[ "text", " | " ], ["keyword.operator","-"],
[ "identifier", "grep" ], ["identifier","o"],
[ "text", " $" ], ["text"," "],
[ "paren.lparen", "{" ], ["string","\"git@github.com:[^ ]*\""],
[ "text", "@:" ], ["text","`; "],
[ "keyword.operator", "-" ], ["keyword","then"]
[ "variable", "$username" ], ],[
[ "paren.rparen", "}" ], "start",
[ "text", " | " ], ["text"," "],
[ "keyword", "while" ], ["support.function.builtin","echo"],
[ "text", " " ], ["text"," "],
[ "keyword", "read" ], ["variable","$repo"],
[ "text", " " ], ["text"," | "],
[ "identifier", "remote" ], ["identifier","sed"],
[ "text", "; " ], ["text"," "],
[ "keyword", "do" ] ["keyword.operator","-"],
] ["identifier","e"],
}, ["text"," "],
{ ["string","\"s/^git@github\\.com://\""],
"state": "start", ["text"," "],
"data": [ ["keyword.operator","-"],
[ "text", " " ], ["identifier","e"],
[ "keyword", "if" ], ["text"," "],
[ "text", " " ], ["string","\"s/\\.git$//\""]
[ "variable", "repo=" ], ],[
[ "text", "`" ], "start",
[ "support.function.builtin", "echo" ], ["text"," "],
[ "text", " " ], ["support.function.builtin","exit"],
[ "variable", "$remote" ], ["text"," "],
[ "text", " | " ], ["constant.numeric","1"]
[ "identifier", "grep" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "-" ], ["text"," "],
[ "identifier", "E" ], ["keyword","fi"]
[ "text", " " ], ],[
[ "keyword.operator", "-" ], "start",
[ "identifier", "o" ], ["text"," "],
[ "text", " " ], ["keyword","if"],
[ "string", "\"git@github.com:[^ ]*\"" ], ["text"," "],
[ "text", "`; " ], ["variable","repo="],
[ "keyword", "then" ] ["text","`"],
] ["support.function.builtin","echo"],
}, ["text"," "],
{ ["variable","$remote"],
"state": "start", ["text"," | "],
"data": [ ["identifier","grep"],
[ "text", " " ], ["text"," "],
[ "support.function.builtin", "echo" ], ["keyword.operator","-"],
[ "text", " " ], ["identifier","E"],
[ "variable", "$repo" ], ["text"," "],
[ "text", " | " ], ["keyword.operator","-"],
[ "identifier", "sed" ], ["identifier","o"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "-" ], ["string","\"https?://([^@]*@)?github.com/[^ ]*\\.git\""],
[ "identifier", "e" ], ["text","`; "],
[ "text", " " ], ["keyword","then"]
[ "string", "\"s/^git@github\\.com://\"" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "-" ], ["text"," "],
[ "identifier", "e" ], ["support.function.builtin","echo"],
[ "text", " " ], ["text"," "],
[ "string", "\"s/\\.git$//\"" ] ["variable","$repo"],
] ["text"," | "],
}, ["identifier","sed"],
{ ["text"," "],
"state": "start", ["keyword.operator","-"],
"data": [ ["identifier","e"],
[ "text", " " ], ["text"," "],
[ "support.function.builtin", "exit" ], ["string","\"s|^https?://||\""],
[ "text", " " ], ["text"," "],
[ "constant.numeric", "1" ] ["keyword.operator","-"],
] ["identifier","e"],
}, ["text"," "],
{ ["string","\"s/^.*github\\.com\\///\""],
"state": "start", ["text"," "],
"data": [ ["keyword.operator","-"],
[ "text", " " ], ["identifier","e"],
[ "keyword", "fi" ] ["text"," "],
] ["string","\"s/\\.git$//\""]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["support.function.builtin","exit"],
[ "text", " " ], ["text"," "],
[ "keyword", "if" ], ["constant.numeric","1"]
[ "text", " " ], ],[
[ "variable", "repo=" ], "start",
[ "text", "`" ], ["text"," "],
[ "support.function.builtin", "echo" ], ["keyword","fi"]
[ "text", " " ], ],[
[ "variable", "$remote" ], "start",
[ "text", " | " ], ["text"," "],
[ "identifier", "grep" ], ["keyword","if"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "-" ], ["variable","repo="],
[ "identifier", "E" ], ["text","`"],
[ "text", " " ], ["support.function.builtin","echo"],
[ "keyword.operator", "-" ], ["text"," "],
[ "identifier", "o" ], ["variable","$remote"],
[ "text", " " ], ["text"," | "],
[ "string", "\"https?://([^@]*@)?github.com/[^ ]*\\.git\"" ], ["identifier","grep"],
[ "text", "`; " ], ["text"," "],
[ "keyword", "then" ] ["keyword.operator","-"],
] ["identifier","E"],
}, ["text"," "],
{ ["keyword.operator","-"],
"state": "start", ["identifier","o"],
"data": [ ["text"," "],
[ "text", " " ], ["string","\"git://github.com/[^ ]*\\.git\""],
[ "support.function.builtin", "echo" ], ["text","`; "],
[ "text", " " ], ["keyword","then"]
[ "variable", "$repo" ], ],[
[ "text", " | " ], "start",
[ "identifier", "sed" ], ["text"," "],
[ "text", " " ], ["support.function.builtin","echo"],
[ "keyword.operator", "-" ], ["text"," "],
[ "identifier", "e" ], ["variable","$repo"],
[ "text", " " ], ["text"," | "],
[ "string", "\"s|^https?://||\"" ], ["identifier","sed"],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "-" ], ["keyword.operator","-"],
[ "identifier", "e" ], ["identifier","e"],
[ "text", " " ], ["text"," "],
[ "string", "\"s/^.*github\\.com\\///\"" ], ["string","\"s|^git://github.com/||\""],
[ "text", " " ], ["text"," "],
[ "keyword.operator", "-" ], ["keyword.operator","-"],
[ "identifier", "e" ], ["identifier","e"],
[ "text", " " ], ["text"," "],
[ "string", "\"s/\\.git$//\"" ] ["string","\"s/\\.git$//\""]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["support.function.builtin","exit"],
"data": [ ["text"," "],
[ "text", " " ], ["constant.numeric","1"]
[ "support.function.builtin", "exit" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "1" ] ["text"," "],
] ["keyword","fi"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["keyword","done"]
[ "text", " " ], ],[
[ "keyword", "fi" ] "start"
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword","if"],
"data": [ ["text"," "],
[ "text", " " ], ["paren.lparen","["],
[ "keyword", "if" ], ["text"," "],
[ "text", " " ], ["variable.language","$?"],
[ "variable", "repo=" ], ["text"," "],
[ "text", "`" ], ["keyword.operator","-"],
[ "support.function.builtin", "echo" ], ["identifier","eq"],
[ "text", " " ], ["text"," "],
[ "variable", "$remote" ], ["constant.numeric","0"],
[ "text", " | " ], ["text"," "],
[ "identifier", "grep" ], ["paren.rparen","]"],
[ "text", " " ], ["text","; "],
[ "keyword.operator", "-" ], ["keyword","then"]
[ "identifier", "E" ], ],[
[ "text", " " ], "start",
[ "keyword.operator", "-" ], ["text"," "],
[ "identifier", "o" ], ["support.function.builtin","echo"],
[ "text", " " ], ["text"," "],
[ "string", "\"git://github.com/[^ ]*\\.git\"" ], ["string","\"Couldn't find a valid remote\""],
[ "text", "`; " ], ["text"," "],
[ "keyword", "then" ] ["keyword.operator",">"],
] ["support.function","&2"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["support.function.builtin","exit"],
[ "text", " " ], ["text"," "],
[ "support.function.builtin", "echo" ], ["constant.numeric","1"]
[ "text", " " ], ],[
[ "variable", "$repo" ], "start",
[ "text", " | " ], ["text"," "],
[ "identifier", "sed" ], ["keyword","fi"]
[ "text", " " ], ],[
[ "keyword.operator", "-" ], "start",
[ "identifier", "e" ], ["paren.rparen","}"]
[ "text", " " ], ],[
[ "string", "\"s|^git://github.com/||\"" ], "start"
[ "text", " " ], ],[
[ "keyword.operator", "-" ], "start",
[ "identifier", "e" ], ["keyword","if"],
[ "text", " " ], ["text"," "],
[ "string", "\"s/\\.git$//\"" ] ["variable","repo="],
] ["text","`"],
}, ["identifier","get_repo"],
{ ["text"," $@`; "],
"state": "start", ["keyword","then"]
"data": [ ],[
[ "text", " " ], "start",
[ "support.function.builtin", "exit" ], ["text"," "],
[ "text", " " ], ["variable","branch="],
[ "constant.numeric", "1" ] ["text","`"],
] ["identifier","git"],
}, ["text"," "],
{ ["identifier","symbolic"],
"state": "start", ["keyword.operator","-"],
"data": [ ["identifier","ref"],
[ "text", " " ], ["text"," "],
[ "keyword", "fi" ] ["identifier","HEAD"],
] ["text"," "],
}, ["constant.numeric","2"],
{ ["keyword.operator",">/"],
"state": "start", ["identifier","dev"],
"data": [ ["keyword.operator","/"],
[ "text", " " ], ["identifier","null"],
[ "keyword", "done" ] ["text","`"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["support.function.builtin","echo"],
"data": [] ["text"," "],
}, ["string","\"http://github.com/$repo/pull/new/${branch##refs/heads/}\""]
{ ],[
"state": "start", "start",
"data": [ ["keyword","else"]
[ "text", " " ], ],[
[ "keyword", "if" ], "start",
[ "text", " " ], ["text"," "],
[ "paren.lparen", "[" ], ["support.function.builtin","exit"],
[ "text", " " ], ["text"," "],
[ "variable.language", "$?" ], ["constant.numeric","1"]
[ "text", " " ], ],[
[ "keyword.operator", "-" ], "start",
[ "identifier", "eq" ], ["keyword","fi"]
[ "text", " " ], ],[
[ "constant.numeric", "0" ], "start"
[ "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": []
}
]

View file

@ -1,73 +1,54 @@
[ [[
{ "start",
"state": "start", ["keyword","SELECT"],
"data": [ ["text"," "],
[ "keyword", "SELECT" ], ["identifier","city"],
[ "text", " " ], ["text",", "],
[ "identifier", "city" ], ["support.function","COUNT"],
[ "text", ", " ], ["paren.lparen","("],
[ "support.function", "COUNT" ], ["identifier","id"],
[ "paren.lparen", "(" ], ["paren.rparen",")"],
[ "identifier", "id" ], ["text"," "],
[ "paren.rparen", ")" ], ["keyword","AS"],
[ "text", " " ], ["text"," "],
[ "keyword", "AS" ], ["identifier","users_count"]
[ "text", " " ], ],[
[ "identifier", "users_count" ] "start",
] ["keyword","FROM"],
}, ["text"," "],
{ ["identifier","users"]
"state": "start", ],[
"data": [ "start",
[ "keyword", "FROM" ], ["keyword","WHERE"],
[ "text", " " ], ["text"," "],
[ "identifier", "users" ] ["identifier","group_name"],
] ["text"," "],
}, ["keyword.operator","="],
{ ["text"," "],
"state": "start", ["string","'salesman'"]
"data": [ ],[
[ "keyword", "WHERE" ], "start",
[ "text", " " ], ["keyword","AND"],
[ "identifier", "group_name" ], ["text"," "],
[ "text", " " ], ["identifier","created"],
[ "keyword.operator", "=" ], ["text"," "],
[ "text", " " ], ["keyword.operator",">"],
[ "string", "'salesman'" ] ["text"," "],
] ["string","'2011-05-21'"]
}, ],[
{ "start",
"state": "start", ["keyword","GROUP"],
"data": [ ["text"," "],
[ "keyword", "AND" ], ["keyword","BY"],
[ "text", " " ], ["text"," "],
[ "identifier", "created" ], ["constant.numeric","1"]
[ "text", " " ], ],[
[ "keyword.operator", ">" ], "start",
[ "text", " " ], ["keyword","ORDER"],
[ "string", "'2011-05-21'" ] ["text"," "],
] ["keyword","BY"],
}, ["text"," "],
{ ["constant.numeric","2"],
"state": "start", ["text"," "],
"data": [ ["keyword","DESC"]
[ "keyword", "GROUP" ], ]]
[ "text", " " ],
[ "keyword", "BY" ],
[ "text", " " ],
[ "constant.numeric", "1" ]
]
},
{
"state": "start",
"data": [
[ "keyword", "ORDER" ],
[ "text", " " ],
[ "keyword", "BY" ],
[ "text", " " ],
[ "constant.numeric", "2" ],
[ "text", " " ],
[ "keyword", "DESC" ]
]
}
]

View file

@ -1,425 +1,270 @@
[ [[
{ "start",
"state": "start", ["comment","// I'm a comment!"]
"data": [ ],[
[ "comment", "// I'm a comment!" ] "start"
] ],[
}, "comment",
{ ["comment","/*"]
"state": "start", ],[
"data": [] "comment",
}, ["comment"," * Adds the given numbers together."]
{ ],[
"state": "comment", "start",
"data": [ ["comment"," */"]
[ "comment", "/*" ] ],[
] "start"
}, ],[
{ "start"
"state": "comment", ],[
"data": [ "comment",
[ "comment", " * Adds the given numbers together." ] ["comment","/*!"]
] ],[
}, "comment",
{ ["comment"," * Adds the given numbers together."]
"state": "start", ],[
"data": [ "start",
[ "comment", " */" ] ["comment"," */"]
] ],[
}, "start"
{ ],[
"state": "start", "start"
"data": [] ],[
}, "start",
{ ["entity.name.function.stylus","asdasdasdad"],
"state": "start", ["text","(df, ad"],
"data": [] ["keyword.operator.stylus","="],
}, ["constant.numeric","23"],
{ ["text",")"]
"state": "comment", ],[
"data": [ "start"
[ "comment", "/*!" ] ],[
] "start",
}, ["entity.name.function.stylus","add"],
{ ["text","("],
"state": "comment", ["entity.name.tag.stylus","a"],
"data": [ ["text",", "],
[ "comment", " * Adds the given numbers together." ] ["entity.name.tag.stylus","b"],
] ["text"," "],
}, ["keyword.operator.stylus","="],
{ ["text"," "],
"state": "start", ["entity.name.tag.stylus","a"],
"data": [ ["text",")"]
[ "comment", " */" ] ],[
] "start",
}, ["text"," "],
{ ["entity.name.tag.stylus","a"],
"state": "start", ["text"," "],
"data": [] ["keyword.operator.stylus","+"],
}, ["text"," "],
{ ["entity.name.tag.stylus","b"]
"state": "start", ],[
"data": [] "start",
}, ["entity.name.function.stylus","green"],
{ ["text","("],
"state": "start", ["constant.numeric","#0c0"],
"data": [ ["text",")"]
[ "entity.name.function.stylus", "asdasdasdad" ], ],[
[ "text", "(df, ad" ], "start",
[ "keyword.operator.stylus", "=" ], ["text"," add("],
[ "constant.numeric", "23" ], ["constant.numeric","10"],
[ "text", ")" ] ["text",", "],
] ["constant.numeric","5"],
}, ["text",")"]
{ ],[
"state": "start", "start",
"data": [] ["text"," "],
}, ["comment","// => 15"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "entity.name.function.stylus", "add" ], "start",
[ "text", "(" ], ["text"," add("],
[ "entity.name.tag.stylus", "a" ], ["constant.numeric","10"],
[ "text", ", " ], ["text",")"]
[ "entity.name.tag.stylus", "b" ], ],[
[ "text", " " ], "start",
[ "keyword.operator.stylus", "=" ], ["text"," add("],
[ "text", " " ], ["entity.name.tag.stylus","a"],
[ "entity.name.tag.stylus", "a" ], ["text",", "],
[ "text", ")" ] ["entity.name.tag.stylus","b"],
] ["text",")"]
}, ],[
{ "start"
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["entity.language.stylus"," &"],
[ "entity.name.tag.stylus", "a" ], ["text","asdasd"]
[ "text", " " ], ],[
[ "keyword.operator.stylus", "+" ], "start"
[ "text", " " ], ],[
[ "entity.name.tag.stylus", "b" ] "start",
] ["text"," ("],
}, ["variable.language.stylus","arguments"],
{ ["text",")"]
"state": "start", ],[
"data": [ "start"
[ "entity.name.function.stylus", "green" ], ],[
[ "text", "(" ], "start",
[ "constant.numeric", "#0c0" ], ["text"," "],
[ "text", ")" ] ["keyword.stylus","@sdfsdf"]
] ],[
}, "start",
{ ["entity.other.attribute-name.class.stylus",".signatures"]
"state": "start", ],[
"data": [ "start",
[ "text", " add(" ], ["text"," "],
[ "constant.numeric", "10" ], ["support.type","background-color"],
[ "text", ", " ], ["text"," "],
[ "constant.numeric", "5" ], ["constant.numeric","#e0e8e0"]
[ "text", ")" ] ],[
] "start",
}, ["text"," "],
{ ["support.type","border"],
"state": "start", ["text"," "],
"data": [ ["constant.numeric","1"],
[ "text", " " ], ["keyword","px"],
[ "comment", "// => 15" ] ["text"," "],
] ["support.constant","solid"],
}, ["text"," grayLighter"]
{ ],[
"state": "start", "start",
"data": [] ["text"," "],
}, ["support.type","box-shadow"],
{ ["text"," "],
"state": "start", ["constant.numeric","0"],
"data": [ ["text"," "],
[ "text", " add(" ], ["constant.numeric","0"],
[ "constant.numeric", "10" ], ["text"," "],
[ "text", ")" ] ["constant.numeric","3"],
] ["keyword","px"],
}, ["text"," grayLightest"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " add(" ], ["support.type","border-radius"],
[ "entity.name.tag.stylus", "a" ], ["text"," "],
[ "text", ", " ], ["constant.numeric","3"],
[ "entity.name.tag.stylus", "b" ], ["keyword","px"]
[ "text", ")" ] ],[
] "start",
}, ["text"," "],
{ ["support.type","padding"],
"state": "start", ["text"," "],
"data": [] ["constant.numeric","3"],
}, ["keyword","px"],
{ ["text"," "],
"state": "start", ["constant.numeric","5"],
"data": [ ["keyword","px"]
[ "entity.language.stylus", " &" ], ],[
[ "text", "asdasd" ] "start",
] ["text"," "],
}, ["string","\"adsads\""]
{ ],[
"state": "start", "start",
"data": [] ["text"," "],
}, ["support.type","margin-left"],
{ ["text"," "],
"state": "start", ["constant.numeric","0"]
"data": [ ],[
[ "text", " (" ], "start",
[ "variable.language.stylus", "arguments" ], ["text"," "],
[ "text", ")" ] ["support.type","list-style"],
] ["text"," "],
}, ["support.constant","none"]
{ ],[
"state": "start", "start",
"data": [] ["entity.other.attribute-name.class.stylus",".signature"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["support.type","list-style"],
[ "text", " " ], ["text"," "],
[ "keyword.stylus", "@sdfsdf" ] ["support.constant","none"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["support.type","display"],
"data": [ ["text",": "],
[ "entity.other.attribute-name.class.stylus", ".signatures" ] ["support.constant","inline"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["support.type","margin-left"],
"data": [ ["text"," "],
[ "text", " " ], ["constant.numeric","0"]
[ "support.type", "background-color" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "#e0e8e0" ] ["text"," "],
] ["keyword.operator.stylus",">"],
}, ["text"," "],
{ ["entity.name.tag.stylus","li"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["text"," "],
[ "support.type", "border" ], ["support.type","display"],
[ "text", " " ], ["text"," "],
[ "constant.numeric", "1" ], ["support.constant","inline"]
[ "keyword", "px" ], ],[
[ "text", " " ], "start",
[ "support.constant", "solid" ], ["keyword.operator.stylus","is"],
[ "text", " grayLighter" ] ["text"," "],
] ["keyword.operator.stylus","not"]
}, ],[
{ "start",
"state": "start", ["entity.other.attribute-name.class.stylus",".signature-values"]
"data": [ ],[
[ "text", " " ], "start",
[ "support.type", "box-shadow" ], ["text"," "],
[ "text", " " ], ["support.type","list-style"],
[ "constant.numeric", "0" ], ["text"," "],
[ "text", " " ], ["support.constant","none"]
[ "constant.numeric", "0" ], ],[
[ "text", " " ], "start",
[ "constant.numeric", "3" ], ["text"," "],
[ "keyword", "px" ], ["support.type","display"],
[ "text", " grayLightest" ] ["text"," "],
] ["support.constant","inline"]
}, ],[
{ "start",
"state": "start", ["text"," "],
"data": [ ["support.type","margin-left"],
[ "text", " " ], ["text"," "],
[ "support.type", "border-radius" ], ["constant.numeric","0"]
[ "text", " " ], ],[
[ "constant.numeric", "3" ], "start",
[ "keyword", "px" ] ["entity.language.stylus"," &"],
] ["punctuation",":"],
}, ["entity.other.attribute-name.pseudo-element.css","before"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["support.type","content"],
[ "support.type", "padding" ], ["text"," "],
[ "text", " " ], ["string","'→'"]
[ "constant.numeric", "3" ], ],[
[ "keyword", "px" ], "start",
[ "text", " " ], ["text"," "],
[ "constant.numeric", "5" ], ["support.type","margin"],
[ "keyword", "px" ] ["text"," "],
] ["constant.numeric","0"],
}, ["text"," "],
{ ["constant.numeric","5"],
"state": "start", ["keyword","px"]
"data": [ ],[
[ "text", " " ], "start",
[ "string", "\"adsads\"" ] ["text"," "],
] ["keyword.operator.stylus",">"],
}, ["text"," "],
{ ["entity.name.tag.stylus","li"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["text"," "],
[ "support.type", "margin-left" ], ["keyword.control.stylus","!important"]
[ "text", " " ], ],[
[ "constant.numeric", "0" ] "start"
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword.control.stylus","unless"]
"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" ]
]
}
]

File diff suppressed because it is too large Load diff

View file

@ -1,530 +1,410 @@
[ [[
{ "commandItem"
"state": "commandItem", ],[
"data": [] "commandItem",
}, ["keyword","proc"],
{ ["text"," "],
"state": "commandItem", ["identifier","dijkstra"],
"data": [ ["text"," "],
[ "keyword", "proc" ], ["paren.lparen","{"],
[ "text", " " ], ["keyword","graph"],
[ "identifier", "dijkstra" ], ["text"," "],
[ "text", " " ], ["identifier","origin"],
[ "paren.lparen", "{" ], ["paren.rparen","}"],
[ "keyword", "graph" ], ["text"," "],
[ "text", " " ], ["paren.lparen","{"]
[ "identifier", "origin" ], ],[
[ "paren.rparen", "}" ], "start",
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ] ["comment","# Initialize"]
] ],[
}, "commandItem",
{ ["text"," "],
"state": "start", ["keyword","dict"],
"data": [ ["text"," "],
[ "text", " " ], ["identifier","for"],
[ "comment", "# Initialize" ] ["text"," "],
] ["paren.lparen","{"],
}, ["keyword","vertex"],
{ ["text"," "],
"state": "commandItem", ["identifier","distmap"],
"data": [ ["paren.rparen","}"],
[ "text", " " ], ["text"," "],
[ "keyword", "dict" ], ["variable.instancce","$"],
[ "text", " " ], ["variable.instance","graph"],
[ "identifier", "for" ], ["text"," "],
[ "text", " " ], ["paren.lparen","{"]
[ "paren.lparen", "{" ], ],[
[ "keyword", "vertex" ], "start",
[ "text", " " ], ["text","\t"],
[ "identifier", "distmap" ], ["keyword","dict"],
[ "paren.rparen", "}" ], ["text"," "],
[ "text", " " ], ["identifier","set"],
[ "variable.instancce", "$" ], ["text"," "],
[ "variable.instance", "graph" ], ["identifier","dist"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ] ["variable.instancce","$"],
] ["variable.instance","vertex"],
}, ["text"," "],
{ ["identifier","Inf"]
"state": "start", ],[
"data": [ "commandItem",
[ "text", "\t" ], ["text","\t"],
[ "keyword", "dict" ], ["keyword","dict"],
[ "text", " " ], ["text"," "],
[ "identifier", "set" ], ["identifier","set"],
[ "text", " " ], ["text"," "],
[ "identifier", "dist" ], ["identifier","path"],
[ "text", " " ], ["text"," "],
[ "variable.instancce", "$" ], ["variable.instancce","$"],
[ "variable.instance", "vertex" ], ["variable.instance","vertex"],
[ "text", " " ], ["text"," "],
[ "identifier", "Inf" ] ["paren.lparen","{"],
] ["text","}"]
}, ],[
{ "commandItem",
"state": "commandItem", ["text"," }"]
"data": [ ],[
[ "text", "\t" ], "start",
[ "keyword", "dict" ], ["text"," "],
[ "text", " " ], ["keyword","dict"],
[ "identifier", "set" ], ["text"," "],
[ "text", " " ], ["identifier","set"],
[ "identifier", "path" ], ["text"," "],
[ "text", " " ], ["identifier","dist"],
[ "variable.instancce", "$" ], ["text"," "],
[ "variable.instance", "vertex" ], ["variable.instancce","$"],
[ "text", " " ], ["variable.instance","origin"],
[ "paren.lparen", "{" ], ["text"," 0"]
[ "text", "}" ] ],[
] "start",
}, ["text"," "],
{ ["keyword","dict"],
"state": "commandItem", ["text"," "],
"data": [ ["identifier","set"],
[ "text", " }" ] ["text"," "],
] ["identifier","path"],
}, ["text"," "],
{ ["variable.instancce","$"],
"state": "start", ["variable.instance","origin"],
"data": [ ["text"," "],
[ "text", " " ], ["paren.lparen","["],
[ "keyword", "dict" ], ["keyword","list"],
[ "text", " " ], ["text"," "],
[ "identifier", "set" ], ["variable.instancce","$"],
[ "text", " " ], ["variable.instance","origin"],
[ "identifier", "dist" ], ["paren.rparen","]"]
[ "text", " " ], ],[
[ "variable.instancce", "$" ], "commandItem",
[ "variable.instance", "origin" ], ["text"," "]
[ "text", " 0" ] ],[
] "commandItem",
}, ["text"," "],
{ ["keyword","while"],
"state": "start", ["text"," "],
"data": [ ["paren.lparen","{"],
[ "text", " " ], ["text","["],
[ "keyword", "dict" ], ["keyword","dict"],
[ "text", " " ], ["text"," "],
[ "identifier", "set" ], ["identifier","size"],
[ "text", " " ], ["text"," "],
[ "identifier", "path" ], ["variable.instancce","$"],
[ "text", " " ], ["variable.instance","graph"],
[ "variable.instancce", "$" ], ["paren.rparen","]}"],
[ "variable.instance", "origin" ], ["text"," "],
[ "text", " " ], ["paren.lparen","{"]
[ "paren.lparen", "[" ], ],[
[ "keyword", "list" ], "start",
[ "text", " " ], ["text","\t"],
[ "variable.instancce", "$" ], ["comment","# Find unhandled node with least weight"]
[ "variable.instance", "origin" ], ],[
[ "paren.rparen", "]" ] "start",
] ["text","\t"],
}, ["keyword","set"],
{ ["text"," "],
"state": "commandItem", ["identifier","d"],
"data": [ ["text"," "],
[ "text", " " ] ["identifier","Inf"]
] ],[
}, "commandItem",
{ ["text","\t"],
"state": "commandItem", ["keyword","dict"],
"data": [ ["text"," "],
[ "text", " " ], ["identifier","for"],
[ "keyword", "while" ], ["text"," "],
[ "text", " " ], ["paren.lparen","{"],
[ "paren.lparen", "{" ], ["keyword","uu"],
[ "text", "[" ], ["text"," "],
[ "keyword", "dict" ], ["support.function","-"],
[ "text", " " ], ["paren.rparen","}"],
[ "identifier", "size" ], ["text"," "],
[ "text", " " ], ["variable.instancce","$"],
[ "variable.instancce", "$" ], ["variable.instance","graph"],
[ "variable.instance", "graph" ], ["text"," "],
[ "paren.rparen", "]}" ], ["paren.lparen","{"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ] "commandItem",
] ["text","\t "],
}, ["keyword","if"],
{ ["text"," "],
"state": "start", ["paren.lparen","{"],
"data": [ ["variable.instancce","$"],
[ "text", "\t" ], ["variable.instance","d"],
[ "comment", "# Find unhandled node with least weight" ] ["text"," "],
] ["support.function",">"],
}, ["text"," "],
{ ["paren.lparen","["],
"state": "start", ["keyword","set"],
"data": [ ["text"," "],
[ "text", "\t" ], ["identifier","dd"],
[ "keyword", "set" ], ["text"," "],
[ "text", " " ], ["paren.lparen","["],
[ "identifier", "d" ], ["keyword","dict"],
[ "text", " " ], ["text"," "],
[ "identifier", "Inf" ] ["identifier","get"],
] ["text"," "],
}, ["variable.instancce","$"],
{ ["variable.instance","dist"],
"state": "commandItem", ["text"," "],
"data": [ ["variable.instancce","$"],
[ "text", "\t" ], ["variable.instance","uu"],
[ "keyword", "dict" ], ["paren.rparen","]]}"],
[ "text", " " ], ["text"," "],
[ "identifier", "for" ], ["paren.lparen","{"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ], "start",
[ "keyword", "uu" ], ["text","\t\t"],
[ "text", " " ], ["keyword","set"],
[ "support.function", "-" ], ["text"," "],
[ "paren.rparen", "}" ], ["identifier","u"],
[ "text", " " ], ["text"," "],
[ "variable.instancce", "$" ], ["variable.instancce","$"],
[ "variable.instance", "graph" ], ["variable.instance","uu"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ] "start",
] ["text","\t\t"],
}, ["keyword","set"],
{ ["text"," "],
"state": "commandItem", ["identifier","d"],
"data": [ ["text"," "],
[ "text", "\t " ], ["variable.instancce","$"],
[ "keyword", "if" ], ["variable.instance","dd"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ], "commandItem",
[ "variable.instancce", "$" ], ["text","\t }"]
[ "variable.instance", "d" ], ],[
[ "text", " " ], "commandItem",
[ "support.function", ">" ], ["text","\t}"]
[ "text", " " ], ],[
[ "paren.lparen", "[" ], "commandItem",
[ "keyword", "set" ], ["text"," "]
[ "text", " " ], ],[
[ "identifier", "dd" ], "start",
[ "text", " " ], ["text","\t"],
[ "paren.lparen", "[" ], ["comment","# No such node; graph must be disconnected"]
[ "keyword", "dict" ], ],[
[ "text", " " ], "start",
[ "identifier", "get" ], ["text","\t"],
[ "text", " " ], ["keyword","if"],
[ "variable.instancce", "$" ], ["text"," "],
[ "variable.instance", "dist" ], ["paren.lparen","{"],
[ "text", " " ], ["variable.instancce","$"],
[ "variable.instancce", "$" ], ["variable.instance","d"],
[ "variable.instance", "uu" ], ["text"," "],
[ "paren.rparen", "]]}" ], ["support.function","=="],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ] ["identifier","Inf"],
] ["paren.rparen","}"],
}, ["text"," "],
{ ["identifier","break"]
"state": "start", ],[
"data": [ "commandItem",
[ "text", "\t\t" ], ["text"," "]
[ "keyword", "set" ], ],[
[ "text", " " ], "commentfollow",
[ "identifier", "u" ], ["text","\t"],
[ "text", " " ], ["comment","# Update the weights for nodes\\"]
[ "variable.instancce", "$" ], ],[
[ "variable.instance", "uu" ] "start",
] ["comment","\t lead to by the node we've picked"]
}, ],[
{ "commandItem",
"state": "start", ["text","\t"],
"data": [ ["keyword","dict"],
[ "text", "\t\t" ], ["text"," "],
[ "keyword", "set" ], ["identifier","for"],
[ "text", " " ], ["text"," "],
[ "identifier", "d" ], ["paren.lparen","{"],
[ "text", " " ], ["keyword","v"],
[ "variable.instancce", "$" ], ["text"," "],
[ "variable.instance", "dd" ] ["identifier","dd"],
] ["paren.rparen","}"],
}, ["text"," "],
{ ["paren.lparen","["],
"state": "commandItem", ["keyword","dict"],
"data": [ ["text"," "],
[ "text", "\t }" ] ["identifier","get"],
] ["text"," "],
}, ["variable.instancce","$"],
{ ["variable.instance","graph"],
"state": "commandItem", ["text"," "],
"data": [ ["variable.instancce","$"],
[ "text", "\t}" ] ["variable.instance","u"],
] ["paren.rparen","]"],
}, ["text"," "],
{ ["paren.lparen","{"]
"state": "commandItem", ],[
"data": [ "commandItem",
[ "text", " " ] ["text","\t "],
] ["keyword","if"],
}, ["text"," "],
{ ["paren.lparen","{"],
"state": "start", ["text","["],
"data": [ ["keyword","dict"],
[ "text", "\t" ], ["text"," "],
[ "comment", "# No such node; graph must be disconnected" ] ["identifier","exists"],
] ["text"," "],
}, ["variable.instancce","$"],
{ ["variable.instance","graph"],
"state": "start", ["text"," "],
"data": [ ["variable.instancce","$"],
[ "text", "\t" ], ["variable.instance","v"],
[ "keyword", "if" ], ["paren.rparen","]}"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ], ["paren.lparen","{"]
[ "variable.instancce", "$" ], ],[
[ "variable.instance", "d" ], "start",
[ "text", " " ], ["text","\t\t"],
[ "support.function", "==" ], ["keyword","set"],
[ "text", " " ], ["text"," "],
[ "identifier", "Inf" ], ["identifier","alt"],
[ "paren.rparen", "}" ], ["text"," "],
[ "text", " " ], ["paren.lparen","["],
[ "identifier", "break" ] ["keyword","expr"],
] ["text"," "],
}, ["paren.lparen","{"],
{ ["variable.instancce","$"],
"state": "commandItem", ["variable.instance","d"],
"data": [ ["text"," "],
[ "text", " " ] ["support.function","+"],
] ["text"," "],
}, ["variable.instancce","$"],
{ ["variable.instance","dd"],
"state": "commentfollow", ["paren.rparen","}]"]
"data": [ ],[
[ "text", "\t" ], "commandItem",
[ "comment", "# Update the weights for nodes\\" ] ["text","\t\t"],
] ["keyword","if"],
}, ["text"," "],
{ ["paren.lparen","{"],
"state": "start", ["variable.instancce","$"],
"data": [ ["variable.instance","alt"],
[ "comment", "\t lead to by the node we've picked" ] ["text"," "],
] ["support.function","<"],
}, ["text"," "],
{ ["paren.lparen","["],
"state": "commandItem", ["keyword","dict"],
"data": [ ["text"," "],
[ "text", "\t" ], ["identifier","get"],
[ "keyword", "dict" ], ["text"," "],
[ "text", " " ], ["variable.instancce","$"],
[ "identifier", "for" ], ["variable.instance","dist"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ], ["variable.instancce","$"],
[ "keyword", "v" ], ["variable.instance","v"],
[ "text", " " ], ["paren.rparen","]}"],
[ "identifier", "dd" ], ["text"," "],
[ "paren.rparen", "}" ], ["paren.lparen","{"]
[ "text", " " ], ],[
[ "paren.lparen", "[" ], "start",
[ "keyword", "dict" ], ["text","\t\t "],
[ "text", " " ], ["keyword","dict"],
[ "identifier", "get" ], ["text"," "],
[ "text", " " ], ["identifier","set"],
[ "variable.instancce", "$" ], ["text"," "],
[ "variable.instance", "graph" ], ["identifier","dist"],
[ "text", " " ], ["text"," "],
[ "variable.instancce", "$" ], ["variable.instancce","$"],
[ "variable.instance", "u" ], ["variable.instance","v"],
[ "paren.rparen", "]" ], ["text"," "],
[ "text", " " ], ["variable.instancce","$"],
[ "paren.lparen", "{" ] ["variable.instance","alt"]
] ],[
}, "start",
{ ["text","\t\t "],
"state": "commandItem", ["keyword","dict"],
"data": [ ["text"," "],
[ "text", "\t " ], ["identifier","set"],
[ "keyword", "if" ], ["text"," "],
[ "text", " " ], ["identifier","path"],
[ "paren.lparen", "{" ], ["text"," "],
[ "text", "[" ], ["variable.instancce","$"],
[ "keyword", "dict" ], ["variable.instance","v"],
[ "text", " " ], ["text"," "],
[ "identifier", "exists" ], ["paren.lparen","["],
[ "text", " " ], ["keyword","list"],
[ "variable.instancce", "$" ], ["text"," "],
[ "variable.instance", "graph" ], ["support.function","{*}"],
[ "text", " " ], ["paren.lparen","["],
[ "variable.instancce", "$" ], ["keyword","dict"],
[ "variable.instance", "v" ], ["text"," "],
[ "paren.rparen", "]}" ], ["identifier","get"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ] ["variable.instancce","$"],
] ["variable.instance","path"],
}, ["text"," "],
{ ["variable.instancce","$"],
"state": "start", ["variable.instance","u"],
"data": [ ["paren.rparen","]"],
[ "text", "\t\t" ], ["text"," "],
[ "keyword", "set" ], ["variable.instancce","$"],
[ "text", " " ], ["variable.instance","v"],
[ "identifier", "alt" ], ["paren.rparen","]"]
[ "text", " " ], ],[
[ "paren.lparen", "[" ], "commandItem",
[ "keyword", "expr" ], ["text","\t\t}"]
[ "text", " " ], ],[
[ "paren.lparen", "{" ], "commandItem",
[ "variable.instancce", "$" ], ["text","\t }"]
[ "variable.instance", "d" ], ],[
[ "text", " " ], "commandItem",
[ "support.function", "+" ], ["text","\t}"]
[ "text", " " ], ],[
[ "variable.instancce", "$" ], "commandItem",
[ "variable.instance", "dd" ], ["text"," "]
[ "paren.rparen", "}]" ] ],[
] "start",
}, ["text","\t"],
{ ["comment","# Remove chosen node from graph still to be handled"]
"state": "commandItem", ],[
"data": [ "start",
[ "text", "\t\t" ], ["text","\t"],
[ "keyword", "if" ], ["keyword","dict"],
[ "text", " " ], ["text"," "],
[ "paren.lparen", "{" ], ["identifier","unset"],
[ "variable.instancce", "$" ], ["text"," "],
[ "variable.instance", "alt" ], ["identifier","graph"],
[ "text", " " ], ["text"," "],
[ "support.function", "<" ], ["variable.instancce","$"],
[ "text", " " ], ["variable.instance","u"]
[ "paren.lparen", "[" ], ],[
[ "keyword", "dict" ], "commandItem",
[ "text", " " ], ["text"," }"]
[ "identifier", "get" ], ],[
[ "text", " " ], "start",
[ "variable.instancce", "$" ], ["text"," "],
[ "variable.instance", "dist" ], ["keyword","return"],
[ "text", " " ], ["text"," "],
[ "variable.instancce", "$" ], ["paren.lparen","["],
[ "variable.instance", "v" ], ["keyword","list"],
[ "paren.rparen", "]}" ], ["text"," "],
[ "text", " " ], ["variable.instancce","$"],
[ "paren.lparen", "{" ] ["variable.instance","dist"],
] ["text"," "],
}, ["variable.instancce","$"],
{ ["variable.instance","path"],
"state": "start", ["paren.rparen","]"]
"data": [ ],[
[ "text", "\t\t " ], "commandItem",
[ "keyword", "dict" ], ["text","}"]
[ "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", "}" ]
]
}
]

View file

@ -1,189 +1,130 @@
[ [[
{ "start",
"state": "start", ["text","The quadratic formula is $$-b "],
"data": [ ["keyword","\\pm"],
[ "text", "The quadratic formula is $$-b " ], ["text"," "],
[ "keyword", "\\pm" ], ["keyword","\\sqrt"],
[ "text", " " ], ["paren.keyword.operator","{"],
[ "keyword", "\\sqrt" ], ["text","b^2 - 4ac"],
[ "paren.keyword.operator", "{" ], ["paren.keyword.operator","}"],
[ "text", "b^2 - 4ac" ], ["text"," "],
[ "paren.keyword.operator", "}" ], ["keyword","\\over"],
[ "text", " " ], ["text"," 2a$$"]
[ "keyword", "\\over" ], ],[
[ "text", " 2a$$" ] "start",
] ["keyword","\\bye"]
}, ],[
{ "start"
"state": "start", ],[
"data": [ "start",
[ "keyword", "\\bye" ] ["keyword","\\makeatletter"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword","\\newcommand"],
"data": [] ["paren.keyword.operator","{"],
}, ["keyword","\\be"],
{ ["paren.keyword.operator","}{"],
"state": "start", ["comment","%"]
"data": [ ],[
[ "keyword", "\\makeatletter" ] "start",
] ["text"," "],
}, ["keyword","\\begingroup"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["comment","% \\setlength{\\arraycolsep}{2pt}"]
[ "keyword", "\\newcommand" ], ],[
[ "paren.keyword.operator", "{" ], "start",
[ "keyword", "\\be" ], ["text"," "],
[ "paren.keyword.operator", "}{" ], ["keyword","\\eqnarray"],
[ "comment", "%" ] ["comment","%"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword","\\@"],
"data": [ ["text","ifstar"],
[ "text", " " ], ["paren.keyword.operator","{"],
[ "keyword", "\\begingroup" ] ["keyword","\\nonumber"],
] ["paren.keyword.operator","}{}"],
}, ["comment","%"]
{ ],[
"state": "start", "start",
"data": [ ["text"," "],
[ "text", " " ], ["paren.keyword.operator","}"]
[ "comment", "% \\setlength{\\arraycolsep}{2pt}" ] ],[
] "start",
}, ["text"," "],
{ ["keyword","\\newcommand"],
"state": "start", ["paren.keyword.operator","{"],
"data": [ ["keyword","\\ee"],
[ "text", " " ], ["paren.keyword.operator","}{"],
[ "keyword", "\\eqnarray" ], ["keyword","\\endeqnarray\\endgroup"],
[ "comment", "%" ] ["paren.keyword.operator","}"]
] ],[
}, "start",
{ ["text"," "],
"state": "start", ["keyword","\\makeatother"]
"data": [ ],[
[ "text", " " ], "start"
[ "keyword", "\\@" ], ],[
[ "text", "ifstar" ], "start",
[ "paren.keyword.operator", "{" ], ["text"," "],
[ "keyword", "\\nonumber" ], ["keyword","\\begin"],
[ "paren.keyword.operator", "}{}" ], ["paren.keyword.operator","{"],
[ "comment", "%" ] ["nospell.text","equation"],
] ["paren.keyword.operator","}"]
}, ],[
{ "start",
"state": "start", ["text"," x="],
"data": [ ["keyword","\\left\\"],
[ "text", " " ], ["paren.keyword.operator","{"],
[ "paren.keyword.operator", "}" ] ["text"," "],
] ["keyword","\\begin"],
}, ["paren.keyword.operator","{"],
{ ["nospell.text","array"],
"state": "start", ["paren.keyword.operator","}{"],
"data": [ ["text","cl"],
[ "text", " " ], ["paren.keyword.operator","}"]
[ "keyword", "\\newcommand" ], ],[
[ "paren.keyword.operator", "{" ], "start",
[ "keyword", "\\ee" ], ["text"," 0 & "],
[ "paren.keyword.operator", "}{" ], ["keyword","\\textrm"],
[ "keyword", "\\endeqnarray\\endgroup" ], ["paren.keyword.operator","{"],
[ "paren.keyword.operator", "}" ] ["text","if "],
] ["paren.keyword.operator","}"],
}, ["text","A="],
{ ["keyword","\\ldots\\\\"]
"state": "start", ],[
"data": [ "start",
[ "text", " " ], ["text"," 1 & "],
[ "keyword", "\\makeatother" ] ["keyword","\\textrm"],
] ["paren.keyword.operator","{"],
}, ["text","if "],
{ ["paren.keyword.operator","}"],
"state": "start", ["text","B="],
"data": [] ["keyword","\\ldots\\\\"]
}, ],[
{ "start",
"state": "start", ["text"," x & "],
"data": [ ["keyword","\\textrm"],
[ "text", " " ], ["paren.keyword.operator","{"],
[ "keyword", "\\begin" ], ["text","this runs with as much text as you like, but without an raggeright text"]
[ "paren.keyword.operator", "{" ], ],[
[ "nospell.text", "equation" ], "start",
[ "paren.keyword.operator", "}" ] ["text","."],
] ["paren.keyword.operator","}"],
}, ["keyword","\\end"],
{ ["paren.keyword.operator","{"],
"state": "start", ["nospell.text","array"],
"data": [ ["paren.keyword.operator","}"],
[ "text", " x=" ], ["keyword","\\right"],
[ "keyword", "\\left\\" ], ["text","."]
[ "paren.keyword.operator", "{" ], ],[
[ "text", " " ], "start",
[ "keyword", "\\begin" ], ["text"," "],
[ "paren.keyword.operator", "{" ], ["keyword","\\end"],
[ "nospell.text", "array" ], ["paren.keyword.operator","{"],
[ "paren.keyword.operator", "}{" ], ["nospell.text","equation"],
[ "text", "cl" ], ["paren.keyword.operator","}"]
[ "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", "}" ]
]
}
]

View file

@ -1,58 +1,29 @@
[ [[
{ "start",
"state": "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."]
"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." ] "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."]
"state": "start", ],[
"data": [] "start"
}, ],[
{ "start",
"state": "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."]
"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." ] "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."]
"state": "start", ],[
"data": [] "start"
}, ],[
{ "start",
"state": "start", ["text","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis."]
"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." ] "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"]
"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" ]
]
}
]

View file

@ -1,191 +1,113 @@
[ [[
{ "start",
"state": "start", ["markup.heading.1","h1"],
"data": [ ["keyword",". "],
[ "markup.heading.1", "h1" ], ["text","Textile document"]
[ "keyword", ". " ], ],[
[ "text", "Textile document" ] "start"
] ],[
}, "start",
{ ["markup.heading.2","h2"],
"state": "start", ["keyword",". "],
"data": [] ["text","Heading Two"]
}, ],[
{ "start"
"state": "start", ],[
"data": [ "start",
[ "markup.heading.2", "h2" ], ["markup.heading.3","h3"],
[ "keyword", ". " ], ["keyword",". "],
[ "text", "Heading Two" ] ["text","A two-line"]
] ],[
}, "start",
{ ["text"," header"]
"state": "start", ],[
"data": [] "start"
}, ],[
{ "start",
"state": "start", ["markup.heading.2","h2"],
"data": [ ["keyword",". "],
[ "markup.heading.3", "h3" ], ["text","Another two-line"]
[ "keyword", ". " ], ],[
[ "text", "A two-line" ] "start",
] ["text","header"]
}, ],[
{ "start"
"state": "start", ],[
"data": [ "start",
[ "text", " header" ] ["text","Paragraph:"]
] ],[
}, "start",
{ ["text","one, two,"]
"state": "start", ],[
"data": [] "start",
}, ["text","thee lines!"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "markup.heading.2", "h2" ], "start",
[ "keyword", ". " ], ["markup.heading","p"],
[ "text", "Another two-line" ] ["keyword","("],
] ["string","classone"],
}, ["text"," "],
{ ["string","two"],
"state": "start", ["text"," "],
"data": [ ["string","three"],
[ "text", "header" ] ["keyword","). "],
] ["text","This is a paragraph with classes"]
}, ],[
{ "start"
"state": "start", ],[
"data": [] "start",
}, ["markup.heading","p"],
{ ["keyword","(#"],
"state": "start", ["string","id"],
"data": [ ["keyword","). "],
[ "text", "Paragraph:" ] ["text","(one with an id)"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["markup.heading","p"],
[ "text", "one, two," ] ["keyword","("],
] ["string","one"],
}, ["text"," "],
{ ["string","two"],
"state": "start", ["text"," "],
"data": [ ["string","three"],
[ "text", "thee lines!" ] ["keyword","#"],
] ["string","my_id"],
}, ["keyword","). "],
{ ["text","..classes + id"]
"state": "start", ],[
"data": [] "start"
}, ],[
{ "start",
"state": "start", ["keyword","*"],
"data": [ ["text"," Unordered list"]
[ "markup.heading", "p" ], ],[
[ "keyword", "(" ], "start",
[ "string", "classone" ], ["keyword","**"],
[ "text", " " ], ["text"," sublist"]
[ "string", "two" ], ],[
[ "text", " " ], "start",
[ "string", "three" ], ["keyword","*"],
[ "keyword", "). " ], ["text"," back again!"]
[ "text", "This is a paragraph with classes" ] ],[
] "start",
}, ["keyword","**"],
{ ["text"," sublist again.."]
"state": "start", ],[
"data": [] "start"
}, ],[
{ "start",
"state": "start", ["keyword","#"],
"data": [ ["text"," ordered"]
[ "markup.heading", "p" ], ],[
[ "keyword", "(#" ], "start"
[ "string", "id" ], ],[
[ "keyword", "). " ], "start",
[ "text", "(one with an id)" ] ["text","bg. Blockquote!"]
] ],[
}, "start",
{ ["text"," This is a two-list blockquote..!"]
"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..!" ]
]
}
]

File diff suppressed because it is too large Load diff

View file

@ -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"]
]]

File diff suppressed because it is too large Load diff

View file

@ -1,64 +1,44 @@
[ [[
{ "start",
"state": "start", ["keyword","xquery"],
"data": [ ["text"," "],
[ "keyword", "xquery" ], ["keyword","version"],
[ "text", " " ], ["text"," "],
[ "keyword", "version" ], ["string","\"1.0\""],
[ "text", " " ], ["text",";"]
[ "string", "\"1.0\"" ], ],[
[ "text", ";" ] "start"
] ],[
}, "start",
{ ["keyword","let"],
"state": "start", ["text"," "],
"data": [] ["variable","$message"],
}, ["text"," "],
{ ["keyword.operator",":="],
"state": "start", ["text"," "],
"data": [ ["string","\"Hello World!\""]
[ "keyword", "let" ], ],[
[ "text", " " ], "start",
[ "variable", "$message" ], ["keyword","return"],
[ "text", " :" ], ["text"," <"],
[ "keyword.operator", "=" ], ["meta.tag","results"],
[ "text", " " ], ["text",">"]
[ "string", "\"Hello World!\"" ] ],[
] "start",
}, ["text"," <"],
{ ["meta.tag","message"],
"state": "start", ["text",">"],
"data": [ ["lparen","{"],
[ "keyword", "return" ], ["variable","$message"],
[ "text", " <" ], ["rparen","}"],
[ "meta.tag", "results" ], ["text","</"],
[ "text", ">" ] ["meta.tag","message"],
] ["text",">"]
}, ],[
{ "start",
"state": "start", ["text","</"],
"data": [ ["meta.tag","results"],
[ "text", " <" ], ["text",">"]
[ "meta.tag", "message" ], ],[
[ "text", ">" ], "start"
[ "lparen", "{" ], ]]
[ "variable", "$message" ],
[ "rparen", "}" ],
[ "text", "</" ],
[ "meta.tag", "message" ],
[ "text", ">" ]
]
},
{
"state": "start",
"data": [
[ "text", "</" ],
[ "meta.tag", "results" ],
[ "text", ">" ]
]
},
{
"state": "start",
"data": []
}
]

View file

@ -1,253 +1,150 @@
[ [[
{ "start",
"state": "start", ["comment","# This sample document was taken from wikipedia:"]
"data": [ ],[
[ "comment", "# This sample document was taken from wikipedia:" ] "start",
] ["comment","# http://en.wikipedia.org/wiki/YAML#Sample_document"]
}, ],[
{ "start",
"state": "start", ["list.markup","---"]
"data": [ ],[
[ "comment", "# http://en.wikipedia.org/wiki/YAML#Sample_document" ] "start",
] ["meta.tag","receipt"],
}, ["keyword",": "],
{ ["text","Oz-Ware Purchase Invoice"]
"state": "start", ],[
"data": [ "start",
[ "list.markup", "---" ] ["meta.tag","date"],
] ["keyword",": "],
}, ["constant.numeric","2007-08-06"]
{ ],[
"state": "start", "start",
"data": [ ["meta.tag","customer"],
[ "meta.tag", "receipt" ], ["keyword",":"]
[ "keyword", ": " ], ],[
[ "text", "Oz-Ware Purchase Invoice" ] "start",
] ["meta.tag"," given"],
}, ["keyword",": "],
{ ["text","Dorothy"]
"state": "start", ],[
"data": [ "start",
[ "meta.tag", "date" ], ["meta.tag"," family"],
[ "keyword", ": " ], ["keyword",": "],
[ "constant.numeric", "2007-08-06" ] ["text","Gale"]
] ],[
}, "start"
{ ],[
"state": "start", "start",
"data": [ ["meta.tag","items"],
[ "meta.tag", "customer" ], ["keyword",":"]
[ "keyword", ":" ] ],[
] "start",
}, ["list.markup"," - "],
{ ["meta.tag","part_no"],
"state": "start", ["keyword",": "],
"data": [ ["string","'A4786'"]
[ "meta.tag", " given" ], ],[
[ "keyword", ": " ], "start",
[ "text", "Dorothy" ] ["meta.tag"," descrip"],
] ["keyword",": "],
}, ["text","Water Bucket "],
{ ["paren.lparen","("],
"state": "start", ["text","Filled"],
"data": [ ["paren.rparen",")"]
[ "meta.tag", " family" ], ],[
[ "keyword", ": " ], "start",
[ "text", "Gale" ] ["meta.tag"," price"],
] ["keyword",": "],
}, ["constant.numeric","1.47"]
{ ],[
"state": "start", "start",
"data": [] ["meta.tag"," quantity"],
}, ["keyword",": "],
{ ["constant.numeric","4"]
"state": "start", ],[
"data": [ "start"
[ "meta.tag", "items" ], ],[
[ "keyword", ":" ] "start",
] ["list.markup"," - "],
}, ["meta.tag","part_no"],
{ ["keyword",": "],
"state": "start", ["string","'E1628'"]
"data": [ ],[
[ "list.markup", " - " ], "start",
[ "meta.tag", "part_no" ], ["meta.tag"," descrip"],
[ "keyword", ": " ], ["keyword",": "],
[ "string", "'A4786'" ] ["text","High Heeled "],
] ["string","\"Ruby\""],
}, ["text"," Slippers"]
{ ],[
"state": "start", "start",
"data": [ ["meta.tag"," size"],
[ "meta.tag", " descrip" ], ["keyword",": "],
[ "keyword", ": " ], ["constant.numeric","8"]
[ "text", "Water Bucket " ], ],[
[ "paren.lparen", "(" ], "start",
[ "text", "Filled" ], ["meta.tag"," price"],
[ "paren.rparen", ")" ] ["keyword",": "],
] ["constant.numeric","100.27"]
}, ],[
{ "start",
"state": "start", ["meta.tag"," quantity"],
"data": [ ["keyword",": "],
[ "meta.tag", " price" ], ["constant.numeric","1"]
[ "keyword", ": " ], ],[
[ "constant.numeric", "1.47" ] "start"
] ],[
}, "start",
{ ["meta.tag","bill-to"],
"state": "start", ["keyword",": "],
"data": [ ["constant.language","&id001"]
[ "meta.tag", " quantity" ], ],[
[ "keyword", ": " ], "qqstring",
[ "constant.numeric", "4" ] ["meta.tag"," street"],
] ["keyword",": "],
}, ["string","|"]
{ ],[
"state": "start", "qqstring",
"data": [] ["string"," 123 Tornado Alley"]
}, ],[
{ "qqstring",
"state": "start", ["string"," Suite 16"]
"data": [ ],[
[ "list.markup", " - " ], "start",
[ "meta.tag", "part_no" ], ["meta.tag"," city"],
[ "keyword", ": " ], ["keyword",": "],
[ "string", "'E1628'" ] ["text","East Centerville"]
] ],[
}, "start",
{ ["meta.tag"," state"],
"state": "start", ["keyword",": "],
"data": [ ["text","KS"]
[ "meta.tag", " descrip" ], ],[
[ "keyword", ": " ], "start"
[ "text", "High Heeled " ], ],[
[ "string", "\"Ruby\"" ], "start",
[ "text", " Slippers" ] ["meta.tag","ship-to"],
] ["keyword",": "],
}, ["constant.language","*id001"]
{ ],[
"state": "start", "start"
"data": [ ],[
[ "meta.tag", " size" ], "qqstring",
[ "keyword", ": " ], ["meta.tag","specialDelivery"],
[ "constant.numeric", "8" ] ["keyword",": "],
] ["string",">"]
}, ],[
{ "qqstring",
"state": "start", ["string"," Follow the Yellow Brick"]
"data": [ ],[
[ "meta.tag", " price" ], "qqstring",
[ "keyword", ": " ], ["string"," Road to the Emerald City."]
[ "constant.numeric", "100.27" ] ],[
] "qqstring",
}, ["string"," Pay no attention to the"]
{ ],[
"state": "start", "qqstring",
"data": [ ["string"," man behind the curtain."]
[ "meta.tag", " quantity" ], ],[
[ "keyword", ": " ], "qqstring"
[ "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": []
}
]

View file

@ -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();
}

View file

@ -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: "<script a='a'>var</script>'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: "meta.tag.tag-name.script",
value: "script"
}, {
type: "meta.tag.r",
value: ">"
}, {
type: "text",
value: "'123'"
}]
}],
"test: tokenize multiline attribute value with double quotes": [{
text: "<a href=\"abc",
state: [ "start", "tag_qqstring"],
tokens: [{
type: "meta.tag",
value: "<"
}, {
type: "meta.tag.tag-name.anchor",
value: "a"
}, {
type: "text",
value: " "
}, {
type: "entity.other.attribute-name",
value: "href"
}, {
type: "keyword.operator",
value: "="
}, {
type: "string",
value: "\"abc"
}
]
}, {
text: "def\">",
state: [ "tag_qqstring", "start" ],
tokens: [ {
type: "string",
value: "def\""
}, {
type: "meta.tag.r",
value: ">"
}
]
}],
"test: tokenize multiline attribute value with single quotes": [{
text: "<a href='abc",
state: ["start", "tag_qstring"],
tokens: [{
type: "meta.tag",
value: "<"
}, {
type: "meta.tag.tag-name.anchor",
value: "a"
}, {
type: "text",
value: " "
}, {
type: "entity.other.attribute-name",
value: "href"
}, {
type: "keyword.operator",
value: "="
}, {
type: "string",
value: "'abc"
}
]
}, {
text: "def\"'>",
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();
}

View file

@ -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()
}

View file

@ -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();
}

View file

@ -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 <quexer AT gmail DOT com>
*
* ***** 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();
}

View file

@ -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()
}

View file

@ -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>//Juhu Kinners</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: "</"
},
{
type: "meta.tag.tag-name",
value: "Kinners"
},
{
type: "meta.tag.r",
value: ">"
}
]
}],
"test: two tags in the same lines should be in separate tokens": [{
text: "<Juhu><Kinners>",
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: "<copy set=\"{",
state: ["start", "tag_qqstring"],
tokens: [
{
type: "meta.tag",
value: "<"
},
{
type: "meta.tag.tag-name",
value: "copy"
},
{
type: "text",
value: " "
},
{
type: "entity.other.attribute-name",
value: "set"
},
{
type: "keyword.operator",
value: "="
},
{
type: "string",
value: "\"{"
}
]
}, {
text: "}\" undo=\"{",
state: [ "tag_qqstring", "tag_qqstring"],
tokens: [
{
type: "string",
value: "}\""
},
{
type: "text",
value: " "
},
{
type: "entity.other.attribute-name",
value: "undo"
},
{
type: "keyword.operator",
value: "="
},
{
type: "string",
value: "\"{"
}
]
}, {
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();
}

View file

@ -23,23 +23,15 @@ var testNames = [
"ace/layer/text_test", "ace/layer/text_test",
"ace/lib/event_emitter_test", "ace/lib/event_emitter_test",
"ace/mode/coffee/parser_test", "ace/mode/coffee/parser_test",
"ace/mode/coffee_highlight_rules_test",
"ace/mode/coldfusion_test", "ace/mode/coldfusion_test",
"ace/mode/css_test", "ace/mode/css_test",
"ace/mode/css_highlight_rules_test",
"ace/mode/css_worker", "ace/mode/css_worker",
"ace/mode/html_test", "ace/mode/html_test",
"ace/mode/html_highlight_rules_test",
"ace/mode/javascript_test", "ace/mode/javascript_test",
"ace/mode/javascript_highlight_rules_test",
"ace/mode/javascript_worker_test", "ace/mode/javascript_worker_test",
"ace/mode/lucene_highlight_rules_test",
"ace/mode/liquid_highlight_rules_test",
"ace/mode/python_test", "ace/mode/python_test",
"ace/mode/ruby_highlight_rules_test",
"ace/mode/text_test", "ace/mode/text_test",
"ace/mode/xml_test", "ace/mode/xml_test",
"ace/mode/xml_highlight_rules_test",
"ace/mode/folding/cstyle_test", "ace/mode/folding/cstyle_test",
"ace/mode/folding/html_test", "ace/mode/folding/html_test",
"ace/mode/folding/pythonic_test", "ace/mode/folding/pythonic_test",