bunmicro 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/PORTING.md +34 -0
- package/README.md +153 -0
- package/bmi +5 -0
- package/bun.lock +17 -0
- package/bunmicro +5 -0
- package/hlw.md +5 -0
- package/package.json +18 -0
- package/runtime/colorschemes/atom-dark.micro +33 -0
- package/runtime/colorschemes/bubblegum.micro +31 -0
- package/runtime/colorschemes/cmc-16.micro +47 -0
- package/runtime/colorschemes/cmc-tc.micro +43 -0
- package/runtime/colorschemes/darcula.micro +34 -0
- package/runtime/colorschemes/default.micro +1 -0
- package/runtime/colorschemes/dracula-tc.micro +49 -0
- package/runtime/colorschemes/dukedark-tc.micro +38 -0
- package/runtime/colorschemes/dukelight-tc.micro +38 -0
- package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
- package/runtime/colorschemes/geany.micro +29 -0
- package/runtime/colorschemes/gotham.micro +29 -0
- package/runtime/colorschemes/gruvbox-tc.micro +29 -0
- package/runtime/colorschemes/gruvbox.micro +26 -0
- package/runtime/colorschemes/material-tc.micro +36 -0
- package/runtime/colorschemes/monokai-dark.micro +28 -0
- package/runtime/colorschemes/monokai.micro +34 -0
- package/runtime/colorschemes/one-dark.micro +39 -0
- package/runtime/colorschemes/railscast.micro +37 -0
- package/runtime/colorschemes/simple.micro +33 -0
- package/runtime/colorschemes/solarized-tc.micro +31 -0
- package/runtime/colorschemes/solarized.micro +30 -0
- package/runtime/colorschemes/sunny-day.micro +29 -0
- package/runtime/colorschemes/twilight.micro +40 -0
- package/runtime/colorschemes/zenburn.micro +30 -0
- package/runtime/help/actions.md +161 -0
- package/runtime/help/colors.md +421 -0
- package/runtime/help/commands.md +161 -0
- package/runtime/help/copypaste.md +149 -0
- package/runtime/help/defaultkeys.md +141 -0
- package/runtime/help/help.md +63 -0
- package/runtime/help/keybindings.md +760 -0
- package/runtime/help/linter.md +90 -0
- package/runtime/help/options.md +701 -0
- package/runtime/help/plugins.md +544 -0
- package/runtime/help/tutorial.md +112 -0
- package/runtime/jsplugins/chapter/chapter.js +108 -0
- package/runtime/jsplugins/diff/diff.js +46 -0
- package/runtime/jsplugins/example/example.js +108 -0
- package/runtime/jsplugins/linter/linter.js +281 -0
- package/runtime/plugins/autoclose/autoclose.lua +75 -0
- package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
- package/runtime/plugins/literate/README.md +5 -0
- package/runtime/plugins/literate/literate.lua +55 -0
- package/runtime/plugins/status/help/status.md +21 -0
- package/runtime/plugins/status/status.lua +62 -0
- package/runtime/syntax/LICENSE +22 -0
- package/runtime/syntax/PowerShell.yaml +128 -0
- package/runtime/syntax/README.md +63 -0
- package/runtime/syntax/ada.yaml +43 -0
- package/runtime/syntax/apacheconf.yaml +59 -0
- package/runtime/syntax/arduino.yaml +101 -0
- package/runtime/syntax/asciidoc.yaml +51 -0
- package/runtime/syntax/asm.yaml +123 -0
- package/runtime/syntax/ats.yaml +99 -0
- package/runtime/syntax/awk.yaml +44 -0
- package/runtime/syntax/b.yaml +87 -0
- package/runtime/syntax/bat.yaml +57 -0
- package/runtime/syntax/c.yaml +60 -0
- package/runtime/syntax/caddyfile.yaml +23 -0
- package/runtime/syntax/cake.yaml +7 -0
- package/runtime/syntax/clojure.yaml +38 -0
- package/runtime/syntax/cmake.yaml +42 -0
- package/runtime/syntax/coffeescript.yaml +56 -0
- package/runtime/syntax/colortest.yaml +19 -0
- package/runtime/syntax/conky.yaml +17 -0
- package/runtime/syntax/cpp.yaml +91 -0
- package/runtime/syntax/crontab.yaml +36 -0
- package/runtime/syntax/crystal.yaml +72 -0
- package/runtime/syntax/csharp.yaml +52 -0
- package/runtime/syntax/css.yaml +44 -0
- package/runtime/syntax/csx.yaml +8 -0
- package/runtime/syntax/cuda.yaml +68 -0
- package/runtime/syntax/cython.yaml +52 -0
- package/runtime/syntax/d.yaml +121 -0
- package/runtime/syntax/dart.yaml +46 -0
- package/runtime/syntax/default.yaml +10 -0
- package/runtime/syntax/dockerfile.yaml +36 -0
- package/runtime/syntax/dot.yaml +29 -0
- package/runtime/syntax/elixir.yaml +30 -0
- package/runtime/syntax/elm.yaml +38 -0
- package/runtime/syntax/erb.yaml +42 -0
- package/runtime/syntax/erlang.yaml +45 -0
- package/runtime/syntax/fish.yaml +48 -0
- package/runtime/syntax/forth.yaml +34 -0
- package/runtime/syntax/fortran.yaml +64 -0
- package/runtime/syntax/freebsd-kernel.yaml +14 -0
- package/runtime/syntax/fsharp.yaml +48 -0
- package/runtime/syntax/gdscript.yaml +61 -0
- package/runtime/syntax/gemini.yaml +19 -0
- package/runtime/syntax/gentoo-ebuild.yaml +48 -0
- package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
- package/runtime/syntax/git-commit.yaml +35 -0
- package/runtime/syntax/git-config.yaml +14 -0
- package/runtime/syntax/git-rebase-todo.yaml +19 -0
- package/runtime/syntax/gleam.yaml +69 -0
- package/runtime/syntax/glsl.yaml +26 -0
- package/runtime/syntax/gnuplot.yaml +15 -0
- package/runtime/syntax/go.yaml +62 -0
- package/runtime/syntax/godoc.yaml +17 -0
- package/runtime/syntax/golo.yaml +73 -0
- package/runtime/syntax/gomod.yaml +31 -0
- package/runtime/syntax/graphql.yaml +47 -0
- package/runtime/syntax/groff.yaml +30 -0
- package/runtime/syntax/groovy.yaml +111 -0
- package/runtime/syntax/haml.yaml +16 -0
- package/runtime/syntax/hare.yaml +52 -0
- package/runtime/syntax/haskell.yaml +52 -0
- package/runtime/syntax/hc.yaml +52 -0
- package/runtime/syntax/html.yaml +70 -0
- package/runtime/syntax/html4.yaml +25 -0
- package/runtime/syntax/html5.yaml +25 -0
- package/runtime/syntax/ini.yaml +23 -0
- package/runtime/syntax/inputrc.yaml +14 -0
- package/runtime/syntax/java.yaml +37 -0
- package/runtime/syntax/javascript.yaml +76 -0
- package/runtime/syntax/jinja2.yaml +19 -0
- package/runtime/syntax/json.yaml +39 -0
- package/runtime/syntax/jsonnet.yaml +92 -0
- package/runtime/syntax/julia.yaml +57 -0
- package/runtime/syntax/justfile.yaml +40 -0
- package/runtime/syntax/keymap.yaml +27 -0
- package/runtime/syntax/kickstart.yaml +16 -0
- package/runtime/syntax/kotlin.yaml +66 -0
- package/runtime/syntax/kvlang.yaml +67 -0
- package/runtime/syntax/ledger.yaml +14 -0
- package/runtime/syntax/lfe.yaml +17 -0
- package/runtime/syntax/lilypond.yaml +26 -0
- package/runtime/syntax/lisp.yaml +17 -0
- package/runtime/syntax/log.yaml +92 -0
- package/runtime/syntax/lua.yaml +111 -0
- package/runtime/syntax/mail.yaml +25 -0
- package/runtime/syntax/makefile.yaml +38 -0
- package/runtime/syntax/man.yaml +12 -0
- package/runtime/syntax/markdown.yaml +49 -0
- package/runtime/syntax/mc.yaml +23 -0
- package/runtime/syntax/meson.yaml +51 -0
- package/runtime/syntax/micro.yaml +34 -0
- package/runtime/syntax/mpdconf.yaml +13 -0
- package/runtime/syntax/msbuild.yaml +6 -0
- package/runtime/syntax/nanorc.yaml +16 -0
- package/runtime/syntax/nftables.yaml +30 -0
- package/runtime/syntax/nginx.yaml +22 -0
- package/runtime/syntax/nim.yaml +27 -0
- package/runtime/syntax/nix.yaml +32 -0
- package/runtime/syntax/nu.yaml +114 -0
- package/runtime/syntax/objc.yaml +60 -0
- package/runtime/syntax/ocaml.yaml +43 -0
- package/runtime/syntax/octave.yaml +83 -0
- package/runtime/syntax/odin.yaml +64 -0
- package/runtime/syntax/pascal.yaml +45 -0
- package/runtime/syntax/patch.yaml +14 -0
- package/runtime/syntax/peg.yaml +16 -0
- package/runtime/syntax/perl.yaml +58 -0
- package/runtime/syntax/php.yaml +60 -0
- package/runtime/syntax/pkg-config.yaml +12 -0
- package/runtime/syntax/po.yaml +12 -0
- package/runtime/syntax/pony.yaml +37 -0
- package/runtime/syntax/pov.yaml +21 -0
- package/runtime/syntax/privoxy-action.yaml +14 -0
- package/runtime/syntax/privoxy-config.yaml +10 -0
- package/runtime/syntax/privoxy-filter.yaml +12 -0
- package/runtime/syntax/proto.yaml +40 -0
- package/runtime/syntax/prql.yaml +84 -0
- package/runtime/syntax/puppet.yaml +22 -0
- package/runtime/syntax/python2.yaml +60 -0
- package/runtime/syntax/python3.yaml +62 -0
- package/runtime/syntax/r.yaml +32 -0
- package/runtime/syntax/raku.yaml +42 -0
- package/runtime/syntax/reST.yaml +18 -0
- package/runtime/syntax/renpy.yaml +15 -0
- package/runtime/syntax/rpmspec.yaml +43 -0
- package/runtime/syntax/ruby.yaml +73 -0
- package/runtime/syntax/rust.yaml +78 -0
- package/runtime/syntax/sage.yaml +60 -0
- package/runtime/syntax/scad.yaml +53 -0
- package/runtime/syntax/scala.yaml +33 -0
- package/runtime/syntax/sed.yaml +13 -0
- package/runtime/syntax/sh.yaml +69 -0
- package/runtime/syntax/sls.yaml +15 -0
- package/runtime/syntax/smalltalk.yaml +55 -0
- package/runtime/syntax/solidity.yaml +41 -0
- package/runtime/syntax/sql.yaml +35 -0
- package/runtime/syntax/stata.yaml +67 -0
- package/runtime/syntax/svelte.yaml +27 -0
- package/runtime/syntax/swift.yaml +103 -0
- package/runtime/syntax/systemd.yaml +16 -0
- package/runtime/syntax/tcl.yaml +18 -0
- package/runtime/syntax/terraform.yaml +87 -0
- package/runtime/syntax/tex.yaml +32 -0
- package/runtime/syntax/toml.yaml +56 -0
- package/runtime/syntax/twig.yaml +55 -0
- package/runtime/syntax/typescript.yaml +49 -0
- package/runtime/syntax/v.yaml +80 -0
- package/runtime/syntax/vala.yaml +26 -0
- package/runtime/syntax/verilog.yaml +60 -0
- package/runtime/syntax/vhdl.yaml +37 -0
- package/runtime/syntax/vi.yaml +31 -0
- package/runtime/syntax/vue.yaml +64 -0
- package/runtime/syntax/xml.yaml +37 -0
- package/runtime/syntax/xresources.yaml +14 -0
- package/runtime/syntax/yaml.yaml +34 -0
- package/runtime/syntax/yum.yaml +12 -0
- package/runtime/syntax/zig.yaml +52 -0
- package/runtime/syntax/zscript.yaml +72 -0
- package/runtime/syntax/zsh.yaml +52 -0
- package/src/buffer/buffer.js +126 -0
- package/src/buffer/loc.js +38 -0
- package/src/buffer/message.js +29 -0
- package/src/config/colorscheme.js +109 -0
- package/src/config/config.js +118 -0
- package/src/config/defaults.js +102 -0
- package/src/display/ansi-style.js +60 -0
- package/src/highlight/highlighter.js +237 -0
- package/src/highlight/parser.js +137 -0
- package/src/index.js +5942 -0
- package/src/lua/engine.js +38 -0
- package/src/platform/archive.js +50 -0
- package/src/platform/clipboard.js +160 -0
- package/src/platform/commands.js +140 -0
- package/src/plugins/js-bridge.js +902 -0
- package/src/plugins/manager.js +619 -0
- package/src/runtime/registry.js +89 -0
- package/src/screen/cell-buffer.js +81 -0
- package/src/screen/events.js +263 -0
- package/src/screen/screen.js +118 -0
- package/src/screen/vt100.js +391 -0
- package/src/shell/shell.js +70 -0
- package/todo.txt +359 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
filetype: gleam
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.gleam$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[a-z][a-z0-9_]*\\b"
|
|
8
|
+
|
|
9
|
+
- statement: "\\b(as|assert|auto|case|const|delegate|derive|echo|else|fn|if|implement|import|let|macro|opaque|panic|pub|test|todo|type|use)\\b"
|
|
10
|
+
|
|
11
|
+
- type: "\\b[A-Z][a-zA-Z0-9_]*\\b"
|
|
12
|
+
|
|
13
|
+
- type: "\\b(Int|Float|String|Bool|List|Option|Result|BitArray)\\b"
|
|
14
|
+
|
|
15
|
+
- constant: "\\b(True|False|Nil)\\b"
|
|
16
|
+
|
|
17
|
+
- preproc: "@[a-z][a-z_]*"
|
|
18
|
+
|
|
19
|
+
- statement: "(\\|>|->|<-)"
|
|
20
|
+
- statement: "(\\.\\.|<>)"
|
|
21
|
+
- statement: "(==|!=|<=\\.|>=\\.|<\\.|>\\.|<=|>=)"
|
|
22
|
+
- statement: "(&&|\\|\\|)"
|
|
23
|
+
- statement: "(\\+\\.|-\\.|\\*\\.|/\\.|\\+|-|\\*|/|%)"
|
|
24
|
+
- statement: "(=|<|>|!|<<|>>)"
|
|
25
|
+
|
|
26
|
+
- constant.number: "\\b0b[01](_?[01])*\\b"
|
|
27
|
+
- constant.number: "\\b0o[0-7](_?[0-7])*\\b"
|
|
28
|
+
- constant.number: "\\b0x[0-9a-fA-F](_?[0-9a-fA-F])*\\b"
|
|
29
|
+
- constant.number: "\\b[0-9](_?[0-9])*(\\.[0-9](_?[0-9])*)?([eE][+-]?[0-9](_?[0-9])*)?\\b"
|
|
30
|
+
|
|
31
|
+
- default:
|
|
32
|
+
start: "#\\("
|
|
33
|
+
end: "\\)"
|
|
34
|
+
limit-group: special
|
|
35
|
+
rules:
|
|
36
|
+
- identifier: "\\b[a-z][a-z0-9_]*\\b"
|
|
37
|
+
- statement: "\\b(as|assert|auto|case|const|delegate|derive|echo|else|fn|if|implement|import|let|macro|opaque|panic|pub|test|todo|type|use)\\b"
|
|
38
|
+
- type: "\\b[A-Z][a-zA-Z0-9_]*\\b"
|
|
39
|
+
- type: "\\b(Int|Float|String|Bool|List|Option|Result|BitArray)\\b"
|
|
40
|
+
- constant: "\\b(True|False|Nil)\\b"
|
|
41
|
+
- statement: "(\\|>|->|<-)"
|
|
42
|
+
- statement: "(\\.\\.|<>)"
|
|
43
|
+
- statement: "(==|!=|<=\\.|>=\\.|<\\.|>\\.|<=|>=)"
|
|
44
|
+
- statement: "(&&|\\|\\|)"
|
|
45
|
+
- statement: "(\\+\\.|-\\.|\\*\\.|/\\.|\\+|-|\\*|/|%)"
|
|
46
|
+
- statement: "(=|<|>|!|<<|>>)"
|
|
47
|
+
- constant.number: "\\b0b[01](_?[01])*\\b"
|
|
48
|
+
- constant.number: "\\b0o[0-7](_?[0-7])*\\b"
|
|
49
|
+
- constant.number: "\\b0x[0-9a-fA-F](_?[0-9a-fA-F])*\\b"
|
|
50
|
+
- constant.number: "\\b[0-9](_?[0-9])*(\\.[0-9](_?[0-9])*)?([eE][+-]?[0-9](_?[0-9])*)?\\b"
|
|
51
|
+
- constant.string:
|
|
52
|
+
start: '"'
|
|
53
|
+
end: '"'
|
|
54
|
+
skip: "\\\\."
|
|
55
|
+
rules:
|
|
56
|
+
- constant.specialChar: "\\\\."
|
|
57
|
+
|
|
58
|
+
- constant.string:
|
|
59
|
+
start: '"'
|
|
60
|
+
end: '"'
|
|
61
|
+
skip: "\\\\."
|
|
62
|
+
rules:
|
|
63
|
+
- constant.specialChar: "\\\\."
|
|
64
|
+
|
|
65
|
+
- comment:
|
|
66
|
+
start: "//"
|
|
67
|
+
end: "$"
|
|
68
|
+
rules:
|
|
69
|
+
- todo: "(TODO|FIXME|XXX):?"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
filetype: glsl
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(frag|vert|fp|vp|glsl)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
|
|
8
|
+
- type: "\\b(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\\b"
|
|
9
|
+
- identifier: "\\bgl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\\b"
|
|
10
|
+
- statement: "\\b(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\\b"
|
|
11
|
+
- statement: "\\b(break|continue)\\b"
|
|
12
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
13
|
+
- symbol.operator: "[-+/*=<>?:!~%&|^]"
|
|
14
|
+
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b"
|
|
15
|
+
|
|
16
|
+
- comment:
|
|
17
|
+
start: "//"
|
|
18
|
+
end: "$"
|
|
19
|
+
rules:
|
|
20
|
+
- todo: "TODO:?"
|
|
21
|
+
|
|
22
|
+
- comment:
|
|
23
|
+
start: "/\\*"
|
|
24
|
+
end: "\\*/"
|
|
25
|
+
rules:
|
|
26
|
+
- todo: "TODO:?"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
filetype: gnuplot
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(gnu|gpi|plt|gp)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "\\b(set|unset|plot|splot|replot|if|else|do|for|while|fit)\\b"
|
|
8
|
+
- symbol.operator: "[-+/*=<>?:!~%&|^$]"
|
|
9
|
+
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b"
|
|
10
|
+
|
|
11
|
+
- comment:
|
|
12
|
+
start: "#"
|
|
13
|
+
end: "$"
|
|
14
|
+
rules:
|
|
15
|
+
- todo: "TODO:?"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
filetype: go
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.go$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Conditionals and control flow
|
|
8
|
+
- special: "\\b(break|case|continue|default|go|goto|range|return|println|fallthrough)\\b"
|
|
9
|
+
- statement: "\\b(else|for|if|switch|select)\\b"
|
|
10
|
+
- preproc: "\\b(package|import|const|var|type|struct|func|defer|iota|make|new|copy|len|cap|panic|append|close|delete|print|recover)\\b"
|
|
11
|
+
- symbol.operator: "[-+/*=<>!~%&|^]|:="
|
|
12
|
+
|
|
13
|
+
# Types
|
|
14
|
+
- symbol: "(,|\\.)"
|
|
15
|
+
- type: "\\b(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\\b"
|
|
16
|
+
- type: "\\b(uintptr|byte|rune|string|interface|bool|map|chan|error)\\b"
|
|
17
|
+
- type.keyword: "\\b(struct)\\b"
|
|
18
|
+
- constant.bool: "\\b(true|false|nil)\\b"
|
|
19
|
+
|
|
20
|
+
# Brackets
|
|
21
|
+
- symbol.brackets: "(\\{|\\})"
|
|
22
|
+
- symbol.brackets: "(\\(|\\))"
|
|
23
|
+
- symbol.brackets: "(\\[|\\])"
|
|
24
|
+
|
|
25
|
+
# Numbers and strings
|
|
26
|
+
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
|
27
|
+
|
|
28
|
+
- constant.string:
|
|
29
|
+
start: "\""
|
|
30
|
+
end: "\""
|
|
31
|
+
skip: "\\\\."
|
|
32
|
+
rules:
|
|
33
|
+
- constant.specialChar: "%."
|
|
34
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
35
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
36
|
+
|
|
37
|
+
- constant.string:
|
|
38
|
+
start: "'"
|
|
39
|
+
end: "'"
|
|
40
|
+
skip: "\\\\."
|
|
41
|
+
rules:
|
|
42
|
+
- error: "..+"
|
|
43
|
+
- constant.specialChar: "%."
|
|
44
|
+
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
|
|
45
|
+
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
46
|
+
|
|
47
|
+
- constant.string:
|
|
48
|
+
start: "`"
|
|
49
|
+
end: "`"
|
|
50
|
+
rules: []
|
|
51
|
+
|
|
52
|
+
- comment:
|
|
53
|
+
start: "//"
|
|
54
|
+
end: "$"
|
|
55
|
+
rules:
|
|
56
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
57
|
+
|
|
58
|
+
- comment:
|
|
59
|
+
start: "/\\*"
|
|
60
|
+
end: "\\*/"
|
|
61
|
+
rules:
|
|
62
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
filetype: golo
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.golo$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- type: "\\b(function|fun|)\\b"
|
|
8
|
+
- type: "\\b(struct|DynamicObject|union|AdapterFabric|Adapter|DynamicVariable|Observable)\\b"
|
|
9
|
+
- type: "\\b(list|set|array|vector|tuple|map)\\b"
|
|
10
|
+
- type: "\\b(Ok|Error|Empty|None|Some|Option|Result|Result.ok|Result.fail|Result.error|Result.empty|Optional.empty|Optional.of)\\b"
|
|
11
|
+
|
|
12
|
+
- identifier.class: "\\b(augment|pimp)\\b"
|
|
13
|
+
- identifier.class: "\\b(interfaces|implements|extends|overrides|maker|newInstance)\\b"
|
|
14
|
+
- identifier.class: "\\b(isEmpty|isNone|isPresent|isSome|iterator|flattened|toList|flatMap|`and|orElseGet|`or|toResult|apply|either)\\b"
|
|
15
|
+
- identifier.class: "\\b(result|option|trying|raising|nullify|catching)\\b"
|
|
16
|
+
- identifier.class: "\\b(promise|setFuture|failedFuture|all|any)\\b"
|
|
17
|
+
- identifier.class: "\\b(initialize|initializeWithinThread|start|future|fallbackTo|onSet|onFail|cancel|enqueue)\\b"
|
|
18
|
+
- identifier.class: "\\b(println|print|raise|readln|readPassword|secureReadPassword|requireNotNull|require|newTypedArray|range|reversedRange|mapEntry|asInterfaceInstance|asFunctionalInterface|isClosure|fileToText|textToFile|fileExists|currentDir|sleep|uuid|isArray|arrayTypeOf|charValue|intValue|longValue|doubleValue|floatValue|removeByIndex|box)\\b"
|
|
19
|
+
- identifier.class: "\\b(likelySupported|reset|bold|underscore|blink|reverse_video|concealed|fg_black|fg_red|fg_green|fg_yellow|fg_blue|fg_magenta|fg_cyan|fg_white|bg_black|bg_red|bg_green|bg_yellow|bg_blue|bg_magenta|bg_cyan|bg_white|cursor_position|cursor_save_position|cursor_restore_position|cursor_up|cursor_down|cursor_forward|cursor_backward|erase_display|erase_line)\\b"
|
|
20
|
+
- identifier.class: "\\b(emptyList|cons|lazyList|fromIter|generator|repeat|iterate)\\b"
|
|
21
|
+
- identifier.class: "\\b(asLazyList|foldl|foldr|take|takeWhile|drop|dropWhile|subList)\\b"
|
|
22
|
+
- identifier.class: "\\b(import)\\b"
|
|
23
|
+
- identifier.class: "\\b(module)\\b"
|
|
24
|
+
- identifier.class: "\\b(JSON)\\b"
|
|
25
|
+
- identifier.class: "\\b(stringify|parse|toJSON|toDynamicObject|updateFromJSON)\\b"
|
|
26
|
+
- identifier.class: "\\b(newInstance|define|getKey|getValue|properties|fallback)\\b"
|
|
27
|
+
- identifier.class: "\\b(times|upTo|downTo)\\b"
|
|
28
|
+
- identifier.class: "\\b(format|toInt|toInteger|toDouble|toFloat|toLong)\\b"
|
|
29
|
+
- identifier.class: "\\b(head|tail|isEmpty|reduce|each|count|exists)\\b"
|
|
30
|
+
- identifier.class: "\\b(newWithSameType|destruct|append|add|addIfAbsent|prepend|insert|last|unmodifiableView|find|filter|map|join|reverse|reversed|order|ordered|removeAt|include|exclude|remove|delete|has|contains|getOrElse|toArray)\\b"
|
|
31
|
+
- identifier.class: "\\b(add|addTo|succ|pred|mul|neg|sub|rsub|div|rdiv|mod|rmod|pow|rpow|str|lt|gt|eq|ne|ge|le|`and|`or|`not|xor|even|odd|contains|isEmpty|`is|`isnt|`oftype|`orIfNull|fst|snd|getitem|setitem|getter|id|const|False|True|Null|curry|uncurry|unary|spreader|varargs|swapArgs|swapCurry|swapCouple|swap|invokeWith|pipe|compose|io|andThen|until|recur|cond)\\b"
|
|
32
|
+
- identifier.class: "\\b(toUpperCase|equals|startsWith)\\b"
|
|
33
|
+
|
|
34
|
+
- statement: "\\b(if|else|then|when|case|match|otherwise)\\b"
|
|
35
|
+
- special: "\\b(with|break|continue|return)\\b"
|
|
36
|
+
- error: "\\b(try|catch|finally|throw)\\b"
|
|
37
|
+
- identifier: "\\b(super|this|let|var|local)\\b"
|
|
38
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
39
|
+
- statement: "\\b(for|while|foreach|in)\\b"
|
|
40
|
+
- constant: "\\b(and|in|is|not|or|isnt|orIfNull)\\b"
|
|
41
|
+
|
|
42
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
43
|
+
- constant: "\\b(null|undefined)\\b"
|
|
44
|
+
|
|
45
|
+
- symbol.operator: "[\\-+/*=<>!~%&|^]|:="
|
|
46
|
+
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
|
|
47
|
+
|
|
48
|
+
- constant.string:
|
|
49
|
+
start: "\""
|
|
50
|
+
end: "\""
|
|
51
|
+
skip: "\\\\."
|
|
52
|
+
rules:
|
|
53
|
+
- constant.specialChar: "\\\\."
|
|
54
|
+
|
|
55
|
+
- constant.string:
|
|
56
|
+
start: "'"
|
|
57
|
+
end: "'"
|
|
58
|
+
skip: "\\\\."
|
|
59
|
+
rules:
|
|
60
|
+
- constant.specialChar: "\\\\."
|
|
61
|
+
|
|
62
|
+
- comment:
|
|
63
|
+
start: "#"
|
|
64
|
+
end: "$"
|
|
65
|
+
rules:
|
|
66
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
67
|
+
|
|
68
|
+
- comment:
|
|
69
|
+
start: "----"
|
|
70
|
+
end: "----"
|
|
71
|
+
rules:
|
|
72
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
73
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
filetype: gomod
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "go.mod"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# URL
|
|
8
|
+
- type: "(^|[ \\t])+\\b([a-zA-Z0-9-]+\\.?)+(/[a-zA-Z0-9-_\\.]+)*\\b"
|
|
9
|
+
|
|
10
|
+
# Keywords
|
|
11
|
+
- special: "(^|[ \\t])+\\b(module|go)\\b"
|
|
12
|
+
- preproc: "(^|[ \\t])+\\b(toolchain|require|exclude|replace|retract)\\b"
|
|
13
|
+
- symbol.operator: "=>"
|
|
14
|
+
|
|
15
|
+
# Brackets
|
|
16
|
+
- type: "(\\(|\\))"
|
|
17
|
+
|
|
18
|
+
# Go version
|
|
19
|
+
- type: "(^|[ \\t])+([0-9]+\\.?)+"
|
|
20
|
+
|
|
21
|
+
# Version
|
|
22
|
+
- constant.string: "(^|[ \\t])+v([0-9]+\\.?){3}.*"
|
|
23
|
+
- constant.number: "(^|[ \\t])+v([0-9]+\\.?){3}"
|
|
24
|
+
|
|
25
|
+
- comment:
|
|
26
|
+
start: "//"
|
|
27
|
+
end: "$"
|
|
28
|
+
rules:
|
|
29
|
+
- todo: "(indirect):?"
|
|
30
|
+
|
|
31
|
+
# (^|[ \\t])+ means after start of string or space or tab character
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
filetype: graphql
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(gql|graphql)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- type: "\\b(?:(query|mutation|subscription|type|input|scalar|fragment|schema|union|on|extends?))\\b"
|
|
8
|
+
|
|
9
|
+
# scalar types
|
|
10
|
+
- statement: "\\b(ID|Int|Float|Boolean|String|Datetime|Null)\\b"
|
|
11
|
+
|
|
12
|
+
# introspection types
|
|
13
|
+
- statement: "(__\\w+)"
|
|
14
|
+
|
|
15
|
+
# parameters
|
|
16
|
+
- statement: "((\\w+)(?:\\:([\\s]*)?)(?:\\$))"
|
|
17
|
+
|
|
18
|
+
# directive locations
|
|
19
|
+
- statement: "\\b(QUERY|MUTATION|SUBSCRIPTION|FIELD|FRAGMENT_DEFINITION|FRAGMENT_SPREAD|INLINE_FRAGMENT|SCHEMA|SCALAR|OBJECT|FIELD_DEFINITION|ARGUMENT_DEFINITION|INTERFACE|UNION|ENUM|ENUM_VALUE|INPUT_OBJECT|INPUT_FIELD_DEFINITION)\\b"
|
|
20
|
+
|
|
21
|
+
# directives
|
|
22
|
+
- constant: "(@\\w+)"
|
|
23
|
+
|
|
24
|
+
# root types
|
|
25
|
+
- constant: "\\b(Query|Mutation|Subscription|Schema|Root)\\b"
|
|
26
|
+
|
|
27
|
+
# variables
|
|
28
|
+
- special: "(\\$\\w+)"
|
|
29
|
+
|
|
30
|
+
# required symbol
|
|
31
|
+
- special: "(!)"
|
|
32
|
+
|
|
33
|
+
- symbol: "(:|=|\\||\\(|\\)|\\{|\\}|\\[|\\])"
|
|
34
|
+
|
|
35
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
36
|
+
|
|
37
|
+
- constant.string:
|
|
38
|
+
start: "\""
|
|
39
|
+
end: "\""
|
|
40
|
+
skip: "\\\\."
|
|
41
|
+
rules:
|
|
42
|
+
- constant.specialChar: "\\\\."
|
|
43
|
+
|
|
44
|
+
- comment:
|
|
45
|
+
start: "#"
|
|
46
|
+
end: "$"
|
|
47
|
+
rules: []
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
filetype: groff
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.m[ems]$|\\.rof|\\.tmac$|^tmac."
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- statement: "^\\.(ds|nr) [^[[:space:]]]*"
|
|
8
|
+
- constant.specialChar: "\\\\."
|
|
9
|
+
- constant.specialChar: "\\\\f.|\\\\f\\(..|\\\\s(\\+|\\-)?[0-9]"
|
|
10
|
+
- constant: "(\\\\|\\\\\\\\)n(.|\\(..)"
|
|
11
|
+
- constant:
|
|
12
|
+
start: "(\\\\|\\\\\\\\)n\\["
|
|
13
|
+
end: "]"
|
|
14
|
+
rules: []
|
|
15
|
+
|
|
16
|
+
- type: "^\\.[[:space:]]*[^[[:space:]]]*"
|
|
17
|
+
- comment: "^\\.\\\\\".*$"
|
|
18
|
+
- constant.string: "(\\\\|\\\\\\\\)\\*(.|\\(..)"
|
|
19
|
+
- constant.string:
|
|
20
|
+
start: "(\\\\|\\\\\\\\)\\*\\["
|
|
21
|
+
end: "]"
|
|
22
|
+
rules: []
|
|
23
|
+
|
|
24
|
+
- constant.specialChar: "\\\\\\(.."
|
|
25
|
+
- constant.specialChar:
|
|
26
|
+
start: "\\\\\\["
|
|
27
|
+
end: "]"
|
|
28
|
+
rules: []
|
|
29
|
+
|
|
30
|
+
- identifier.macro: "\\\\\\\\\\$[1-9]"
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
filetype: groovy
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.(groovy|gy|gvy|gsh|gradle)$|^[Jj]enkinsfile$)"
|
|
5
|
+
header: "^#!.*/(env +)?groovy *$"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
# And the style guide for constants is CONSTANT_CASE
|
|
9
|
+
- identifier: "\\b[A-Z_$]+\\b"
|
|
10
|
+
# The style guide for JVM languages is PascalCase for classes and interfaces
|
|
11
|
+
- identifier.class: "\\b[A-Z][a-zA-Z0-9$]+\\b"
|
|
12
|
+
|
|
13
|
+
# Primitive types
|
|
14
|
+
- type: "\\b(byte|short|int|long|float|double|char|boolean|void)\\b"
|
|
15
|
+
|
|
16
|
+
# Type-related keywords
|
|
17
|
+
- type.keyword: "\\b(private|public|protected|static|final|var|def)\\b"
|
|
18
|
+
|
|
19
|
+
# Keywords
|
|
20
|
+
- statement: "\\b(for|while|do|if|else|switch|case|default|try|catch|finally)\\b"
|
|
21
|
+
- statement: "\\b(break|continue|return|throw|assert)\\b"
|
|
22
|
+
- statement: "\\b(package|import|class|interface|trait|enum|extends|implements|throws)\\b"
|
|
23
|
+
- statement: "\\b(this|super)\\b"
|
|
24
|
+
# Unsused, but reserved keywords
|
|
25
|
+
- statement: "\\b(goto|const)\\b"
|
|
26
|
+
|
|
27
|
+
# Operators and punctuation
|
|
28
|
+
- symbol.operator: "[-+*/%=<>^~&|!?:;,.@]|\\b(in|is|as|instanceof|new)\\b"
|
|
29
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
30
|
+
|
|
31
|
+
# Decimal integer literal
|
|
32
|
+
- constant.number: "(?i)\\b[1-9]([_0-9]*[0-9])?[GLIDF]?\\b"
|
|
33
|
+
# Binary integer literal
|
|
34
|
+
- constant.number: "(?i)\\b0b[01]([01_]*[01])?[GLIDF]?\\b"
|
|
35
|
+
# Octal integer literal
|
|
36
|
+
- constant.number: "(?i)\\b0[0-7]([0-7_]*[0-7])?[GLIDF]?\\b"
|
|
37
|
+
# Hexadecimal integer literal
|
|
38
|
+
- constant.number: "(?i)\\b0x[0-9a-fA-F]([0-9a-f_]*[0-9a-fA-F])?[GLIDF]?\\b"
|
|
39
|
+
# Floating-point literal
|
|
40
|
+
- constant.number: "(?i)\\b[0-9]([0-9_]*[0-9])?([.][0-9]([0-9_]*[0-9])?)?(e[+-]?[0-9]([0-9_]*[0-9])?)?[DF]?\\b"
|
|
41
|
+
- constant.bool: "\\b(true|false|null)\\b"
|
|
42
|
+
|
|
43
|
+
# Annotations
|
|
44
|
+
- identifier: "@[A-Za-z_$][A-Za-z0-9_$]*\\b"
|
|
45
|
+
|
|
46
|
+
# Triple-double-quoted strings
|
|
47
|
+
- constant.string:
|
|
48
|
+
start: "\"\"\""
|
|
49
|
+
end: "\"\"\""
|
|
50
|
+
skip: "\\\\."
|
|
51
|
+
rules:
|
|
52
|
+
- constant.specialChar: "\\\\([\"'bfnrst\\x24\\\\]|u[a-fA-F0-9]{4})"
|
|
53
|
+
- identifier.var: "\\x24[\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+([.][a-zA-Z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+)*"
|
|
54
|
+
- identifier:
|
|
55
|
+
start: "[$][{]"
|
|
56
|
+
end: "[}]"
|
|
57
|
+
rules: []
|
|
58
|
+
|
|
59
|
+
# Triple-single-quoted strings
|
|
60
|
+
- constant.string:
|
|
61
|
+
start: "'''"
|
|
62
|
+
end: "'''"
|
|
63
|
+
skip: "\\\\."
|
|
64
|
+
rules:
|
|
65
|
+
- constant.specialChar: "\\\\([\"'bfnrst\\x24\\\\]|u[a-fA-F0-9]{4})"
|
|
66
|
+
|
|
67
|
+
# Nesting ${} are never going to be matched correctly with just regex either, so highlighting will break if one is to nest interpolation
|
|
68
|
+
# Double-quoted strings
|
|
69
|
+
- constant.string:
|
|
70
|
+
start: "\""
|
|
71
|
+
end: "\""
|
|
72
|
+
skip: "\\\\."
|
|
73
|
+
rules:
|
|
74
|
+
- constant.specialChar: "\\\\([\"'bfnrst\\x24\\\\]|u[a-fA-F0-9]{4})"
|
|
75
|
+
- identifier.var: "\\x24[\\w\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+([.][a-zA-Z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE]+)*"
|
|
76
|
+
- identifier: "\\x24[{].*[}]"
|
|
77
|
+
|
|
78
|
+
# Single-quoted strings
|
|
79
|
+
- constant.string:
|
|
80
|
+
start: "'"
|
|
81
|
+
end: "'"
|
|
82
|
+
skip: "\\\\."
|
|
83
|
+
rules:
|
|
84
|
+
- constant.specialChar: "\\\\([\"'bfnrst\\x24\\\\]|u[a-fA-F0-9]{4})"
|
|
85
|
+
|
|
86
|
+
# Slashy strings are left out, because they match in unwanted places pretty much all the time
|
|
87
|
+
# Dollar-slashy strings
|
|
88
|
+
- constant.string:
|
|
89
|
+
start: "[$]/"
|
|
90
|
+
end: "/[$]"
|
|
91
|
+
rules: []
|
|
92
|
+
|
|
93
|
+
# Single-line comments
|
|
94
|
+
- comment:
|
|
95
|
+
start: "//"
|
|
96
|
+
end: "$"
|
|
97
|
+
rules:
|
|
98
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
99
|
+
|
|
100
|
+
# Multiline comments
|
|
101
|
+
- comment:
|
|
102
|
+
start: "/[*]"
|
|
103
|
+
end: "[*]/"
|
|
104
|
+
rules:
|
|
105
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
106
|
+
|
|
107
|
+
# Groovydoc comments
|
|
108
|
+
- comment:
|
|
109
|
+
start: "/[*][*]@?"
|
|
110
|
+
end: "[*]/"
|
|
111
|
+
rules: []
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
filetype: haml
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.haml$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- symbol: "-|="
|
|
8
|
+
- default: "->|=>"
|
|
9
|
+
- constant: "([ ]|^)%[0-9A-Za-z_]+>"
|
|
10
|
+
- special: ":[0-9A-Za-z_]+>"
|
|
11
|
+
- type: "\\.[A-Za-z_]+>"
|
|
12
|
+
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
|
|
13
|
+
- constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
|
|
14
|
+
- identifier: "#\\{[^}]*\\}"
|
|
15
|
+
- identifier.var: "(@|@@)[0-9A-Z_a-z]+"
|
|
16
|
+
- comment: "#[^{].*$|#$"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
filetype: hare
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.ha$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
|
8
|
+
|
|
9
|
+
- type: "\\b(bool|char|str|rune|void)\\b"
|
|
10
|
+
- type: "\\b(f32|f64|uint|int|u8|u16|u32|u64|i8|i16|i32|i64|uintptr)\\b"
|
|
11
|
+
|
|
12
|
+
- statement: "\\b(case|else|for|if|switch)\\b"
|
|
13
|
+
- statement: "\\b(continue|break|return)\\b"
|
|
14
|
+
|
|
15
|
+
- special: "\\b(as|const|def|defer|enum|export|fn|is|let|match|static|struct|type|union|yield|_)\\b"
|
|
16
|
+
- preproc: "\\b(abort|alloc|append|assert|delete|free|insert|len|nullable|offset|size)\\b"
|
|
17
|
+
- preproc: "^use .+;"
|
|
18
|
+
- preproc: "\\@([a-zA-Z_][0-9a-zA-Z_]+)\\b"
|
|
19
|
+
|
|
20
|
+
- constant: "\\b(false|null|true)\\b"
|
|
21
|
+
- constant.number: "\\b(0x[0-9A-Fa-f]+(i(8|16|32|64)?|u(8|16|32|64)?|z)?)\\b"
|
|
22
|
+
- constant.number: "\\b(0o[0-7]+(i(8|16|32|64)?|u(8|16|32|64)?|z)?)\\b"
|
|
23
|
+
- constant.number: "\\b(0b[01]+(i(8|16|32|64)?|u(8|16|32|64)?|z)?)\\b"
|
|
24
|
+
|
|
25
|
+
- constant.specialChar: "\\\".*\\\""
|
|
26
|
+
- constant.specialChar: "`.*`"
|
|
27
|
+
- constant.specialChar: "'([^'\\\\]|\\\\(0|a|b|f|n|r|t|v|\\\\|'|\\\"|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}))'"
|
|
28
|
+
|
|
29
|
+
- symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&)"
|
|
30
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
31
|
+
|
|
32
|
+
- constant.string:
|
|
33
|
+
start: "\""
|
|
34
|
+
end: "\""
|
|
35
|
+
skip: "\\\\."
|
|
36
|
+
rules:
|
|
37
|
+
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
|
38
|
+
|
|
39
|
+
- constant.string:
|
|
40
|
+
start: "'"
|
|
41
|
+
end: "'"
|
|
42
|
+
skip: "\\\\."
|
|
43
|
+
rules:
|
|
44
|
+
- error: "..+"
|
|
45
|
+
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
|
46
|
+
|
|
47
|
+
- comment:
|
|
48
|
+
start: "//"
|
|
49
|
+
end: "$"
|
|
50
|
+
rules:
|
|
51
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
52
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
filetype: haskell
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.hs$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- symbol.operator: "[!#$%&:*+/<=>?@.\\\\^\\|~\\p{Sm}\\-]+"
|
|
8
|
+
|
|
9
|
+
# Identifiers (with or without a module name)
|
|
10
|
+
- type: "\\b([A-Z][A-Za-z0-9_]*\\.)*[A-Z]+[A-Za-z0-9_']*\\b"
|
|
11
|
+
- default: "\\b([A-Z][A-Za-z0-9_]*\\.)*[a-z][A-Za-z0-9_']*\\b"
|
|
12
|
+
|
|
13
|
+
- statement: ";"
|
|
14
|
+
- symbol.bracket: "[\\(\\)\\[\\]\\{\\}]"
|
|
15
|
+
- special: "`[A-Za-z0-9']+`"
|
|
16
|
+
|
|
17
|
+
# Keywords
|
|
18
|
+
- statement: "\\b(case|of|class|data|default|deriving|do|forall|foreign|hiding|if|then|else|import|infix|infixl|infixr|instance|let|in|mdo|module|newtype|qualified|type|where)\\b"
|
|
19
|
+
|
|
20
|
+
# Data constructors
|
|
21
|
+
- constant.bool: "\\b(True|False)\\b"
|
|
22
|
+
- constant: "\\b(Nothing|Just|Left|Right|LT|EQ|GT)\\b"
|
|
23
|
+
|
|
24
|
+
- constant: "\\(\\)" # Unit
|
|
25
|
+
- constant.number: "\\b(0[xX][0-9A-Fa-f]+|0[oO][0-7]+|0[bB][01]+|[-]?[0-9]+([.][0-9]+)?([eE][+-]?[0-9]+)?)\\b"
|
|
26
|
+
|
|
27
|
+
# Data classes
|
|
28
|
+
- identifier.class: "\\b(Additive|Applicative|Bounded|Data|Enum|Eq|Floating|Foldable|Fractional|Functor|Integral|Monad|MonadPlus|Monoid|Num|Ord|Read|Real|RealFloat|RealFrac|Semigroup|Show|Traversable|Typeable|Zip)[ ]"
|
|
29
|
+
|
|
30
|
+
# Strings
|
|
31
|
+
- constant.string:
|
|
32
|
+
start: "\""
|
|
33
|
+
end: "\""
|
|
34
|
+
skip: "\\\\."
|
|
35
|
+
rules:
|
|
36
|
+
- special: "\\\\&"
|
|
37
|
+
- constant.specialChar: "\\\\([abfnrtv\"'\\\\]|[0-9]+|x[0-9a-fA-F]+|o[0-7]+|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC[1-4]|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL)"
|
|
38
|
+
|
|
39
|
+
# Comments
|
|
40
|
+
- comment:
|
|
41
|
+
start: "--"
|
|
42
|
+
end: "$"
|
|
43
|
+
rules:
|
|
44
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
45
|
+
|
|
46
|
+
- comment:
|
|
47
|
+
start: "\\{-"
|
|
48
|
+
end: "-\\}"
|
|
49
|
+
rules:
|
|
50
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
51
|
+
|
|
52
|
+
- identifier.macro: "undefined"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
filetype: hc
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.(hc|HC)$|\\.(hh|HH)$|\\.ii?$|\\.(def)$)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
|
8
|
+
- type: "\\b(F64|I8|U8|I16|U16|I32|U32|I64|U64|sizeof|enum|U0|static|extern|struct|union|class|intern|public|argc|argv|asm)\\b"
|
|
9
|
+
|
|
10
|
+
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
|
|
11
|
+
- statement: "\\b(try|catch|throw|goto|continue|break|return)\\b"
|
|
12
|
+
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|help_index|ifjit|ifaot|exe)"
|
|
13
|
+
|
|
14
|
+
# Operator Color
|
|
15
|
+
- symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&)"
|
|
16
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
17
|
+
# Integer Constants
|
|
18
|
+
- constant.number: "(\\b([1-9][0-9]*|0[0-7]*|0[Xx][0-9A-Fa-f]+|0[Bb][01]+)([Uu]?[Ll][Ll]?|[Ll][Ll]?[Uu]?)?\\b)"
|
|
19
|
+
# Decimal Floating Constants
|
|
20
|
+
- constant.number: "(\\b(([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)[FfLl]?\\b)"
|
|
21
|
+
# Hexadecimal Floating Constants
|
|
22
|
+
- constant.number: "(\\b0[Xx]([0-9A-Za-z]*[.][0-9A-Za-z]+|[0-9A-Za-z]+[.][0-9A-Za-z]*)[Pp][+-]?[0-9]+[FfLl]?\\b)"
|
|
23
|
+
- constant.number: "NULL"
|
|
24
|
+
- constant.number: "TRUE"
|
|
25
|
+
- constant.number: "FALSE"
|
|
26
|
+
|
|
27
|
+
- constant.string:
|
|
28
|
+
start: "\""
|
|
29
|
+
end: "\""
|
|
30
|
+
skip: "\\\\."
|
|
31
|
+
rules:
|
|
32
|
+
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
|
33
|
+
|
|
34
|
+
- constant.string:
|
|
35
|
+
start: "'"
|
|
36
|
+
end: "'"
|
|
37
|
+
skip: "\\\\."
|
|
38
|
+
rules:
|
|
39
|
+
- error: "..+"
|
|
40
|
+
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
|
|
41
|
+
|
|
42
|
+
- comment:
|
|
43
|
+
start: "//"
|
|
44
|
+
end: "$"
|
|
45
|
+
rules:
|
|
46
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
47
|
+
|
|
48
|
+
- comment:
|
|
49
|
+
start: "/\\*"
|
|
50
|
+
end: "\\*/"
|
|
51
|
+
rules:
|
|
52
|
+
- todo: "(TODO|XXX|FIXME):?"
|