Merge pull request #1355 from ajaxorg/highlighting/tmmodes
add several new modes autoconverted from textmate
This commit is contained in:
commit
28c810bbce
62 changed files with 5418 additions and 284 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -7,6 +7,7 @@
|
|||
.*
|
||||
!/.gitignore
|
||||
.*.gz
|
||||
*.tmTheme.js
|
||||
|
||||
# A handy place to put stuff that git should ignore:
|
||||
/ignore/
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ event.addListener(container, "drop", function(e) {
|
|||
if (window.FileReader) {
|
||||
var reader = new FileReader();
|
||||
reader.onload = function() {
|
||||
var mode = modelist.getModeFromPath(file.name);
|
||||
var mode = modelist.getModeForPath(file.name);
|
||||
|
||||
env.editor.session.doc.setValue(reader.result);
|
||||
modeEl.value = mode.name;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ function initDoc(file, path, doc) {
|
|||
session.setUseWrapMode(true);
|
||||
session.setWrapLimitRange(80, 80);
|
||||
}
|
||||
var mode = modelist.getModeFromPath(path);
|
||||
var mode = modelist.getModeForPath(path);
|
||||
session.modeName = mode.name;
|
||||
session.setMode(mode.mode);
|
||||
return session;
|
||||
|
|
@ -66,8 +66,8 @@ function makeHuge(txt) {
|
|||
}
|
||||
|
||||
var docs = {
|
||||
"docs/AsciiDoc.asciidoc": "AsciiDoc",
|
||||
"docs/javascript.js": "JavaScript",
|
||||
"docs/AsciiDoc.asciidoc": "AsciiDoc",
|
||||
"docs/clojure.clj": "Clojure",
|
||||
"docs/coffeescript.coffee": "CoffeeScript",
|
||||
"docs/coldfusion.cfm": "ColdFusion",
|
||||
|
|
@ -103,7 +103,7 @@ var docs = {
|
|||
"docs/luapage.lp": "LuaPage",
|
||||
"docs/Makefile": "Makefile",
|
||||
"docs/markdown.md": {name: "Markdown", wrapped: true},
|
||||
"docs/tinymush.mc": {name: "TinyMUSH"},
|
||||
"docs/mushcode.mc": {name: "MUSHCode", wrapped: true},
|
||||
"docs/objectivec.m": {name: "Objective-C"},
|
||||
"docs/ocaml.ml": "OCaml",
|
||||
"docs/OpenSCAD.scad": "OpenSCAD",
|
||||
|
|
@ -130,7 +130,7 @@ var docs = {
|
|||
"docs/tcl.tcl": "Tcl",
|
||||
"docs/tex.tex": "Tex",
|
||||
"docs/textile.textile": {name: "Textile", wrapped: true},
|
||||
"docs/tmSnippet.tmSnippet": "tmSnippet",
|
||||
"docs/snippets.snippets": "snippets",
|
||||
"docs/toml.toml": "TOML",
|
||||
"docs/typescript.ts": "Typescript",
|
||||
"docs/vbscript.vbs": "VBScript",
|
||||
|
|
@ -138,7 +138,17 @@ var docs = {
|
|||
"docs/xml.xml": "XML",
|
||||
"docs/xquery.xq": "XQuery",
|
||||
"docs/yaml.yaml": "YAML",
|
||||
"docs/c9search.c9search_results": "C9 Search Results"
|
||||
"docs/c9search.c9search_results": "C9 Search Results",
|
||||
|
||||
"docs/actionscript.as": "ActionScript",
|
||||
"docs/autohotkey.ahk": "AutoHotKey",
|
||||
"docs/batchfile.bat": "BatchFile",
|
||||
"docs/erlang/erl": "Erlang",
|
||||
"docs/forth.frt": "Forth",
|
||||
"docs/haskell.hs": "Haskell",
|
||||
"docs/julia.js": "Julia",
|
||||
"docs/prolog/plg": "Prolog",
|
||||
"docs/rust.rs": "Rust"
|
||||
};
|
||||
|
||||
var ownSource = {
|
||||
|
|
|
|||
51
demo/kitchen-sink/docs/actionscript.as
Normal file
51
demo/kitchen-sink/docs/actionscript.as
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
package code
|
||||
{
|
||||
/*****************************************
|
||||
* based on textmate actionscript bundle
|
||||
****************************************/
|
||||
|
||||
import fl.events.SliderEvent;
|
||||
|
||||
public class Foo extends MovieClip
|
||||
{
|
||||
//*************************
|
||||
// Properties:
|
||||
|
||||
public var activeSwatch:MovieClip;
|
||||
|
||||
// Color offsets
|
||||
public var c1:Number = 0; // R
|
||||
|
||||
//*************************
|
||||
// Constructor:
|
||||
|
||||
public function Foo()
|
||||
{
|
||||
// Respond to mouse events
|
||||
swatch1_btn.addEventListener(MouseEvent.CLICK,swatchHandler,false,0,false);
|
||||
previewBox_btn.addEventListener(MouseEvent.MOUSE_DOWN,dragPressHandler);
|
||||
|
||||
// Respond to drag events
|
||||
red_slider.addEventListener(SliderEvent.THUMB_DRAG,sliderHandler);
|
||||
|
||||
// Draw a frame later
|
||||
addEventListener(Event.ENTER_FRAME,draw);
|
||||
}
|
||||
|
||||
protected function clickHandler(event:MouseEvent):void
|
||||
{
|
||||
car.transform.colorTransform = new ColorTransform(0,0,0,1,c1,c2,c3);
|
||||
}
|
||||
|
||||
protected function changeRGBHandler(event:Event):void
|
||||
{
|
||||
c1 = Number(c1_txt.text);
|
||||
|
||||
if(!(c1>=0)){
|
||||
c1 = 0;
|
||||
}
|
||||
|
||||
updateSliders();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
demo/kitchen-sink/docs/autohotkey.ahk
Normal file
35
demo/kitchen-sink/docs/autohotkey.ahk
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#NoEnv
|
||||
SetBatchLines -1
|
||||
|
||||
CoordMode Mouse, Screen
|
||||
OnExit GuiClose
|
||||
|
||||
zoom := 9
|
||||
|
||||
computeSize(){
|
||||
global as_x
|
||||
as_x := Round(ws_x/zoom/2 - 0.5)
|
||||
if (zoom>1) {
|
||||
pix := Round(zoom)
|
||||
} ele {
|
||||
pix := 1
|
||||
}
|
||||
ToolTip Message %as_x% %zoom% %ws_x% %hws_x%
|
||||
}
|
||||
|
||||
hdc_frame := DllCall("GetDC", UInt, MagnifierID)
|
||||
|
||||
; comment
|
||||
DrawCross(byRef x="", rX,rY,z, dc){
|
||||
;specify the style, thickness and color of the cross lines
|
||||
h_pen := DllCall( "gdi32.dll\CreatePen", Int, 0, Int, 1, UInt, 0x0000FF)
|
||||
}
|
||||
|
||||
;Ctrl ^; Shift +; Win #; Alt !
|
||||
^NumPadAdd::
|
||||
^WheelUp::
|
||||
^;:: ;comment
|
||||
If(zoom < ws_x and ( A_ThisHotKey = "^WheelUp" or A_ThisHotKey ="^NumPadAdd") )
|
||||
zoom *= 1.189207115 ; sqrt(sqrt(2))
|
||||
Gosub,setZoom
|
||||
return
|
||||
15
demo/kitchen-sink/docs/batchfile.bat
Normal file
15
demo/kitchen-sink/docs/batchfile.bat
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
:: batch file highlighting in Ace!
|
||||
@echo off
|
||||
|
||||
CALL set var1=%cd%
|
||||
echo unhide everything in %var1%!
|
||||
|
||||
:: FOR loop in bat is super strange!
|
||||
FOR /f "tokens=*" %%G IN ('dir /A:D /b') DO (
|
||||
echo %var1%%%G
|
||||
attrib -r -a -h -s "%var1%%%G" /D /S
|
||||
)
|
||||
|
||||
pause
|
||||
|
||||
REM that's all
|
||||
|
|
@ -14,8 +14,8 @@ asdad
|
|||
77
|
||||
.86
|
||||
|
||||
#import("http://dartwatch.com/myOtherLibrary.dart");
|
||||
#import("myOtherLibrary.dart", prefix:"lib1");
|
||||
import("http://dartwatch.com/myOtherLibrary.dart");
|
||||
import("myOtherLibrary.dart", prefix:"lib1");
|
||||
|
||||
"""asdasdads
|
||||
asdadsadsasd
|
||||
|
|
|
|||
20
demo/kitchen-sink/docs/erlang.erl
Normal file
20
demo/kitchen-sink/docs/erlang.erl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
%% A process whose only job is to keep a counter.
|
||||
%% First version
|
||||
-module(counter).
|
||||
-export([start/0, codeswitch/1]).
|
||||
|
||||
start() -> loop(0).
|
||||
|
||||
loop(Sum) ->
|
||||
receive
|
||||
{increment, Count} ->
|
||||
loop(Sum+Count);
|
||||
{counter, Pid} ->
|
||||
Pid ! {counter, Sum},
|
||||
loop(Sum);
|
||||
code_switch ->
|
||||
?MODULE:codeswitch(Sum)
|
||||
% Force the use of 'codeswitch/1' from the latest MODULE version
|
||||
end.
|
||||
|
||||
codeswitch(Sum) -> loop(Sum).
|
||||
41
demo/kitchen-sink/docs/forth.frt
Normal file
41
demo/kitchen-sink/docs/forth.frt
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
: HELLO ( -- ) CR ." Hello, world!" ;
|
||||
|
||||
HELLO <cr>
|
||||
Hello, world!
|
||||
|
||||
: [CHAR] CHAR POSTPONE LITERAL ; IMMEDIATE
|
||||
|
||||
0 value ii 0 value jj
|
||||
0 value KeyAddr 0 value KeyLen
|
||||
create SArray 256 allot \ state array of 256 bytes
|
||||
: KeyArray KeyLen mod KeyAddr ;
|
||||
|
||||
: get_byte + c@ ;
|
||||
: set_byte + c! ;
|
||||
: as_byte 255 and ;
|
||||
: reset_ij 0 TO ii 0 TO jj ;
|
||||
: i_update 1 + as_byte TO ii ;
|
||||
: j_update ii SArray get_byte + as_byte TO jj ;
|
||||
: swap_s_ij
|
||||
jj SArray get_byte
|
||||
ii SArray get_byte jj SArray set_byte
|
||||
ii SArray set_byte
|
||||
;
|
||||
|
||||
: rc4_init ( KeyAddr KeyLen -- )
|
||||
256 min TO KeyLen TO KeyAddr
|
||||
256 0 DO i i SArray set_byte LOOP
|
||||
reset_ij
|
||||
BEGIN
|
||||
ii KeyArray get_byte jj + j_update
|
||||
swap_s_ij
|
||||
ii 255 < WHILE
|
||||
ii i_update
|
||||
REPEAT
|
||||
reset_ij
|
||||
;
|
||||
: rc4_byte
|
||||
ii i_update jj j_update
|
||||
swap_s_ij
|
||||
ii SArray get_byte jj SArray get_byte + as_byte SArray get_byte xor
|
||||
;
|
||||
20
demo/kitchen-sink/docs/haskell.hs
Normal file
20
demo/kitchen-sink/docs/haskell.hs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- Type annotation (optional)
|
||||
fib :: Int -> Integer
|
||||
|
||||
-- With self-referencing data
|
||||
fib n = fibs !! n
|
||||
where fibs = 0 : scanl (+) 1 fibs
|
||||
-- 0,1,1,2,3,5,...
|
||||
|
||||
-- Same, coded directly
|
||||
fib n = fibs !! n
|
||||
where fibs = 0 : 1 : next fibs
|
||||
next (a : t@(b:_)) = (a+b) : next t
|
||||
|
||||
-- Similar idea, using zipWith
|
||||
fib n = fibs !! n
|
||||
where fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
|
||||
|
||||
-- Using a generator function
|
||||
fib n = fibs (0,1) !! n
|
||||
where fibs (a,b) = a : fibs (b,a+b)
|
||||
15
demo/kitchen-sink/docs/julia.jl
Normal file
15
demo/kitchen-sink/docs/julia.jl
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
for op = (:+, :*, :&, :|, :$)
|
||||
@eval ($op)(a,b,c) = ($op)(($op)(a,b),c)
|
||||
end
|
||||
|
||||
|
||||
function g(x,y)
|
||||
return x * y
|
||||
x + y
|
||||
end
|
||||
|
||||
cd("data") do
|
||||
open("outfile", "w") do f
|
||||
write(f, data)
|
||||
end
|
||||
end
|
||||
18
demo/kitchen-sink/docs/prolog.plg
Normal file
18
demo/kitchen-sink/docs/prolog.plg
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
partition([], _, [], []).
|
||||
partition([X|Xs], Pivot, Smalls, Bigs) :-
|
||||
( X @< Pivot ->
|
||||
Smalls = [X|Rest],
|
||||
partition(Xs, Pivot, Rest, Bigs)
|
||||
; Bigs = [X|Rest],
|
||||
partition(Xs, Pivot, Smalls, Rest)
|
||||
).
|
||||
|
||||
quicksort([]) --> [].
|
||||
quicksort([X|Xs]) -->
|
||||
{ partition(Xs, X, Smaller, Bigger) },
|
||||
quicksort(Smaller), [X], quicksort(Bigger).
|
||||
|
||||
perfect(N) :-
|
||||
between(1, inf, N), U is N // 2,
|
||||
findall(D, (between(1,U,D), N mod D =:= 0), Ds),
|
||||
sumlist(Ds, N).
|
||||
20
demo/kitchen-sink/docs/rust.rs
Normal file
20
demo/kitchen-sink/docs/rust.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use core::rand::RngUtil;
|
||||
|
||||
fn main() {
|
||||
for ["Alice", "Bob", "Carol"].each |&name| {
|
||||
do spawn {
|
||||
let v = rand::Rng().shuffle([1, 2, 3]);
|
||||
for v.each |&num| {
|
||||
print(fmt!("%s says: '%d'\n", name, num + 1))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn map<T, U>(vector: &[T], function: &fn(v: &T) -> U) -> ~[U] {
|
||||
let mut accumulator = ~[];
|
||||
for vec::each(vector) |element| {
|
||||
accumulator.push(function(element));
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
|
@ -1,26 +1,26 @@
|
|||
# Function
|
||||
snippet fun
|
||||
function ${1?:function_name}(${2:argument}) {
|
||||
${3:// body...}
|
||||
}
|
||||
# Anonymous Function
|
||||
regex /((=)\s*|(:)\s*|(\()|\b)/f/(\))?/
|
||||
name f
|
||||
function${M1?: ${1:functionName}}($2) {
|
||||
${0:$TM_SELECTED_TEXT}
|
||||
}${M2?;}${M3?,}${M4?)}
|
||||
# Immediate function
|
||||
trigger \(?f\(
|
||||
endTrigger \)?
|
||||
snippet f(
|
||||
(function(${1}) {
|
||||
${0:${TM_SELECTED_TEXT:/* code */}}
|
||||
}(${1}));
|
||||
# if
|
||||
snippet if
|
||||
if (${1:true}) {
|
||||
${0}
|
||||
}
|
||||
|
||||
|
||||
# Function
|
||||
snippet fun
|
||||
function ${1?:function_name}(${2:argument}) {
|
||||
${3:// body...}
|
||||
}
|
||||
# Anonymous Function
|
||||
regex /((=)\s*|(:)\s*|(\()|\b)/f/(\))?/
|
||||
name f
|
||||
function${M1?: ${1:functionName}}($2) {
|
||||
${0:$TM_SELECTED_TEXT}
|
||||
}${M2?;}${M3?,}${M4?)}
|
||||
# Immediate function
|
||||
trigger \(?f\(
|
||||
endTrigger \)?
|
||||
snippet f(
|
||||
(function(${1}) {
|
||||
${0:${TM_SELECTED_TEXT:/* code */}}
|
||||
}(${1}));
|
||||
# if
|
||||
snippet if
|
||||
if (${1:true}) {
|
||||
${0}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,128 +0,0 @@
|
|||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
/************** modes ***********************/
|
||||
var modes = [];
|
||||
function getModeFromPath(path) {
|
||||
var mode = modesByName.text;
|
||||
var fileName = path.split(/[\/\\]/).pop();
|
||||
for (var i = 0; i < modes.length; i++) {
|
||||
if (modes[i].supportsFile(fileName)) {
|
||||
mode = modes[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
var Mode = function(name, desc, extensions) {
|
||||
this.name = name;
|
||||
this.desc = desc;
|
||||
this.mode = "ace/mode/" + name;
|
||||
if (/\^/.test(extensions)) {
|
||||
var re = extensions.replace(/\|(\^)?/g, function(a, b){
|
||||
return "$|" + (b ? "^" : "^.*\\.");
|
||||
}) + "$";
|
||||
} else {
|
||||
var re = "^.*\\.(" + extensions + ")$";
|
||||
}
|
||||
|
||||
this.extRe = new RegExp(re, "gi");
|
||||
};
|
||||
|
||||
Mode.prototype.supportsFile = function(filename) {
|
||||
return filename.match(this.extRe);
|
||||
};
|
||||
|
||||
var modesByName = {
|
||||
abap: ["ABAP" , "abap"],
|
||||
asciidoc: ["AsciiDoc" , "asciidoc"],
|
||||
c9search: ["C9Search" , "c9search_results"],
|
||||
coffee: ["CoffeeScript" , "^Cakefile|coffee|cf|cson"],
|
||||
coldfusion: ["ColdFusion" , "cfm"],
|
||||
csharp: ["C#" , "cs"],
|
||||
css: ["CSS" , "css"],
|
||||
curly: ["Curly" , "curly"],
|
||||
dart: ["Dart" , "dart"],
|
||||
diff: ["Diff" , "diff|patch"],
|
||||
dot: ["Dot" , "dot"],
|
||||
ftl: ["FreeMarker" , "ftl"],
|
||||
glsl: ["Glsl" , "glsl|frag|vert"],
|
||||
golang: ["Go" , "go"],
|
||||
groovy: ["Groovy" , "groovy"],
|
||||
haxe: ["haXe" , "hx"],
|
||||
haml: ["HAML" , "haml"],
|
||||
html: ["HTML" , "htm|html|xhtml"],
|
||||
c_cpp: ["C/C++" , "c|cc|cpp|cxx|h|hh|hpp"],
|
||||
clojure: ["Clojure" , "clj"],
|
||||
jade: ["Jade" , "jade"],
|
||||
java: ["Java" , "java"],
|
||||
jsp: ["JSP" , "jsp"],
|
||||
javascript: ["JavaScript" , "js"],
|
||||
json: ["JSON" , "json"],
|
||||
jsx: ["JSX" , "jsx"],
|
||||
latex: ["LaTeX" , "latex|tex|ltx|bib"],
|
||||
less: ["LESS" , "less"],
|
||||
lisp: ["Lisp" , "lisp"],
|
||||
scheme: ["Scheme" , "scm|rkt"],
|
||||
liquid: ["Liquid" , "liquid"],
|
||||
livescript: ["LiveScript" , "ls"],
|
||||
logiql: ["LogiQL" , "logic|lql"],
|
||||
lua: ["Lua" , "lua"],
|
||||
luapage: ["LuaPage" , "lp"], // http://keplerproject.github.com/cgilua/manual.html#templates
|
||||
lucene: ["Lucene" , "lucene"],
|
||||
lsl: ["LSL" , "lsl"],
|
||||
makefile: ["Makefile" , "^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],
|
||||
markdown: ["Markdown" , "md|markdown"],
|
||||
mushcode: ["TinyMUSH" , "mc|mush"],
|
||||
objectivec: ["Objective-C" , "m"],
|
||||
ocaml: ["OCaml" , "ml|mli"],
|
||||
pascal: ["Pascal" , "pas|p"],
|
||||
perl: ["Perl" , "pl|pm"],
|
||||
pgsql: ["pgSQL" , "pgsql"],
|
||||
php: ["PHP" , "php|phtml"],
|
||||
powershell: ["Powershell" , "ps1"],
|
||||
properties: ["Properties" , "properties"],
|
||||
python: ["Python" , "py"],
|
||||
r: ["R" , "r"],
|
||||
rdoc: ["RDoc" , "Rd"],
|
||||
rhtml: ["RHTML" , "Rhtml"],
|
||||
ruby: ["Ruby" , "ru|gemspec|rake|rb"],
|
||||
scad: ["OpenSCAD" , "scad"],
|
||||
scala: ["Scala" , "scala"],
|
||||
scss: ["SCSS" , "scss"],
|
||||
sass: ["SASS" , "sass"],
|
||||
sh: ["SH" , "sh|bash|bat"],
|
||||
sql: ["SQL" , "sql"],
|
||||
stylus: ["Stylus" , "styl|stylus"],
|
||||
svg: ["SVG" , "svg"],
|
||||
tcl: ["Tcl" , "tcl"],
|
||||
tex: ["Tex" , "tex"],
|
||||
text: ["Text" , "txt"],
|
||||
textile: ["Textile" , "textile"],
|
||||
tmsnippet: ["tmSnippet" , "tmSnippet"],
|
||||
toml: ["toml" , "toml"],
|
||||
typescript: ["Typescript" , "typescript|ts|str"],
|
||||
vbscript: ["VBScript" , "vbs"],
|
||||
velocity: ["Velocity" , "vm"],
|
||||
xml: ["XML" , "xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],
|
||||
xquery: ["XQuery" , "xq"],
|
||||
jsoniq: ["JSONiq" , "jq"],
|
||||
yaml: ["YAML" , "yaml"]
|
||||
};
|
||||
|
||||
for (var name in modesByName) {
|
||||
var mode = modesByName[name];
|
||||
mode = new Mode(name, mode[0], mode[1]);
|
||||
modesByName[name] = mode;
|
||||
modes.push(mode);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getModeFromPath: getModeFromPath,
|
||||
modes: modes,
|
||||
modesByName: modesByName
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -220,8 +220,8 @@ function elt(tag, attributes, content) {
|
|||
function optgroup(values) {
|
||||
return values.map(function(item) {
|
||||
if (typeof item == "string")
|
||||
item = {name: item, desc: item};
|
||||
return elt("option", {value: item.name}, item.desc);
|
||||
item = {name: item, caption: item};
|
||||
return elt("option", {value: item.name}, item.caption || item.desc);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
/************** modes ***********************/
|
||||
/**
|
||||
* An array containing information about rendering modes.
|
||||
*/
|
||||
var modes = [];
|
||||
/**
|
||||
* Suggests a mode based on the file extension present in the given path
|
||||
|
|
@ -12,7 +8,7 @@ var modes = [];
|
|||
* @returns {object} Returns an object containing information about the
|
||||
* suggested mode.
|
||||
*/
|
||||
function getModeFromPath(path) {
|
||||
function getModeForPath(path) {
|
||||
var mode = modesByName.text;
|
||||
var fileName = path.split(/[\/\\]/).pop();
|
||||
for (var i = 0; i < modes.length; i++) {
|
||||
|
|
@ -24,10 +20,11 @@ function getModeFromPath(path) {
|
|||
return mode;
|
||||
}
|
||||
|
||||
var Mode = function(name, desc, extensions) {
|
||||
var Mode = function(name, caption, extensions) {
|
||||
this.name = name;
|
||||
this.desc = desc;
|
||||
this.caption = caption;
|
||||
this.mode = "ace/mode/" + name;
|
||||
this.extensions = extensions;
|
||||
if (/\^/.test(extensions)) {
|
||||
var re = extensions.replace(/\|(\^)?/g, function(a, b){
|
||||
return "$|" + (b ? "^" : "^.*\\.");
|
||||
|
|
@ -43,95 +40,113 @@ Mode.prototype.supportsFile = function(filename) {
|
|||
return filename.match(this.extRe);
|
||||
};
|
||||
|
||||
/**
|
||||
* An object containing properties that map to rendering modes. Each property
|
||||
* contains an array where element 0 is the name of the mode and element 1
|
||||
* contains information about the file extensions where this mode is
|
||||
* applicable.
|
||||
*/
|
||||
var modesByName = {
|
||||
abap: ["ABAP" , "abap"],
|
||||
asciidoc: ["AsciiDoc" , "asciidoc"],
|
||||
c9search: ["C9Search" , "c9search_results"],
|
||||
coffee: ["CoffeeScript" , "^Cakefile|coffee|cf|cson"],
|
||||
coldfusion: ["ColdFusion" , "cfm"],
|
||||
csharp: ["C#" , "cs"],
|
||||
css: ["CSS" , "css"],
|
||||
curly: ["Curly" , "curly"],
|
||||
dart: ["Dart" , "dart"],
|
||||
diff: ["Diff" , "diff|patch"],
|
||||
dot: ["Dot" , "dot"],
|
||||
ftl: ["FreeMarker" , "ftl"],
|
||||
glsl: ["Glsl" , "glsl|frag|vert"],
|
||||
golang: ["Go" , "go"],
|
||||
groovy: ["Groovy" , "groovy"],
|
||||
haxe: ["haXe" , "hx"],
|
||||
haml: ["HAML" , "haml"],
|
||||
html: ["HTML" , "htm|html|xhtml"],
|
||||
c_cpp: ["C/C++" , "c|cc|cpp|cxx|h|hh|hpp"],
|
||||
clojure: ["Clojure" , "clj"],
|
||||
jade: ["Jade" , "jade"],
|
||||
java: ["Java" , "java"],
|
||||
jsp: ["JSP" , "jsp"],
|
||||
javascript: ["JavaScript" , "js"],
|
||||
json: ["JSON" , "json"],
|
||||
jsx: ["JSX" , "jsx"],
|
||||
latex: ["LaTeX" , "latex|tex|ltx|bib"],
|
||||
less: ["LESS" , "less"],
|
||||
lisp: ["Lisp" , "lisp"],
|
||||
scheme: ["Scheme" , "scm|rkt"],
|
||||
liquid: ["Liquid" , "liquid"],
|
||||
livescript: ["LiveScript" , "ls"],
|
||||
logiql: ["LogiQL" , "logic|lql"],
|
||||
lua: ["Lua" , "lua"],
|
||||
luapage: ["LuaPage" , "lp"], // http://keplerproject.github.com/cgilua/manual.html#templates
|
||||
lucene: ["Lucene" , "lucene"],
|
||||
lsl: ["LSL" , "lsl"],
|
||||
makefile: ["Makefile" , "^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],
|
||||
markdown: ["Markdown" , "md|markdown"],
|
||||
mushcode: ["TinyMUSH" , "mc|mush"],
|
||||
objectivec: ["Objective-C" , "m"],
|
||||
ocaml: ["OCaml" , "ml|mli"],
|
||||
pascal: ["Pascal" , "pas|p"],
|
||||
perl: ["Perl" , "pl|pm"],
|
||||
pgsql: ["pgSQL" , "pgsql"],
|
||||
php: ["PHP" , "php|phtml"],
|
||||
powershell: ["Powershell" , "ps1"],
|
||||
python: ["Python" , "py"],
|
||||
r: ["R" , "r"],
|
||||
rdoc: ["RDoc" , "Rd"],
|
||||
rhtml: ["RHTML" , "Rhtml"],
|
||||
ruby: ["Ruby" , "ru|gemspec|rake|rb"],
|
||||
scad: ["OpenSCAD" , "scad"],
|
||||
scala: ["Scala" , "scala"],
|
||||
scss: ["SCSS" , "scss"],
|
||||
sass: ["SASS" , "sass"],
|
||||
sh: ["SH" , "sh|bash|bat"],
|
||||
sql: ["SQL" , "sql"],
|
||||
stylus: ["Stylus" , "styl|stylus"],
|
||||
svg: ["SVG" , "svg"],
|
||||
tcl: ["Tcl" , "tcl"],
|
||||
tex: ["Tex" , "tex"],
|
||||
text: ["Text" , "txt"],
|
||||
textile: ["Textile" , "textile"],
|
||||
tmsnippet: ["tmSnippet" , "tmSnippet"],
|
||||
toml: ["toml" , "toml"],
|
||||
typescript: ["Typescript" , "typescript|ts|str"],
|
||||
vbscript: ["VBScript" , "vbs"],
|
||||
xml: ["XML" , "xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],
|
||||
xquery: ["XQuery" , "xq"],
|
||||
yaml: ["YAML" , "yaml"]
|
||||
// todo firstlinematch
|
||||
var supportedModes = {
|
||||
ABAP: ["abap"],
|
||||
ActionScript:["as"],
|
||||
AsciiDoc: ["asciidoc"],
|
||||
AutoHotKey: ["ahk"],
|
||||
BatchFile: ["bat|cmd"],
|
||||
C9Search: ["c9search_results"],
|
||||
C_Cpp: ["c|cc|cpp|cxx|h|hh|hpp"],
|
||||
Clojure: ["clj"],
|
||||
coffee: ["^Cakefile|coffee|cf|cson"],
|
||||
ColdFusion: ["cfm"],
|
||||
CSharp: ["cs"],
|
||||
CSS: ["css"],
|
||||
Curly: ["curly"],
|
||||
Dart: ["dart"],
|
||||
Diff: ["diff|patch"],
|
||||
Dot: ["dot"],
|
||||
Erlang: ["erl|hrl"],
|
||||
Forth: ["frt|fs|ldr"],
|
||||
FreeMarker: ["ftl"],
|
||||
Glsl: ["glsl|frag|vert"],
|
||||
golang: ["go"],
|
||||
Groovy: ["groovy"],
|
||||
HAML: ["haml"],
|
||||
Haskell: ["hs"],
|
||||
haXe: ["hx"],
|
||||
HTML: ["htm|html|xhtml"],
|
||||
Ini: ["Ini|conf"],
|
||||
Jade: ["jade"],
|
||||
Java: ["java"],
|
||||
JavaScript: ["js"],
|
||||
JSON: ["json"],
|
||||
JSONiq: ["jq"],
|
||||
JSP: ["jsp"],
|
||||
JSX: ["jsx"],
|
||||
Julia: ["jl"],
|
||||
LaTeX: ["latex|tex|ltx|bib"],
|
||||
LESS: ["less"],
|
||||
Liquid: ["liquid"],
|
||||
Lisp: ["lisp"],
|
||||
LiveScript: ["ls"],
|
||||
LogiQL: ["logic|lql"],
|
||||
LSL: ["lsl"],
|
||||
Lua: ["lua"],
|
||||
LuaPage: ["lp"],
|
||||
Lucene: ["lucene"],
|
||||
Makefile: ["^GNUmakefile|^makefile|^Makefile|^OCamlMakefile|make"],
|
||||
Markdown: ["md|markdown"],
|
||||
MUSHCode: ["mc|mush"],
|
||||
ObjectiveC: ["m"],
|
||||
OCaml: ["ml|mli"],
|
||||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP: ["php|phtml"],
|
||||
Powershell: ["ps1"],
|
||||
Prolog: ["plg|prolog"],
|
||||
Properties: ["properties"],
|
||||
Python: ["py"],
|
||||
R: ["r"],
|
||||
RDoc: ["Rd"],
|
||||
RHTML: ["Rhtml"],
|
||||
Ruby: ["ru|gemspec|rake|rb"],
|
||||
Rust: ["rs"],
|
||||
SASS: ["sass"],
|
||||
SCAD: ["scad"],
|
||||
Scala: ["scala"],
|
||||
Scheme: ["scm|rkt"],
|
||||
SCSS: ["scss"],
|
||||
SH: ["sh|bash"],
|
||||
snippets: ["snippets"],
|
||||
SQL: ["sql"],
|
||||
Stylus: ["styl|stylus"],
|
||||
SVG: ["svg"],
|
||||
Tcl: ["tcl"],
|
||||
Tex: ["tex"],
|
||||
Text: ["txt"],
|
||||
Textile: ["textile"],
|
||||
Toml: ["toml"],
|
||||
Typescript: ["typescript|ts|str"],
|
||||
VBScript: ["vbs"],
|
||||
Velocity: ["vm"],
|
||||
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],
|
||||
XQuery: ["xq"],
|
||||
YAML: ["yaml"]
|
||||
};
|
||||
|
||||
for (var name in modesByName) {
|
||||
var mode = modesByName[name];
|
||||
mode = new Mode(name, mode[0], mode[1]);
|
||||
modesByName[name] = mode;
|
||||
var nameOverrides = {
|
||||
ObjectiveC: "Objective-C",
|
||||
CSharp: "C#",
|
||||
golang: "Go",
|
||||
C_Cpp: "C/C++",
|
||||
coffee: "CoffeeScript"
|
||||
};
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
var data = supportedModes[name];
|
||||
var displayName = nameOverrides[name] || name;
|
||||
var filename = name.toLowerCase();
|
||||
mode = new Mode(filename, displayName, data[0]);
|
||||
modesByName[filename] = mode;
|
||||
modes.push(mode);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getModeFromPath: getModeFromPath,
|
||||
getModeForPath: getModeForPath,
|
||||
modes: modes,
|
||||
modesByName: modesByName
|
||||
};
|
||||
|
|
|
|||
|
|
@ -122,9 +122,11 @@ var SearchBox = function(editor, range, showReplaceForm) {
|
|||
});
|
||||
event.addListener(this.searchInput, "focus", function() {
|
||||
_this.activeInput = _this.searchInput;
|
||||
_this.searchInput.value && _this.highlight();
|
||||
});
|
||||
event.addListener(this.replaceInput, "focus", function() {
|
||||
_this.activeInput = _this.replaceInput;
|
||||
_this.searchInput.value && _this.highlight();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -199,6 +201,10 @@ var SearchBox = function(editor, range, showReplaceForm) {
|
|||
this.find(false, false);
|
||||
};
|
||||
|
||||
this.highlight = function(re) {
|
||||
this.editor.session.highlight(re || this.editor.$search.$options.re);
|
||||
this.editor.renderer.updateBackMarkers()
|
||||
};
|
||||
this.find = function(skipCurrent, backwards) {
|
||||
var range = this.editor.find(this.searchInput.value, {
|
||||
skipCurrent: skipCurrent,
|
||||
|
|
@ -209,7 +215,7 @@ var SearchBox = function(editor, range, showReplaceForm) {
|
|||
wholeWord: this.wholeWordOption.checked
|
||||
});
|
||||
dom.setCssClass(this.searchBox, "ace_nomatch", !range && this.searchInput.value);
|
||||
this.editor.session.highlight(this.editor.$search.$options.re);
|
||||
this.highlight();
|
||||
};
|
||||
this.findNext = function() {
|
||||
this.find(true, false);
|
||||
|
|
|
|||
263
lib/ace/mode/_test/tokens_actionscript.json
Normal file
263
lib/ace/mode/_test/tokens_actionscript.json
Normal file
|
|
@ -0,0 +1,263 @@
|
|||
[[
|
||||
"start",
|
||||
["text","package code"]
|
||||
],[
|
||||
"start",
|
||||
["text","{"]
|
||||
],[
|
||||
"punctuation.definition.comment.actionscript.2",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.actionscript.2","/*"],
|
||||
["comment.block.actionscript.2","****************************************"]
|
||||
],[
|
||||
"punctuation.definition.comment.actionscript.2",
|
||||
["comment.block.actionscript.2","\t * based on textmate actionscript bundle"]
|
||||
],[
|
||||
"start",
|
||||
["comment.block.actionscript.2","\t ***************************************"],
|
||||
["punctuation.definition.comment.actionscript.2","*/"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.control.actionscript.2","import"],
|
||||
["text"," fl.events.SliderEvent;"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.control.actionscript.2","public"],
|
||||
["text"," "],
|
||||
["storage.type.class.actionscript.2","class"],
|
||||
["meta.class.actionscript.2"," "],
|
||||
["entity.name.type.class.actionscript.2","Foo"],
|
||||
["meta.class.actionscript.2"," "],
|
||||
["storage.modifier.extends.actionscript.2","extends"],
|
||||
["meta.class.actionscript.2"," "],
|
||||
["entity.other.inherited-class.actionscript.2","MovieClip"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t{"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["punctuation.definition.comment.actionscript.2","//*************************"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["punctuation.definition.comment.actionscript.2","// Properties:"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["keyword.control.actionscript.2","public"],
|
||||
["text"," "],
|
||||
["keyword.control.actionscript.2","var"],
|
||||
["text"," activeSwatch"],
|
||||
["keyword.operator.symbolic.actionscript.2",":"],
|
||||
["support.class.actionscript.2","MovieClip"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["punctuation.definition.comment.actionscript.2","// Color offsets"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["keyword.control.actionscript.2","public"],
|
||||
["text"," "],
|
||||
["keyword.control.actionscript.2","var"],
|
||||
["text"," c1"],
|
||||
["keyword.operator.symbolic.actionscript.2",":"],
|
||||
["storage.type.actionscript.2","Number"],
|
||||
["text"," "],
|
||||
["keyword.operator.symbolic.actionscript.2","="],
|
||||
["text"," "],
|
||||
["constant.numeric.actionscript.2","0"],
|
||||
["text",";\t"],
|
||||
["punctuation.definition.comment.actionscript.2","// R"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["punctuation.definition.comment.actionscript.2","//*************************"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["punctuation.definition.comment.actionscript.2","// Constructor:"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["keyword.control.actionscript.2","public"],
|
||||
["text"," "],
|
||||
["storage.type.function.actionscript.2","function"],
|
||||
["meta.function.actionscript.2"," "],
|
||||
["entity.name.function.actionscript.2","Foo"],
|
||||
["punctuation.definition.parameters.begin.actionscript.2","("],
|
||||
["punctuation.definition.parameters.end.actionscript.2",")"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t{"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["punctuation.definition.comment.actionscript.2","// Respond to mouse events"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\tswatch1_btn."],
|
||||
["support.function.actionscript.2","addEventListener"],
|
||||
["text","(MouseEvent.CLICK,swatchHandler,"],
|
||||
["constant.language.actionscript.2","false"],
|
||||
["text",","],
|
||||
["constant.numeric.actionscript.2","0"],
|
||||
["text",","],
|
||||
["constant.language.actionscript.2","false"],
|
||||
["text",");"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\tpreviewBox_btn."],
|
||||
["support.function.actionscript.2","addEventListener"],
|
||||
["text","(MouseEvent.MOUSE_DOWN,dragPressHandler);"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["punctuation.definition.comment.actionscript.2","// Respond to drag events"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\tred_slider."],
|
||||
["support.function.actionscript.2","addEventListener"],
|
||||
["text","(SliderEvent.THUMB_DRAG,sliderHandler);"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["punctuation.definition.comment.actionscript.2","// Draw a frame later"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["support.function.actionscript.2","addEventListener"],
|
||||
["text","(Event.ENTER_FRAME,"],
|
||||
["support.function.actionscript.2","draw"],
|
||||
["text",");"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\tprotected "],
|
||||
["storage.type.function.actionscript.2","function"],
|
||||
["meta.function.actionscript.2"," "],
|
||||
["entity.name.function.actionscript.2","clickHandler"],
|
||||
["punctuation.definition.parameters.begin.actionscript.2","("],
|
||||
["variable.parameter.function.actionscript.2","event:MouseEvent"],
|
||||
["punctuation.definition.parameters.end.actionscript.2",")"],
|
||||
["keyword.operator.symbolic.actionscript.2",":"],
|
||||
["support.function.actionscript.2","void"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t{"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\tcar.transform.colorTransform "],
|
||||
["keyword.operator.symbolic.actionscript.2","="],
|
||||
["text"," "],
|
||||
["keyword.control.actionscript.2","new"],
|
||||
["text"," ColorTransform("],
|
||||
["constant.numeric.actionscript.2","0"],
|
||||
["text",","],
|
||||
["constant.numeric.actionscript.2","0"],
|
||||
["text",","],
|
||||
["constant.numeric.actionscript.2","0"],
|
||||
["text",","],
|
||||
["constant.numeric.actionscript.2","1"],
|
||||
["text",",c1,c2,c3);"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t}"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\tprotected "],
|
||||
["storage.type.function.actionscript.2","function"],
|
||||
["meta.function.actionscript.2"," "],
|
||||
["entity.name.function.actionscript.2","changeRGBHandler"],
|
||||
["punctuation.definition.parameters.begin.actionscript.2","("],
|
||||
["variable.parameter.function.actionscript.2","event:Event"],
|
||||
["punctuation.definition.parameters.end.actionscript.2",")"],
|
||||
["keyword.operator.symbolic.actionscript.2",":"],
|
||||
["support.function.actionscript.2","void"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t{"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\tc1 "],
|
||||
["keyword.operator.symbolic.actionscript.2","="],
|
||||
["text"," "],
|
||||
["storage.type.actionscript.2","Number"],
|
||||
["text","(c1_txt."],
|
||||
["support.function.actionscript.2","text"],
|
||||
["text",");"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"],
|
||||
["keyword.control.actionscript.2","if"],
|
||||
["text","("],
|
||||
["keyword.operator.symbolic.actionscript.2","!"],
|
||||
["text","(c1>"],
|
||||
["keyword.operator.symbolic.actionscript.2","="],
|
||||
["constant.numeric.actionscript.2","0"],
|
||||
["text",")){"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t\tc1 "],
|
||||
["keyword.operator.symbolic.actionscript.2","="],
|
||||
["text"," "],
|
||||
["constant.numeric.actionscript.2","0"],
|
||||
["text",";"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t}\t\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\t"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t\tupdateSliders();"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t}"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t}"]
|
||||
],[
|
||||
"start",
|
||||
["text","}"]
|
||||
]]
|
||||
261
lib/ace/mode/_test/tokens_autohotkey.json
Normal file
261
lib/ace/mode/_test/tokens_autohotkey.json
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
[[
|
||||
"start",
|
||||
["punctuation.ahk","#"],
|
||||
["keyword.command.ahk","NoEnv"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.command.ahk","SetBatchLines"],
|
||||
["text"," "],
|
||||
["constant.numeric","-1"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.command.ahk","CoordMode"],
|
||||
["text"," "],
|
||||
["variable.parameter","Mouse"],
|
||||
["punctuation.ahk",","],
|
||||
["text"," "],
|
||||
["variable.parameter","Screen"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.command.ahk","OnExit"],
|
||||
["text"," "],
|
||||
["variable.parameter","GuiClose"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","zoom "],
|
||||
["keyword.operator.ahk",":="],
|
||||
["text"," 9"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","computeSize"],
|
||||
["punctuation.ahk","(){"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.control.ahk","global"],
|
||||
["text"," as_x"]
|
||||
],[
|
||||
"start",
|
||||
["text","\tas_x "],
|
||||
["keyword.operator.ahk",":="],
|
||||
["text"," "],
|
||||
["support.function.ahk","Round"],
|
||||
["punctuation.ahk","("],
|
||||
["text","ws_x"],
|
||||
["keyword.operator.ahk","/"],
|
||||
["text","zoom"],
|
||||
["keyword.operator.ahk","/"],
|
||||
["text","2 "],
|
||||
["keyword.operator.ahk","-"],
|
||||
["text"," 0.5"],
|
||||
["punctuation.ahk",")"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.control.ahk","if"],
|
||||
["text"," "],
|
||||
["punctuation.ahk","("],
|
||||
["text","zoom"],
|
||||
["keyword.operator.ahk",">"],
|
||||
["text","1"],
|
||||
["punctuation.ahk",")"],
|
||||
["text"," "],
|
||||
["punctuation.ahk","{"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\tpix "],
|
||||
["keyword.operator.ahk",":="],
|
||||
["text"," "],
|
||||
["support.function.ahk","Round"],
|
||||
["punctuation.ahk","("],
|
||||
["text","zoom"],
|
||||
["punctuation.ahk",")"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["punctuation.ahk","}"],
|
||||
["text"," ele "],
|
||||
["punctuation.ahk","{"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\tpix "],
|
||||
["keyword.operator.ahk",":="],
|
||||
["text"," 1"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["punctuation.ahk","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.command.ahk","ToolTip"],
|
||||
["text"," Message "],
|
||||
["punctuation.ahk","%"],
|
||||
["text","as_x"],
|
||||
["punctuation.ahk","%"],
|
||||
["text"," "],
|
||||
["punctuation.ahk","%"],
|
||||
["text","zoom"],
|
||||
["punctuation.ahk","%"],
|
||||
["text"," "],
|
||||
["punctuation.ahk","%"],
|
||||
["text","ws_x"],
|
||||
["punctuation.ahk","%"],
|
||||
["text"," "],
|
||||
["punctuation.ahk","%"],
|
||||
["text","hws_x"],
|
||||
["punctuation.ahk","%"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["punctuation.ahk","}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","hdc_frame "],
|
||||
["keyword.operator.ahk",":="],
|
||||
["text"," "],
|
||||
["support.function.ahk","DllCall"],
|
||||
["punctuation.ahk","("],
|
||||
["punctuation.quote.double","\""],
|
||||
["string.quoted.ahk","GetDC"],
|
||||
["punctuation.quote.double","\""],
|
||||
["punctuation.ahk",","],
|
||||
["text"," UInt"],
|
||||
["punctuation.ahk",","],
|
||||
["text"," MagnifierID"],
|
||||
["punctuation.ahk",")"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["comment.line.ahk","; comment"]
|
||||
],[
|
||||
"start",
|
||||
["text","DrawCross"],
|
||||
["punctuation.ahk","("],
|
||||
["keyword.control.ahk","byRef"],
|
||||
["text"," x"],
|
||||
["keyword.operator.ahk","="],
|
||||
["punctuation.quote.double","\""],
|
||||
["punctuation.quote.double","\""],
|
||||
["punctuation.ahk",","],
|
||||
["text"," rX"],
|
||||
["punctuation.ahk",","],
|
||||
["text","rY"],
|
||||
["punctuation.ahk",","],
|
||||
["text","z"],
|
||||
["punctuation.ahk",","],
|
||||
["text"," dc"],
|
||||
["punctuation.ahk","){"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["comment.line.ahk"," ;specify the style, thickness and color of the cross lines"]
|
||||
],[
|
||||
"start",
|
||||
["text"," h_pen "],
|
||||
["keyword.operator.ahk",":="],
|
||||
["text"," "],
|
||||
["support.function.ahk","DllCall"],
|
||||
["punctuation.ahk","("],
|
||||
["text"," "],
|
||||
["punctuation.quote.double","\""],
|
||||
["string.quoted.ahk","gdi32.dll\\CreatePen"],
|
||||
["punctuation.quote.double","\""],
|
||||
["punctuation.ahk",","],
|
||||
["text"," "],
|
||||
["constant.language","Int"],
|
||||
["punctuation.ahk",","],
|
||||
["text"," 0"],
|
||||
["punctuation.ahk",","],
|
||||
["text"," "],
|
||||
["constant.language","Int"],
|
||||
["punctuation.ahk",","],
|
||||
["text"," 1"],
|
||||
["punctuation.ahk",","],
|
||||
["text"," UInt"],
|
||||
["punctuation.ahk",","],
|
||||
["text"," 0x0000FF"],
|
||||
["punctuation.ahk",")"]
|
||||
],[
|
||||
"start",
|
||||
["punctuation.ahk","}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["comment.line.ahk",";Ctrl ^; Shift +; Win #; Alt !"]
|
||||
],[
|
||||
"start",
|
||||
["text","^"],
|
||||
["support.constant.ahk","NumPadAdd"],
|
||||
["keyword.operator.ahk","::"]
|
||||
],[
|
||||
"start",
|
||||
["text","^"],
|
||||
["support.constant.ahk","WheelUp"],
|
||||
["keyword.operator.ahk","::"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text","^;"],
|
||||
["keyword.operator.ahk","::"],
|
||||
["text"," "],
|
||||
["comment.line.ahk"," ;comment"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.ahk","If"],
|
||||
["punctuation.ahk","("],
|
||||
["text","zoom "],
|
||||
["keyword.operator.ahk","<"],
|
||||
["text"," ws_x "],
|
||||
["variable.parameter","and"],
|
||||
["text"," "],
|
||||
["punctuation.ahk","("],
|
||||
["text"," "],
|
||||
["variable.predefined.ahk","A_ThisHotKey"],
|
||||
["text"," "],
|
||||
["keyword.operator.ahk","="],
|
||||
["text"," "],
|
||||
["punctuation.quote.double","\""],
|
||||
["string.quoted.ahk","^WheelUp"],
|
||||
["punctuation.quote.double","\""],
|
||||
["text"," "],
|
||||
["variable.parameter","or"],
|
||||
["text"," "],
|
||||
["variable.predefined.ahk","A_ThisHotKey"],
|
||||
["text"," "],
|
||||
["keyword.operator.ahk","="],
|
||||
["punctuation.quote.double","\""],
|
||||
["string.quoted.ahk","^NumPadAdd"],
|
||||
["punctuation.quote.double","\""],
|
||||
["punctuation.ahk",")"],
|
||||
["text"," "],
|
||||
["punctuation.ahk",")"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\tzoom "],
|
||||
["keyword.operator.ahk","*="],
|
||||
["text"," 1.189207115 "],
|
||||
["comment.line.ahk"," ; sqrt(sqrt(2))"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["keyword.command.ahk","Gosub"],
|
||||
["punctuation.ahk",","],
|
||||
["text","setZoom"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.ahk","return"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
|
|
@ -100,10 +100,12 @@
|
|||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["paren.lparen","({"],
|
||||
["paren.lparen","("],
|
||||
["paren","{"],
|
||||
["keyword.operator","/"],
|
||||
["identifier","abc"],
|
||||
["paren.rparen","})"],
|
||||
["paren","}"],
|
||||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["storage.type","=>"]
|
||||
],[
|
||||
|
|
@ -113,10 +115,12 @@
|
|||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["paren.lparen","({"],
|
||||
["paren.lparen","("],
|
||||
["paren","{"],
|
||||
["identifier","abc"],
|
||||
["keyword.operator","/"],
|
||||
["paren.rparen","})"],
|
||||
["paren","}"],
|
||||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["storage.type","->"]
|
||||
],[
|
||||
|
|
@ -150,10 +154,12 @@
|
|||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["paren.lparen","({"],
|
||||
["paren.lparen","("],
|
||||
["paren","{"],
|
||||
["paren.rparen",")"],
|
||||
["identifier","abc"],
|
||||
["paren.rparen","})"],
|
||||
["paren","}"],
|
||||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["storage.type","->"]
|
||||
],[
|
||||
|
|
@ -163,9 +169,12 @@
|
|||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["paren.lparen","({"],
|
||||
["paren.lparen","("],
|
||||
["paren","{"],
|
||||
["identifier","abc"],
|
||||
["paren.rparen",")})"],
|
||||
["paren.rparen",")"],
|
||||
["paren","}"],
|
||||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["storage.type","->"]
|
||||
],[
|
||||
|
|
@ -427,9 +436,36 @@
|
|||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["string.start","\""],
|
||||
["string","#{ 22 / 7 + {x: "],
|
||||
["paren.string","#{"],
|
||||
["text"," "],
|
||||
["constant.numeric","22"],
|
||||
["text"," "],
|
||||
["keyword.operator","/"],
|
||||
["text"," "],
|
||||
["constant.numeric","7"],
|
||||
["text"," "],
|
||||
["keyword.operator","+"],
|
||||
["text"," "],
|
||||
["paren","{"],
|
||||
["identifier","x"],
|
||||
["keyword.operator",":"],
|
||||
["text"," "],
|
||||
["string.start","\""],
|
||||
["paren.string","#{"],
|
||||
["identifier","a"],
|
||||
["text"," "],
|
||||
["keyword.operator","+"],
|
||||
["text"," "],
|
||||
["identifier","b"],
|
||||
["paren.string","}"],
|
||||
["string.end","\""],
|
||||
["comment","#{a + b}\"} + 2}\""]
|
||||
["paren","}"],
|
||||
["text"," "],
|
||||
["keyword.operator","+"],
|
||||
["text"," "],
|
||||
["constant.numeric","2"],
|
||||
["paren.string","}"],
|
||||
["string.end","\""]
|
||||
],[
|
||||
"qqdoc",
|
||||
["string","\"\"\"heredoc"]
|
||||
|
|
|
|||
166
lib/ace/mode/_test/tokens_erlang.json
Normal file
166
lib/ace/mode/_test/tokens_erlang.json
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
[[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.erlang","%% A process whose only job is to keep a counter."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.erlang","%% First version"]
|
||||
],[
|
||||
"start",
|
||||
["meta.directive.module.erlang"," "],
|
||||
["punctuation.section.directive.begin.erlang","-"],
|
||||
["keyword.control.directive.module.erlang","module"],
|
||||
["punctuation.definition.parameters.begin.erlang","("],
|
||||
["entity.name.type.class.module.definition.erlang","counter"],
|
||||
["punctuation.definition.parameters.end.erlang",")"],
|
||||
["punctuation.section.directive.end.erlang","."]
|
||||
],[
|
||||
"start",
|
||||
["meta.directive.export.erlang"," "],
|
||||
["punctuation.section.directive.begin.erlang","-"],
|
||||
["keyword.control.directive.export.erlang","export"],
|
||||
["punctuation.definition.parameters.begin.erlang","("],
|
||||
["punctuation.definition.list.begin.erlang","["],
|
||||
["entity.name.function.erlang","start"],
|
||||
["punctuation.separator.function-arity.erlang","/"],
|
||||
["constant.numeric.integer.decimal.erlang","0"],
|
||||
["punctuation.separator.list.erlang",","],
|
||||
["meta.structure.list.function.erlang"," "],
|
||||
["entity.name.function.erlang","codeswitch"],
|
||||
["punctuation.separator.function-arity.erlang","/"],
|
||||
["constant.numeric.integer.decimal.erlang","1"],
|
||||
["punctuation.definition.list.end.erlang","]"],
|
||||
["punctuation.definition.parameters.end.erlang",")"],
|
||||
["punctuation.section.directive.end.erlang","."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["meta.function.erlang"," "],
|
||||
["entity.name.function.definition.erlang","start"],
|
||||
["punctuation.section.expression.begin.erlang","("],
|
||||
["punctuation.section.expression.end.erlang",")"],
|
||||
["text"," "],
|
||||
["keyword.operator.symbolic.erlang","->"],
|
||||
["text"," "],
|
||||
["entity.name.function.erlang","loop"],
|
||||
["punctuation.definition.parameters.begin.erlang","("],
|
||||
["constant.numeric.integer.decimal.erlang","0"],
|
||||
["punctuation.definition.parameters.end.erlang",")"],
|
||||
["punctuation.terminator.function.erlang","."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
["text6","meta.function.erlang"],
|
||||
["meta.function.erlang"," "],
|
||||
["entity.name.function.definition.erlang","loop"],
|
||||
["punctuation.section.expression.begin.erlang","("],
|
||||
["variable.other.erlang","Sum"],
|
||||
["punctuation.section.expression.end.erlang",")"],
|
||||
["text"," "],
|
||||
["keyword.operator.symbolic.erlang","->"]
|
||||
],[
|
||||
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
|
||||
["text"," "],
|
||||
["keyword.control.receive.erlang","receive"]
|
||||
],[
|
||||
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["punctuation.definition.tuple.begin.erlang","{"],
|
||||
["constant.other.symbol.unquoted.erlang","increment"],
|
||||
["punctuation.separator.tuple.erlang",","],
|
||||
["meta.structure.tuple.erlang"," "],
|
||||
["variable.other.erlang","Count"],
|
||||
["punctuation.definition.tuple.end.erlang","}"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["punctuation.separator.clause-head-body.erlang","->"]
|
||||
],[
|
||||
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["entity.name.function.erlang","loop"],
|
||||
["punctuation.definition.parameters.begin.erlang","("],
|
||||
["variable.other.erlang","Sum"],
|
||||
["keyword.operator.symbolic.erlang","+"],
|
||||
["variable.other.erlang","Count"],
|
||||
["punctuation.definition.parameters.end.erlang",")"],
|
||||
["punctuation.separator.clauses.erlang",";"]
|
||||
],[
|
||||
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["punctuation.definition.tuple.begin.erlang","{"],
|
||||
["constant.other.symbol.unquoted.erlang","counter"],
|
||||
["punctuation.separator.tuple.erlang",","],
|
||||
["meta.structure.tuple.erlang"," "],
|
||||
["variable.other.erlang","Pid"],
|
||||
["punctuation.definition.tuple.end.erlang","}"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["punctuation.separator.clause-head-body.erlang","->"]
|
||||
],[
|
||||
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["variable.other.erlang","Pid"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["keyword.operator.symbolic.erlang","!"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["punctuation.definition.tuple.begin.erlang","{"],
|
||||
["constant.other.symbol.unquoted.erlang","counter"],
|
||||
["punctuation.separator.tuple.erlang",","],
|
||||
["meta.structure.tuple.erlang"," "],
|
||||
["variable.other.erlang","Sum"],
|
||||
["punctuation.definition.tuple.end.erlang","}"],
|
||||
["punctuation.separator.expressions.erlang",","]
|
||||
],[
|
||||
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["entity.name.function.erlang","loop"],
|
||||
["punctuation.definition.parameters.begin.erlang","("],
|
||||
["variable.other.erlang","Sum"],
|
||||
["punctuation.definition.parameters.end.erlang",")"],
|
||||
["punctuation.separator.clauses.erlang",";"]
|
||||
],[
|
||||
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["constant.other.symbol.unquoted.erlang","code_switch"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["punctuation.separator.clause-head-body.erlang","->"]
|
||||
],[
|
||||
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["keyword.operator.macro.erlang","?"],
|
||||
["entity.name.function.macro.erlang","MODULE"],
|
||||
["meta.expression.receive.erlang",":"],
|
||||
["entity.name.function.erlang","codeswitch"],
|
||||
["punctuation.definition.parameters.begin.erlang","("],
|
||||
["variable.other.erlang","Sum"],
|
||||
["punctuation.definition.parameters.end.erlang",")"]
|
||||
],[
|
||||
["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["punctuation.definition.comment.erlang","% Force the use of 'codeswitch/1' from the latest MODULE version"]
|
||||
],[
|
||||
"start",
|
||||
["meta.expression.receive.erlang"," "],
|
||||
["keyword.control.end.erlang","end"],
|
||||
["punctuation.terminator.function.erlang","."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["meta.function.erlang"," "],
|
||||
["entity.name.function.definition.erlang","codeswitch"],
|
||||
["punctuation.section.expression.begin.erlang","("],
|
||||
["variable.other.erlang","Sum"],
|
||||
["punctuation.section.expression.end.erlang",")"],
|
||||
["text"," "],
|
||||
["keyword.operator.symbolic.erlang","->"],
|
||||
["text"," "],
|
||||
["entity.name.function.erlang","loop"],
|
||||
["punctuation.definition.parameters.begin.erlang","("],
|
||||
["variable.other.erlang","Sum"],
|
||||
["punctuation.definition.parameters.end.erlang",")"],
|
||||
["punctuation.terminator.function.erlang","."]
|
||||
]]
|
||||
219
lib/ace/mode/_test/tokens_forth.json
Normal file
219
lib/ace/mode/_test/tokens_forth.json
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
[[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","HELLO"],
|
||||
["meta.block.forth"," "],
|
||||
["comment.line.parentheses.forth"," ( -- )"],
|
||||
["meta.block.forth"," CR "],
|
||||
["string.quoted.double.forth",".\" Hello, world!\""],
|
||||
["meta.block.forth"," "],
|
||||
["keyword.other.compile-only.forth",";"],
|
||||
["text"," "]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","HELLO <cr>"]
|
||||
],[
|
||||
"start",
|
||||
["text","Hello, world!"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","[CHAR]"],
|
||||
["meta.block.forth"," "],
|
||||
["keyword.other.non-immediate.forth"," CHAR"],
|
||||
["meta.block.forth"," "],
|
||||
["keyword.other.compile-only.forth"," POSTPONE"],
|
||||
["meta.block.forth"," LITERAL "],
|
||||
["keyword.other.compile-only.forth",";"],
|
||||
["keyword.other.immediate.forth"," IMMEDIATE"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["constant.numeric.forth","0"],
|
||||
["storage.type.forth"," value"],
|
||||
["text"," ii "],
|
||||
["constant.numeric.forth"," 0"],
|
||||
["storage.type.forth"," value"],
|
||||
["text"," jj"]
|
||||
],[
|
||||
"start",
|
||||
["constant.numeric.forth","0"],
|
||||
["storage.type.forth"," value"],
|
||||
["text"," KeyAddr "],
|
||||
["constant.numeric.forth"," 0"],
|
||||
["storage.type.forth"," value"],
|
||||
["text"," KeyLen"]
|
||||
],[
|
||||
"start",
|
||||
["storage.type.forth","create"],
|
||||
["text"," SArray "],
|
||||
["constant.numeric.forth"," 256"],
|
||||
["text"," allot "],
|
||||
["comment.line.backslash.forth"," \\ state array of 256 bytes"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","KeyArray"],
|
||||
["meta.block.forth"," KeyLen mod KeyAddr "],
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","get_byte"],
|
||||
["meta.block.forth"," + c@ "],
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","set_byte"],
|
||||
["meta.block.forth"," + c! "],
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","as_byte"],
|
||||
["meta.block.forth"," "],
|
||||
["constant.numeric.forth"," 255"],
|
||||
["meta.block.forth"," and "],
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","reset_ij"],
|
||||
["meta.block.forth"," "],
|
||||
["constant.numeric.forth"," 0"],
|
||||
["keyword.other.immediate.forth"," TO"],
|
||||
["meta.block.forth"," ii "],
|
||||
["constant.numeric.forth"," 0"],
|
||||
["keyword.other.immediate.forth"," TO"],
|
||||
["meta.block.forth"," jj "],
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","i_update"],
|
||||
["meta.block.forth"," "],
|
||||
["constant.numeric.forth"," 1"],
|
||||
["meta.block.forth"," + as_byte"],
|
||||
["keyword.other.immediate.forth"," TO"],
|
||||
["meta.block.forth"," ii "],
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","j_update"],
|
||||
["meta.block.forth"," ii SArray get_byte + as_byte"],
|
||||
["keyword.other.immediate.forth"," TO"],
|
||||
["meta.block.forth"," jj "],
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","swap_s_ij"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," jj SArray get_byte"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," ii SArray get_byte jj SArray set_byte"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," ii SArray set_byte"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","rc4_init"],
|
||||
["comment.line.parentheses.forth"," ( KeyAddr KeyLen -- )"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," "],
|
||||
["constant.numeric.forth"," 256"],
|
||||
["meta.block.forth"," min"],
|
||||
["keyword.other.immediate.forth"," TO"],
|
||||
["meta.block.forth"," KeyLen "],
|
||||
["keyword.other.immediate.forth"," TO"],
|
||||
["meta.block.forth"," KeyAddr"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," "],
|
||||
["constant.numeric.forth"," 256 0"],
|
||||
["keyword.control.compile-only.forth"," DO"],
|
||||
["meta.block.forth"," "],
|
||||
["variable.language.forth","i"],
|
||||
["meta.block.forth"," "],
|
||||
["variable.language.forth","i"],
|
||||
["meta.block.forth"," SArray set_byte "],
|
||||
["keyword.control.compile-only.forth"," LOOP"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," reset_ij"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," "],
|
||||
["keyword.control.compile-only.forth"," BEGIN"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," ii KeyArray get_byte jj + j_update"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," swap_s_ij"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," ii"],
|
||||
["constant.numeric.forth"," 255"],
|
||||
["meta.block.forth"," <"],
|
||||
["keyword.control.compile-only.forth"," WHILE"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," ii i_update"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," "],
|
||||
["keyword.control.compile-only.forth"," REPEAT"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," reset_ij"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["keyword.other.compile-only.forth",":"],
|
||||
["meta.block.forth"," "],
|
||||
["entity.name.function.forth","rc4_byte"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," ii i_update jj j_update"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," swap_s_ij"]
|
||||
],[
|
||||
"keyword.other.compile-only.forth",
|
||||
["meta.block.forth"," ii SArray get_byte jj SArray get_byte + as_byte SArray get_byte xor"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.compile-only.forth",";"]
|
||||
]]
|
||||
337
lib/ace/mode/_test/tokens_ftl.json
Normal file
337
lib/ace/mode/_test/tokens_ftl.json
Normal file
|
|
@ -0,0 +1,337 @@
|
|||
[[
|
||||
"start",
|
||||
["keyword.function","<#ftl"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","encoding"],
|
||||
["keyword.operator","="],
|
||||
["string","\"utf-8\""],
|
||||
["text"," "],
|
||||
["keyword","/>"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.function","<#setting"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","locale"],
|
||||
["keyword.operator","="],
|
||||
["string","\"en_US\""],
|
||||
["text"," "],
|
||||
["keyword","/>"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.function","<#import"],
|
||||
["text"," "],
|
||||
["string","\"library\""],
|
||||
["text"," "],
|
||||
["keyword.operator","as"],
|
||||
["text"," "],
|
||||
["variable","lib"],
|
||||
["text"," "],
|
||||
["keyword","/>"]
|
||||
],[
|
||||
"comment",
|
||||
["comment","<#--"]
|
||||
],[
|
||||
"comment",
|
||||
["comment"," FreeMarker comment"]
|
||||
],[
|
||||
"comment",
|
||||
["comment"," ${abc} <#assign a=12 />"]
|
||||
],[
|
||||
"start",
|
||||
["comment","-->"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["xml-pe","<!DOCTYPE html>"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","html"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","lang"],
|
||||
["keyword.operator","="],
|
||||
["string","\"en-us\""],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","head"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","meta"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","charset"],
|
||||
["keyword.operator","="],
|
||||
["string","\"utf-8\""],
|
||||
["text"," "],
|
||||
["meta.tag.r","/>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","title"],
|
||||
["meta.tag.r",">"],
|
||||
["string.interpolated","${"],
|
||||
["variable","title"],
|
||||
["keyword.operator","!"],
|
||||
["string","\"FreeMarker\""],
|
||||
["string.interpolated","}"],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","title"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","</"],
|
||||
["meta.tag.tag-name","head"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","body"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","h1"],
|
||||
["meta.tag.r",">"],
|
||||
["text","Hello "],
|
||||
["string.interpolated","${"],
|
||||
["variable","name"],
|
||||
["keyword.operator","!"],
|
||||
["string","\"\""],
|
||||
["string.interpolated","}"],
|
||||
["meta.tag","</"],
|
||||
["meta.tag.tag-name","h1"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","p"],
|
||||
["meta.tag.r",">"],
|
||||
["text","Today is: "],
|
||||
["string.interpolated","${"],
|
||||
["language.variable",".now"],
|
||||
["support.function","?date"],
|
||||
["string.interpolated","}"],
|
||||
["meta.tag","</"],
|
||||
["meta.tag.tag-name","p"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.function","<#assign"],
|
||||
["text"," "],
|
||||
["variable","x"],
|
||||
["text"," "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["constant.numeric","13"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.function","<#if"],
|
||||
["text"," "],
|
||||
["variable","x"],
|
||||
["text"," "],
|
||||
["constant.character.entity",">"],
|
||||
["text"," "],
|
||||
["constant.numeric","12"],
|
||||
["text"," "],
|
||||
["keyword.operator","&&"],
|
||||
["text"," "],
|
||||
["variable","x"],
|
||||
["text"," "],
|
||||
["keyword.operator","lt"],
|
||||
["text"," "],
|
||||
["constant.numeric","14"],
|
||||
["keyword",">"],
|
||||
["text","x equals 13: "],
|
||||
["string.interpolated","${"],
|
||||
["variable","x"],
|
||||
["string.interpolated","}"],
|
||||
["keyword.function","</#if"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","ul"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.function","<#list"],
|
||||
["text"," "],
|
||||
["variable","items"],
|
||||
["text"," "],
|
||||
["keyword.operator","as"],
|
||||
["text"," "],
|
||||
["variable","item"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name","li"],
|
||||
["meta.tag.r",">"],
|
||||
["string.interpolated","${"],
|
||||
["variable","item_index"],
|
||||
["string.interpolated","}"],
|
||||
["text",": "],
|
||||
["string.interpolated","${"],
|
||||
["variable","item.name"],
|
||||
["keyword.operator","!"],
|
||||
["support.function","?split"],
|
||||
["paren.lparen","("],
|
||||
["string","\""],
|
||||
["constant.character.escape","\\n"],
|
||||
["string","\""],
|
||||
["paren.rparen",")"],
|
||||
["paren.lparen","["],
|
||||
["constant.numeric","0"],
|
||||
["paren.rparen","]"],
|
||||
["string.interpolated","}"],
|
||||
["meta.tag","</"],
|
||||
["meta.tag.tag-name","li"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.function","</#list"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","</"],
|
||||
["meta.tag.tag-name","ul"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," User directive: "],
|
||||
["keyword.other","<@lib.function"],
|
||||
["text"," "],
|
||||
["variable","attr1"],
|
||||
["keyword.operator","="],
|
||||
["constant.language","true"],
|
||||
["text"," "],
|
||||
["variable","attr2"],
|
||||
["keyword.operator","="],
|
||||
["string","'value'"],
|
||||
["text"," "],
|
||||
["variable","attr3"],
|
||||
["keyword.operator","="],
|
||||
["constant.numeric","-42.12"],
|
||||
["keyword",">"],
|
||||
["text","Test"],
|
||||
["keyword.other","</@lib.function"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.other","<@anotherOne"],
|
||||
["text"," "],
|
||||
["keyword","/>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.function","<#if"],
|
||||
["text"," "],
|
||||
["variable","variable"],
|
||||
["support.function.deprecated","?exists"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Deprecated"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.function","<#elseif"],
|
||||
["text"," "],
|
||||
["variable","variable"],
|
||||
["support.function","??"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Better"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.function","<#else"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Default"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.function","</#if"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","<"],
|
||||
["meta.tag.tag-name.image","img"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","src"],
|
||||
["keyword.operator","="],
|
||||
["string","\"images/"],
|
||||
["string.interpolated","${"],
|
||||
["variable","user.id"],
|
||||
["string.interpolated","}"],
|
||||
["string",".png\""],
|
||||
["text"," "],
|
||||
["meta.tag.r","/>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag","</"],
|
||||
["meta.tag.tag-name","body"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag","</"],
|
||||
["meta.tag.tag-name","html"],
|
||||
["meta.tag.r",">"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
156
lib/ace/mode/_test/tokens_haskell.json
Normal file
156
lib/ace/mode/_test/tokens_haskell.json
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
[[
|
||||
"start",
|
||||
["punctuation.definition.comment.haskell","-- Type annotation (optional)"]
|
||||
],[
|
||||
"start",
|
||||
["entity.name.function.haskell","fib"],
|
||||
["meta.function.type-declaration.haskell"," "],
|
||||
["keyword.other.double-colon.haskell","::"],
|
||||
["meta.function.type-declaration.haskell"," "],
|
||||
["support.type.prelude.haskell","Int"],
|
||||
["meta.function.type-declaration.haskell"," "],
|
||||
["keyword.other.arrow.haskell","->"],
|
||||
["meta.function.type-declaration.haskell"," "],
|
||||
["support.type.prelude.haskell","Integer"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["punctuation.definition.comment.haskell","-- With self-referencing data"]
|
||||
],[
|
||||
"start",
|
||||
["text","fib n "],
|
||||
["keyword.operator.haskell","="],
|
||||
["text"," fibs "],
|
||||
["keyword.operator.haskell","!!"],
|
||||
["text"," n"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.other.haskell","where"],
|
||||
["text"," fibs "],
|
||||
["keyword.operator.haskell","="],
|
||||
["text"," "],
|
||||
["constant.numeric.haskell","0"],
|
||||
["text"," "],
|
||||
["keyword.operator.haskell",":"],
|
||||
["text"," "],
|
||||
["support.function.prelude.haskell","scanl"],
|
||||
["text"," "],
|
||||
["entity.name.function.infix.haskell","(+)"],
|
||||
["text"," "],
|
||||
["constant.numeric.haskell","1"],
|
||||
["text"," fibs"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["punctuation.definition.comment.haskell","-- 0,1,1,2,3,5,..."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["punctuation.definition.comment.haskell","-- Same, coded directly"]
|
||||
],[
|
||||
"start",
|
||||
["text","fib n "],
|
||||
["keyword.operator.haskell","="],
|
||||
["text"," fibs "],
|
||||
["keyword.operator.haskell","!!"],
|
||||
["text"," n"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.other.haskell","where"],
|
||||
["text"," fibs "],
|
||||
["keyword.operator.haskell","="],
|
||||
["text"," "],
|
||||
["constant.numeric.haskell","0"],
|
||||
["text"," "],
|
||||
["keyword.operator.haskell",":"],
|
||||
["text"," "],
|
||||
["constant.numeric.haskell","1"],
|
||||
["text"," "],
|
||||
["keyword.operator.haskell",":"],
|
||||
["text"," next fibs"]
|
||||
],[
|
||||
"start",
|
||||
["text"," next (a "],
|
||||
["keyword.operator.haskell",":"],
|
||||
["text"," t@(b"],
|
||||
["keyword.operator.haskell",":"],
|
||||
["text","_)) "],
|
||||
["keyword.operator.haskell","="],
|
||||
["text"," (a"],
|
||||
["keyword.operator.haskell","+"],
|
||||
["text","b) "],
|
||||
["keyword.operator.haskell",":"],
|
||||
["text"," next t"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["punctuation.definition.comment.haskell","-- Similar idea, using zipWith"]
|
||||
],[
|
||||
"start",
|
||||
["text","fib n "],
|
||||
["keyword.operator.haskell","="],
|
||||
["text"," fibs "],
|
||||
["keyword.operator.haskell","!!"],
|
||||
["text"," n"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.other.haskell","where"],
|
||||
["text"," fibs "],
|
||||
["keyword.operator.haskell","="],
|
||||
["text"," "],
|
||||
["constant.numeric.haskell","0"],
|
||||
["text"," "],
|
||||
["keyword.operator.haskell",":"],
|
||||
["text"," "],
|
||||
["constant.numeric.haskell","1"],
|
||||
["text"," "],
|
||||
["keyword.operator.haskell",":"],
|
||||
["text"," "],
|
||||
["support.function.prelude.haskell","zipWith"],
|
||||
["text"," "],
|
||||
["entity.name.function.infix.haskell","(+)"],
|
||||
["text"," fibs ("],
|
||||
["support.function.prelude.haskell","tail"],
|
||||
["text"," fibs)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"start",
|
||||
["punctuation.definition.comment.haskell","-- Using a generator function"]
|
||||
],[
|
||||
"start",
|
||||
["text","fib n "],
|
||||
["keyword.operator.haskell","="],
|
||||
["text"," fibs ("],
|
||||
["constant.numeric.haskell","0"],
|
||||
["punctuation.separator.comma.haskell",","],
|
||||
["constant.numeric.haskell","1"],
|
||||
["text",") "],
|
||||
["keyword.operator.haskell","!!"],
|
||||
["text"," n"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.other.haskell","where"],
|
||||
["text"," fibs (a"],
|
||||
["punctuation.separator.comma.haskell",","],
|
||||
["text","b) "],
|
||||
["keyword.operator.haskell","="],
|
||||
["text"," a "],
|
||||
["keyword.operator.haskell",":"],
|
||||
["text"," fibs (b"],
|
||||
["punctuation.separator.comma.haskell",","],
|
||||
["text","a"],
|
||||
["keyword.operator.haskell","+"],
|
||||
["text","b)"]
|
||||
]]
|
||||
105
lib/ace/mode/_test/tokens_julia.json
Normal file
105
lib/ace/mode/_test/tokens_julia.json
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
[[
|
||||
"start",
|
||||
["keyword.control.julia","for"],
|
||||
["text"," op "],
|
||||
["keyword.operator.update.julia","="],
|
||||
["text"," ("],
|
||||
["keyword.operator.ternary.julia",":"],
|
||||
["keyword.operator.arithmetic.julia","+"],
|
||||
["text",", "],
|
||||
["keyword.operator.ternary.julia",":"],
|
||||
["keyword.operator.arithmetic.julia","*"],
|
||||
["text",", "],
|
||||
["keyword.operator.ternary.julia",":"],
|
||||
["keyword.operator.bitwise.julia","&"],
|
||||
["text",", "],
|
||||
["keyword.operator.ternary.julia",":"],
|
||||
["keyword.operator.bitwise.julia","|"],
|
||||
["text",", "],
|
||||
["keyword.operator.ternary.julia",":"],
|
||||
["keyword.operator.interpolation.julia","$"],
|
||||
["text",")"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["variable.macro.julia","@eval"],
|
||||
["text"," ("],
|
||||
["keyword.operator.interpolation.julia","$"],
|
||||
["text","op)(a,b,c) "],
|
||||
["keyword.operator.update.julia","="],
|
||||
["text"," ("],
|
||||
["keyword.operator.interpolation.julia","$"],
|
||||
["text","op)(("],
|
||||
["keyword.operator.interpolation.julia","$"],
|
||||
["text","op)(a,b),c)"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.julia","end"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.other.julia","function"],
|
||||
["meta.function.julia"," "],
|
||||
["entity.name.function.julia","g"],
|
||||
["text","("],
|
||||
["text","x,y)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.julia","return"],
|
||||
["text"," x "],
|
||||
["keyword.operator.arithmetic.julia","*"],
|
||||
["text"," y"]
|
||||
],[
|
||||
"start",
|
||||
["text"," x "],
|
||||
["keyword.operator.arithmetic.julia","+"],
|
||||
["text"," y"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.julia","end"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["support.function.julia","cd"],
|
||||
["text","("],
|
||||
["punctuation.definition.string.begin.julia","\""],
|
||||
["string.quoted.double.julia","data"],
|
||||
["punctuation.definition.string.end.julia","\""],
|
||||
["text",") "],
|
||||
["keyword.control.julia","do"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.function.julia","open"],
|
||||
["text","("],
|
||||
["punctuation.definition.string.begin.julia","\""],
|
||||
["string.quoted.double.julia","outfile"],
|
||||
["punctuation.definition.string.end.julia","\""],
|
||||
["text",", "],
|
||||
["punctuation.definition.string.begin.julia","\""],
|
||||
["string.quoted.double.julia","w"],
|
||||
["punctuation.definition.string.end.julia","\""],
|
||||
["text",") "],
|
||||
["keyword.control.julia","do"],
|
||||
["text"," f"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["support.function.julia","write"],
|
||||
["text","("],
|
||||
["text","f, data)"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.control.julia","end"]
|
||||
],[
|
||||
"start",
|
||||
["keyword.control.julia","end"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
6
lib/ace/mode/_test/tokens_livescript.json
Normal file
6
lib/ace/mode/_test/tokens_livescript.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[[
|
||||
"start",
|
||||
["comment","# comment"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
[[
|
||||
"punctuation.definition.comment.pascal2",
|
||||
"punctuation.definition.comment.pascal",
|
||||
["punctuation.definition.comment.pascal","(*"],
|
||||
["comment.block.pascal.one","****************************************************************************"]
|
||||
],[
|
||||
"punctuation.definition.comment.pascal2",
|
||||
"punctuation.definition.comment.pascal",
|
||||
["comment.block.pascal.one"," * A simple bubble sort program. Reads integers, one per line, and prints *"]
|
||||
],[
|
||||
"punctuation.definition.comment.pascal2",
|
||||
"punctuation.definition.comment.pascal",
|
||||
["comment.block.pascal.one"," * them out in sorted order. Blows up if there are more than 49. *"]
|
||||
],[
|
||||
"start",
|
||||
|
|
|
|||
265
lib/ace/mode/_test/tokens_prolog.json
Normal file
265
lib/ace/mode/_test/tokens_prolog.json
Normal file
|
|
@ -0,0 +1,265 @@
|
|||
[[
|
||||
"start",
|
||||
["entity.name.function.fact.prolog","partition"],
|
||||
["punctuation.begin.fact.parameters.prolog","("],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.fact.prolog"," "],
|
||||
["variable.language.anonymous.prolog","_"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.fact.prolog"," "],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.fact.prolog"," "],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["punctuation.end.fact.parameters.prolog",")"],
|
||||
["punctuation.end.fact.prolog","."]
|
||||
],[
|
||||
["keyword.operator.definition.prolog","meta.rule.prolog"],
|
||||
["entity.name.function.rule.prolog","partition"],
|
||||
["punctuation.rule.parameters.begin.prolog","("],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["variable.other.prolog","X"],
|
||||
["punctuation.concat.list.prolog","|"],
|
||||
["variable.other.prolog","Xs"],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.rule.parameters.prolog"," "],
|
||||
["variable.parameter.prolog","Pivot"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.rule.parameters.prolog"," "],
|
||||
["variable.parameter.prolog","Smalls"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.rule.parameters.prolog"," "],
|
||||
["variable.parameter.prolog","Bigs"],
|
||||
["punctuation.rule.parameters.end.prolog",")"],
|
||||
["meta.rule.signature.prolog"," "],
|
||||
["keyword.operator.definition.prolog",":-"]
|
||||
],[
|
||||
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
|
||||
["meta.rule.definition.prolog"," "],
|
||||
["meta.expression.prolog","( "],
|
||||
["variable.other.prolog","X"],
|
||||
["meta.expression.prolog"," @"],
|
||||
["keyword.operator.prolog","<"],
|
||||
["meta.expression.prolog"," "],
|
||||
["variable.other.prolog","Pivot"],
|
||||
["meta.expression.prolog"," "],
|
||||
["keyword.operator.prolog","->"]
|
||||
],[
|
||||
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
|
||||
["meta.expression.prolog"," "],
|
||||
["variable.other.prolog","Smalls"],
|
||||
["meta.expression.prolog"," "],
|
||||
["keyword.operator.prolog","="],
|
||||
["meta.expression.prolog"," "],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["variable.other.prolog","X"],
|
||||
["punctuation.concat.list.prolog","|"],
|
||||
["variable.other.prolog","Rest"],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["punctuation.control.and.prolog",","]
|
||||
],[
|
||||
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
|
||||
["meta.expression.prolog"," "],
|
||||
["constant.other.atom.prolog","partition"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["variable.other.prolog","Xs"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","Pivot"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","Rest"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","Bigs"],
|
||||
["punctuation.end.statement.parameters.prolog",")"]
|
||||
],[
|
||||
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
|
||||
["meta.expression.prolog"," "],
|
||||
["punctuation.control.or.prolog",";"],
|
||||
["meta.expression.prolog"," "],
|
||||
["variable.other.prolog","Bigs"],
|
||||
["meta.expression.prolog"," "],
|
||||
["keyword.operator.prolog","="],
|
||||
["meta.expression.prolog"," "],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["variable.other.prolog","X"],
|
||||
["punctuation.concat.list.prolog","|"],
|
||||
["variable.other.prolog","Rest"],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["punctuation.control.and.prolog",","]
|
||||
],[
|
||||
["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
|
||||
["meta.expression.prolog"," "],
|
||||
["constant.other.atom.prolog","partition"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["variable.other.prolog","Xs"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","Pivot"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","Smalls"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","Rest"],
|
||||
["punctuation.end.statement.parameters.prolog",")"]
|
||||
],[
|
||||
"start",
|
||||
["meta.expression.prolog"," )"],
|
||||
["punctuation.rule.end.prolog","."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
],[
|
||||
"entity.name.function.fact.prolog",
|
||||
["entity.name.function.fact.prolog","quicksort"],
|
||||
["punctuation.begin.fact.parameters.prolog","("],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["invalid.illegal.invalidchar.prolog",")"],
|
||||
["meta.fact.prolog"," "],
|
||||
["invalid.illegal.invalidchar.prolog","-"],
|
||||
["keyword.operator.prolog","->"],
|
||||
["meta.fact.prolog"," "],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["invalid.illegal.invalidchar.prolog","."]
|
||||
],[
|
||||
"entity.name.function.fact.prolog",
|
||||
["constant.other.atom.prolog","quicksort"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["variable.other.prolog","X"],
|
||||
["punctuation.concat.list.prolog","|"],
|
||||
["variable.other.prolog","Xs"],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["punctuation.end.statement.parameters.prolog",")"],
|
||||
["meta.fact.prolog"," "],
|
||||
["invalid.illegal.invalidchar.prolog","-"],
|
||||
["keyword.operator.prolog","->"]
|
||||
],[
|
||||
"entity.name.function.fact.prolog",
|
||||
["meta.fact.prolog"," "],
|
||||
["invalid.illegal.invalidchar.prolog","{"],
|
||||
["meta.fact.prolog"," "],
|
||||
["constant.other.atom.prolog","partition"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["variable.other.prolog","Xs"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","X"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","Smaller"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","Bigger"],
|
||||
["punctuation.end.statement.parameters.prolog",")"],
|
||||
["meta.fact.prolog"," "],
|
||||
["invalid.illegal.invalidchar.prolog","}"],
|
||||
["punctuation.separator.parameters.prolog",","]
|
||||
],[
|
||||
"entity.name.function.fact.prolog",
|
||||
["meta.fact.prolog"," "],
|
||||
["constant.other.atom.prolog","quicksort"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["variable.other.prolog","Smaller"],
|
||||
["punctuation.end.statement.parameters.prolog",")"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.fact.prolog"," "],
|
||||
["punctuation.begin.list.prolog","["],
|
||||
["variable.other.prolog","X"],
|
||||
["punctuation.end.list.prolog","]"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.fact.prolog"," "],
|
||||
["constant.other.atom.prolog","quicksort"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["variable.other.prolog","Bigger"],
|
||||
["punctuation.end.statement.parameters.prolog",")"],
|
||||
["invalid.illegal.invalidchar.prolog","."]
|
||||
],[
|
||||
"entity.name.function.fact.prolog"
|
||||
],[
|
||||
"entity.name.function.fact.prolog",
|
||||
["constant.other.atom.prolog","perfect"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["variable.other.prolog","N"],
|
||||
["punctuation.end.statement.parameters.prolog",")"],
|
||||
["meta.fact.prolog"," "],
|
||||
["invalid.illegal.invalidchar.prolog",":-"]
|
||||
],[
|
||||
"entity.name.function.fact.prolog",
|
||||
["meta.fact.prolog"," "],
|
||||
["constant.other.atom.prolog","between"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["constant.numeric.prolog","1"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["constant.other.atom.prolog","inf"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","N"],
|
||||
["punctuation.end.statement.parameters.prolog",")"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.fact.prolog"," "],
|
||||
["variable.parameter.prolog","U"],
|
||||
["meta.fact.prolog"," "],
|
||||
["keyword.operator.prolog","is"],
|
||||
["meta.fact.prolog"," "],
|
||||
["variable.parameter.prolog","N"],
|
||||
["meta.fact.prolog"," "],
|
||||
["invalid.illegal.invalidchar.prolog","//"],
|
||||
["meta.fact.prolog"," "],
|
||||
["constant.numeric.prolog","2"],
|
||||
["punctuation.separator.parameters.prolog",","]
|
||||
],[
|
||||
"entity.name.function.fact.prolog",
|
||||
["meta.fact.prolog"," "],
|
||||
["constant.other.atom.prolog","findall"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["variable.other.prolog","D"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," ("],
|
||||
["constant.other.atom.prolog","between"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["constant.numeric.prolog","1"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["variable.other.prolog","U"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["variable.other.prolog","D"],
|
||||
["punctuation.end.statement.parameters.prolog",")"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","N"],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["constant.other.atom.prolog","mod"],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","D"],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["keyword.operator.prolog","=:="],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["constant.numeric.prolog","0"],
|
||||
["punctuation.end.statement.parameters.prolog",")"],
|
||||
["punctuation.separator.parameters.prolog",","],
|
||||
["meta.fact.prolog"," "],
|
||||
["variable.parameter.prolog","Ds"],
|
||||
["invalid.illegal.invalidchar.prolog",")"],
|
||||
["punctuation.separator.parameters.prolog",","]
|
||||
],[
|
||||
"entity.name.function.fact.prolog",
|
||||
["meta.fact.prolog"," "],
|
||||
["constant.other.atom.prolog","sumlist"],
|
||||
["punctuation.begin.statement.parameters.prolog","("],
|
||||
["variable.other.prolog","Ds"],
|
||||
["punctuation.separator.statement.prolog",","],
|
||||
["meta.statement.parameters.prolog"," "],
|
||||
["variable.other.prolog","N"],
|
||||
["punctuation.end.statement.parameters.prolog",")"],
|
||||
["invalid.illegal.invalidchar.prolog","."]
|
||||
]]
|
||||
136
lib/ace/mode/_test/tokens_rust.json
Normal file
136
lib/ace/mode/_test/tokens_rust.json
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
[[
|
||||
"start",
|
||||
["keyword.source.rust","use"],
|
||||
["text"," "],
|
||||
["support.constant","core::rand::"],
|
||||
["text","RngUtil"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.source.rust","fn"],
|
||||
["meta.function.source.rust"," "],
|
||||
["entity.name.function.source.rust","main"],
|
||||
["meta.function.source.rust","("],
|
||||
["text",") {"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.source.rust","for"],
|
||||
["text"," ["],
|
||||
["string.quoted.double.source.rust","\"Alice\""],
|
||||
["keyword.operator",","],
|
||||
["text"," "],
|
||||
["string.quoted.double.source.rust","\"Bob\""],
|
||||
["keyword.operator",","],
|
||||
["text"," "],
|
||||
["string.quoted.double.source.rust","\"Carol\""],
|
||||
["text","].each |&name| {"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.source.rust","do"],
|
||||
["text"," spawn {"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.source.rust","let"],
|
||||
["text"," v "],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
["support.constant","rand::"],
|
||||
["text","Rng().shuffle(["],
|
||||
["constant.numeric.integer.source.rust","1"],
|
||||
["keyword.operator",","],
|
||||
["text"," "],
|
||||
["constant.numeric.integer.source.rust","2"],
|
||||
["keyword.operator",","],
|
||||
["text"," "],
|
||||
["constant.numeric.integer.source.rust","3"],
|
||||
["text","])"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.source.rust","for"],
|
||||
["text"," v.each |&num| {"]
|
||||
],[
|
||||
"start",
|
||||
["text"," print(fmt"],
|
||||
["keyword.operator","!"],
|
||||
["text","("],
|
||||
["string.quoted.double.source.rust","\"%s says: '%d'"],
|
||||
["constant.character.escape.source.rust","\\n"],
|
||||
["string.quoted.double.source.rust","\""],
|
||||
["keyword.operator",","],
|
||||
["text"," name"],
|
||||
["keyword.operator",","],
|
||||
["text"," num "],
|
||||
["keyword.operator","+"],
|
||||
["text"," "],
|
||||
["constant.numeric.integer.source.rust","1"],
|
||||
["text","))"]
|
||||
],[
|
||||
"start",
|
||||
["text"," }"]
|
||||
],[
|
||||
"start",
|
||||
["text"," }"]
|
||||
],[
|
||||
"start",
|
||||
["text"," }"]
|
||||
],[
|
||||
"start",
|
||||
["text","}"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["keyword.source.rust","fn"],
|
||||
["meta.function.source.rust"," "],
|
||||
["entity.name.function.source.rust","map<T, U>"],
|
||||
["meta.function.source.rust","("],
|
||||
["text","vector: &[T]"],
|
||||
["keyword.operator",","],
|
||||
["text"," function: &fn(v: &T) "],
|
||||
["keyword.operator","->"],
|
||||
["text"," U) "],
|
||||
["keyword.operator","->"],
|
||||
["text"," ~[U] {"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.source.rust","let"],
|
||||
["text"," "],
|
||||
["keyword.source.rust","mut"],
|
||||
["text"," accumulator "],
|
||||
["keyword.operator","="],
|
||||
["text"," ~[]"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.source.rust","for"],
|
||||
["text"," "],
|
||||
["support.constant","vec::"],
|
||||
["text","each(vector) |element| {"]
|
||||
],[
|
||||
"start",
|
||||
["text"," accumulator.push(function(element))"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text"," }"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["keyword.source.rust","return"],
|
||||
["text"," accumulator"],
|
||||
["keyword.operator",";"]
|
||||
],[
|
||||
"start",
|
||||
["text","}"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
64
lib/ace/mode/actionscript.js
Normal file
64
lib/ace/mode/actionscript.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var ActionScriptHighlightRules = require("./actionscript_highlight_rules").ActionScriptHighlightRules;
|
||||
// TODO: pick appropriate fold mode
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new ActionScriptHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
141
lib/ace/mode/actionscript_highlight_rules.js
Normal file
141
lib/ace/mode/actionscript_highlight_rules.js
Normal file
File diff suppressed because one or more lines are too long
64
lib/ace/mode/autohotkey.js
Normal file
64
lib/ace/mode/autohotkey.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var AutoHotKeyHighlightRules = require("./autohotkey_highlight_rules").AutoHotKeyHighlightRules;
|
||||
// TODO: pick appropriate fold mode
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new AutoHotKeyHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "/\\*";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
107
lib/ace/mode/autohotkey_highlight_rules.js
Normal file
107
lib/ace/mode/autohotkey_highlight_rules.js
Normal file
File diff suppressed because one or more lines are too long
63
lib/ace/mode/batchfile.js
Normal file
63
lib/ace/mode/batchfile.js
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new BatchFileHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "::";
|
||||
this.blockComment = "";
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
96
lib/ace/mode/batchfile_highlight_rules.js
Normal file
96
lib/ace/mode/batchfile_highlight_rules.js
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* This file was autogenerated from C:\Users\LED\AppData\Roaming\Sublime Text 2\Packages\Batch File\Batch File.tmLanguage (uuid: ) */
|
||||
/****************************************************************************************
|
||||
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
|
||||
* fileTypes *
|
||||
****************************************************************************************/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var BatchFileHighlightRules = function() {
|
||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||
// regexps are ordered -> the first match is used
|
||||
|
||||
this.$rules = { start:
|
||||
[ { token: 'keyword.command.dosbatch',
|
||||
regex: '\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.control.statement.dosbatch',
|
||||
regex: '\\b(?:goto|call|exit)\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.control.conditional.if.dosbatch',
|
||||
regex: '\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.control.conditional.dosbatch',
|
||||
regex: '\\b(?:if|else)\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.control.repeat.dosbatch',
|
||||
regex: '\\bfor\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.operator.dosbatch',
|
||||
regex: '\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b' },
|
||||
{ token: ['doc.comment', 'comment'],
|
||||
regex: '(?:^|\\b)(rem)($|\\s.*$)',
|
||||
caseInsensitive: true },
|
||||
{ token: 'comment.line.colons.dosbatch',
|
||||
regex: '::.*$' },
|
||||
{ include: 'variable' },
|
||||
{ token: 'punctuation.definition.string.begin.shell',
|
||||
regex: '"',
|
||||
push: [
|
||||
{ token: 'punctuation.definition.string.end.shell', regex: '"', next: 'pop' },
|
||||
{ include: 'variable' },
|
||||
{ defaultToken: 'string.quoted.double.dosbatch' } ] },
|
||||
{ token: 'keyword.operator.pipe.dosbatch', regex: '[|]' },
|
||||
{ token: 'keyword.operator.redirect.shell',
|
||||
regex: '&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>' } ],
|
||||
variable: [
|
||||
{ token: 'constant.numeric', regex: '%%\\w+'},
|
||||
{ token: ['markup.list', 'constant.other', 'markup.list'],
|
||||
regex: '(%)(\\w+)(%?)' }]}
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
BatchFileHighlightRules.metaData = { name: 'Batch File',
|
||||
scopeName: 'source.dosbatch',
|
||||
fileTypes: [ 'bat' ] }
|
||||
|
||||
|
||||
oop.inherits(BatchFileHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.BatchFileHighlightRules = BatchFileHighlightRules;
|
||||
});
|
||||
|
|
@ -170,8 +170,8 @@ var ClojureHighlightRules = function() {
|
|||
regex : '"',
|
||||
next: "string"
|
||||
}, {
|
||||
token : "string", // symbol
|
||||
regex : /:[\w*+!\-_?:\/]+/
|
||||
token : "constant", // symbol
|
||||
regex : /:[^()\[\]{}'"\^%`,;\s]+/
|
||||
}, {
|
||||
token : "string.regexp", //Regular Expressions
|
||||
regex : '/#"(?:\\.|(?:\\\")|[^\""\n])*"/g'
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ define(function(require, exports, module) {
|
|||
regex : '"""',
|
||||
next : [
|
||||
{token : "string", regex : '"""', next : "start"},
|
||||
{token : "paren.string", regex : '#{', push : "start"},
|
||||
{token : "constant.language.escape", regex : stringEscape},
|
||||
{defaultToken: "string"}
|
||||
]
|
||||
|
|
@ -121,6 +122,7 @@ define(function(require, exports, module) {
|
|||
stateName: "qqstring",
|
||||
token : "string.start", regex : '"', next : [
|
||||
{token : "string.end", regex : '"', next : "start"},
|
||||
{token : "paren.string", regex : '#{', push : "start"},
|
||||
{token : "constant.language.escape", regex : stringEscape},
|
||||
{defaultToken: "string"}
|
||||
]
|
||||
|
|
@ -131,6 +133,21 @@ define(function(require, exports, module) {
|
|||
{token : "constant.language.escape", regex : stringEscape},
|
||||
{defaultToken: "string"}
|
||||
]
|
||||
}, {
|
||||
regex: "[{}]", onMatch: function(val, state, stack) {
|
||||
this.next = "";
|
||||
if (val == "{" && stack.length) {
|
||||
stack.unshift("start", state);
|
||||
return "paren";
|
||||
}
|
||||
if (val == "}" && stack.length) {
|
||||
stack.shift();
|
||||
this.next = stack.shift();
|
||||
if (this.next.indexOf("string") != -1)
|
||||
return "paren.string";
|
||||
}
|
||||
return "paren";
|
||||
}
|
||||
}, {
|
||||
token : "string.regex",
|
||||
regex : "///",
|
||||
|
|
|
|||
64
lib/ace/mode/erlang.js
Normal file
64
lib/ace/mode/erlang.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules;
|
||||
// TODO: pick appropriate fold mode
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new ErlangHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "%";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
876
lib/ace/mode/erlang_highlight_rules.js
Normal file
876
lib/ace/mode/erlang_highlight_rules.js
Normal file
|
|
@ -0,0 +1,876 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* This file was autogenerated from tm bundles\erlang.tmbundle\Syntaxes\Erlang.plist (uuid: ) */
|
||||
/****************************************************************************************
|
||||
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
|
||||
* fileTypes *
|
||||
****************************************************************************************/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var ErlangHighlightRules = function() {
|
||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||
// regexps are ordered -> the first match is used
|
||||
|
||||
this.$rules = { start:
|
||||
[ { include: '#module-directive' },
|
||||
{ include: '#import-export-directive' },
|
||||
{ include: '#behaviour-directive' },
|
||||
{ include: '#record-directive' },
|
||||
{ include: '#define-directive' },
|
||||
{ include: '#macro-directive' },
|
||||
{ include: '#directive' },
|
||||
{ include: '#function' },
|
||||
{ include: '#everything-else' } ],
|
||||
'#atom':
|
||||
[ { token: 'punctuation.definition.symbol.begin.erlang',
|
||||
regex: '\'',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.symbol.end.erlang',
|
||||
regex: '\'',
|
||||
next: 'pop' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.escape.erlang',
|
||||
'constant.other.symbol.escape.erlang',
|
||||
'punctuation.definition.escape.erlang',
|
||||
'constant.other.symbol.escape.erlang',
|
||||
'constant.other.symbol.escape.erlang' ],
|
||||
regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
|
||||
{ token: 'invalid.illegal.atom.erlang', regex: '\\\\\\^?.?' },
|
||||
{ defaultToken: 'constant.other.symbol.quoted.single.erlang' } ] },
|
||||
{ token: 'constant.other.symbol.unquoted.erlang',
|
||||
regex: '[a-z][a-zA-Z\\d@_]*' } ],
|
||||
'#behaviour-directive':
|
||||
[ { token:
|
||||
[ 'meta.directive.behaviour.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.behaviour.erlang',
|
||||
'keyword.control.directive.behaviour.erlang',
|
||||
'meta.directive.behaviour.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang',
|
||||
'meta.directive.behaviour.erlang',
|
||||
'entity.name.type.class.behaviour.definition.erlang',
|
||||
'meta.directive.behaviour.erlang',
|
||||
'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.behaviour.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ],
|
||||
'#binary':
|
||||
[ { token: 'punctuation.definition.binary.begin.erlang',
|
||||
regex: '<<',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.binary.end.erlang',
|
||||
regex: '>>',
|
||||
next: 'pop' },
|
||||
{ token:
|
||||
[ 'punctuation.separator.binary.erlang',
|
||||
'punctuation.separator.value-size.erlang' ],
|
||||
regex: '(,)|(:)' },
|
||||
{ include: '#internal-type-specifiers' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.structure.binary.erlang' } ] } ],
|
||||
'#character':
|
||||
[ { token:
|
||||
[ 'punctuation.definition.character.erlang',
|
||||
'punctuation.definition.escape.erlang',
|
||||
'constant.character.escape.erlang',
|
||||
'punctuation.definition.escape.erlang',
|
||||
'constant.character.escape.erlang',
|
||||
'constant.character.escape.erlang' ],
|
||||
regex: '(\\$)(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
|
||||
{ token: 'invalid.illegal.character.erlang',
|
||||
regex: '\\$\\\\\\^?.?' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.character.erlang',
|
||||
'constant.character.erlang' ],
|
||||
regex: '(\\$)(\\S)' },
|
||||
{ token: 'invalid.illegal.character.erlang', regex: '\\$.?' } ],
|
||||
'#comment':
|
||||
[ { token: 'punctuation.definition.comment.erlang',
|
||||
regex: '%.*$',
|
||||
push_:
|
||||
[ { token: 'comment.line.percentage.erlang',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.percentage.erlang' } ] } ],
|
||||
'#define-directive':
|
||||
[ { token:
|
||||
[ 'meta.directive.define.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.define.erlang',
|
||||
'keyword.control.directive.define.erlang',
|
||||
'meta.directive.define.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang',
|
||||
'meta.directive.define.erlang',
|
||||
'entity.name.function.macro.definition.erlang',
|
||||
'meta.directive.define.erlang',
|
||||
'punctuation.separator.parameters.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)',
|
||||
push:
|
||||
[ { token:
|
||||
[ 'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.define.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '(\\))(\\s*)(\\.)',
|
||||
next: 'pop' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.directive.define.erlang' } ] },
|
||||
{ token: 'meta.directive.define.erlang',
|
||||
regex: '(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()',
|
||||
push:
|
||||
[ { token:
|
||||
[ 'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.define.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '(\\))(\\s*)(\\.)',
|
||||
next: 'pop' },
|
||||
{ token:
|
||||
[ 'text',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'text',
|
||||
'keyword.control.directive.define.erlang',
|
||||
'text',
|
||||
'punctuation.definition.parameters.begin.erlang',
|
||||
'text',
|
||||
'entity.name.function.macro.definition.erlang',
|
||||
'text',
|
||||
'punctuation.definition.parameters.begin.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()',
|
||||
push:
|
||||
[ { token:
|
||||
[ 'punctuation.definition.parameters.end.erlang',
|
||||
'text',
|
||||
'punctuation.separator.parameters.erlang' ],
|
||||
regex: '(\\))(\\s*)(,)',
|
||||
next: 'pop' },
|
||||
{ token: 'punctuation.separator.parameters.erlang', regex: ',' },
|
||||
{ include: '#everything-else' } ] },
|
||||
{ token: 'punctuation.separator.define.erlang',
|
||||
regex: '\\|\\||\\||:|;|,|\\.|->' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.directive.define.erlang' } ] } ],
|
||||
'#directive':
|
||||
[ { token:
|
||||
[ 'meta.directive.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.erlang',
|
||||
'keyword.control.directive.erlang',
|
||||
'meta.directive.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)',
|
||||
push:
|
||||
[ { token:
|
||||
[ 'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '(\\)?)(\\s*)(\\.)',
|
||||
next: 'pop' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.directive.erlang' } ] },
|
||||
{ token:
|
||||
[ 'meta.directive.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.erlang',
|
||||
'keyword.control.directive.erlang',
|
||||
'meta.directive.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)' } ],
|
||||
'#everything-else':
|
||||
[ { include: '#comment' },
|
||||
{ include: '#record-usage' },
|
||||
{ include: '#macro-usage' },
|
||||
{ include: '#expression' },
|
||||
{ include: '#keyword' },
|
||||
{ include: '#textual-operator' },
|
||||
{ include: '#function-call' },
|
||||
{ include: '#tuple' },
|
||||
{ include: '#list' },
|
||||
{ include: '#binary' },
|
||||
{ include: '#parenthesized-expression' },
|
||||
{ include: '#character' },
|
||||
{ include: '#number' },
|
||||
{ include: '#atom' },
|
||||
{ include: '#string' },
|
||||
{ include: '#symbolic-operator' },
|
||||
{ include: '#variable' } ],
|
||||
'#expression':
|
||||
[ { token: 'keyword.control.if.erlang',
|
||||
regex: '\\bif\\b',
|
||||
push:
|
||||
[ { token: 'keyword.control.end.erlang',
|
||||
regex: '\\bend\\b',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-expression-punctuation' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.expression.if.erlang' } ] },
|
||||
{ token: 'keyword.control.case.erlang',
|
||||
regex: '\\bcase\\b',
|
||||
push:
|
||||
[ { token: 'keyword.control.end.erlang',
|
||||
regex: '\\bend\\b',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-expression-punctuation' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.expression.case.erlang' } ] },
|
||||
{ token: 'keyword.control.receive.erlang',
|
||||
regex: '\\breceive\\b',
|
||||
push:
|
||||
[ { token: 'keyword.control.end.erlang',
|
||||
regex: '\\bend\\b',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-expression-punctuation' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.expression.receive.erlang' } ] },
|
||||
{ token:
|
||||
[ 'keyword.control.fun.erlang',
|
||||
'text',
|
||||
'entity.name.type.class.module.erlang',
|
||||
'text',
|
||||
'punctuation.separator.module-function.erlang',
|
||||
'text',
|
||||
'entity.name.function.erlang',
|
||||
'text',
|
||||
'punctuation.separator.function-arity.erlang' ],
|
||||
regex: '\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)' },
|
||||
{ token: 'keyword.control.fun.erlang',
|
||||
regex: '\\bfun\\b',
|
||||
push:
|
||||
[ { token: 'keyword.control.end.erlang',
|
||||
regex: '\\bend\\b',
|
||||
next: 'pop' },
|
||||
{ token: 'text',
|
||||
regex: '(?=\\()',
|
||||
push:
|
||||
[ { token: 'punctuation.separator.clauses.erlang',
|
||||
regex: ';|(?=\\bend\\b)',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-function-parts' } ] },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.expression.fun.erlang' } ] },
|
||||
{ token: 'keyword.control.try.erlang',
|
||||
regex: '\\btry\\b',
|
||||
push:
|
||||
[ { token: 'keyword.control.end.erlang',
|
||||
regex: '\\bend\\b',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-expression-punctuation' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.expression.try.erlang' } ] },
|
||||
{ token: 'keyword.control.begin.erlang',
|
||||
regex: '\\bbegin\\b',
|
||||
push:
|
||||
[ { token: 'keyword.control.end.erlang',
|
||||
regex: '\\bend\\b',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-expression-punctuation' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.expression.begin.erlang' } ] },
|
||||
{ token: 'keyword.control.query.erlang',
|
||||
regex: '\\bquery\\b',
|
||||
push:
|
||||
[ { token: 'keyword.control.end.erlang',
|
||||
regex: '\\bend\\b',
|
||||
next: 'pop' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.expression.query.erlang' } ] } ],
|
||||
'#function':
|
||||
[ { token:
|
||||
[ 'meta.function.erlang',
|
||||
'entity.name.function.definition.erlang',
|
||||
'meta.function.erlang' ],
|
||||
regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()',
|
||||
push:
|
||||
[ { token: 'punctuation.terminator.function.erlang',
|
||||
regex: '\\.',
|
||||
next: 'pop' },
|
||||
{ token: [ 'text', 'entity.name.function.erlang', 'text' ],
|
||||
regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()' },
|
||||
{ token: 'text',
|
||||
regex: '(?=\\()',
|
||||
push:
|
||||
[ { token: 'punctuation.separator.clauses.erlang',
|
||||
regex: ';|(?=\\.)',
|
||||
next: 'pop' },
|
||||
{ include: '#parenthesized-expression' },
|
||||
{ include: '#internal-function-parts' } ] },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.function.erlang' } ] } ],
|
||||
'#function-call':
|
||||
[ { token: 'meta.function-call.erlang',
|
||||
regex: '(?=(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*\\())',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.parameters.end.erlang',
|
||||
regex: '\\)',
|
||||
next: 'pop' },
|
||||
{ token:
|
||||
[ 'entity.name.type.class.module.erlang',
|
||||
'text',
|
||||
'punctuation.separator.module-function.erlang',
|
||||
'text',
|
||||
'entity.name.function.guard.erlang',
|
||||
'text',
|
||||
'punctuation.definition.parameters.begin.erlang' ],
|
||||
regex: '(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()',
|
||||
push:
|
||||
[ { token: 'text', regex: '(?=\\))', next: 'pop' },
|
||||
{ token: 'punctuation.separator.parameters.erlang', regex: ',' },
|
||||
{ include: '#everything-else' } ] },
|
||||
{ token:
|
||||
[ 'entity.name.type.class.module.erlang',
|
||||
'text',
|
||||
'punctuation.separator.module-function.erlang',
|
||||
'text',
|
||||
'entity.name.function.erlang',
|
||||
'text',
|
||||
'punctuation.definition.parameters.begin.erlang' ],
|
||||
regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\()',
|
||||
push:
|
||||
[ { token: 'text', regex: '(?=\\))', next: 'pop' },
|
||||
{ token: 'punctuation.separator.parameters.erlang', regex: ',' },
|
||||
{ include: '#everything-else' } ] },
|
||||
{ defaultToken: 'meta.function-call.erlang' } ] } ],
|
||||
'#import-export-directive':
|
||||
[ { token:
|
||||
[ 'meta.directive.import.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.import.erlang',
|
||||
'keyword.control.directive.import.erlang',
|
||||
'meta.directive.import.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang',
|
||||
'meta.directive.import.erlang',
|
||||
'entity.name.type.class.module.erlang',
|
||||
'meta.directive.import.erlang',
|
||||
'punctuation.separator.parameters.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)',
|
||||
push:
|
||||
[ { token:
|
||||
[ 'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.import.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '(\\))(\\s*)(\\.)',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-function-list' },
|
||||
{ defaultToken: 'meta.directive.import.erlang' } ] },
|
||||
{ token:
|
||||
[ 'meta.directive.export.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.export.erlang',
|
||||
'keyword.control.directive.export.erlang',
|
||||
'meta.directive.export.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(export)(\\s*)(\\()',
|
||||
push:
|
||||
[ { token:
|
||||
[ 'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.export.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '(\\))(\\s*)(\\.)',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-function-list' },
|
||||
{ defaultToken: 'meta.directive.export.erlang' } ] } ],
|
||||
'#internal-expression-punctuation':
|
||||
[ { token:
|
||||
[ 'punctuation.separator.clause-head-body.erlang',
|
||||
'punctuation.separator.clauses.erlang',
|
||||
'punctuation.separator.expressions.erlang' ],
|
||||
regex: '(->)|(;)|(,)' } ],
|
||||
'#internal-function-list':
|
||||
[ { token: 'punctuation.definition.list.begin.erlang',
|
||||
regex: '\\[',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.list.end.erlang',
|
||||
regex: '\\]',
|
||||
next: 'pop' },
|
||||
{ token:
|
||||
[ 'entity.name.function.erlang',
|
||||
'text',
|
||||
'punctuation.separator.function-arity.erlang' ],
|
||||
regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(/)',
|
||||
push:
|
||||
[ { token: 'punctuation.separator.list.erlang',
|
||||
regex: ',|(?=\\])',
|
||||
next: 'pop' },
|
||||
{ include: '#everything-else' } ] },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.structure.list.function.erlang' } ] } ],
|
||||
'#internal-function-parts':
|
||||
[ { token: 'text',
|
||||
regex: '(?=\\()',
|
||||
push:
|
||||
[ { token: 'punctuation.separator.clause-head-body.erlang',
|
||||
regex: '->',
|
||||
next: 'pop' },
|
||||
{ token: 'punctuation.definition.parameters.begin.erlang',
|
||||
regex: '\\(',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.parameters.end.erlang',
|
||||
regex: '\\)',
|
||||
next: 'pop' },
|
||||
{ token: 'punctuation.separator.parameters.erlang', regex: ',' },
|
||||
{ include: '#everything-else' } ] },
|
||||
{ token: 'punctuation.separator.guards.erlang', regex: ',|;' },
|
||||
{ include: '#everything-else' } ] },
|
||||
{ token: 'punctuation.separator.expressions.erlang',
|
||||
regex: ',' },
|
||||
{ include: '#everything-else' } ],
|
||||
'#internal-record-body':
|
||||
[ { token: 'punctuation.definition.class.record.begin.erlang',
|
||||
regex: '\\{',
|
||||
push:
|
||||
[ { token: 'meta.structure.record.erlang',
|
||||
regex: '(?=\\})',
|
||||
next: 'pop' },
|
||||
{ token:
|
||||
[ 'variable.other.field.erlang',
|
||||
'variable.language.omitted.field.erlang',
|
||||
'text',
|
||||
'keyword.operator.assignment.erlang' ],
|
||||
regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')|(_))(\\s*)(=|::)',
|
||||
push:
|
||||
[ { token: 'punctuation.separator.class.record.erlang',
|
||||
regex: ',|(?=\\})',
|
||||
next: 'pop' },
|
||||
{ include: '#everything-else' } ] },
|
||||
{ token:
|
||||
[ 'variable.other.field.erlang',
|
||||
'text',
|
||||
'punctuation.separator.class.record.erlang' ],
|
||||
regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)((?:,)?)' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.structure.record.erlang' } ] } ],
|
||||
'#internal-type-specifiers':
|
||||
[ { token: 'punctuation.separator.value-type.erlang',
|
||||
regex: '/',
|
||||
push:
|
||||
[ { token: 'text', regex: '(?=,|:|>>)', next: 'pop' },
|
||||
{ token:
|
||||
[ 'storage.type.erlang',
|
||||
'storage.modifier.signedness.erlang',
|
||||
'storage.modifier.endianness.erlang',
|
||||
'storage.modifier.unit.erlang',
|
||||
'punctuation.separator.type-specifiers.erlang' ],
|
||||
regex: '(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)' } ] } ],
|
||||
'#keyword':
|
||||
[ { token: 'keyword.control.erlang',
|
||||
regex: '\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b' } ],
|
||||
'#list':
|
||||
[ { token: 'punctuation.definition.list.begin.erlang',
|
||||
regex: '\\[',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.list.end.erlang',
|
||||
regex: '\\]',
|
||||
next: 'pop' },
|
||||
{ token: 'punctuation.separator.list.erlang',
|
||||
regex: '\\||\\|\\||,' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.structure.list.erlang' } ] } ],
|
||||
'#macro-directive':
|
||||
[ { token:
|
||||
[ 'meta.directive.ifdef.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.ifdef.erlang',
|
||||
'keyword.control.directive.ifdef.erlang',
|
||||
'meta.directive.ifdef.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang',
|
||||
'meta.directive.ifdef.erlang',
|
||||
'entity.name.function.macro.erlang',
|
||||
'meta.directive.ifdef.erlang',
|
||||
'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.ifdef.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' },
|
||||
{ token:
|
||||
[ 'meta.directive.ifndef.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.ifndef.erlang',
|
||||
'keyword.control.directive.ifndef.erlang',
|
||||
'meta.directive.ifndef.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang',
|
||||
'meta.directive.ifndef.erlang',
|
||||
'entity.name.function.macro.erlang',
|
||||
'meta.directive.ifndef.erlang',
|
||||
'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.ifndef.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' },
|
||||
{ token:
|
||||
[ 'meta.directive.undef.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.undef.erlang',
|
||||
'keyword.control.directive.undef.erlang',
|
||||
'meta.directive.undef.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang',
|
||||
'meta.directive.undef.erlang',
|
||||
'entity.name.function.macro.erlang',
|
||||
'meta.directive.undef.erlang',
|
||||
'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.undef.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' } ],
|
||||
'#macro-usage':
|
||||
[ { token:
|
||||
[ 'keyword.operator.macro.erlang',
|
||||
'meta.macro-usage.erlang',
|
||||
'entity.name.function.macro.erlang' ],
|
||||
regex: '(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)' } ],
|
||||
'#module-directive':
|
||||
[ { token:
|
||||
[ 'meta.directive.module.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.module.erlang',
|
||||
'keyword.control.directive.module.erlang',
|
||||
'meta.directive.module.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang',
|
||||
'meta.directive.module.erlang',
|
||||
'entity.name.type.class.module.definition.erlang',
|
||||
'meta.directive.module.erlang',
|
||||
'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.module.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ],
|
||||
'#number':
|
||||
[ { token: 'text',
|
||||
regex: '(?=\\d)',
|
||||
push:
|
||||
[ { token: 'text', regex: '(?!\\d)', next: 'pop' },
|
||||
{ token:
|
||||
[ 'constant.numeric.float.erlang',
|
||||
'punctuation.separator.integer-float.erlang',
|
||||
'constant.numeric.float.erlang',
|
||||
'punctuation.separator.float-exponent.erlang' ],
|
||||
regex: '(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.binary.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.binary.erlang' ],
|
||||
regex: '(2)(#)([0-1]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-3.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-3.erlang' ],
|
||||
regex: '(3)(#)([0-2]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-4.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-4.erlang' ],
|
||||
regex: '(4)(#)([0-3]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-5.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-5.erlang' ],
|
||||
regex: '(5)(#)([0-4]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-6.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-6.erlang' ],
|
||||
regex: '(6)(#)([0-5]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-7.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-7.erlang' ],
|
||||
regex: '(7)(#)([0-6]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.octal.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.octal.erlang' ],
|
||||
regex: '(8)(#)([0-7]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-9.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-9.erlang' ],
|
||||
regex: '(9)(#)([0-8]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.decimal.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.decimal.erlang' ],
|
||||
regex: '(10)(#)(\\d+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-11.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-11.erlang' ],
|
||||
regex: '(11)(#)([\\daA]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-12.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-12.erlang' ],
|
||||
regex: '(12)(#)([\\da-bA-B]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-13.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-13.erlang' ],
|
||||
regex: '(13)(#)([\\da-cA-C]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-14.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-14.erlang' ],
|
||||
regex: '(14)(#)([\\da-dA-D]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-15.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-15.erlang' ],
|
||||
regex: '(15)(#)([\\da-eA-E]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.hexadecimal.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.hexadecimal.erlang' ],
|
||||
regex: '(16)(#)([\\da-fA-F]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-17.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-17.erlang' ],
|
||||
regex: '(17)(#)([\\da-gA-G]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-18.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-18.erlang' ],
|
||||
regex: '(18)(#)([\\da-hA-H]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-19.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-19.erlang' ],
|
||||
regex: '(19)(#)([\\da-iA-I]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-20.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-20.erlang' ],
|
||||
regex: '(20)(#)([\\da-jA-J]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-21.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-21.erlang' ],
|
||||
regex: '(21)(#)([\\da-kA-K]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-22.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-22.erlang' ],
|
||||
regex: '(22)(#)([\\da-lA-L]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-23.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-23.erlang' ],
|
||||
regex: '(23)(#)([\\da-mA-M]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-24.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-24.erlang' ],
|
||||
regex: '(24)(#)([\\da-nA-N]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-25.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-25.erlang' ],
|
||||
regex: '(25)(#)([\\da-oA-O]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-26.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-26.erlang' ],
|
||||
regex: '(26)(#)([\\da-pA-P]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-27.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-27.erlang' ],
|
||||
regex: '(27)(#)([\\da-qA-Q]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-28.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-28.erlang' ],
|
||||
regex: '(28)(#)([\\da-rA-R]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-29.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-29.erlang' ],
|
||||
regex: '(29)(#)([\\da-sA-S]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-30.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-30.erlang' ],
|
||||
regex: '(30)(#)([\\da-tA-T]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-31.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-31.erlang' ],
|
||||
regex: '(31)(#)([\\da-uA-U]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-32.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-32.erlang' ],
|
||||
regex: '(32)(#)([\\da-vA-V]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-33.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-33.erlang' ],
|
||||
regex: '(33)(#)([\\da-wA-W]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-34.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-34.erlang' ],
|
||||
regex: '(34)(#)([\\da-xA-X]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-35.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-35.erlang' ],
|
||||
regex: '(35)(#)([\\da-yA-Y]+)' },
|
||||
{ token:
|
||||
[ 'constant.numeric.integer.base-36.erlang',
|
||||
'punctuation.separator.base-integer.erlang',
|
||||
'constant.numeric.integer.base-36.erlang' ],
|
||||
regex: '(36)(#)([\\da-zA-Z]+)' },
|
||||
{ token: 'invalid.illegal.integer.erlang',
|
||||
regex: '\\d+#[\\da-zA-Z]+' },
|
||||
{ token: 'constant.numeric.integer.decimal.erlang',
|
||||
regex: '\\d+' } ] } ],
|
||||
'#parenthesized-expression':
|
||||
[ { token: 'punctuation.section.expression.begin.erlang',
|
||||
regex: '\\(',
|
||||
push:
|
||||
[ { token: 'punctuation.section.expression.end.erlang',
|
||||
regex: '\\)',
|
||||
next: 'pop' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.expression.parenthesized' } ] } ],
|
||||
'#record-directive':
|
||||
[ { token:
|
||||
[ 'meta.directive.record.erlang',
|
||||
'punctuation.section.directive.begin.erlang',
|
||||
'meta.directive.record.erlang',
|
||||
'keyword.control.directive.import.erlang',
|
||||
'meta.directive.record.erlang',
|
||||
'punctuation.definition.parameters.begin.erlang',
|
||||
'meta.directive.record.erlang',
|
||||
'entity.name.type.class.record.definition.erlang',
|
||||
'meta.directive.record.erlang',
|
||||
'punctuation.separator.parameters.erlang' ],
|
||||
regex: '^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)',
|
||||
push:
|
||||
[ { token:
|
||||
[ 'punctuation.definition.class.record.end.erlang',
|
||||
'meta.directive.record.erlang',
|
||||
'punctuation.definition.parameters.end.erlang',
|
||||
'meta.directive.record.erlang',
|
||||
'punctuation.section.directive.end.erlang' ],
|
||||
regex: '(\\})(\\s*)(\\))(\\s*)(\\.)',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-record-body' },
|
||||
{ defaultToken: 'meta.directive.record.erlang' } ] } ],
|
||||
'#record-usage':
|
||||
[ { token:
|
||||
[ 'keyword.operator.record.erlang',
|
||||
'meta.record-usage.erlang',
|
||||
'entity.name.type.class.record.erlang',
|
||||
'meta.record-usage.erlang',
|
||||
'punctuation.separator.record-field.erlang',
|
||||
'meta.record-usage.erlang',
|
||||
'variable.other.field.erlang' ],
|
||||
regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')' },
|
||||
{ token:
|
||||
[ 'keyword.operator.record.erlang',
|
||||
'meta.record-usage.erlang',
|
||||
'entity.name.type.class.record.erlang' ],
|
||||
regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.class.record.end.erlang',
|
||||
regex: '\\}',
|
||||
next: 'pop' },
|
||||
{ include: '#internal-record-body' },
|
||||
{ defaultToken: 'meta.record-usage.erlang' } ] } ],
|
||||
'#string':
|
||||
[ { token: 'punctuation.definition.string.begin.erlang',
|
||||
regex: '"',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.erlang',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.escape.erlang',
|
||||
'constant.character.escape.erlang',
|
||||
'punctuation.definition.escape.erlang',
|
||||
'constant.character.escape.erlang',
|
||||
'constant.character.escape.erlang' ],
|
||||
regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
|
||||
{ token: 'invalid.illegal.string.erlang', regex: '\\\\\\^?.?' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.placeholder.erlang',
|
||||
'punctuation.separator.placeholder-parts.erlang',
|
||||
'constant.other.placeholder.erlang',
|
||||
'punctuation.separator.placeholder-parts.erlang',
|
||||
'punctuation.separator.placeholder-parts.erlang',
|
||||
'constant.other.placeholder.erlang',
|
||||
'punctuation.separator.placeholder-parts.erlang',
|
||||
'punctuation.separator.placeholder-parts.erlang',
|
||||
'punctuation.separator.placeholder-parts.erlang',
|
||||
'constant.other.placeholder.erlang',
|
||||
'constant.other.placeholder.erlang' ],
|
||||
regex: '(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.placeholder.erlang',
|
||||
'punctuation.separator.placeholder-parts.erlang',
|
||||
'constant.other.placeholder.erlang',
|
||||
'constant.other.placeholder.erlang' ],
|
||||
regex: '(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])' },
|
||||
{ token: 'invalid.illegal.string.erlang', regex: '~.?' },
|
||||
{ defaultToken: 'string.quoted.double.erlang' } ] } ],
|
||||
'#symbolic-operator':
|
||||
[ { token: 'keyword.operator.symbolic.erlang',
|
||||
regex: '\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::' } ],
|
||||
'#textual-operator':
|
||||
[ { token: 'keyword.operator.textual.erlang',
|
||||
regex: '\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b' } ],
|
||||
'#tuple':
|
||||
[ { token: 'punctuation.definition.tuple.begin.erlang',
|
||||
regex: '\\{',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.tuple.end.erlang',
|
||||
regex: '\\}',
|
||||
next: 'pop' },
|
||||
{ token: 'punctuation.separator.tuple.erlang', regex: ',' },
|
||||
{ include: '#everything-else' },
|
||||
{ defaultToken: 'meta.structure.tuple.erlang' } ] } ],
|
||||
'#variable':
|
||||
[ { token: [ 'variable.other.erlang', 'variable.language.omitted.erlang' ],
|
||||
regex: '(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)' } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
ErlangHighlightRules.metaData = { comment: 'The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp',
|
||||
fileTypes: [ 'erl', 'hrl' ],
|
||||
keyEquivalent: '^~E',
|
||||
name: 'Erlang',
|
||||
scopeName: 'source.erlang' }
|
||||
|
||||
|
||||
oop.inherits(ErlangHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ErlangHighlightRules = ErlangHighlightRules;
|
||||
});
|
||||
64
lib/ace/mode/forth.js
Normal file
64
lib/ace/mode/forth.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var ForthHighlightRules = require("./forth_highlight_rules").ForthHighlightRules;
|
||||
// TODO: pick appropriate fold mode
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new ForthHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "(?<=^|\\s)\\.?\\( [^)]*\\)";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
164
lib/ace/mode/forth_highlight_rules.js
Normal file
164
lib/ace/mode/forth_highlight_rules.js
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* This file was autogenerated from https://raw.github.com/vze26m98/Forth.tmbundle/master/Syntaxes/Forth.tmLanguage (uuid: ) */
|
||||
/****************************************************************************************
|
||||
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
|
||||
* fileTypes *
|
||||
****************************************************************************************/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var ForthHighlightRules = function() {
|
||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||
// regexps are ordered -> the first match is used
|
||||
|
||||
this.$rules = { start: [ { include: '#forth' } ],
|
||||
'#comment':
|
||||
[ { token: 'comment.line.double-dash.forth',
|
||||
regex: '(?:^|\\s)--\\s.*$',
|
||||
comment: 'line comments for iForth' },
|
||||
{ token: 'comment.line.backslash.forth',
|
||||
regex: '(?:^|\\s)\\\\[\\s\\S]*$',
|
||||
comment: 'ANSI line comment' },
|
||||
{ token: 'comment.line.backslash-g.forth',
|
||||
regex: '(?:^|\\s)\\\\[Gg] .*$',
|
||||
comment: 'gForth line comment' },
|
||||
{ token: 'comment.block.forth',
|
||||
regex: '(?:^|\\s)\\(\\*(?=\\s|$)',
|
||||
push:
|
||||
[ { token: 'comment.block.forth',
|
||||
regex: '(?:^|\\s)\\*\\)(?=\\s|$)',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.block.forth' } ],
|
||||
comment: 'multiline comments for iForth' },
|
||||
{ token: 'comment.block.documentation.forth',
|
||||
regex: '\\bDOC\\b',
|
||||
caseInsensitive: true,
|
||||
push:
|
||||
[ { token: 'comment.block.documentation.forth',
|
||||
regex: '\\bENDDOC\\b',
|
||||
caseInsensitive: true,
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.block.documentation.forth' } ],
|
||||
comment: 'documentation comments for iForth' },
|
||||
{ token: 'comment.line.parentheses.forth',
|
||||
regex: '(?:^|\\s)\\.?\\( [^)]*\\)',
|
||||
comment: 'ANSI line comment' } ],
|
||||
'#constant':
|
||||
[ { token: 'constant.language.forth',
|
||||
regex: '(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)',
|
||||
caseInsensitive: true},
|
||||
{ token: 'constant.numeric.forth',
|
||||
regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)'},
|
||||
{ token: 'constant.character.forth',
|
||||
regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)'}],
|
||||
'#forth':
|
||||
[ { include: '#constant' },
|
||||
{ include: '#comment' },
|
||||
{ include: '#string' },
|
||||
{ include: '#word' },
|
||||
{ include: '#variable' },
|
||||
{ include: '#storage' },
|
||||
{ include: '#word-def' } ],
|
||||
'#storage':
|
||||
[ { token: 'storage.type.forth',
|
||||
regex: '(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)',
|
||||
caseInsensitive: true}],
|
||||
'#string':
|
||||
[ { token: 'string.quoted.double.forth',
|
||||
regex: '(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',
|
||||
caseInsensitive: true},
|
||||
{ token: 'string.unquoted.forth',
|
||||
regex: '(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)',
|
||||
caseInsensitive: true}],
|
||||
'#variable':
|
||||
[ { token: 'variable.language.forth',
|
||||
regex: '\\b(?:I|J)\\b',
|
||||
caseInsensitive: true } ],
|
||||
'#word':
|
||||
[ { token: 'keyword.control.immediate.forth',
|
||||
regex: '(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)',
|
||||
caseInsensitive: true},
|
||||
{ token: 'keyword.other.immediate.forth',
|
||||
regex: '(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT\'S|])(?=\\s|$)',
|
||||
caseInsensitive: true},
|
||||
{ token: 'keyword.control.compile-only.forth',
|
||||
regex: '(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)',
|
||||
caseInsensitive: true},
|
||||
{ token: 'keyword.other.compile-only.forth',
|
||||
regex: '(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\[\'\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]|<COMPILATION|<INTERPRETATION|ASSERT\\(|ASSERT0\\(|ASSERT1\\(|ASSERT2\\(|ASSERT3\\(|COMPILATION>|DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)',
|
||||
caseInsensitive: true},
|
||||
{ token: 'keyword.other.non-immediate.forth',
|
||||
regex: '(?:^|\\s)(?:\'|<IS>|<TO>|CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)',
|
||||
caseInsensitive: true},
|
||||
{ token: 'keyword.other.warning.forth',
|
||||
regex: '(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',
|
||||
caseInsensitive: true}],
|
||||
'#word-def':
|
||||
[ { token:
|
||||
[ 'keyword.other.compile-only.forth',
|
||||
'keyword.other.compile-only.forth',
|
||||
'meta.block.forth',
|
||||
'entity.name.function.forth' ],
|
||||
regex: '(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)',
|
||||
caseInsensitive: true,
|
||||
push:
|
||||
[ { token: 'keyword.other.compile-only.forth',
|
||||
regex: ';(?:CODE)?',
|
||||
caseInsensitive: true,
|
||||
next: 'pop' },
|
||||
{ include: '#constant' },
|
||||
{ include: '#comment' },
|
||||
{ include: '#string' },
|
||||
{ include: '#word' },
|
||||
{ include: '#variable' },
|
||||
{ include: '#storage' },
|
||||
{ defaultToken: 'meta.block.forth' } ] } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
ForthHighlightRules.metaData = { fileTypes: [ 'frt', 'fs', 'ldr' ],
|
||||
foldingStartMarker: '/\\*\\*|\\{\\s*$',
|
||||
foldingStopMarker: '\\*\\*/|^\\s*\\}',
|
||||
keyEquivalent: '^~F',
|
||||
name: 'Forth',
|
||||
scopeName: 'source.forth' }
|
||||
|
||||
|
||||
oop.inherits(ForthHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ForthHighlightRules = ForthHighlightRules;
|
||||
});
|
||||
64
lib/ace/mode/haskell.js
Normal file
64
lib/ace/mode/haskell.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var HaskellHighlightRules = require("./haskell_highlight_rules").HaskellHighlightRules;
|
||||
// TODO: pick appropriate fold mode
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new HaskellHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "--";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
246
lib/ace/mode/haskell_highlight_rules.js
Normal file
246
lib/ace/mode/haskell_highlight_rules.js
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* This file was autogenerated from tm bundles\haskell.tmbundle\Syntaxes\Haskell.plist (uuid: ) */
|
||||
/****************************************************************************************
|
||||
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
|
||||
* fileTypes *
|
||||
****************************************************************************************/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var HaskellHighlightRules = function() {
|
||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||
// regexps are ordered -> the first match is used
|
||||
|
||||
this.$rules = { start:
|
||||
[ { token:
|
||||
[ 'punctuation.definition.entity.haskell',
|
||||
'keyword.operator.function.infix.haskell',
|
||||
'punctuation.definition.entity.haskell' ],
|
||||
regex: '(`)([a-zA-Z_\']*?)(`)',
|
||||
comment: 'In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]).' },
|
||||
{ token: 'constant.language.unit.haskell', regex: '\\(\\)' },
|
||||
{ token: 'constant.language.empty-list.haskell',
|
||||
regex: '\\[\\]' },
|
||||
{ token: 'keyword.other.haskell',
|
||||
regex: 'module',
|
||||
push:
|
||||
[ { token: 'keyword.other.haskell', regex: 'where', next: 'pop' },
|
||||
{ include: '#module_name' },
|
||||
{ include: '#module_exports' },
|
||||
{ token: 'invalid', regex: '[a-z]+' },
|
||||
{ defaultToken: 'meta.declaration.module.haskell' } ] },
|
||||
{ token: 'keyword.other.haskell',
|
||||
regex: '\\bclass\\b',
|
||||
push:
|
||||
[ { token: 'keyword.other.haskell',
|
||||
regex: '\\bwhere\\b',
|
||||
next: 'pop' },
|
||||
{ token: 'support.class.prelude.haskell',
|
||||
regex: '\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b' },
|
||||
{ token: 'entity.other.inherited-class.haskell',
|
||||
regex: '[A-Z][A-Za-z_\']*' },
|
||||
{ token: 'variable.other.generic-type.haskell',
|
||||
regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' },
|
||||
{ defaultToken: 'meta.declaration.class.haskell' } ] },
|
||||
{ token: 'keyword.other.haskell',
|
||||
regex: '\\binstance\\b',
|
||||
push:
|
||||
[ { token: 'keyword.other.haskell',
|
||||
regex: '\\bwhere\\b|$',
|
||||
next: 'pop' },
|
||||
{ include: '#type_signature' },
|
||||
{ defaultToken: 'meta.declaration.instance.haskell' } ] },
|
||||
{ token: 'keyword.other.haskell',
|
||||
regex: 'import',
|
||||
push:
|
||||
[ { token: 'meta.import.haskell', regex: '$|;', next: 'pop' },
|
||||
{ token: 'keyword.other.haskell', regex: 'qualified|as|hiding' },
|
||||
{ include: '#module_name' },
|
||||
{ include: '#module_exports' },
|
||||
{ defaultToken: 'meta.import.haskell' } ] },
|
||||
{ token: [ 'keyword.other.haskell', 'meta.deriving.haskell' ],
|
||||
regex: '(deriving)(\\s*\\()',
|
||||
push:
|
||||
[ { token: 'meta.deriving.haskell', regex: '\\)', next: 'pop' },
|
||||
{ token: 'entity.other.inherited-class.haskell',
|
||||
regex: '\\b[A-Z][a-zA-Z_\']*' },
|
||||
{ defaultToken: 'meta.deriving.haskell' } ] },
|
||||
{ token: 'keyword.other.haskell',
|
||||
regex: '\\b(?:deriving|where|data|type|case|of|let|in|newtype|default)\\b' },
|
||||
{ token: 'keyword.operator.haskell', regex: '\\binfix[lr]?\\b' },
|
||||
{ token: 'keyword.control.haskell',
|
||||
regex: '\\b(?:do|if|then|else)\\b' },
|
||||
{ token: 'constant.numeric.float.haskell',
|
||||
regex: '\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b',
|
||||
comment: 'Floats are always decimal' },
|
||||
{ token: 'constant.numeric.haskell',
|
||||
regex: '\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b' },
|
||||
{ token:
|
||||
[ 'meta.preprocessor.c',
|
||||
'punctuation.definition.preprocessor.c',
|
||||
'meta.preprocessor.c' ],
|
||||
regex: '^(\\s*)(#)(\\s*\\w+)',
|
||||
comment: 'In addition to Haskell\'s "native" syntax, GHC permits the C preprocessor to be run on a source file.' },
|
||||
{ include: '#pragma' },
|
||||
{ token: 'punctuation.definition.string.begin.haskell',
|
||||
regex: '"',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.haskell',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
{ token: 'constant.character.escape.haskell',
|
||||
regex: '\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&])' },
|
||||
{ token: 'constant.character.escape.octal.haskell',
|
||||
regex: '\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+' },
|
||||
{ token: 'constant.character.escape.control.haskell',
|
||||
regex: '\\^[A-Z@\\[\\]\\\\\\^_]' },
|
||||
{ defaultToken: 'string.quoted.double.haskell' } ] },
|
||||
{ token:
|
||||
[ 'punctuation.definition.string.begin.haskell',
|
||||
'string.quoted.single.haskell',
|
||||
'constant.character.escape.haskell',
|
||||
'constant.character.escape.octal.haskell',
|
||||
'constant.character.escape.hexadecimal.haskell',
|
||||
'constant.character.escape.control.haskell',
|
||||
'punctuation.definition.string.end.haskell' ],
|
||||
regex: '(\')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(\')' },
|
||||
{ token:
|
||||
[ 'meta.function.type-declaration.haskell',
|
||||
'entity.name.function.haskell',
|
||||
'meta.function.type-declaration.haskell',
|
||||
'keyword.other.double-colon.haskell' ],
|
||||
regex: '^(\\s*)([a-z_][a-zA-Z0-9_\']*|\\([|!%$+\\-.,=</>]+\\))(\\s*)(::)',
|
||||
push:
|
||||
[ { token: 'meta.function.type-declaration.haskell',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ include: '#type_signature' },
|
||||
{ defaultToken: 'meta.function.type-declaration.haskell' } ] },
|
||||
{ token: 'support.constant.haskell',
|
||||
regex: '\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b' },
|
||||
{ token: 'constant.other.haskell', regex: '\\b[A-Z]\\w*\\b' },
|
||||
{ include: '#comments' },
|
||||
{ token: 'support.function.prelude.haskell',
|
||||
regex: '\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b' },
|
||||
{ include: '#infix_op' },
|
||||
{ token: 'keyword.operator.haskell',
|
||||
regex: '[|!%$?~+:\\-.=</>\\\\]+',
|
||||
comment: 'In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*.' },
|
||||
{ token: 'punctuation.separator.comma.haskell', regex: ',' } ],
|
||||
'#block_comment':
|
||||
[ { token: 'punctuation.definition.comment.haskell',
|
||||
regex: '\\{-(?!#)',
|
||||
push:
|
||||
[ { include: '#block_comment' },
|
||||
{ token: 'punctuation.definition.comment.haskell',
|
||||
regex: '-\\}',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.block.haskell' } ] } ],
|
||||
'#comments':
|
||||
[ { token: 'punctuation.definition.comment.haskell',
|
||||
regex: '--.*',
|
||||
push_:
|
||||
[ { token: 'comment.line.double-dash.haskell',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.double-dash.haskell' } ] },
|
||||
{ include: '#block_comment' } ],
|
||||
'#infix_op':
|
||||
[ { token: 'entity.name.function.infix.haskell',
|
||||
regex: '\\([|!%$+:\\-.=</>]+\\)|\\(,+\\)' } ],
|
||||
'#module_exports':
|
||||
[ { token: 'meta.declaration.exports.haskell',
|
||||
regex: '\\(',
|
||||
push:
|
||||
[ { token: 'meta.declaration.exports.haskell',
|
||||
regex: '\\)',
|
||||
next: 'pop' },
|
||||
{ token: 'entity.name.function.haskell',
|
||||
regex: '\\b[a-z][a-zA-Z_\']*' },
|
||||
{ token: 'storage.type.haskell', regex: '\\b[A-Z][A-Za-z_\']*' },
|
||||
{ token: 'punctuation.separator.comma.haskell', regex: ',' },
|
||||
{ include: '#infix_op' },
|
||||
{ token: 'meta.other.unknown.haskell',
|
||||
regex: '\\(.*?\\)',
|
||||
comment: 'So named because I don\'t know what to call this.' },
|
||||
{ defaultToken: 'meta.declaration.exports.haskell' } ] } ],
|
||||
'#module_name':
|
||||
[ { token: 'support.other.module.haskell',
|
||||
regex: '[A-Z][A-Za-z._\']*' } ],
|
||||
'#pragma':
|
||||
[ { token: 'meta.preprocessor.haskell',
|
||||
regex: '\\{-#',
|
||||
push:
|
||||
[ { token: 'meta.preprocessor.haskell',
|
||||
regex: '#-\\}',
|
||||
next: 'pop' },
|
||||
{ token: 'keyword.other.preprocessor.haskell',
|
||||
regex: '\\b(?:LANGUAGE|UNPACK|INLINE)\\b' },
|
||||
{ defaultToken: 'meta.preprocessor.haskell' } ] } ],
|
||||
'#type_signature':
|
||||
[ { token:
|
||||
[ 'meta.class-constraint.haskell',
|
||||
'entity.other.inherited-class.haskell',
|
||||
'meta.class-constraint.haskell',
|
||||
'variable.other.generic-type.haskell',
|
||||
'meta.class-constraint.haskell',
|
||||
'keyword.other.big-arrow.haskell' ],
|
||||
regex: '(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_\']*)(\\)\\s*)(=>)' },
|
||||
{ include: '#pragma' },
|
||||
{ token: 'keyword.other.arrow.haskell', regex: '->' },
|
||||
{ token: 'keyword.other.big-arrow.haskell', regex: '=>' },
|
||||
{ token: 'support.type.prelude.haskell',
|
||||
regex: '\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?)\\b' },
|
||||
{ token: 'variable.other.generic-type.haskell',
|
||||
regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' },
|
||||
{ token: 'storage.type.haskell',
|
||||
regex: '\\b[A-Z][a-zA-Z0-9_\']*\\b' },
|
||||
{ token: 'support.constant.unit.haskell', regex: '\\(\\)' },
|
||||
{ include: '#comments' } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
HaskellHighlightRules.metaData = { fileTypes: [ 'hs' ],
|
||||
keyEquivalent: '^~H',
|
||||
name: 'Haskell',
|
||||
scopeName: 'source.haskell' }
|
||||
|
||||
|
||||
oop.inherits(HaskellHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.HaskellHighlightRules = HaskellHighlightRules;
|
||||
});
|
||||
64
lib/ace/mode/ini.js
Normal file
64
lib/ace/mode/ini.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var IniHighlightRules = require("./ini_highlight_rules").IniHighlightRules;
|
||||
// TODO: pick appropriate fold mode
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new IniHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = ";";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
98
lib/ace/mode/ini_highlight_rules.js
Normal file
98
lib/ace/mode/ini_highlight_rules.js
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* This file was autogenerated from tool\tm bundles\ini.tmbundle\Syntaxes\Ini.plist (uuid: ) */
|
||||
/****************************************************************************************
|
||||
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
|
||||
* fileTypes *
|
||||
****************************************************************************************/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var IniHighlightRules = function() {
|
||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||
// regexps are ordered -> the first match is used
|
||||
|
||||
this.$rules = { start:
|
||||
[ { token: 'punctuation.definition.comment.ini',
|
||||
regex: '#.*',
|
||||
push_:
|
||||
[ { token: 'comment.line.number-sign.ini',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.number-sign.ini' } ] },
|
||||
{ token: 'punctuation.definition.comment.ini',
|
||||
regex: ';.*',
|
||||
push_:
|
||||
[ { token: 'comment.line.semicolon.ini', regex: '$', next: 'pop' },
|
||||
{ defaultToken: 'comment.line.semicolon.ini' } ] },
|
||||
{ token:
|
||||
[ 'keyword.other.definition.ini',
|
||||
'text',
|
||||
'punctuation.separator.key-value.ini' ],
|
||||
regex: '\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)' },
|
||||
{ token:
|
||||
[ 'punctuation.definition.entity.ini',
|
||||
'constant.section.group-title.ini',
|
||||
'punctuation.definition.entity.ini' ],
|
||||
regex: '^(\\[)(.*?)(\\])' },
|
||||
{ token: 'punctuation.definition.string.begin.ini',
|
||||
regex: '\'',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.ini',
|
||||
regex: '\'',
|
||||
next: 'pop' },
|
||||
{ token: 'constant.character.escape.ini', regex: '\\\\.' },
|
||||
{ defaultToken: 'string.quoted.single.ini' } ] },
|
||||
{ token: 'punctuation.definition.string.begin.ini',
|
||||
regex: '"',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.ini',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'string.quoted.double.ini' } ] } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
IniHighlightRules.metaData = { fileTypes: [ 'ini', 'conf' ],
|
||||
keyEquivalent: '^~I',
|
||||
name: 'Ini',
|
||||
scopeName: 'source.ini' }
|
||||
|
||||
|
||||
oop.inherits(IniHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.IniHighlightRules = IniHighlightRules;
|
||||
});
|
||||
64
lib/ace/mode/julia.js
Normal file
64
lib/ace/mode/julia.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules;
|
||||
// TODO: pick appropriate fold mode
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new JuliaHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "#";
|
||||
this.blockComment = "";
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
170
lib/ace/mode/julia_highlight_rules.js
Normal file
170
lib/ace/mode/julia_highlight_rules.js
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* This file was autogenerated from https://raw.github.com/JuliaLang/julia/master/contrib/Julia.tmbundle/Syntaxes/Julia.tmLanguage (uuid: ) */
|
||||
/****************************************************************************************
|
||||
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
|
||||
* fileTypes *
|
||||
****************************************************************************************/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var JuliaHighlightRules = function() {
|
||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||
// regexps are ordered -> the first match is used
|
||||
|
||||
this.$rules = { start:
|
||||
[ { include: '#function_decl' },
|
||||
{ include: '#function_call' },
|
||||
{ include: '#type_decl' },
|
||||
{ include: '#keyword' },
|
||||
{ include: '#operator' },
|
||||
{ include: '#number' },
|
||||
{ include: '#string' },
|
||||
{ include: '#comment' } ],
|
||||
'#bracket':
|
||||
[ { token: 'keyword.bracket.julia',
|
||||
regex: '\\(|\\)|\\[|\\]|\\{|\\}|,' } ],
|
||||
'#comment':
|
||||
[ { token:
|
||||
[ 'punctuation.definition.comment.julia',
|
||||
'comment.line.number-sign.julia' ],
|
||||
regex: '(#)(?!\\{)(.*$)'} ],
|
||||
'#function_call':
|
||||
[ { token: [ 'support.function.julia', 'text' ],
|
||||
regex: '([a-zA-Z0-9_]+!?)(\\w*\\()'} ],
|
||||
'#function_decl':
|
||||
[ { token: [ 'keyword.other.julia', 'meta.function.julia',
|
||||
'entity.name.function.julia', 'meta.function.julia','text' ],
|
||||
regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)(\\w*)([(\\\\{])'} ],
|
||||
'#keyword':
|
||||
[ { token: 'keyword.other.julia',
|
||||
regex: '\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b' },
|
||||
{ token: 'keyword.control.julia',
|
||||
regex: '\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b' },
|
||||
{ token: 'storage.modifier.variable.julia',
|
||||
regex: '\\b(?:global|local|const|export|import|importall|using)\\b' },
|
||||
{ token: 'variable.macro.julia', regex: '@\\w+\\b' } ],
|
||||
'#number':
|
||||
[ { token: 'constant.numeric.julia',
|
||||
regex: '\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b' } ],
|
||||
'#operator':
|
||||
[ { token: 'keyword.operator.update.julia',
|
||||
regex: '=|:=|\\+=|-=|\\*=|/=|//=|\\.//=|\\.\\*=|\\\\=|\\.\\\\=|^=|\\.^=|%=|\\|=|&=|\\$=|<<=|>>=' },
|
||||
{ token: 'keyword.operator.ternary.julia', regex: '\\?|:' },
|
||||
{ token: 'keyword.operator.boolean.julia',
|
||||
regex: '\\|\\||&&|!' },
|
||||
{ token: 'keyword.operator.arrow.julia', regex: '->|<-|-->' },
|
||||
{ token: 'keyword.operator.relation.julia',
|
||||
regex: '>|<|>=|<=|==|!=|\\.>|\\.<|\\.>=|\\.>=|\\.==|\\.!=|\\.=|\\.!|<:|:>' },
|
||||
{ token: 'keyword.operator.range.julia', regex: ':' },
|
||||
{ token: 'keyword.operator.shift.julia', regex: '<<|>>' },
|
||||
{ token: 'keyword.operator.bitwise.julia', regex: '\\||\\&|~' },
|
||||
{ token: 'keyword.operator.arithmetic.julia',
|
||||
regex: '\\+|-|\\*|\\.\\*|/|\\./|//|\\.//|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^' },
|
||||
{ token: 'keyword.operator.isa.julia', regex: '::' },
|
||||
{ token: 'keyword.operator.dots.julia',
|
||||
regex: '\\.(?=[a-zA-Z])|\\.\\.+' },
|
||||
{ token: 'keyword.operator.interpolation.julia',
|
||||
regex: '\\$#?(?=.)' },
|
||||
{ token: [ 'variable', 'keyword.operator.transposed-variable.julia' ],
|
||||
regex: '(\\w+)((?:\'|\\.\')*\\.?\')' },
|
||||
{ token: 'text',
|
||||
regex: '\\[|\\('},
|
||||
{ token: [ 'text', 'keyword.operator.transposed-matrix.julia' ],
|
||||
regex: "([\\]\\)])((?:'|\\.')*\\.?')"} ],
|
||||
'#string':
|
||||
[ { token: 'punctuation.definition.string.begin.julia',
|
||||
regex: '\'',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.julia',
|
||||
regex: '\'',
|
||||
next: 'pop' },
|
||||
{ include: '#string_escaped_char' },
|
||||
{ defaultToken: 'string.quoted.single.julia' } ] },
|
||||
{ token: 'punctuation.definition.string.begin.julia',
|
||||
regex: '"',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.julia',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
{ include: '#string_escaped_char' },
|
||||
{ defaultToken: 'string.quoted.double.julia' } ] },
|
||||
{ token: 'punctuation.definition.string.begin.julia',
|
||||
regex: '\\b\\w+"',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.julia',
|
||||
regex: '"\\w*',
|
||||
next: 'pop' },
|
||||
{ include: '#string_custom_escaped_char' },
|
||||
{ defaultToken: 'string.quoted.custom-double.julia' } ] },
|
||||
{ token: 'punctuation.definition.string.begin.julia',
|
||||
regex: '`',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.julia',
|
||||
regex: '`',
|
||||
next: 'pop' },
|
||||
{ include: '#string_escaped_char' },
|
||||
{ defaultToken: 'string.quoted.backtick.julia' } ] } ],
|
||||
'#string_custom_escaped_char': [ { token: 'constant.character.escape.julia', regex: '\\\\"' } ],
|
||||
'#string_escaped_char':
|
||||
[ { token: 'constant.character.escape.julia',
|
||||
regex: '\\\\(?:\\\\|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}|.)' } ],
|
||||
'#type_decl':
|
||||
[ { token:
|
||||
[ 'keyword.control.type.julia',
|
||||
'meta.type.julia',
|
||||
'entity.name.type.julia',
|
||||
'entity.other.inherited-class.julia',
|
||||
'punctuation.separator.inheritance.julia',
|
||||
'entity.other.inherited-class.julia' ],
|
||||
regex: '(type|immutable)(\\s+)([a-zA-Z0-9_]+)(?:(\\s*)(<:)(\\s*[.a-zA-Z0-9_:]+))?' },
|
||||
{ token: [ 'other.typed-variable.julia', 'support.type.julia' ],
|
||||
regex: '([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)' } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
JuliaHighlightRules.metaData = { fileTypes: [ 'jl' ],
|
||||
firstLineMatch: '^#!.*\\bjulia\\s*$',
|
||||
foldingStartMarker: '^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$',
|
||||
foldingStopMarker: '^\\s*(?:end)\\b.*$',
|
||||
name: 'Julia',
|
||||
scopeName: 'source.julia' }
|
||||
|
||||
|
||||
oop.inherits(JuliaHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.JuliaHighlightRules = JuliaHighlightRules;
|
||||
});
|
||||
|
|
@ -63,7 +63,7 @@ module.exports = {
|
|||
"test: no auto indent in multi line comment" : function() {
|
||||
assert.equal("", this.mode.getNextLineIndent("start", "/* -->", " "));
|
||||
assert.equal(" ", this.mode.getNextLineIndent("start", " /* ->", " "));
|
||||
assert.equal(" ", this.mode.getNextLineIndent("comment.block0", " abcd", " "));
|
||||
assert.equal(" ", this.mode.getNextLineIndent("comment.block", " abcd", " "));
|
||||
},
|
||||
|
||||
"test: no auto indent after -> in single line comment" : function() {
|
||||
|
|
|
|||
|
|
@ -69,15 +69,15 @@ var PascalHighlightRules = function() {
|
|||
{ token: 'constant.numeric.pascal',
|
||||
regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' },
|
||||
{ token: 'punctuation.definition.comment.pascal',
|
||||
regex: '--',
|
||||
push:
|
||||
regex: '--.*$',
|
||||
push_:
|
||||
[ { token: 'comment.line.double-dash.pascal.one',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.double-dash.pascal.one' } ] },
|
||||
{ token: 'punctuation.definition.comment.pascal',
|
||||
regex: '//',
|
||||
push:
|
||||
regex: '//.*$',
|
||||
push_:
|
||||
[ { token: 'comment.line.double-slash.pascal.two',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
|
|
|
|||
64
lib/ace/mode/prolog.js
Normal file
64
lib/ace/mode/prolog.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var PrologHighlightRules = require("./prolog_highlight_rules").PrologHighlightRules;
|
||||
// TODO: pick appropriate fold mode
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new PrologHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "/\\*";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
238
lib/ace/mode/prolog_highlight_rules.js
Normal file
238
lib/ace/mode/prolog_highlight_rules.js
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* This file was autogenerated from https://raw.github.com/stephenroller/prolog-tmbundle/master/Syntaxes/Prolog.tmLanguage (uuid: ) */
|
||||
/****************************************************************************************
|
||||
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
|
||||
* fileTypes *
|
||||
****************************************************************************************/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var PrologHighlightRules = function() {
|
||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||
// regexps are ordered -> the first match is used
|
||||
|
||||
this.$rules = { start:
|
||||
[ { include: '#comment' },
|
||||
{ include: '#basic_fact' },
|
||||
{ include: '#rule' },
|
||||
{ include: '#directive' },
|
||||
{ include: '#fact' } ],
|
||||
'#atom':
|
||||
[ { token: 'constant.other.atom.prolog',
|
||||
regex: '\\b[a-z][a-zA-Z0-9_]*\\b' },
|
||||
{ token: 'constant.numeric.prolog',
|
||||
regex: '-?\\d+(?:\\.\\d+)?' },
|
||||
{ include: '#string' } ],
|
||||
'#basic_elem':
|
||||
[ { include: '#comment' },
|
||||
{ include: '#statement' },
|
||||
{ include: '#constants' },
|
||||
{ include: '#operators' },
|
||||
{ include: '#builtins' },
|
||||
{ include: '#list' },
|
||||
{ include: '#atom' },
|
||||
{ include: '#variable' } ],
|
||||
'#basic_fact':
|
||||
[ { token:
|
||||
[ 'entity.name.function.fact.basic.prolog',
|
||||
'punctuation.end.fact.basic.prolog' ],
|
||||
regex: '([a-z]\\w*)(\\.)' } ],
|
||||
'#builtins':
|
||||
[ { token: 'support.function.builtin.prolog',
|
||||
regex: '\\b(?:\n\t\t\t\t\t\tabolish|abort|ancestors|arg|ascii|assert[az]|\n\t\t\t\t\t\tatom(?:ic)?|body|char|close|conc|concat|consult|\n\t\t\t\t\t\tdefine|definition|dynamic|dump|fail|file|free|\n\t\t\t\t\t\tfree_proc|functor|getc|goal|halt|head|head|integer|\n\t\t\t\t\t\tlength|listing|match_args|member|next_clause|nl|\n\t\t\t\t\t\tnonvar|nth|number|cvars|nvars|offset|op|\n\t\t\t\t\t\tprint?|prompt|putc|quoted|ratom|read|redefine|\n\t\t\t\t\t\trename|retract(?:all)?|see|seeing|seen|skip|spy|\n\t\t\t\t\t\tstatistics|system|tab|tell|telling|term|\n\t\t\t\t\t\ttime|told|univ|unlink_clause|unspy_predicate|\n\t\t\t\t\t\tvar|write\n\t\t\t\t\t)\\b' } ],
|
||||
'#comment':
|
||||
[ { token:
|
||||
[ 'punctuation.definition.comment.prolog',
|
||||
'comment.line.percentage.prolog' ],
|
||||
regex: '(%)(.*$)' },
|
||||
{ token: 'punctuation.definition.comment.prolog',
|
||||
regex: '/\\*',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.comment.prolog',
|
||||
regex: '\\*/',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.block.prolog' } ] } ],
|
||||
'#constants':
|
||||
[ { token: 'constant.language.prolog',
|
||||
regex: '\\b(?:true|false|yes|no)\\b' } ],
|
||||
'#directive':
|
||||
[ { token: 'keyword.operator.directive.prolog',
|
||||
regex: ':-',
|
||||
push:
|
||||
[ { token: 'meta.directive.prolog', regex: '\\.', next: 'pop' },
|
||||
{ include: '#comment' },
|
||||
{ include: '#statement' },
|
||||
{ defaultToken: 'meta.directive.prolog' } ] } ],
|
||||
'#expr':
|
||||
[ { include: '#comments' },
|
||||
{ token: 'meta.expression.prolog',
|
||||
regex: '\\(',
|
||||
push:
|
||||
[ { token: 'meta.expression.prolog', regex: '\\)', next: 'pop' },
|
||||
{ include: '#expr' },
|
||||
{ defaultToken: 'meta.expression.prolog' } ] },
|
||||
{ token: 'keyword.control.cutoff.prolog', regex: '!' },
|
||||
{ token: 'punctuation.control.and.prolog', regex: ',' },
|
||||
{ token: 'punctuation.control.or.prolog', regex: ';' },
|
||||
{ include: '#basic_elem' } ],
|
||||
'#fact':
|
||||
[ { token:
|
||||
[ 'entity.name.function.fact.prolog',
|
||||
'punctuation.begin.fact.parameters.prolog' ],
|
||||
regex: '([a-z]\\w*)(\\()(?!.*:-)',
|
||||
push:
|
||||
[ { token:
|
||||
[ 'punctuation.end.fact.parameters.prolog',
|
||||
'punctuation.end.fact.prolog' ],
|
||||
regex: '(\\))(\\.)',
|
||||
next: 'pop' },
|
||||
{ include: '#parameter' },
|
||||
{ defaultToken: 'meta.fact.prolog' } ] } ],
|
||||
'#list':
|
||||
[ { token: 'punctuation.begin.list.prolog',
|
||||
regex: '\\[(?=.*\\])',
|
||||
push:
|
||||
[ { token: 'punctuation.end.list.prolog',
|
||||
regex: '\\]',
|
||||
next: 'pop' },
|
||||
{ include: '#comment' },
|
||||
{ token: 'punctuation.separator.list.prolog', regex: ',' },
|
||||
{ token: 'punctuation.concat.list.prolog',
|
||||
regex: '\\|',
|
||||
push:
|
||||
[ { token: 'meta.list.concat.prolog',
|
||||
regex: '(?=\\s*\\])',
|
||||
next: 'pop' },
|
||||
{ include: '#basic_elem' },
|
||||
{ defaultToken: 'meta.list.concat.prolog' } ] },
|
||||
{ include: '#basic_elem' },
|
||||
{ defaultToken: 'meta.list.prolog' } ] } ],
|
||||
'#operators':
|
||||
[ { token: 'keyword.operator.prolog',
|
||||
regex: '\\\\\\+|\\bnot\\b|\\bis\\b|->|[><]|[><\\\\:=]?=|(?:=\\\\|\\\\=)=' } ],
|
||||
'#parameter':
|
||||
[ { token: 'variable.language.anonymous.prolog',
|
||||
regex: '\\b_\\b' },
|
||||
{ token: 'variable.parameter.prolog',
|
||||
regex: '\\b[A-Z_]\\w*\\b' },
|
||||
{ token: 'punctuation.separator.parameters.prolog', regex: ',' },
|
||||
{ include: '#basic_elem' },
|
||||
{ token: 'invalid.illegal.invalidchar.prolog', regex: '[^\\s]' } ],
|
||||
'#rule':
|
||||
[ { token: 'meta.rule.prolog',
|
||||
regex: '(?=[a-z]\\w*.*:-)',
|
||||
push:
|
||||
[ { token: 'punctuation.rule.end.prolog',
|
||||
regex: '\\.',
|
||||
next: 'pop' },
|
||||
{ token: 'meta.rule.signature.prolog',
|
||||
regex: '(?=[a-z]\\w*.*:-)',
|
||||
push:
|
||||
[ { token: 'meta.rule.signature.prolog',
|
||||
regex: '(?=:-)',
|
||||
next: 'pop' },
|
||||
{ token: 'entity.name.function.rule.prolog',
|
||||
regex: '[a-z]\\w*(?=\\(|\\s*:-)' },
|
||||
{ token: 'punctuation.rule.parameters.begin.prolog',
|
||||
regex: '\\(',
|
||||
push:
|
||||
[ { token: 'punctuation.rule.parameters.end.prolog',
|
||||
regex: '\\)',
|
||||
next: 'pop' },
|
||||
{ include: '#parameter' },
|
||||
{ defaultToken: 'meta.rule.parameters.prolog' } ] },
|
||||
{ defaultToken: 'meta.rule.signature.prolog' } ] },
|
||||
{ token: 'keyword.operator.definition.prolog',
|
||||
regex: ':-',
|
||||
push:
|
||||
[ { token: 'meta.rule.definition.prolog',
|
||||
regex: '(?=\\.)',
|
||||
next: 'pop' },
|
||||
{ include: '#comment' },
|
||||
{ include: '#expr' },
|
||||
{ defaultToken: 'meta.rule.definition.prolog' } ] },
|
||||
{ defaultToken: 'meta.rule.prolog' } ] } ],
|
||||
'#statement':
|
||||
[ { token: 'meta.statement.prolog',
|
||||
regex: '(?=[a-z]\\w*\\()',
|
||||
push:
|
||||
[ { token: 'punctuation.end.statement.parameters.prolog',
|
||||
regex: '\\)',
|
||||
next: 'pop' },
|
||||
{ include: '#builtins' },
|
||||
{ include: '#atom' },
|
||||
{ token: 'punctuation.begin.statement.parameters.prolog',
|
||||
regex: '\\(',
|
||||
push:
|
||||
[ { token: 'meta.statement.parameters.prolog',
|
||||
regex: '(?=\\))',
|
||||
next: 'pop' },
|
||||
{ token: 'punctuation.separator.statement.prolog', regex: ',' },
|
||||
{ include: '#basic_elem' },
|
||||
{ defaultToken: 'meta.statement.parameters.prolog' } ] },
|
||||
{ defaultToken: 'meta.statement.prolog' } ] } ],
|
||||
'#string':
|
||||
[ { token: 'punctuation.definition.string.begin.prolog',
|
||||
regex: '\'',
|
||||
push:
|
||||
[ { token: 'punctuation.definition.string.end.prolog',
|
||||
regex: '\'',
|
||||
next: 'pop' },
|
||||
{ token: 'constant.character.escape.prolog', regex: '\\\\.' },
|
||||
{ token: 'constant.character.escape.quote.prolog',
|
||||
regex: '\'\'' },
|
||||
{ defaultToken: 'string.quoted.single.prolog' } ] } ],
|
||||
'#variable':
|
||||
[ { token: 'variable.language.anonymous.prolog',
|
||||
regex: '\\b_\\b' },
|
||||
{ token: 'variable.other.prolog',
|
||||
regex: '\\b[A-Z_][a-zA-Z0-9_]*\\b' } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
PrologHighlightRules.metaData = { fileTypes: [ 'plg', 'prolog' ],
|
||||
foldingStartMarker: '(%\\s*region \\w*)|([a-z]\\w*.*:- ?)',
|
||||
foldingStopMarker: '(%\\s*end(\\s*region)?)|(?=\\.)',
|
||||
keyEquivalent: '^~P',
|
||||
name: 'Prolog',
|
||||
scopeName: 'source.prolog' }
|
||||
|
||||
|
||||
oop.inherits(PrologHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.PrologHighlightRules = PrologHighlightRules;
|
||||
});
|
||||
64
lib/ace/mode/rust.js
Normal file
64
lib/ace/mode/rust.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
|
||||
*/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var RustHighlightRules = require("./rust_highlight_rules").RustHighlightRules;
|
||||
// TODO: pick appropriate fold mode
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
var highlighter = new RustHighlightRules();
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "/\\*";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
// Extra logic goes here.
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
129
lib/ace/mode/rust_highlight_rules.js
Normal file
129
lib/ace/mode/rust_highlight_rules.js
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* This file was autogenerated from https://raw.github.com/dbp/sublime-rust/master/Rust.tmLanguage (uuid: ) */
|
||||
/****************************************************************************************
|
||||
* IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
|
||||
* fileTypes *
|
||||
****************************************************************************************/
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var RustHighlightRules = function() {
|
||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||
// regexps are ordered -> the first match is used
|
||||
|
||||
this.$rules = { start:
|
||||
[ { token: 'variable.other.source.rust',
|
||||
regex: '\'[a-zA-Z_][a-zA-Z0-9_]*[^\\\']' },
|
||||
{ token: 'string.quoted.single.source.rust',
|
||||
regex: '\'',
|
||||
push:
|
||||
[ { token: 'string.quoted.single.source.rust',
|
||||
regex: '\'',
|
||||
next: 'pop' },
|
||||
{ include: '#rust_escaped_character' },
|
||||
{ defaultToken: 'string.quoted.single.source.rust' } ] },
|
||||
{ token: 'string.quoted.double.source.rust',
|
||||
regex: '"',
|
||||
push:
|
||||
[ { token: 'string.quoted.double.source.rust',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
{ include: '#rust_escaped_character' },
|
||||
{ defaultToken: 'string.quoted.double.source.rust' } ] },
|
||||
{ token: [ 'keyword.source.rust', 'meta.function.source.rust',
|
||||
'entity.name.function.source.rust', 'meta.function.source.rust' ],
|
||||
regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' },
|
||||
{ token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' },
|
||||
{ token: 'keyword.source.rust',
|
||||
regex: '\\b(?:as|assert|break|claim|const|copy|Copy|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },
|
||||
{ token: 'storage.type.source.rust',
|
||||
regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' },
|
||||
{ token: 'variable.language.source.rust', regex: '\\bself\\b' },
|
||||
{ token: 'keyword.operator',
|
||||
regex: '!|\\$|\\*|\\-\\-|\\-|\\+\\+|\\+|-->|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|,|;' },
|
||||
{ token: 'constant.language.source.rust',
|
||||
regex: '\\b(?:true|false|Some|None|Left|Right|Ok|Err)\\b' },
|
||||
{ token: 'support.constant.source.rust',
|
||||
regex: '\\b(?:EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|EOF|SEEK_SET|SEEK_CUR|SEEK_END|_IOFBF|_IONBF|_IOLBF|BUFSIZ|FOPEN_MAX|FILENAME_MAX|L_tmpnam|TMP_MAX|O_RDONLY|O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_EXCL|O_TRUNC|S_IFIFO|S_IFCHR|S_IFBLK|S_IFDIR|S_IFREG|S_IFMT|S_IEXEC|S_IWRITE|S_IREAD|S_IRWXU|S_IXUSR|S_IWUSR|S_IRUSR|F_OK|R_OK|W_OK|X_OK|STDIN_FILENO|STDOUT_FILENO|STDERR_FILENO)\\b' },
|
||||
{ token: 'meta.preprocessor.source.rust',
|
||||
regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' },
|
||||
{ token: 'constant.numeric.integer.source.rust',
|
||||
regex: '\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|i8|i16|i32|i64))\\b' },
|
||||
{ token: 'constant.numeric.hex.source.rust',
|
||||
regex: '\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|i8|i16|i32|i64))\\b' },
|
||||
{ token: 'constant.numeric.binary.source.rust',
|
||||
regex: '\\b(?:0b[01_]+|0b[01_]+(?:u|u8|u16|u32|u64)|0b[01_]+(?:i|i8|i16|i32|i64))\\b' },
|
||||
{ token: 'constant.numeric.float.source.rust',
|
||||
regex: '[0-9][0-9_]*(?:f32|f64|f)|[0-9][0-9_]*[eE][+-]=[0-9_]+|[0-9][0-9_]*[eE][+-]=[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+|[0-9][0-9_]*\\.[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+(?:f32|f64|f)' },
|
||||
{ token: 'comment.line.documentation.source.rust',
|
||||
regex: '//!.*$',
|
||||
push_:
|
||||
[ { token: 'comment.line.documentation.source.rust',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.documentation.source.rust' } ] },
|
||||
{ token: 'comment.line.double-dash.source.rust',
|
||||
regex: '//.*$',
|
||||
push_:
|
||||
[ { token: 'comment.line.double-dash.source.rust',
|
||||
regex: '$',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.line.double-dash.source.rust' } ] },
|
||||
{ token: 'comment.block.source.rust',
|
||||
regex: '/\\*',
|
||||
push:
|
||||
[ { token: 'comment.block.source.rust',
|
||||
regex: '\\*/',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.block.source.rust' } ] } ],
|
||||
'#rust_escaped_character':
|
||||
[ { token: 'constant.character.escape.source.rust',
|
||||
regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
RustHighlightRules.metaData = { fileTypes: [ 'rs', 'rc' ],
|
||||
foldingStartMarker: '^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$',
|
||||
foldingStopMarker: '^\\s*\\}',
|
||||
name: 'Rust',
|
||||
scopeName: 'source.rust' }
|
||||
|
||||
|
||||
oop.inherits(RustHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.RustHighlightRules = RustHighlightRules;
|
||||
});
|
||||
|
|
@ -131,7 +131,14 @@ var TextHighlightRules = function() {
|
|||
}
|
||||
var next = rule.next || rule.push;
|
||||
if (next && Array.isArray(next)) {
|
||||
var stateName = rule.stateName || (rule.token + id++);
|
||||
var stateName = rule.stateName;
|
||||
if (!stateName) {
|
||||
stateName = rule.token;
|
||||
if (typeof stateName != "string")
|
||||
stateName = stateName[0] || "";
|
||||
if (rules[stateName])
|
||||
stateName += id++;
|
||||
}
|
||||
rules[stateName] = next;
|
||||
rule.next = stateName;
|
||||
processState(stateName);
|
||||
|
|
@ -171,9 +178,16 @@ var TextHighlightRules = function() {
|
|||
i--;
|
||||
toInsert = null
|
||||
}
|
||||
|
||||
if (rule.keywordMap) {
|
||||
rule.token = this.createKeywordMapper(
|
||||
rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive
|
||||
);
|
||||
delete rule.defaultToken;
|
||||
}
|
||||
}
|
||||
};
|
||||
Object.keys(rules).forEach(processState);
|
||||
Object.keys(rules).forEach(processState, this);
|
||||
};
|
||||
|
||||
this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
.ace-monokai .ace_entity.ace_name.ace_tag,
|
||||
.ace-monokai .ace_keyword,
|
||||
.ace-monokai .ace_meta,
|
||||
.ace-monokai .ace_meta.ace_tag,
|
||||
.ace-monokai .ace_storage {
|
||||
color: #F92672
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ var Tokenizer = function(rules) {
|
|||
+ (matchcount - 1) + "!=" + rule.token.length);
|
||||
} else {
|
||||
rule.tokenArray = rule.token;
|
||||
rule.token = null;
|
||||
rule.onMatch = this.$arrayTokens;
|
||||
}
|
||||
} else if (typeof rule.token == "function" && !rule.onMatch) {
|
||||
|
|
@ -293,8 +294,17 @@ var Tokenizer = function(rules) {
|
|||
lastIndex = index;
|
||||
|
||||
if (tokens.length > MAX_TOKEN_COUNT) {
|
||||
token.value += line.substr(lastIndex);
|
||||
currentState = "start"
|
||||
// chrome doens't show contents of text nodes with very long text
|
||||
while (lastIndex < line.length) {
|
||||
if (token.type)
|
||||
tokens.push(token);
|
||||
token = {
|
||||
value: line.substring(lastIndex, lastIndex += 2000),
|
||||
type: "overflow"
|
||||
}
|
||||
}
|
||||
currentState = "start";
|
||||
stack = [];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ define(function(require, exports, module) {
|
|||
var BaseTokenizer = require("./tokenizer").Tokenizer;
|
||||
|
||||
// tokenizing lines longer than this makes editor very slow
|
||||
var MAX_TOKEN_COUNT = 1000;
|
||||
var MAX_TOKEN_COUNT = 100000;
|
||||
/*
|
||||
* version of Tokenizer with additional logging
|
||||
* and infinite loop checks
|
||||
|
|
@ -80,7 +80,7 @@ var Tokenizer = function(rules) {
|
|||
};
|
||||
initState();
|
||||
|
||||
var maxRecur = 10000;
|
||||
var maxRecur = 100000;
|
||||
|
||||
while (match = re.exec(line)) {
|
||||
var type = mapping.defaultToken;
|
||||
|
|
@ -177,5 +177,7 @@ var Tokenizer = function(rules) {
|
|||
|
||||
};
|
||||
|
||||
Tokenizer.prototype = BaseTokenizer.prototype;
|
||||
|
||||
exports.Tokenizer = Tokenizer;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
|
|
@ -16,11 +16,32 @@
|
|||
<key>foreground</key>
|
||||
<string>#F8F8F2</string>
|
||||
<key>invisibles</key>
|
||||
<string>#49483E</string>
|
||||
<string>#3B3A32</string>
|
||||
<key>lineHighlight</key>
|
||||
<string>#49483E</string>
|
||||
<string>#3E3D32</string>
|
||||
<key>selection</key>
|
||||
<string>#49483E</string>
|
||||
<key>findHighlight</key>
|
||||
<string>#FFE792</string>
|
||||
<key>findHighlightForeground</key>
|
||||
<string>#000000</string>
|
||||
<key>selectionBorder</key>
|
||||
<string>#222218</string>
|
||||
<key>activeGuide</key>
|
||||
<string>#9D550FB0</string>
|
||||
|
||||
<key>bracketsForeground</key>
|
||||
<string>#F8F8F2A5</string>
|
||||
<key>bracketsOptions</key>
|
||||
<string>underline</string>
|
||||
|
||||
<key>bracketContentsForeground</key>
|
||||
<string>#F8F8F2A5</string>
|
||||
<key>bracketContentsOptions</key>
|
||||
<string>underline</string>
|
||||
|
||||
<key>tagsOptions</key>
|
||||
<string>stippled_underline</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
|
|
@ -56,6 +77,7 @@
|
|||
<string>#AE81FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Built-in constant</string>
|
||||
|
|
@ -282,6 +304,82 @@
|
|||
<string>#F8F8F0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>JSON String</string>
|
||||
<key>scope</key>
|
||||
<string>meta.structure.dictionary.json string.quoted.double.json</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#CFCFC2</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>diff.header</string>
|
||||
<key>scope</key>
|
||||
<string>meta.diff, meta.diff.header</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#75715E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>diff.deleted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.deleted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#F92672</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>diff.inserted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.inserted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A6E22E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>diff.changed</string>
|
||||
<key>scope</key>
|
||||
<string>markup.changed</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#E6DB74</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>scope</key>
|
||||
<string>constant.numeric.line-number.find-in-files - match</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AE81FFA0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>scope</key>
|
||||
<string>entity.name.filename.find-in-files</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#E6DB74</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>D8D5E82E-3D5B-46B5-B38E-8C841C21347D</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue