Merge remote branch 'origin/master' into gh-pages

This commit is contained in:
C9 2012-11-15 12:35:18 -05:00
commit f2c311253a
73 changed files with 9351 additions and 19212 deletions

View file

@ -25,7 +25,7 @@ var EventEmitter = require("../lib/event_emitter").EventEmitter;
var CommandManager = function(platform, commands) { var CommandManager = function(platform, commands) {
this.platform = platform; this.platform = platform;
this.commands = {}; this.commands = this.byName = {};
this.commmandKeyBinding = {}; this.commmandKeyBinding = {};
this.addCommands(commands); this.addCommands(commands);

View file

@ -74,11 +74,15 @@ exports.defaultCommands = [{
}, { }, {
name: "splitIntoLines", name: "splitIntoLines",
exec: function(editor) { editor.multiSelect.splitIntoLines(); }, exec: function(editor) { editor.multiSelect.splitIntoLines(); },
bindKey: {win: "Ctrl-Shift-L", mac: "Ctrl-Shift-L"}, bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"},
readonly: true readonly: true
}, {
name: "alignCursors",
exec: function(editor) { editor.alignCursors(); },
bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}
}]; }];
// commands active in multiselect mode // commands active only in multiselect mode
exports.multiSelectCommands = [{ exports.multiSelectCommands = [{
name: "singleSelection", name: "singleSelection",
bindKey: "esc", bindKey: "esc",

View file

@ -262,9 +262,8 @@
margin: 0 -12px 0 1px; margin: 0 -12px 0 1px;
display: inline-block; display: inline-block;
height: 100%;
width: 11px; width: 11px;
vertical-align: bottom; vertical-align: top;
background-image: url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82"); background-image: url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82");
background-repeat: no-repeat; background-repeat: no-repeat;

View file

@ -39,7 +39,6 @@ var useragent = require("./lib/useragent");
var TextInput = require("./keyboard/textinput").TextInput; var TextInput = require("./keyboard/textinput").TextInput;
var MouseHandler = require("./mouse/mouse_handler").MouseHandler; var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
var FoldHandler = require("./mouse/fold_handler").FoldHandler; var FoldHandler = require("./mouse/fold_handler").FoldHandler;
//var TouchHandler = require("./touch_handler").TouchHandler;
var KeyBinding = require("./keyboard/keybinding").KeyBinding; var KeyBinding = require("./keyboard/keybinding").KeyBinding;
var EditSession = require("./edit_session").EditSession; var EditSession = require("./edit_session").EditSession;
var Search = require("./search").Search; var Search = require("./search").Search;
@ -74,12 +73,8 @@ var Editor = function(renderer, session) {
this.keyBinding = new KeyBinding(this); this.keyBinding = new KeyBinding(this);
// TODO detect touch event support // TODO detect touch event support
if (useragent.isIPad) { this.$mouseHandler = new MouseHandler(this);
//this.$mouseHandler = new TouchHandler(this); new FoldHandler(this);
} else {
this.$mouseHandler = new MouseHandler(this);
new FoldHandler(this);
}
this.$blockScrolling = 0; this.$blockScrolling = 0;
this.$search = new Search().set({ this.$search = new Search().set({

View file

@ -212,7 +212,8 @@ exports.emacsKeys = {
"S-C-Home" : "selecttostart", "S-C-Home" : "selecttostart",
"S-C-End" : "selecttoend", "S-C-End" : "selecttoend",
"C-l|M-s" : "centerselection", "C-l" : "recenterTopBottom",
"M-s" : "centerselection",
"M-g": "gotoline", "M-g": "gotoline",
"C-x C-p": "selectall", "C-x C-p": "selectall",
@ -270,6 +271,20 @@ exports.emacsKeys = {
exports.handler.bindKeys(exports.emacsKeys); exports.handler.bindKeys(exports.emacsKeys);
exports.handler.addCommands({ exports.handler.addCommands({
recenterTopBottom: function(editor) {
var renderer = editor.renderer;
var pos = renderer.$cursorLayer.getPixelPosition();
var h = renderer.$size.scrollerHeight - renderer.lineHeight;
var scrollTop = renderer.scrollTop;
if (Math.abs(pos.top - scrollTop) < 2) {
scrollTop = pos.top - h;
} else if (Math.abs(pos.top - scrollTop - h * 0.5) < 2) {
scrollTop = pos.top;
} else {
scrollTop = pos.top - h * 0.5;
}
editor.session.setScrollTop(scrollTop);
},
selectRectangularRegion: function(editor) { selectRectangularRegion: function(editor) {
editor.multiSelect.toggleBlockSelection(); editor.multiSelect.toggleBlockSelection();
}, },
@ -323,7 +338,7 @@ exports.handler.addCommands({
}, },
killRegion: function(editor) { killRegion: function(editor) {
exports.killRing.add(editor.getCopyText()); exports.killRing.add(editor.getCopyText());
editor.cut(); editor.commands.byName.cut.exec(editor);
}, },
killRingSave: function(editor) { killRingSave: function(editor) {
exports.killRing.add(editor.getCopyText()); exports.killRing.add(editor.getCopyText());

View file

@ -88,7 +88,9 @@ exports.handler = {
if (hashId == 1) if (hashId == 1)
key = "ctrl-" + key; key = "ctrl-" + key;
if (data.state == "start") { if ((key == "esc" && hashId == 0) || key == "ctrl-[") {
return {command: coreCommands.stop};
} else if (data.state == "start") {
if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) { if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
hashId = -1; hashId = -1;
key = data.inputChar; key = data.inputChar;
@ -109,10 +111,7 @@ exports.handler = {
return {command: coreCommands.stop}; return {command: coreCommands.stop};
} }
} else { } else {
if (key == "esc" || key == "ctrl-[") { if (key == "ctrl-w") {
data.state = "start";
return {command: coreCommands.stop};
} else if (key == "ctrl-w") {
return {command: "removewordleft"}; return {command: "removewordleft"};
} }
} }

View file

@ -27,7 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
"use strict" "use strict"
define(function(require, exports, module) { define(function(require, exports, module) {
@ -598,6 +598,25 @@ module.exports = {
return match; return match;
}), }),
"{": new Motion(function(ed) {
var session = ed.session;
var row = session.selection.lead.row;
while(row > 0 && !/\S/.test(session.getLine(row)))
row--;
while(/\S/.test(session.getLine(row)))
row--;
return {column: 0, row: row};
}),
"}": new Motion(function(ed) {
var session = ed.session;
var l = session.getLength();
var row = session.selection.lead.row;
while(row < l && !/\S/.test(session.getLine(row)))
row++;
while(/\S/.test(session.getLine(row)))
row++;
return {column: 0, row: row};
}),
"ctrl-d": { "ctrl-d": {
nav: function(editor, range, count, param) { nav: function(editor, range, count, param) {
editor.selection.clearSelection(); editor.selection.clearSelection();

View file

@ -148,6 +148,10 @@ var Cursor = function(parentEl) {
for (var i = selections.length; i--; ) { for (var i = selections.length; i--; ) {
sel = selections[i]; sel = selections[i];
var pixelPos = this.getPixelPosition(sel.cursor, true); var pixelPos = this.getPixelPosition(sel.cursor, true);
if ((pixelPos.top > config.height + config.offset ||
pixelPos.top < -config.offset) && i > 1) {
continue;
}
var style = (this.cursors[cursorIndex++] || this.addCursor()).style; var style = (this.cursors[cursorIndex++] || this.addCursor()).style;

View file

@ -131,6 +131,7 @@ var Gutter = function(parentEl) {
html.push( html.push(
"<span class='ace_fold-widget ", c, "<span class='ace_fold-widget ", c,
c == "start" && i == foldStart && i < fold.end.row ? " closed" : " open", c == "start" && i == foldStart && i < fold.end.row ? " closed" : " open",
"' style='height:", config.lineHeight, "px",
"'></span>" "'></span>"
); );
} }

View file

@ -122,6 +122,9 @@ var Keys = (function() {
ret.enter = ret["return"]; ret.enter = ret["return"];
ret.escape = ret.esc; ret.escape = ret.esc;
ret.del = ret["delete"]; ret.del = ret["delete"];
// workaround for firefox bug
ret[173] = '-';
return ret; return ret;
})(); })();

View file

@ -21,6 +21,8 @@ function generateTestData() {
docs.forEach(function(docName) { docs.forEach(function(docName) {
var p = docName.toLowerCase().split("."); var p = docName.toLowerCase().split(".");
if (!p[1])
return;
var modeName; var modeName;
if (modes.indexOf(p[0]) != -1) if (modes.indexOf(p[0]) != -1)
modeName = p[0]; modeName = p[0];
@ -35,7 +37,12 @@ function generateTestData() {
} }
var text = fs.readFileSync(cwd + filePath, "utf8"); var text = fs.readFileSync(cwd + filePath, "utf8");
var Mode = require("../" + modeName).Mode; try {
var Mode = require("../" + modeName).Mode;
} catch(e) {
console.warn("Can't load mode :" + modeName, e);
return;
}
var tokenizer = new Mode().getTokenizer(); var tokenizer = new Mode().getTokenizer();
var state = "start"; var state = "start";
@ -45,12 +52,12 @@ function generateTestData() {
tokens = tokens.tokens; tokens = tokens.tokens;
return { return {
state: state, state: state,
values: tokens.map(function(x) {return x.value;}), data: tokens.map(function(x) {return [x.type, x.value]})
types: tokens.map(function(x) {return x.type;})
}; };
}); });
var jsonStr = JSON.stringify(data, null, 1);
fs.writeFileSync(cwd + "tokens_" + modeName + ".json", JSON.stringify(data, null, 1), "utf8"); jsonStr = jsonStr.replace(/\n {4}/g, " ").replace(/\n {3}]/g, " ]");
fs.writeFileSync(cwd + "tokens_" + modeName + ".json", jsonStr, "utf8");
}); });
} }
@ -58,8 +65,8 @@ function test(startAt) {
var docs = fs.readdirSync(cwd).filter(function(x) { var docs = fs.readdirSync(cwd).filter(function(x) {
return /^tokens_\w+.json$/.test(x); return /^tokens_\w+.json$/.test(x);
}); });
if (startAt && startAt > 1) if (startAt && startAt > 1)
docs = docs.slice(startAt - 1); docs = docs.slice(startAt - 1);
docs.forEach(function(x, i) { docs.forEach(function(x, i) {
var modeName = x.match(/tokens_(.*).json/)[1]; var modeName = x.match(/tokens_(.*).json/)[1];
@ -72,6 +79,13 @@ function test(startAt) {
var state = "start"; var state = "start";
data.forEach(function(lineData) { data.forEach(function(lineData) {
lineData.values = [];
lineData.types = [];
lineData.data.forEach(function(x) {
lineData.types.push(x[0]);
lineData.values.push(x[1]);
});
var line = lineData.values.join(""); var line = lineData.values.join("");
var tokens = tokenizer.getLineTokens(line, state); var tokens = tokenizer.getLineTokens(line, state);
@ -79,7 +93,6 @@ function test(startAt) {
var types = tokens.tokens.map(function(x) {return x.type;}); var types = tokens.tokens.map(function(x) {return x.type;});
var success = true; var success = true;
var report =
testEqual([ testEqual([
lineData.state, tokens.state, lineData.state, tokens.state,
lineData.types, types, lineData.types, types,

View file

@ -3,6 +3,9 @@ function foo(items, nada) {
alert(items[i] + "juhu\n"); alert(items[i] + "juhu\n");
} // Real Tab. } // Real Tab.
} }
r = /d{1,2}?f{e}++r*?\d+?[]r[^r-o\f\f[\f]?r{7}+r\{7}+rr--rr$^(?:d|s)(?=a|)(?!y)[]|$?|^*/ o
a=/a/ jk = / / / / /
/************************************/ /************************************/
/** total mess, tricky to highlight**/ /** total mess, tricky to highlight**/

View file

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

View file

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

View file

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

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

View file

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

View file

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

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

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

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

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

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

View file

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

File diff suppressed because it is too large Load diff

View file

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

File diff suppressed because it is too large Load diff

View file

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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,81 +1,58 @@
[ [
{ {
"state": "start", "state": "start",
"values": [ "data": [
"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." [ "text", "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet." ]
],
"types": [
"text"
] ]
}, },
{ {
"state": "start", "state": "start",
"values": [], "data": []
"types": []
}, },
{ {
"state": "start", "state": "start",
"values": [ "data": [
"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." [ "text", "Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat." ]
],
"types": [
"text"
] ]
}, },
{ {
"state": "start", "state": "start",
"values": [], "data": []
"types": []
}, },
{ {
"state": "start", "state": "start",
"values": [ "data": [
"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." [ "text", "Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi." ]
],
"types": [
"text"
] ]
}, },
{ {
"state": "start", "state": "start",
"values": [], "data": []
"types": []
}, },
{ {
"state": "start", "state": "start",
"values": [ "data": [
"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." [ "text", "Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat." ]
],
"types": [
"text"
] ]
}, },
{ {
"state": "start", "state": "start",
"values": [], "data": []
"types": []
}, },
{ {
"state": "start", "state": "start",
"values": [ "data": [
"Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis." [ "text", "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", "state": "start",
"values": [], "data": []
"types": []
}, },
{ {
"state": "start", "state": "start",
"values": [ "data": [
"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" [ "text", "At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur" ]
],
"types": [
"text"
] ]
} }
] ]

View file

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

File diff suppressed because it is too large Load diff

View file

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

View file

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

View file

@ -243,6 +243,7 @@ var JavaScriptHighlightRules = function() {
], ],
"regex": [ "regex": [
{ {
// escapes
token: "regexp.keyword.operator", token: "regexp.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, { }, {
@ -251,13 +252,21 @@ var JavaScriptHighlightRules = function() {
regex: "/\\w*", regex: "/\\w*",
next: "start", next: "start",
merge: true merge: true
}, {
// invalid operators
token : "invalid",
regex: /\{\d+,?(?:\d+)?}[+*]|[+*^$?][+*]|\?\?/ // |[^$][?]
}, {
// operators
token : "constant.language.escape",
regex: /\(\?[:=!]|\)|\{\d+,?(?:\d+)?}|[+*]\?|[(|)$^+*?]/
}, { }, {
token: "string.regexp", token: "string.regexp",
regex: "[^\\\\/\\[]+", regex: /{|[^\[\\{()$^+*?\/]+/,
merge: true merge: true
}, { }, {
token: "string.regexp.charachterclass", token: "constant.language.escape",
regex: "\\[", regex: /\[\^?/,
next: "regex_character_class", next: "regex_character_class",
merge: true merge: true
}, { }, {
@ -271,13 +280,16 @@ var JavaScriptHighlightRules = function() {
token: "regexp.keyword.operator", token: "regexp.keyword.operator",
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
}, { }, {
token: "string.regexp.charachterclass", token: "constant.language.escape",
regex: "]", regex: "]",
next: "regex", next: "regex",
merge: true merge: true
}, {
token: "constant.language.escape",
regex: "-",
}, { }, {
token: "string.regexp.charachterclass", token: "string.regexp.charachterclass",
regex: "[^\\\\\\]]+", regex: /[^\]\-\\]+/,
merge: true merge: true
}, { }, {
token: "empty", token: "empty",

View file

@ -134,7 +134,7 @@ module.exports = {
assert.equal("string.regexp", tokens[2].type); assert.equal("string.regexp", tokens[2].type);
var tokens = this.tokenizer.getLineTokens("a = 1 + /2 + 1/b", "start").tokens; var tokens = this.tokenizer.getLineTokens("a = 1 + /2 + 1/b", "start").tokens;
assert.equal(9, tokens.length); assert.equal(11, tokens.length);
assert.equal("string.regexp", tokens[8].type); assert.equal("string.regexp", tokens[8].type);
var tokens = this.tokenizer.getLineTokens("a=/a/ / /a/", "start").tokens; var tokens = this.tokenizer.getLineTokens("a=/a/ / /a/", "start").tokens;

View file

@ -3,7 +3,7 @@
* *
* Copyright (c) 2010, Ajax.org B.V. * Copyright (c) 2010, Ajax.org B.V.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright * * Redistributions of source code must retain the above copyright
@ -14,7 +14,7 @@
* * Neither the name of Ajax.org B.V. nor the * * Neither the name of Ajax.org B.V. nor the
* names of its contributors may be used to endorse or promote products * names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -35,6 +35,7 @@ var Range = require("./range").Range;
var Selection = require("./selection").Selection; var Selection = require("./selection").Selection;
var onMouseDown = require("./mouse/multi_select_handler").onMouseDown; var onMouseDown = require("./mouse/multi_select_handler").onMouseDown;
var event = require("./lib/event"); var event = require("./lib/event");
var lang = require("./lib/lang");
var commands = require("./commands/multi_select_commands"); var commands = require("./commands/multi_select_commands");
exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands); exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);
@ -66,7 +67,7 @@ var EditSession = require("./edit_session").EditSession;
this.rangeList = null; this.rangeList = null;
/** extension /** extension
* Selection.addRange(range, $blockChangeEvents) * Selection.addRange(range, $blockChangeEvents)
* - range (Range): The new range to add * - range (Range): The new range to add
* - $blockChangeEvents (Boolean): Whether or not to block changing events * - $blockChangeEvents (Boolean): Whether or not to block changing events
* *
@ -113,7 +114,7 @@ var EditSession = require("./edit_session").EditSession;
range && this.fromOrientedRange(range); range && this.fromOrientedRange(range);
}; };
/** extension /** extension
* Selection.substractPoint(pos) -> Range * Selection.substractPoint(pos) -> Range
* - pos (Range): The position to remove, as a `{row, column}` object * - pos (Range): The position to remove, as a `{row, column}` object
@ -129,7 +130,7 @@ var EditSession = require("./edit_session").EditSession;
}; };
/** extension /** extension
* Selection.mergeOverlappingRanges() * Selection.mergeOverlappingRanges()
* *
* Merges overlapping ranges ensuring consistency after changes * Merges overlapping ranges ensuring consistency after changes
**/ **/
@ -198,10 +199,19 @@ var EditSession = require("./edit_session").EditSession;
this.setSelectionRange(range, lastRange.cursor == lastRange.start); this.setSelectionRange(range, lastRange.cursor == lastRange.start);
} else { } else {
var range = this.getRange(); var range = this.getRange();
var isBackwards = this.isBackwards();
var startRow = range.start.row; var startRow = range.start.row;
var endRow = range.end.row; var endRow = range.end.row;
if (startRow == endRow) if (startRow == endRow) {
if (isBackwards)
var start = range.end, end = range.start;
else
var start = range.start, end = range.end;
this.addRange(Range.fromPoints(end, end));
this.addRange(Range.fromPoints(start, start));
return; return;
}
var rectSel = []; var rectSel = [];
var r = this.getLineRange(startRow, true); var r = this.getLineRange(startRow, true);
@ -241,7 +251,7 @@ var EditSession = require("./edit_session").EditSession;
* - screenCursor (Cursor): The cursor to use * - screenCursor (Cursor): The cursor to use
* - screenAnchor (Anchor): The anchor to use * - screenAnchor (Anchor): The anchor to use
* - includeEmptyLines (Boolean): If true, this includes ranges inside the block which are empty due to clipping * - includeEmptyLines (Boolean): If true, this includes ranges inside the block which are empty due to clipping
* *
* Gets list of ranges composing rectangular block on the screen * Gets list of ranges composing rectangular block on the screen
* *
**/ **/
@ -313,9 +323,9 @@ var EditSession = require("./edit_session").EditSession;
// extend Editor // extend Editor
var Editor = require("./editor").Editor; var Editor = require("./editor").Editor;
(function() { (function() {
/** extension /** extension
* Editor.updateSelectionMarkers() * Editor.updateSelectionMarkers()
* *
* Updates the cursor and marker layers. * Updates the cursor and marker layers.
**/ **/
@ -343,7 +353,7 @@ var Editor = require("./editor").Editor;
}; };
/** extension /** extension
* Editor.removeSelectionMarker(range) * Editor.removeSelectionMarker(range)
* - range (Range): The selection range added with [[Editor.addSelectionMarker `addSelectionMarker()`]]. * - range (Range): The selection range added with [[Editor.addSelectionMarker `addSelectionMarker()`]].
* *
* Removes the selection marker. * Removes the selection marker.
@ -431,7 +441,7 @@ var Editor = require("./editor").Editor;
}; };
/** extension /** extension
* Editor.forEachSelection(cmd, args) * Editor.forEachSelection(cmd, args)
* - cmd (String): The command to execute * - cmd (String): The command to execute
* - args (String): Any arguments for the command * - args (String): Any arguments for the command
* *
@ -496,7 +506,7 @@ var Editor = require("./editor").Editor;
// todo this should change when paste becomes a command // todo this should change when paste becomes a command
this.onPaste = function(text) { this.onPaste = function(text) {
if (this.$readOnly) if (this.$readOnly)
return; return;
this._emit("paste", text); this._emit("paste", text);
@ -551,7 +561,7 @@ var Editor = require("./editor").Editor;
// commands // commands
/** extension /** extension
* Editor.selectMoreLines(dir, skip) * Editor.selectMoreLines(dir, skip)
* - dir (Number): The direction of lines to select: -1 for up, 1 for down * - dir (Number): The direction of lines to select: -1 for up, 1 for down
* - skip (Boolean): If `true`, removes the active selection range * - skip (Boolean): If `true`, removes the active selection range
* *
@ -596,10 +606,10 @@ var Editor = require("./editor").Editor;
}; };
/** extension /** extension
* Editor.transposeSelections(dir) * Editor.transposeSelections(dir)
* - dir (Number): The direction to rotate selections * - dir (Number): The direction to rotate selections
* *
* Transposes the selected ranges. * Transposes the selected ranges.
**/ **/
this.transposeSelections = function(dir) { this.transposeSelections = function(dir) {
var session = this.session; var session = this.session;
@ -639,13 +649,13 @@ var Editor = require("./editor").Editor;
} }
/** extension /** extension
* Editor.selectMore(dir, skip) * Editor.selectMore(dir, skip)
* - dir (Number): The direction of lines to select: -1 for up, 1 for down * - dir (Number): The direction of lines to select: -1 for up, 1 for down
* - skip (Boolean): If `true`, removes the active selection range * - skip (Boolean): If `true`, removes the active selection range
* *
* Finds the next occurence of text in an active selection and adds it to the selections. * Finds the next occurence of text in an active selection and adds it to the selections.
**/ **/
this.selectMore = function (dir, skip) { this.selectMore = function(dir, skip) {
var session = this.session; var session = this.session;
var sel = session.multiSelect; var sel = session.multiSelect;
@ -665,6 +675,121 @@ var Editor = require("./editor").Editor;
if (skip) if (skip)
this.multiSelect.substractPoint(range.cursor); this.multiSelect.substractPoint(range.cursor);
}; };
/** extension
* Editor.alignCursors()
*
* aligns cursors or selected text
**/
this.alignCursors = function() {
var session = this.session;
var sel = session.multiSelect;
var ranges = sel.ranges;
if (!ranges.length) {
var range = this.selection.getRange();
var fr = range.start.row, lr = range.end.row;
var lines = this.session.doc.removeLines(fr, lr);
lines = this.$reAlignText(lines);
this.session.doc.insertLines(fr, lines);
range.start.column = 0;
range.end.column = lines[lines.length - 1].length;
this.selection.setRange(range);
} else {
// filter out ranges on same row
var row = -1;
var sameRowRanges = ranges.filter(function(r) {
if (r.cursor.row == row)
return true;
row = r.cursor.row;
});
sel.$onRemoveRange(sameRowRanges);
var maxCol = 0;
var minSpace = Infinity;
var spaceOffsets = ranges.map(function(r) {
var p = r.cursor;
var line = session.getLine(p.row);
var spaceOffset = line.substr(p.column).search(/\S/g);
if (spaceOffset == -1)
spaceOffset = 0;
if (p.column > maxCol)
maxCol = p.column;
if (spaceOffset < minSpace)
minSpace = spaceOffset;
return spaceOffset;
});
ranges.forEach(function(r, i) {
var p = r.cursor;
var l = maxCol - p.column;
var d = spaceOffsets[i] - minSpace;
if (l > d)
session.insert(p, lang.stringRepeat(" ", l - d));
else
session.remove(new Range(p.row, p.column, p.row, p.column - l + d));
r.start.column = r.end.column = maxCol;
r.start.row = r.end.row = p.row;
r.cursor = r.end;
});
sel.fromOrientedRange(ranges[0]);
this.renderer.updateCursor();
this.renderer.updateBackMarkers();
}
};
this.$reAlignText = function(lines) {
var isLeftAligned = true, isRightAligned = true;
var startW, textW, endW;
return lines.map(function(line) {
var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/);
if (!m)
return [line];
if (startW == null) {
startW = m[1].length;
textW = m[2].length;
endW = m[3].length;
return m;
}
if (startW + textW + endW != m[1].length + m[2].length + m[3].length)
isRightAligned = false;
if (startW != m[1].length)
isLeftAligned = false;
if (startW > m[1].length)
startW = m[1].length;
if (textW < m[2].length)
textW = m[2].length;
if (endW > m[3].length)
endW = m[3].length;
return m;
}).map(isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);
function strRepeat(n, ch) {
return Array(n + 1).join(ch)
}
function alignLeft(m) {
return !m[2] ? m[0] : strRepeat(startW, " ") + m[2]
+ strRepeat(textW - m[2].length + endW, " ")
+ m[4].replace(/^([=:])\s+/, "$1 ")
}
function alignRight(m) {
return !m[2] ? m[0] : strRepeat(startW + textW - m[2].length, " ") + m[2]
+ strRepeat(endW, " ")
+ m[4].replace(/^([=:])\s+/, "$1 ")
}
function unAlign(m) {
return !m[2] ? m[0] : strRepeat(startW, " ") + m[2]
+ strRepeat(endW, " ")
+ m[4].replace(/^([=:])\s+/, "$1 ")
}
}
}).call(Editor.prototype); }).call(Editor.prototype);
@ -710,7 +835,7 @@ exports.onSessionChange = function(e) {
} }
}; };
// MultiSelect(editor) // MultiSelect(editor)
// adds multiple selection support to the editor // adds multiple selection support to the editor
// (note: should be called only once for each editor instance) // (note: should be called only once for each editor instance)
function MultiSelect(editor) { function MultiSelect(editor) {

View file

@ -123,7 +123,7 @@ var ScrollBar = function(parent) {
* Sets the scroll top of the scroll bar. * Sets the scroll top of the scroll bar.
* *
**/ **/
// TODO: on chrome 17+ after for small zoom levels after this function // TODO: on chrome 17+ for small zoom levels after calling this function
// this.element.scrollTop != scrollTop which makes page to scroll up. // this.element.scrollTop != scrollTop which makes page to scroll up.
this.setScrollTop = function(scrollTop) { this.setScrollTop = function(scrollTop) {
this.element.scrollTop = scrollTop; this.element.scrollTop = scrollTop;

View file

@ -17,7 +17,8 @@
background: #e8e8e8; background: #e8e8e8;
} }
.ace-chrome .ace_text-layer { .ace-chrome .ace_scroller {
background-color: #FFFFFF;
} }
.ace-chrome .ace_cursor { .ace-chrome .ace_cursor {
@ -69,7 +70,7 @@
.ace-chrome .ace_variable.ace_parameter { .ace-chrome .ace_variable.ace_parameter {
font-style:italic; font-style:italic;
color:#FD971F; color:#FD971F;
} }
.ace-chrome .ace_line .ace_keyword.ace_operator { .ace-chrome .ace_line .ace_keyword.ace_operator {
color: rgb(104, 118, 135); color: rgb(104, 118, 135);
@ -103,7 +104,7 @@ color:#FD971F;
color: #0000A2; color: #0000A2;
} }
.ace-chrome .ace_markup.ace_markupine { .ace-chrome .ace_markup.ace_underline {
text-decoration:underline; text-decoration:underline;
} }
@ -155,11 +156,11 @@ color:#FD971F;
color: rgb(255, 0, 0) color: rgb(255, 0, 0)
} }
.ace-chrome .ace_line .ace_string{ .ace-chrome .ace_line .ace_string {
color: #1A1AA6; color: #1A1AA6;
} }
.ace-chrome .ace_entity.ace_other.ace_attribute-name{ .ace-chrome .ace_entity.ace_other.ace_attribute-name {
color: #994409; color: #994409;
} }

View file

@ -22,6 +22,10 @@
background: #e8e8e8; background: #e8e8e8;
} }
.ace-crimson-editor .ace_scroller {
background-color: #FFFFFF;
}
.ace-crimson-editor .ace_text-layer { .ace-crimson-editor .ace_text-layer {
color: rgb(64, 64, 64); color: rgb(64, 64, 64);
} }

View file

@ -16,6 +16,10 @@
background: #e8e8e8; background: #e8e8e8;
} }
.ace-dreamweaver .ace_scroller {
background-color: #FFFFFF;
}
.ace-dreamweaver .ace_fold { .ace-dreamweaver .ace_fold {
background-color: #757AD8; background-color: #757AD8;
} }
@ -111,7 +115,7 @@
color: #00F; color: #00F;
} }
.ace-dreamweaver .ace_markup.ace_markupine { .ace-dreamweaver .ace_markup.ace_underline {
text-decoration:underline; text-decoration:underline;
} }

View file

@ -17,6 +17,10 @@
background: #ebebeb; background: #ebebeb;
} }
.ace-eclipse .ace_scroller {
background-color: #FFFFFF;
}
.ace-eclipse .ace_fold { .ace-eclipse .ace_fold {
background-color: rgb(60, 76, 114); background-color: rgb(60, 76, 114);
} }

View file

@ -117,7 +117,7 @@
border: 1px solid rgb(192, 192, 192); border: 1px solid rgb(192, 192, 192);
} }
.ace-github .ace_gutter_active_line{ .ace-github .ace_gutter_active_line {
background-color : rgba(0, 0, 0, 0.07); background-color : rgba(0, 0, 0, 0.07);
} }

View file

@ -125,7 +125,7 @@ color:#66D9EF;
color:#F92672; color:#F92672;
} }
.ace-monokai .ace_storage.ace_type, .ace-monokai .ace_support.ace_type{ .ace-monokai .ace_storage.ace_type, .ace-monokai .ace_support.ace_type {
font-style:italic; font-style:italic;
color:#66D9EF; color:#66D9EF;
} }

View file

@ -20,7 +20,8 @@
background-color: #6B72E6; background-color: #6B72E6;
} }
.ace-tm .ace_text-layer { .ace-tm .ace_scroller {
background-color: #FFFFFF;
} }
.ace-tm .ace_cursor { .ace-tm .ace_cursor {
@ -111,7 +112,7 @@
color: #0000A2; color: #0000A2;
} }
.ace-tm .ace_markup.ace_markupine { .ace-tm .ace_markup.ace_underline {
text-decoration:underline; text-decoration:underline;
} }
@ -123,6 +124,14 @@
color:rgb(185, 6, 144); color:rgb(185, 6, 144);
} }
.ace-tm .ace_meta.ace_tag {
color:rgb(0, 22, 142);
}
.ace-tm .ace_string.ace_regex {
color: rgb(255, 0, 0)
}
.ace-tm .ace_marker-layer .ace_selection { .ace-tm .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255); background: rgb(181, 213, 255);
} }
@ -156,14 +165,6 @@
border: 1px solid rgb(200, 200, 250); border: 1px solid rgb(200, 200, 250);
} }
.ace-tm .ace_meta.ace_tag {
color:rgb(0, 22, 142);
}
.ace-tm .ace_string.ace_regex {
color: rgb(255, 0, 0)
}
.ace-tm .ace_indent-guide { .ace-tm .ace_indent-guide {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
} }

View file

@ -127,7 +127,7 @@ background-color:#8959A8;
color:#8959A8; color:#8959A8;
} }
.ace-tomorrow .ace_storage.ace_type, .ace-tomorrow .ace_support.ace_type{ .ace-tomorrow .ace_storage.ace_type, .ace-tomorrow .ace_support.ace_type {
color:#8959A8; color:#8959A8;
} }

View file

@ -127,7 +127,7 @@ background-color:#B798BF;
color:#B294BB; color:#B294BB;
} }
.ace-tomorrow-night .ace_storage.ace_type, .ace-tomorrow-night .ace_support.ace_type{ .ace-tomorrow-night .ace_storage.ace_type, .ace-tomorrow-night .ace_support.ace_type {
color:#B294BB; color:#B294BB;
} }

View file

@ -127,7 +127,7 @@ background-color:#EBBBFF;
color:#EBBBFF; color:#EBBBFF;
} }
.ace-tomorrow-night-blue .ace_storage.ace_type, .ace-tomorrow-night-blue .ace_support.ace_type{ .ace-tomorrow-night-blue .ace_storage.ace_type, .ace-tomorrow-night-blue .ace_support.ace_type {
color:#EBBBFF; color:#EBBBFF;
} }

View file

@ -127,7 +127,7 @@ background-color:#B798BF;
color:#C397D8; color:#C397D8;
} }
.ace-tomorrow-night-bright .ace_storage.ace_type, .ace-tomorrow-night-bright .ace_support.ace_type{ .ace-tomorrow-night-bright .ace_storage.ace_type, .ace-tomorrow-night-bright .ace_support.ace_type {
color:#C397D8; color:#C397D8;
} }

View file

@ -127,7 +127,7 @@ background-color:#CC99CC;
color:#CC99CC; color:#CC99CC;
} }
.ace-tomorrow-night-eighties .ace_storage.ace_type, .ace-tomorrow-night-eighties .ace_support.ace_type{ .ace-tomorrow-night-eighties .ace_storage.ace_type, .ace-tomorrow-night-eighties .ace_support.ace_type {
color:#CC99CC; color:#CC99CC;
} }

View file

@ -1038,9 +1038,11 @@ var VirtualRenderer = function(container, theme) {
cursor = {row: cursor, column: 0}; cursor = {row: cursor, column: 0};
var pos = this.$cursorLayer.getPixelPosition(cursor); var pos = this.$cursorLayer.getPixelPosition(cursor);
var offset = pos.top - this.$size.scrollerHeight * (alignment || 0); var h = this.$size.scrollerHeight - this.lineHeight;
var offset = pos.top - h * (alignment || 0);
this.session.setScrollTop(offset); this.session.setScrollTop(offset);
return offset;
}; };
this.STEPS = 8; this.STEPS = 8;

View file

@ -15,7 +15,6 @@
"asyncjs": "0.0.x", "asyncjs": "0.0.x",
"jsdom": "0.2.x", "jsdom": "0.2.x",
"amd-loader": "~0.0.4", "amd-loader": "~0.0.4",
"plist": "",
"dryice": "" "dryice": ""
}, },
"mappings": { "mappings": {

7
tool/package.json Normal file
View file

@ -0,0 +1,7 @@
{
"name": "ace-tools",
"version": "0.1.0",
"dependencies": {
"plist": ""
}
}