add tests for all highlighters

This commit is contained in:
nightwing 2012-08-31 00:08:01 +04:00
commit 6b96cd1229
47 changed files with 25312 additions and 8 deletions

View file

@ -0,0 +1,8 @@
{
"name": "ace-mode-creator",
"version": "0.1.0",
"dependencies": {
"connect": "",
"socket.io": ""
}
}

View file

@ -0,0 +1,102 @@
var fs = require("fs");
var path = require("path");
if (!fs.existsSync)
fs.existsSync = path.existsSync;
require("amd-loader");
function generateTestData() {
var root = Array(5).join("../") + "/demo/kitchen-sink/docs"
var docs = fs.readdirSync(root)
var specialDocs = fs.readdirSync(".")
var modes = fs.readdirSync("../").filter(function(x){
return /(\w+)_highlight_rules.js$/.test(x)
}).map(function(x) {
return x.replace(/_highlight_rules.js$/, "")
});
console.log(docs)
console.log(modes)
docs.forEach(function(docName){
var p = docName.toLowerCase().split("."), 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]]
}
if (!modeName) {
return console.error(p)
}
var filePath = "text_" + modeName + ".txt"
if (specialDocs.indexOf(filePath) == -1) {
filePath = root + "/" + docName
}
var text = fs.readFileSync(filePath, "utf8")
var Mode = require("../" + modeName).Mode;
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,
values: tokens.map(function(x) {return x.value}),
types: tokens.map(function(x) {return x.type})
}
})
fs.writeFileSync("tokens_" + modeName + ".json", JSON.stringify(data, null, 1), "utf8")
})
}
function test() {
var docs = fs.readdirSync(".").filter(function(x){
return /^tokens_\w+.json/.test(x)
});
docs.forEach(function(x, i){
var modeName = x.match(/tokens_(.*).json/)[1]
console.log((" " + (i+1)).slice(-3) + ") testing: \u001b[33m" + modeName + "\u001b[0m")
var text = fs.readFileSync("./" + x, "utf8")
var data = JSON.parse(text)
var Mode = require("../" + modeName).Mode;
var tokenizer = new Mode().getTokenizer();
var state = "start"
data.forEach(function(lineData) {
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})
testEqual(lineData.state, tokens.state)
testEqual(lineData.types, types)
testEqual(lineData.values, values)
state = lineData.state
})
})
console.log("\u001b[32m" + "all ok" + "\u001b[0m")
function testEqual(a, b) {
if (a + "" !== b + "")
throw a + "!=" + b
}
}
if (process.argv[2] == "gen") {
generateTestData(process.argv.splice(3))
} else {
test()
}

View file

@ -0,0 +1,47 @@
function foo(items, nada) {
for (var i=0; i<items.length; i++) {
alert(items[i] + "juhu\n");
} // Real Tab.
}
/************************************/
/** total mess, tricky to highlight**/
function () {
/**
* docComment
**/
r = /u\t*/
g = 1.00E^1, y = 1.2 + .2 + 052 + 0x25
t = ['d', '']
}
function () {
/* eee */
}
"s\
s\u7824sss\u1"
'\
string'
'
string'
"trailing space\
" " /not a regexp/g
/**
*doc
*/
a = {
'a': b,
'g': function(t)
gta:function(a,b)
}
foo.protoype.d = function(a, b,
c, d)
foo.d =function(a, b)
foo.d =function(a, /*****/ d"string"

View file

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

View file

@ -0,0 +1,207 @@
[
{
"state": "start",
"values": [
"// compound assignment operators"
],
"types": [
"comment"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"#include",
" ",
"<iostream>"
],
"types": [
"keyword",
"text",
"constant"
]
},
{
"state": "start",
"values": [
"using",
" ",
"namespace",
" ",
"std",
";"
],
"types": [
"keyword",
"text",
"keyword",
"text",
"identifier",
"punctuation.operator"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"int",
" ",
"main",
" ",
"(",
")"
],
"types": [
"keyword",
"text",
"identifier",
"text",
"paren.lparen",
"paren.rparen"
]
},
{
"state": "start",
"values": [
"{"
],
"types": [
"paren.lparen"
]
},
{
"state": "start",
"values": [
" ",
"int",
" ",
"a",
",",
" ",
"b",
"=",
"3",
";",
" ",
"/*",
" foobar */"
],
"types": [
"text",
"keyword",
"text",
"identifier",
"punctuation.operator",
"text",
"identifier",
"keyword.operator",
"constant.numeric",
"punctuation.operator",
"text",
"comment",
"comment"
]
},
{
"state": "start",
"values": [
" ",
"a",
" ",
"=",
" ",
"b",
";"
],
"types": [
"text",
"identifier",
"text",
"keyword.operator",
"text",
"identifier",
"punctuation.operator"
]
},
{
"state": "start",
"values": [
" ",
"a",
"+",
"=",
"2",
";",
" ",
"// equivalent to a=a+2"
],
"types": [
"text",
"identifier",
"keyword.operator",
"keyword.operator",
"constant.numeric",
"punctuation.operator",
"text",
"comment"
]
},
{
"state": "start",
"values": [
" ",
"cout",
" ",
"<",
"<",
" ",
"a",
";"
],
"types": [
"text",
"identifier",
"text",
"keyword.operator",
"keyword.operator",
"text",
"identifier",
"punctuation.operator"
]
},
{
"state": "start",
"values": [
" ",
"return",
" ",
"0",
";"
],
"types": [
"text",
"keyword",
"text",
"constant.numeric",
"punctuation.operator"
]
},
{
"state": "start",
"values": [
"}"
],
"types": [
"paren.rparen"
]
}
]

View file

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

View file

@ -0,0 +1,308 @@
[
{
"state": "start",
"values": [
"#!/usr/bin/env coffee"
],
"types": [
"comment"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"try"
],
"types": [
"keyword"
]
},
{
"state": "start",
"values": [
" ",
"throw",
" ",
"URIError",
" ",
"decodeURI",
"(",
"0xC0ffee",
" ",
"*",
" ",
"123456.7e-8",
" ",
"/",
" ",
".9",
")"
],
"types": [
"text",
"keyword",
"text",
"language.support.class",
"text",
"language.support.function",
"paren.lparen",
"constant.numeric",
"text",
"keyword.operator",
"text",
"constant.numeric",
"text",
"keyword.operator",
"text",
"constant.numeric",
"paren.rparen"
]
},
{
"state": "start",
"values": [
"catch",
" ",
"e"
],
"types": [
"keyword",
"text",
"identifier"
]
},
{
"state": "qdoc",
"values": [
" ",
"console",
".log",
" ",
"'qstring'",
" ",
"+",
" ",
"\"qqstring\"",
" ",
"+",
" ",
"'''"
],
"types": [
"text",
"identifier",
"identifier",
"text",
"string",
"text",
"keyword.operator",
"text",
"string",
"text",
"keyword.operator",
"text",
"string"
]
},
{
"state": "qdoc",
"values": [
" qdoc"
],
"types": [
"string"
]
},
{
"state": "qqdoc",
"values": [
" '''",
" ",
"+",
" ",
"\"\"\""
],
"types": [
"string",
"text",
"keyword.operator",
"text",
"string"
]
},
{
"state": "qqdoc",
"values": [
" qqdoc"
],
"types": [
"string"
]
},
{
"state": "start",
"values": [
" \"\"\""
],
"types": [
"string"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"do",
" ",
"->"
],
"types": [
"keyword",
"text",
"keyword.operator"
]
},
{
"state": "comment",
"values": [
" ",
"###"
],
"types": [
"text",
"comment"
]
},
{
"state": "comment",
"values": [
" herecomment"
],
"types": [
"comment"
]
},
{
"state": "start",
"values": [
" ###"
],
"types": [
"comment"
]
},
{
"state": "heregex",
"values": [
" ",
"re",
" ",
"=",
" ",
"/regex/imgy",
".test",
" ",
"///"
],
"types": [
"text",
"identifier",
"text",
"keyword.operator",
"text",
"string.regex",
"identifier",
"text",
"string.regex"
]
},
{
"state": "heregex",
"values": [
" ",
"heregex",
" # comment"
],
"types": [
"comment.regex",
"string.regex",
"comment.regex"
]
},
{
"state": "start",
"values": [
" ///imgy"
],
"types": [
"string.regex"
]
},
{
"state": "start",
"values": [
" ",
"this",
" ",
"isnt",
":",
" ",
"`just JavaScript`"
],
"types": [
"text",
"keyword",
"text",
"keyword",
"punctuation.operator",
"text",
"string"
]
},
{
"state": "start",
"values": [
" ",
"undefined"
],
"types": [
"text",
"constant.language"
]
},
{
"state": "start",
"values": [
" "
],
"types": [
"text"
]
},
{
"state": "start",
"values": [
"sentence",
" ",
"=",
" ",
"\"#{ 22 / 7 } is a decent approximation of π\""
],
"types": [
"identifier",
"text",
"keyword.operator",
"text",
"string"
]
}
]

View file

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

View file

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

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,766 @@
[
{
"state": "regex_allowed",
"values": [
"function",
" ",
"foo",
"(",
"items",
", ",
"nada",
")",
" ",
"{"
],
"types": [
"storage.type",
"text",
"entity.name.function",
"paren.lparen",
"variable.parameter",
"punctuation.operator",
"variable.parameter",
"paren.rparen",
"text",
"paren.lparen"
]
},
{
"state": "regex_allowed",
"values": [
" ",
"for",
" ",
"(",
"var",
" ",
"i",
"=",
"0",
";",
" ",
"i",
"<",
"items",
".",
"length",
";",
" ",
"i",
"++",
")",
" ",
"{"
],
"types": [
"text",
"keyword",
"text",
"paren.lparen",
"storage.type",
"text",
"identifier",
"keyword.operator",
"constant.numeric",
"punctuation.operator",
"text",
"identifier",
"keyword.operator",
"identifier",
"punctuation.operator",
"support.constant",
"punctuation.operator",
"text",
"identifier",
"keyword.operator",
"paren.rparen",
"text",
"paren.lparen"
]
},
{
"state": "regex_allowed",
"values": [
" ",
"alert",
"(",
"items",
"[",
"i",
"]",
" ",
"+",
" ",
"\"juhu",
"\\n",
"\"",
")",
";"
],
"types": [
"text",
"identifier",
"paren.lparen",
"identifier",
"paren.lparen",
"identifier",
"paren.rparen",
"text",
"keyword.operator",
"text",
"string",
"constant.language.escape",
"string",
"paren.rparen",
"punctuation.operator"
]
},
{
"state": "start",
"values": [
" ",
"}",
"\t",
"// Real Tab."
],
"types": [
"text",
"paren.rparen",
"text",
"comment"
]
},
{
"state": "start",
"values": [
"}"
],
"types": [
"paren.rparen"
]
},
{
"state": "start",
"values": [
" ",
"/************************************/"
],
"types": [
"text",
"comment.doc"
]
},
{
"state": "start",
"values": [
"/** total mess, tricky to highlight**/"
],
"types": [
"comment.doc"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "regex_allowed",
"values": [
"function",
" ",
"(",
")",
" ",
"{"
],
"types": [
"storage.type",
"text",
"paren.lparen",
"paren.rparen",
"text",
"paren.lparen"
]
},
{
"state": "doc-start",
"values": [
"\t",
"/**"
],
"types": [
"text",
"comment.doc"
]
},
{
"state": "doc-start",
"values": [
"\t * docComment"
],
"types": [
"comment.doc"
]
},
{
"state": "start",
"values": [
"\t **/"
],
"types": [
"comment.doc"
]
},
{
"state": "start",
"values": [
"\t",
"r",
" ",
"=",
" ",
"/u",
"\\t",
"*/"
],
"types": [
"text",
"identifier",
"text",
"keyword.operator",
"text",
"string.regexp",
"regexp.keyword.operator",
"string.regexp"
]
},
{
"state": "start",
"values": [
"\t",
"g",
" ",
"=",
" ",
"1.",
"00",
"E",
"^",
"1",
",",
" ",
"y",
" ",
"=",
" ",
"1.2",
" ",
"+",
" ",
".",
"2",
" ",
"+",
" ",
"052",
" ",
"+",
" ",
"0x25"
],
"types": [
"text",
"identifier",
"text",
"keyword.operator",
"text",
"constant.numeric",
"text",
"identifier",
"text",
"constant.numeric",
"punctuation.operator",
"text",
"identifier",
"text",
"keyword.operator",
"text",
"constant.numeric",
"text",
"keyword.operator",
"text",
"punctuation.operator",
"constant.numeric",
"text",
"keyword.operator",
"text",
"constant.numeric",
"text",
"keyword.operator",
"text",
"constant.numeric"
]
},
{
"state": "start",
"values": [
"\t",
"t",
" ",
"=",
" ",
"[",
"'d'",
",",
" ",
"''",
"]"
],
"types": [
"text",
"identifier",
"text",
"keyword.operator",
"text",
"paren.lparen",
"string",
"punctuation.operator",
"text",
"string",
"paren.rparen"
]
},
{
"state": "start",
"values": [
"}"
],
"types": [
"paren.rparen"
]
},
{
"state": "regex_allowed",
"values": [
"function",
" ",
"(",
")",
" ",
"{"
],
"types": [
"storage.type",
"text",
"paren.lparen",
"paren.rparen",
"text",
"paren.lparen"
]
},
{
"state": "regex_allowed",
"values": [
"\t",
"/* eee */"
],
"types": [
"text",
"comment"
]
},
{
"state": "start",
"values": [
"}"
],
"types": [
"paren.rparen"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "qqstring",
"values": [
"\"s\\"
],
"types": [
"string"
]
},
{
"state": "start",
"values": [
"s",
"\\u7824",
"sss",
"\\u",
"1\""
],
"types": [
"string",
"constant.language.escape",
"string",
"constant.language.escape",
"string"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "qstring",
"values": [
"'\\"
],
"types": [
"string"
]
},
{
"state": "start",
"values": [
"string'"
],
"types": [
"string"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"'"
],
"types": [
"text"
]
},
{
"state": "start",
"values": [
"string",
"'"
],
"types": [
"identifier",
"text"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"\"trailing space",
"\\ ",
" "
],
"types": [
"string",
"constant.language.escape",
"string"
]
},
{
"state": "start",
"values": [
"\" \"",
" ",
"/",
"not",
" ",
"a",
" ",
"regexp",
"/",
"g"
],
"types": [
"string",
"text",
"keyword.operator",
"identifier",
"text",
"identifier",
"text",
"identifier",
"keyword.operator",
"identifier"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "doc-start",
"values": [
"/**"
],
"types": [
"comment.doc"
]
},
{
"state": "doc-start",
"values": [
" *doc"
],
"types": [
"comment.doc"
]
},
{
"state": "start",
"values": [
" */"
],
"types": [
"comment.doc"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "regex_allowed",
"values": [
"a",
" ",
"=",
" ",
"{"
],
"types": [
"identifier",
"text",
"keyword.operator",
"text",
"paren.lparen"
]
},
{
"state": "regex_allowed",
"values": [
"\t",
"'a'",
":",
" ",
"b",
","
],
"types": [
"text",
"string",
"punctuation.operator",
"text",
"identifier",
"punctuation.operator"
]
},
{
"state": "start",
"values": [
"\t",
"'g'",
": ",
"function",
"(",
"t",
")"
],
"types": [
"text",
"string",
"text",
"storage.type",
"paren.lparen",
"variable.parameter",
"paren.rparen"
]
},
{
"state": "start",
"values": [
"\t",
"gta",
":",
"function",
"(",
"a",
",",
"b",
")"
],
"types": [
"text",
"entity.name.function",
"punctuation.operator",
"storage.type",
"paren.lparen",
"variable.parameter",
"punctuation.operator",
"variable.parameter",
"paren.rparen"
]
},
{
"state": "start",
"values": [
"}"
],
"types": [
"paren.rparen"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "function_arguments",
"values": [
"foo",
".",
"protoype",
".",
"d",
" ",
"=",
" ",
"function",
"(",
"a",
", ",
"b",
","
],
"types": [
"identifier",
"punctuation.operator",
"storage.type",
"punctuation.operator",
"entity.name.function",
"text",
"keyword.operator",
"text",
"storage.type",
"paren.lparen",
"variable.parameter",
"punctuation.operator",
"variable.parameter",
"punctuation.operator"
]
},
{
"state": "start",
"values": [
" ",
"c",
", ",
"d",
")"
],
"types": [
"punctuation.operator",
"variable.parameter",
"punctuation.operator",
"variable.parameter",
"paren.rparen"
]
},
{
"state": "start",
"values": [
"foo",
".",
"d",
" ",
"=",
"function",
"(",
"a",
", ",
"b",
")"
],
"types": [
"storage.type",
"punctuation.operator",
"entity.name.function",
"text",
"keyword.operator",
"storage.type",
"paren.lparen",
"variable.parameter",
"punctuation.operator",
"variable.parameter",
"paren.rparen"
]
},
{
"state": "start",
"values": [
"foo",
".",
"d",
" ",
"=",
"function",
"(",
"a",
", ",
"/*****/",
" ",
"d",
"\"string\"",
" "
],
"types": [
"storage.type",
"punctuation.operator",
"entity.name.function",
"text",
"keyword.operator",
"storage.type",
"paren.lparen",
"variable.parameter",
"punctuation.operator",
"comment.doc",
"text",
"identifier",
"string",
"text"
]
},
{
"state": "start",
"values": [],
"types": []
}
]

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,129 @@
[
{
"state": "comment",
"values": [
"/*EXPECTED"
],
"types": [
"comment"
]
},
{
"state": "comment",
"values": [
"hello world!"
],
"types": [
"comment"
]
},
{
"state": "start",
"values": [
"*/"
],
"types": [
"comment"
]
},
{
"state": "start",
"values": [
"class",
" ",
"Test",
" ",
"{"
],
"types": [
"keyword",
"text",
"language.support.class",
"text",
"paren.lparen"
]
},
{
"state": "start",
"values": [
" ",
"static",
" ",
"function",
" ",
"run",
"(",
")",
" ",
":",
" ",
"void",
" ",
"{"
],
"types": [
"text",
"keyword",
"text",
"storage.type",
"text",
"entity.name.function",
"paren.lparen",
"paren.rparen",
"text",
"punctuation.operator",
"text",
"keyword",
"text",
"paren.lparen"
]
},
{
"state": "start",
"values": [
" ",
"// console.log(\"hello world!\");"
],
"types": [
"text",
"comment"
]
},
{
"state": "start",
"values": [
" ",
"log",
" ",
"\"hello world!\"",
";"
],
"types": [
"text",
"keyword",
"text",
"string",
"punctuation.operator"
]
},
{
"state": "start",
"values": [
" ",
"}"
],
"types": [
"text",
"paren.rparen"
]
},
{
"state": "start",
"values": [
"}"
],
"types": [
"paren.rparen"
]
}
]

View file

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

View file

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

File diff suppressed because it is too large Load diff

View file

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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

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

View file

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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,417 @@
[
{
"state": "start",
"values": [
"<?php"
],
"types": [
"support.php_tag"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"function",
" ",
"nfact",
"(",
"$n",
")",
" ",
"{"
],
"types": [
"keyword",
"text",
"identifier",
"lparen",
"variable",
"rparen",
"text",
"lparen"
]
},
{
"state": "start",
"values": [
" ",
"if",
" ",
"(",
"$n",
" ",
"==",
" ",
"0",
")",
" ",
"{"
],
"types": [
"text",
"keyword",
"text",
"lparen",
"variable",
"text",
"keyword.operator",
"text",
"constant.numeric",
"rparen",
"text",
"lparen"
]
},
{
"state": "start",
"values": [
" ",
"return",
" ",
"1",
";"
],
"types": [
"text",
"support.function",
"text",
"constant.numeric",
"text"
]
},
{
"state": "start",
"values": [
" ",
"}"
],
"types": [
"text",
"rparen"
]
},
{
"state": "start",
"values": [
" ",
"else",
" ",
"{"
],
"types": [
"text",
"keyword",
"text",
"lparen"
]
},
{
"state": "start",
"values": [
" ",
"return",
" ",
"$n",
" ",
"*",
" ",
"nfact",
"(",
"$n",
" ",
"-",
" ",
"1",
")",
";"
],
"types": [
"text",
"support.function",
"text",
"variable",
"text",
"keyword.operator",
"text",
"identifier",
"lparen",
"variable",
"text",
"keyword.operator",
"text",
"constant.numeric",
"rparen",
"text"
]
},
{
"state": "start",
"values": [
" ",
"}"
],
"types": [
"text",
"rparen"
]
},
{
"state": "start",
"values": [
"}"
],
"types": [
"rparen"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"echo",
" ",
"\"",
"\\n",
"\\n",
"P",
"l",
"e",
"a",
"s",
"e",
" ",
"e",
"n",
"t",
"e",
"r",
" ",
"a",
" ",
"w",
"h",
"o",
"l",
"e",
" ",
"n",
"u",
"m",
"b",
"e",
"r",
" ",
".",
".",
".",
" ",
"\"",
";"
],
"types": [
"support.function",
"text",
"string",
"constant.language.escape",
"constant.language.escape",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"text"
]
},
{
"state": "start",
"values": [
"$num",
" ",
"=",
" ",
"trim",
"(",
"fgets",
"(",
"STDIN",
")",
")",
";"
],
"types": [
"variable",
"text",
"keyword.operator",
"text",
"support.function",
"lparen",
"support.function",
"lparen",
"constant.language",
"rparen",
"rparen",
"text"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"// ===== PROCESS - Determing the factorial of the input number ====="
],
"types": [
"comment"
]
},
{
"state": "start",
"values": [
"$output",
" ",
"=",
" ",
"\"",
"\\n",
"\\n",
"F",
"a",
"c",
"t",
"o",
"r",
"i",
"a",
"l",
" ",
"\"",
" . ",
"$num",
" . ",
"\"",
" ",
"=",
" ",
"\"",
" . ",
"nfact",
"(",
"$num",
")",
" . ",
"\"",
"\\n",
"\\n",
"\"",
";"
],
"types": [
"variable",
"text",
"keyword.operator",
"text",
"string",
"constant.language.escape",
"constant.language.escape",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"string",
"text",
"variable",
"text",
"string",
"string",
"string",
"string",
"string",
"text",
"identifier",
"lparen",
"variable",
"rparen",
"text",
"string",
"constant.language.escape",
"constant.language.escape",
"string",
"text"
]
},
{
"state": "start",
"values": [
"echo",
" ",
"$output",
";"
],
"types": [
"support.function",
"text",
"variable",
"text"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"?>"
],
"types": [
"support.php_tag"
]
}
]

View file

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

View file

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

View file

@ -0,0 +1,170 @@
[
{
"state": "start",
"values": [
"#!/usr/bin/ruby"
],
"types": [
"comment"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"# Program to find the factorial of a number"
],
"types": [
"comment"
]
},
{
"state": "start",
"values": [
"def",
" ",
"fact",
"(",
"n",
")"
],
"types": [
"keyword",
"text",
"identifier",
"paren.lparen",
"identifier",
"paren.rparen"
]
},
{
"state": "start",
"values": [
" ",
"if",
" ",
"n",
" ",
"==",
" ",
"0"
],
"types": [
"text",
"keyword",
"text",
"identifier",
"text",
"keyword.operator",
"text",
"constant.numeric"
]
},
{
"state": "start",
"values": [
" ",
"1"
],
"types": [
"text",
"constant.numeric"
]
},
{
"state": "start",
"values": [
" ",
"else"
],
"types": [
"text",
"keyword"
]
},
{
"state": "start",
"values": [
" ",
"n",
" ",
"*",
" ",
"fact",
"(",
"n",
"-1",
")"
],
"types": [
"text",
"identifier",
"text",
"keyword.operator",
"text",
"identifier",
"paren.lparen",
"identifier",
"constant.numeric",
"paren.rparen"
]
},
{
"state": "start",
"values": [
" ",
"end"
],
"types": [
"text",
"keyword"
]
},
{
"state": "start",
"values": [
"end"
],
"types": [
"keyword"
]
},
{
"state": "start",
"values": [],
"types": []
},
{
"state": "start",
"values": [
"puts",
" ",
"fact",
"(",
"ARGV",
"[",
"0",
"]",
".",
"to_i",
")"
],
"types": [
"support.function",
"text",
"identifier",
"paren.lparen",
"variable.class",
"paren.lparen",
"constant.numeric",
"paren.rparen",
"text",
"identifier",
"paren.rparen"
]
}
]

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

@ -20,12 +20,11 @@
define(function(require, exports, module) {
var oop = require("ace/lib/oop");
var TextMode = require("ace/mode/text").Mode;
var Tokenizer = require("ace/tokenizer").Tokenizer;
var PgsqlHighlightRules = require("ace/mode/pgsql_highlight_rules").PgsqlHighlightRules;
var Range = require("ace/range").Range;
// var EditSession = require("ace/edit_session").EditSession;
var oop = require("../lib/oop");
var TextMode = require("../mode/text").Mode;
var Tokenizer = require("../tokenizer").Tokenizer;
var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules;
var Range = require("../range").Range;
var Mode = function() {
this.$tokenizer = new Tokenizer(new PgsqlHighlightRules().getRules());

View file

@ -23,8 +23,8 @@
define(function(require, exports, module) {
var oop = require("ace/lib/oop");
var lang = require("ace/lib/lang");
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
// Supporting perl and python for now -- both in pg core and ace