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.
Files changed (237) hide show
  1. package/LICENSE +22 -0
  2. package/PORTING.md +34 -0
  3. package/README.md +153 -0
  4. package/bmi +5 -0
  5. package/bun.lock +17 -0
  6. package/bunmicro +5 -0
  7. package/hlw.md +5 -0
  8. package/package.json +18 -0
  9. package/runtime/colorschemes/atom-dark.micro +33 -0
  10. package/runtime/colorschemes/bubblegum.micro +31 -0
  11. package/runtime/colorschemes/cmc-16.micro +47 -0
  12. package/runtime/colorschemes/cmc-tc.micro +43 -0
  13. package/runtime/colorschemes/darcula.micro +34 -0
  14. package/runtime/colorschemes/default.micro +1 -0
  15. package/runtime/colorschemes/dracula-tc.micro +49 -0
  16. package/runtime/colorschemes/dukedark-tc.micro +38 -0
  17. package/runtime/colorschemes/dukelight-tc.micro +38 -0
  18. package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
  19. package/runtime/colorschemes/geany.micro +29 -0
  20. package/runtime/colorschemes/gotham.micro +29 -0
  21. package/runtime/colorschemes/gruvbox-tc.micro +29 -0
  22. package/runtime/colorschemes/gruvbox.micro +26 -0
  23. package/runtime/colorschemes/material-tc.micro +36 -0
  24. package/runtime/colorschemes/monokai-dark.micro +28 -0
  25. package/runtime/colorschemes/monokai.micro +34 -0
  26. package/runtime/colorschemes/one-dark.micro +39 -0
  27. package/runtime/colorschemes/railscast.micro +37 -0
  28. package/runtime/colorschemes/simple.micro +33 -0
  29. package/runtime/colorschemes/solarized-tc.micro +31 -0
  30. package/runtime/colorschemes/solarized.micro +30 -0
  31. package/runtime/colorschemes/sunny-day.micro +29 -0
  32. package/runtime/colorschemes/twilight.micro +40 -0
  33. package/runtime/colorschemes/zenburn.micro +30 -0
  34. package/runtime/help/actions.md +161 -0
  35. package/runtime/help/colors.md +421 -0
  36. package/runtime/help/commands.md +161 -0
  37. package/runtime/help/copypaste.md +149 -0
  38. package/runtime/help/defaultkeys.md +141 -0
  39. package/runtime/help/help.md +63 -0
  40. package/runtime/help/keybindings.md +760 -0
  41. package/runtime/help/linter.md +90 -0
  42. package/runtime/help/options.md +701 -0
  43. package/runtime/help/plugins.md +544 -0
  44. package/runtime/help/tutorial.md +112 -0
  45. package/runtime/jsplugins/chapter/chapter.js +108 -0
  46. package/runtime/jsplugins/diff/diff.js +46 -0
  47. package/runtime/jsplugins/example/example.js +108 -0
  48. package/runtime/jsplugins/linter/linter.js +281 -0
  49. package/runtime/plugins/autoclose/autoclose.lua +75 -0
  50. package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
  51. package/runtime/plugins/literate/README.md +5 -0
  52. package/runtime/plugins/literate/literate.lua +55 -0
  53. package/runtime/plugins/status/help/status.md +21 -0
  54. package/runtime/plugins/status/status.lua +62 -0
  55. package/runtime/syntax/LICENSE +22 -0
  56. package/runtime/syntax/PowerShell.yaml +128 -0
  57. package/runtime/syntax/README.md +63 -0
  58. package/runtime/syntax/ada.yaml +43 -0
  59. package/runtime/syntax/apacheconf.yaml +59 -0
  60. package/runtime/syntax/arduino.yaml +101 -0
  61. package/runtime/syntax/asciidoc.yaml +51 -0
  62. package/runtime/syntax/asm.yaml +123 -0
  63. package/runtime/syntax/ats.yaml +99 -0
  64. package/runtime/syntax/awk.yaml +44 -0
  65. package/runtime/syntax/b.yaml +87 -0
  66. package/runtime/syntax/bat.yaml +57 -0
  67. package/runtime/syntax/c.yaml +60 -0
  68. package/runtime/syntax/caddyfile.yaml +23 -0
  69. package/runtime/syntax/cake.yaml +7 -0
  70. package/runtime/syntax/clojure.yaml +38 -0
  71. package/runtime/syntax/cmake.yaml +42 -0
  72. package/runtime/syntax/coffeescript.yaml +56 -0
  73. package/runtime/syntax/colortest.yaml +19 -0
  74. package/runtime/syntax/conky.yaml +17 -0
  75. package/runtime/syntax/cpp.yaml +91 -0
  76. package/runtime/syntax/crontab.yaml +36 -0
  77. package/runtime/syntax/crystal.yaml +72 -0
  78. package/runtime/syntax/csharp.yaml +52 -0
  79. package/runtime/syntax/css.yaml +44 -0
  80. package/runtime/syntax/csx.yaml +8 -0
  81. package/runtime/syntax/cuda.yaml +68 -0
  82. package/runtime/syntax/cython.yaml +52 -0
  83. package/runtime/syntax/d.yaml +121 -0
  84. package/runtime/syntax/dart.yaml +46 -0
  85. package/runtime/syntax/default.yaml +10 -0
  86. package/runtime/syntax/dockerfile.yaml +36 -0
  87. package/runtime/syntax/dot.yaml +29 -0
  88. package/runtime/syntax/elixir.yaml +30 -0
  89. package/runtime/syntax/elm.yaml +38 -0
  90. package/runtime/syntax/erb.yaml +42 -0
  91. package/runtime/syntax/erlang.yaml +45 -0
  92. package/runtime/syntax/fish.yaml +48 -0
  93. package/runtime/syntax/forth.yaml +34 -0
  94. package/runtime/syntax/fortran.yaml +64 -0
  95. package/runtime/syntax/freebsd-kernel.yaml +14 -0
  96. package/runtime/syntax/fsharp.yaml +48 -0
  97. package/runtime/syntax/gdscript.yaml +61 -0
  98. package/runtime/syntax/gemini.yaml +19 -0
  99. package/runtime/syntax/gentoo-ebuild.yaml +48 -0
  100. package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
  101. package/runtime/syntax/git-commit.yaml +35 -0
  102. package/runtime/syntax/git-config.yaml +14 -0
  103. package/runtime/syntax/git-rebase-todo.yaml +19 -0
  104. package/runtime/syntax/gleam.yaml +69 -0
  105. package/runtime/syntax/glsl.yaml +26 -0
  106. package/runtime/syntax/gnuplot.yaml +15 -0
  107. package/runtime/syntax/go.yaml +62 -0
  108. package/runtime/syntax/godoc.yaml +17 -0
  109. package/runtime/syntax/golo.yaml +73 -0
  110. package/runtime/syntax/gomod.yaml +31 -0
  111. package/runtime/syntax/graphql.yaml +47 -0
  112. package/runtime/syntax/groff.yaml +30 -0
  113. package/runtime/syntax/groovy.yaml +111 -0
  114. package/runtime/syntax/haml.yaml +16 -0
  115. package/runtime/syntax/hare.yaml +52 -0
  116. package/runtime/syntax/haskell.yaml +52 -0
  117. package/runtime/syntax/hc.yaml +52 -0
  118. package/runtime/syntax/html.yaml +70 -0
  119. package/runtime/syntax/html4.yaml +25 -0
  120. package/runtime/syntax/html5.yaml +25 -0
  121. package/runtime/syntax/ini.yaml +23 -0
  122. package/runtime/syntax/inputrc.yaml +14 -0
  123. package/runtime/syntax/java.yaml +37 -0
  124. package/runtime/syntax/javascript.yaml +76 -0
  125. package/runtime/syntax/jinja2.yaml +19 -0
  126. package/runtime/syntax/json.yaml +39 -0
  127. package/runtime/syntax/jsonnet.yaml +92 -0
  128. package/runtime/syntax/julia.yaml +57 -0
  129. package/runtime/syntax/justfile.yaml +40 -0
  130. package/runtime/syntax/keymap.yaml +27 -0
  131. package/runtime/syntax/kickstart.yaml +16 -0
  132. package/runtime/syntax/kotlin.yaml +66 -0
  133. package/runtime/syntax/kvlang.yaml +67 -0
  134. package/runtime/syntax/ledger.yaml +14 -0
  135. package/runtime/syntax/lfe.yaml +17 -0
  136. package/runtime/syntax/lilypond.yaml +26 -0
  137. package/runtime/syntax/lisp.yaml +17 -0
  138. package/runtime/syntax/log.yaml +92 -0
  139. package/runtime/syntax/lua.yaml +111 -0
  140. package/runtime/syntax/mail.yaml +25 -0
  141. package/runtime/syntax/makefile.yaml +38 -0
  142. package/runtime/syntax/man.yaml +12 -0
  143. package/runtime/syntax/markdown.yaml +49 -0
  144. package/runtime/syntax/mc.yaml +23 -0
  145. package/runtime/syntax/meson.yaml +51 -0
  146. package/runtime/syntax/micro.yaml +34 -0
  147. package/runtime/syntax/mpdconf.yaml +13 -0
  148. package/runtime/syntax/msbuild.yaml +6 -0
  149. package/runtime/syntax/nanorc.yaml +16 -0
  150. package/runtime/syntax/nftables.yaml +30 -0
  151. package/runtime/syntax/nginx.yaml +22 -0
  152. package/runtime/syntax/nim.yaml +27 -0
  153. package/runtime/syntax/nix.yaml +32 -0
  154. package/runtime/syntax/nu.yaml +114 -0
  155. package/runtime/syntax/objc.yaml +60 -0
  156. package/runtime/syntax/ocaml.yaml +43 -0
  157. package/runtime/syntax/octave.yaml +83 -0
  158. package/runtime/syntax/odin.yaml +64 -0
  159. package/runtime/syntax/pascal.yaml +45 -0
  160. package/runtime/syntax/patch.yaml +14 -0
  161. package/runtime/syntax/peg.yaml +16 -0
  162. package/runtime/syntax/perl.yaml +58 -0
  163. package/runtime/syntax/php.yaml +60 -0
  164. package/runtime/syntax/pkg-config.yaml +12 -0
  165. package/runtime/syntax/po.yaml +12 -0
  166. package/runtime/syntax/pony.yaml +37 -0
  167. package/runtime/syntax/pov.yaml +21 -0
  168. package/runtime/syntax/privoxy-action.yaml +14 -0
  169. package/runtime/syntax/privoxy-config.yaml +10 -0
  170. package/runtime/syntax/privoxy-filter.yaml +12 -0
  171. package/runtime/syntax/proto.yaml +40 -0
  172. package/runtime/syntax/prql.yaml +84 -0
  173. package/runtime/syntax/puppet.yaml +22 -0
  174. package/runtime/syntax/python2.yaml +60 -0
  175. package/runtime/syntax/python3.yaml +62 -0
  176. package/runtime/syntax/r.yaml +32 -0
  177. package/runtime/syntax/raku.yaml +42 -0
  178. package/runtime/syntax/reST.yaml +18 -0
  179. package/runtime/syntax/renpy.yaml +15 -0
  180. package/runtime/syntax/rpmspec.yaml +43 -0
  181. package/runtime/syntax/ruby.yaml +73 -0
  182. package/runtime/syntax/rust.yaml +78 -0
  183. package/runtime/syntax/sage.yaml +60 -0
  184. package/runtime/syntax/scad.yaml +53 -0
  185. package/runtime/syntax/scala.yaml +33 -0
  186. package/runtime/syntax/sed.yaml +13 -0
  187. package/runtime/syntax/sh.yaml +69 -0
  188. package/runtime/syntax/sls.yaml +15 -0
  189. package/runtime/syntax/smalltalk.yaml +55 -0
  190. package/runtime/syntax/solidity.yaml +41 -0
  191. package/runtime/syntax/sql.yaml +35 -0
  192. package/runtime/syntax/stata.yaml +67 -0
  193. package/runtime/syntax/svelte.yaml +27 -0
  194. package/runtime/syntax/swift.yaml +103 -0
  195. package/runtime/syntax/systemd.yaml +16 -0
  196. package/runtime/syntax/tcl.yaml +18 -0
  197. package/runtime/syntax/terraform.yaml +87 -0
  198. package/runtime/syntax/tex.yaml +32 -0
  199. package/runtime/syntax/toml.yaml +56 -0
  200. package/runtime/syntax/twig.yaml +55 -0
  201. package/runtime/syntax/typescript.yaml +49 -0
  202. package/runtime/syntax/v.yaml +80 -0
  203. package/runtime/syntax/vala.yaml +26 -0
  204. package/runtime/syntax/verilog.yaml +60 -0
  205. package/runtime/syntax/vhdl.yaml +37 -0
  206. package/runtime/syntax/vi.yaml +31 -0
  207. package/runtime/syntax/vue.yaml +64 -0
  208. package/runtime/syntax/xml.yaml +37 -0
  209. package/runtime/syntax/xresources.yaml +14 -0
  210. package/runtime/syntax/yaml.yaml +34 -0
  211. package/runtime/syntax/yum.yaml +12 -0
  212. package/runtime/syntax/zig.yaml +52 -0
  213. package/runtime/syntax/zscript.yaml +72 -0
  214. package/runtime/syntax/zsh.yaml +52 -0
  215. package/src/buffer/buffer.js +126 -0
  216. package/src/buffer/loc.js +38 -0
  217. package/src/buffer/message.js +29 -0
  218. package/src/config/colorscheme.js +109 -0
  219. package/src/config/config.js +118 -0
  220. package/src/config/defaults.js +102 -0
  221. package/src/display/ansi-style.js +60 -0
  222. package/src/highlight/highlighter.js +237 -0
  223. package/src/highlight/parser.js +137 -0
  224. package/src/index.js +5942 -0
  225. package/src/lua/engine.js +38 -0
  226. package/src/platform/archive.js +50 -0
  227. package/src/platform/clipboard.js +160 -0
  228. package/src/platform/commands.js +140 -0
  229. package/src/plugins/js-bridge.js +902 -0
  230. package/src/plugins/manager.js +619 -0
  231. package/src/runtime/registry.js +89 -0
  232. package/src/screen/cell-buffer.js +81 -0
  233. package/src/screen/events.js +263 -0
  234. package/src/screen/screen.js +118 -0
  235. package/src/screen/vt100.js +391 -0
  236. package/src/shell/shell.js +70 -0
  237. package/todo.txt +359 -0
@@ -0,0 +1,12 @@
1
+ filetype: pc
2
+
3
+ detect:
4
+ filename: "\\.pc$"
5
+
6
+ rules:
7
+ - preproc: "^(Name|Description|URL|Version|Conflicts|Cflags):"
8
+ - preproc: "^(Requires|Libs)(\\.private)?:"
9
+ - symbol.operator: "="
10
+ - identifier.var: "\\$\\{[A-Za-z_][A-Za-z0-9_]*\\}"
11
+ - indent-char.whitespace: "[[:space:]]+$"
12
+ - indent-char: " + +| + +"
@@ -0,0 +1,12 @@
1
+ filetype: po
2
+
3
+ detect:
4
+ filename: "\\.pot?$"
5
+
6
+ rules:
7
+ - preproc: "\\b(msgid|msgstr)\\b"
8
+ - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
9
+ - special: "\\\\.?"
10
+ - comment: "(^|[[:space:]])#([^{].*)?$"
11
+ - indent-char.whitespace: "[[:space:]]+$"
12
+ - indent-char: " + +| + +"
@@ -0,0 +1,37 @@
1
+ filetype: pony
2
+
3
+ detect:
4
+ filename: "\\.pony$"
5
+
6
+ rules:
7
+ - statement: "\\b(type|interface|trait|primitive|class|struct|actor)\\b"
8
+ - statement: "\\b(compiler_intrinsic)\\b"
9
+ - statement: "\\b(use)\\b"
10
+ - statement: "\\b(var|let|embed)\\b"
11
+ - statement: "\\b(new|be|fun)\\b"
12
+ - statement: "\\b(iso|trn|ref|val|box|tag|consume)\\b"
13
+ - statement: "\\b(break|continue|return|error)\\b"
14
+ - statement: "\\b(if|then|elseif|else|end|match|where|try|with|as|recover|object|lambda|as|digestof|ifdef)\\b"
15
+ - statement: "\\b(while|do|repeat|until|for|in)\\b"
16
+ - statement: "(\\?|=>)"
17
+ - statement: "(\\||\\&|\\,|\\^)"
18
+ - symbol.operator: "(\\-|\\+|\\*|/|\\!|%|<<|>>)"
19
+ - symbol.operator: "(==|!=|<=|>=|<|>)"
20
+ - statement: "\\b(is|isnt|not|and|or|xor)\\b"
21
+ - type: "\\b(_*[A-Z][_a-zA-Z0-9\\']*)\\b"
22
+ - constant: "\\b(this)\\b"
23
+ - constant.bool: "\\b(true|false)\\b"
24
+ - constant.number: "\\b((0b[0-1_]*)|(0o[0-7_]*)|(0x[0-9a-fA-F_]*)|([0-9_]+(\\.[0-9_]+)?((e|E)(\\\\+|-)?[0-9_]+)?))\\b"
25
+ - constant.string: "\"(\\\\.|[^\"])*\""
26
+ - comment:
27
+ start: "\"\"\"[^\"]*"
28
+ end: "\"\"\""
29
+ rules: []
30
+
31
+ - comment: "(^|[[:space:]])//.*"
32
+ - comment:
33
+ start: "/\\*"
34
+ end: "\\*/"
35
+ rules: []
36
+
37
+ - todo: "TODO:?"
@@ -0,0 +1,21 @@
1
+ filetype: pov
2
+
3
+ detect:
4
+ filename: "\\.(pov|POV|povray|POVRAY)$"
5
+
6
+ rules:
7
+ - preproc: "^[[:space:]]*#[[:space:]]*(declare)"
8
+ - statement: "\\b(sphere|cylinder|translate|matrix|rotate|scale)\\b"
9
+ - statement: "\\b(orthographic|location|up|right|direction|clipped_by)\\b"
10
+ - statement: "\\b(fog_type|fog_offset|fog_alt|rgb|distance|transform)\\b"
11
+ - identifier: "^\\b(texture)\\b"
12
+ - identifier: "\\b(light_source|background)\\b"
13
+ - identifier: "\\b(fog|object|camera)\\b"
14
+ - symbol.operator: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
15
+ - special: "\\b(union|group|subgroup)\\b"
16
+ - comment: "//.*"
17
+ - comment:
18
+ start: "/\\*"
19
+ end: "\\*/"
20
+ rules: []
21
+
@@ -0,0 +1,14 @@
1
+ filetype: privoxy-action
2
+
3
+ detect:
4
+ filename: "\\.action$"
5
+
6
+ rules:
7
+ - constant.bool.false: "[{[:space:]]\\-block([[:space:]{}]|$)"
8
+ - constant.bool.true: "[{[:space:]]\\+block([[:space:]{}]|$)"
9
+ - constant.bool.false: "-(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)"
10
+ - constant.bool.true: "\\+(add-header|change-x-forwarded-for|client-header-filter|client-header-tagger|content-type-overwrite|crunch-client-header|crunch-if-none-match|crunch-incoming-cookies|crunch-outgoing-cookies|crunch-server-header|deanimate-gifs|downgrade-http-version|fast-redirects|filter|force-text-mode|forward-override|handle-as-empty-document|handle-as-image|hide-accept-language|hide-content-disposition|hide-from-header|hide-if-modified-since|hide-referrer|hide-user-agent|limit-connect|overwrite-last-modified|prevent-compression|redirect|server-header-filter|server-header-tagger|session-cookies-only|set-image-blocker)"
11
+ - constant.specialChar: "\\\\.?"
12
+ - comment: "(^|[[:space:]])#([^{].*)?$"
13
+ - indent-char.whitespace: "[[:space:]]+$"
14
+ - indent-char: " + +| + +"
@@ -0,0 +1,10 @@
1
+ filetype: privoxy-config
2
+
3
+ detect:
4
+ filename: "privoxy/config$"
5
+
6
+ rules:
7
+ - statement: "(accept-intercepted-requests|actionsfile|admin-address|allow-cgi-request-crunching|buffer-limit|compression-level|confdir|connection-sharing|debug|default-server-timeout|deny-access|enable-compression|enable-edit-actions|enable-remote-http-toggle|enable-remote-toggle|enforce-blocks|filterfile|forward|forwarded-connect-retries|forward-socks4|forward-socks4a|forward-socks5|handle-as-empty-doc-returns-ok|hostname|keep-alive-timeout|listen-address|logdir|logfile|max-client-connections|permit-access|proxy-info-url|single-threaded|socket-timeout|split-large-forms|templdir|toggle|tolerate-pipelining|trustfile|trust-info-url|user-manual)[[:space:]]"
8
+ - comment: "(^|[[:space:]])#([^{].*)?$"
9
+ - indent-char.whitespace: "[[:space:]]+$"
10
+ - indent-char: " + +| + +"
@@ -0,0 +1,12 @@
1
+ filetype: privoxy-filter
2
+
3
+ detect:
4
+ filename: "\\.filter$"
5
+
6
+ rules:
7
+ - statement: "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEADER-FILTER|SERVER-HEADER-TAGGER): [a-z-]+"
8
+ - identifier: "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEADER-FILTER|SERVER-HEADER-TAGGER):"
9
+ - constant.specialChar: "\\\\.?"
10
+ - comment: "(^|[[:space:]])#([^{].*)?$"
11
+ - indent-char.whitespace: "[[:space:]]+$"
12
+ - indent-char: " + +| + +"
@@ -0,0 +1,40 @@
1
+ filetype: proto
2
+
3
+ detect:
4
+ filename: "(\\.(proto)$$)"
5
+
6
+ rules:
7
+ - identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
8
+ - type: "\\b(int(8|16|32|64))|string|bytes|repeated|bool|required|map|optional|oneof|union\\b"
9
+ - statement: "\\b(import|service|enum|syntax|package|option|message|rpc|returns|extensions|to)\\b"
10
+ - constant: "'\\\\(([0-3]?[0-7]{1,2}))'"
11
+ - constant: "'\\\\x[0-9A-Fa-f]{1,2}'"
12
+ - symbol.brackets: "[(){}]|\\[|\\]"
13
+ - constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
14
+
15
+ - constant.string:
16
+ start: "\""
17
+ end: "\""
18
+ skip: "\\\\."
19
+ rules:
20
+ - constant.specialChar: "\\\\."
21
+
22
+ - constant.string:
23
+ start: "'"
24
+ end: "'"
25
+ skip: "\\\\."
26
+ rules:
27
+ - preproc: "..+"
28
+ - constant.specialChar: "\\\\."
29
+
30
+ - comment:
31
+ start: "//"
32
+ end: "$"
33
+ rules:
34
+ - todo: "(TODO|XXX|FIXME):?"
35
+
36
+ - comment:
37
+ start: "/\\*"
38
+ end: "\\*/"
39
+ rules:
40
+ - todo: "(TODO|XXX|FIXME):?"
@@ -0,0 +1,84 @@
1
+ # https://prql-lang.org/
2
+ # https://github.com/PRQL/prql
3
+ filetype: prql
4
+
5
+ detect:
6
+ filename: "\\.prql$"
7
+
8
+ rules:
9
+ - statement: "\\b(let|module|into|case|type|func)\\b"
10
+
11
+ # Types
12
+ - type: "\\b(u?int(8|16|32|64)?|float(32|64)|bool|text|date|time|timestamp)\\b"
13
+ - type.keyword: "\\b(enum)\\b"
14
+ - constant.bool: "\\b(true|false|null|this|that)\\b"
15
+
16
+ # Built-in functions
17
+ - identifier: "\\b(abs|floor|ceil|pi|exp|ln|log10|log|sqrt|degrees|radians|cos|acos|sin|asin|tan|atan|pow|round)\\b" # Math module
18
+ - identifier: "\\b(min|max|sum|average|stddev|all|any|concat_array|count)\\b" # Aggregate functions
19
+ - identifier: "\\b(lag|lead|first|last|rank|rank_dense|row_number)\\b" # Window functions
20
+ - identifier: "\\b(tuple_every|tuple_map|tuple_zip|_eq|_is_null)\\b" # Tuple functions
21
+ - identifier: "\\b(as|in|from_text)\\b" # Misc
22
+ - identifier: "\\b(lower|upper|ltrim|rtrim|trim|length|extract|replace|starts_with|contains|ends_with)\\b" # Text module
23
+ - identifier: "\\b(to_text)\\b" # Date module
24
+ - identifier: "\\b(read_parquet|read_csv)\\b" # File-reading functions
25
+
26
+ # Modules
27
+ - identifier.class: "\\b(math|text|date|prql)\\b"
28
+
29
+ # Transforms
30
+ - statement: "\\b(aggregate|derive|filter|from|group|join|select|sort|take|window)\\b"
31
+
32
+ # Operators
33
+ - symbol.operator: "([~^.:;,+*|=!\\%@?]|<|>|/|-|&)"
34
+
35
+ # Brackets
36
+ - symbol.brackets: "[{}()\\[\\]]"
37
+
38
+ # Numbers
39
+ - constant.number: "\\b[0-9](_?[0-9])*(\\.([0-9](_?[0-9])*)?)?(e[0-9](_?[0-9])*)?\\b" # decimal
40
+ - constant.number: "\\b0b(_?[01])+\\b" # bin
41
+ - constant.number: "\\b0o(_?[0-7])+\\b" # oct
42
+ - constant.number: "\\b0x(_?[0-9a-fA-F])+\\b" # hex
43
+ - constant: "\\b[0-9]+(years|months|weeks|days|hours|minutes|seconds|milliseconds|microseconds)\\b"
44
+
45
+ - constant.string:
46
+ start: "[frs]?\"\"\""
47
+ end: "\"\"\""
48
+ skip: "\\\\."
49
+ rules:
50
+ - constant.specialChar: "\\\\[bfnrt'\"\\\\]"
51
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u\\{[0-9A-Fa-f]{1,6}\\})"
52
+
53
+ - constant.string:
54
+ start: "[frs]?'''"
55
+ end: "'''"
56
+ skip: "\\\\."
57
+ rules:
58
+ - constant.specialChar: "\\\\[bfnrt'\"\\\\]"
59
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u\\{[0-9A-Fa-f]{1,6}\\})"
60
+
61
+ - constant.string:
62
+ start: "[frs]?\""
63
+ end: "\""
64
+ skip: "\\\\."
65
+ rules:
66
+ - constant.specialChar: "\\\\[bfnrt'\"\\\\]"
67
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u\\{[0-9A-Fa-f]{1,6}\\})"
68
+
69
+ - constant.string:
70
+ start: "[frs]?'"
71
+ end: "'"
72
+ skip: "\\\\."
73
+ rules:
74
+ - constant.specialChar: "\\\\[bfnrt'\"\\\\]"
75
+ - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u\\{[0-9A-Fa-f]{1,6}\\})"
76
+
77
+ - comment:
78
+ start: "#"
79
+ end: "$"
80
+ rules:
81
+ - todo: "(TODO|FIXME|NOTE):?"
82
+
83
+ # Decorators
84
+ - preproc: "@\\{([a-z]+(=[a-z0-9]+,?)?)*\\}"
@@ -0,0 +1,22 @@
1
+ filetype: puppet
2
+
3
+ detect:
4
+ filename: "\\.pp$"
5
+
6
+ rules:
7
+ - default: "^[[:space:]]([a-z][a-z0-9_]+)"
8
+ - identifier.var: "\\$[a-z:][a-z0-9_:]+"
9
+ - type: "\\b(augeas|computer|cron|exec|file|filebucket|group|host|interface|k5login|macauthorization|mailalias|maillist|mcx|mount|nagios_command|nagios_contact|nagios_contactgroup|nagios_host|nagios_hostdependency|nagios_hostescalation|nagios_hostextinfo|nagios_hostgroup|nagios_service|nagios_servicedependency|nagios_serviceescalation|nagios_serviceextinfo|nagios_servicegroup|nagios_timeperiod|notify|package|resources|router|schedule|scheduled_task|selboolean|selmodule|service|ssh_authorized_key|sshkey|stage|tidy|user|vlan|yumrepo|zfs|zone|zpool|anchor)\\b"
10
+ - statement: "\\b(class|define|if|else|undef|inherits)\\b"
11
+ - symbol: "(=|-|~|>)"
12
+ - identifier.var: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
13
+ - symbol: "([ ]|^):[0-9A-Z_]+\\b"
14
+ - constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
15
+ - constant.string: "`[^`]*`|%x\\{[^}]*\\}"
16
+ - constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
17
+ - special: "\\$\\{[^}]*\\}"
18
+ - constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
19
+ - comment: "#[^{].*$|#$"
20
+ - comment.bright: "##[^{].*$|##$"
21
+ - todo: "(XXX|TODO|FIXME|\\?\\?\\?)"
22
+ - indent-char.whitespace: "[[:space:]]+$"
@@ -0,0 +1,60 @@
1
+ filetype: python2
2
+
3
+ detect:
4
+ filename: "\\.py2$"
5
+ header: "^#!.*/(env +)?python2$"
6
+
7
+ rules:
8
+
9
+ # built-in objects
10
+ - constant: "\\b(None|self|True|False)\\b"
11
+ # built-in attributes
12
+ - constant: "\\b(__bases__|__builtin__|__class__|__debug__|__dict__|__doc__|__file__|__members__|__methods__|__name__|__self__)\\b"
13
+ # built-in functions
14
+ - identifier: "\\b(abs|apply|callable|chr|cmp|compile|delattr|dir|divmod|eval|exec|execfile|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|intern|isinstance|issubclass|len|locals|max|min|next|oct|open|ord|pow|range|raw_input|reduce|reload|repr|round|setattr|unichr|vars|zip|__import__)\\b"
15
+ # special method names
16
+ - identifier: "\\b(__abs__|__add__|__and__|__call__|__cmp__|__coerce__|__complex__|__concat__|__contains__|__del__|__delattr__|__delitem__|__dict__|__delslice__|__div__|__divmod__|__float__|__getattr__|__getitem__|__getslice__|__hash__|__hex__|__init__|__int__|__inv__|__invert__|__len__|__long__|__lshift__|__mod__|__mul__|__neg__|__nonzero__|__oct__|__or__|__pos__|__pow__|__radd__|__rand__|__rcmp__|__rdiv__|__rdivmod__|__repeat__|__repr__|__rlshift__|__rmod__|__rmul__|__ror__|__rpow__|__rrshift__|__rshift__|__rsub__|__rxor__|__setattr__|__setitem__|__setslice__|__str__|__sub__|__xor__)\\b"
17
+ # types
18
+ - type: "\\b(basestring|bool|buffer|bytearray|bytes|classmethod|complex|dict|enumerate|file|float|frozenset|int|list|long|map|memoryview|object|property|reversed|set|slice|staticmethod|str|super|tuple|type|unicode|xrange)\\b"
19
+ # definitions
20
+ - identifier: "def [a-zA-Z_0-9]+"
21
+ # keywords
22
+ - statement: "\\b(and|as|assert|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\\b"
23
+ # decorators
24
+ - preproc: "^\\s*@[^(]*"
25
+ # operators
26
+ - symbol.operator: "([.:;,+*|=!\\%@]|<|>|/|-|&)"
27
+ # parentheses
28
+ - symbol.brackets: "([(){}]|\\[|\\])"
29
+ # numbers
30
+ - constant.number: "\\b[0-9]+\\b"
31
+
32
+ - constant.string:
33
+ start: "\"\"\""
34
+ end: "\"\"\""
35
+ rules: []
36
+
37
+ - constant.string:
38
+ start: "'''"
39
+ end: "'''"
40
+ rules: []
41
+
42
+ - constant.string:
43
+ start: "\""
44
+ end: "\""
45
+ skip: "\\\\."
46
+ rules:
47
+ - constant.specialChar: "\\\\."
48
+
49
+ - constant.string:
50
+ start: "'"
51
+ end: "'"
52
+ skip: "\\\\."
53
+ rules:
54
+ - constant.specialChar: "\\\\."
55
+
56
+ - comment:
57
+ start: "#"
58
+ end: "$"
59
+ rules: []
60
+
@@ -0,0 +1,62 @@
1
+ filetype: python
2
+
3
+ detect:
4
+ filename: "\\.py(3|w)?$"
5
+ header: "^#!.*/(env +)?python(3)?$"
6
+
7
+ rules:
8
+ # built-in objects
9
+ - constant: "\\b(Ellipsis|None|self|cls|True|False)\\b"
10
+ # built-in attributes
11
+ - constant: "\\b(__bases__|__builtin__|__class__|__debug__|__dict__|__doc__|__file__|__members__|__methods__|__name__|__self__)\\b"
12
+ # built-in functions
13
+ - identifier: "\\b(abs|all|any|ascii|bin|bool|breakpoint|bytearray|bytes|callable|chr|classmethod|compile|complex|delattr|dir|divmod|eval|exec|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|locals|max|min|next|nonlocal|oct|open|ord|pow|print|repr|round|setattr|sorted|sum|vars|__import__)\\b"
14
+ # special method names
15
+ - identifier: "\\b__(abs|add|and|call|cmp|coerce|complex|concat|contains|delattr|delitem|delslice|del|dict|divmod|div|float|getattr|getitem|getslice|hash|hex|iadd|iand|iconcat|ifloordiv|ilshift|imatmul|imod|imul|init|int|invert|inv|ior|ipow|irshift|isub|iter|itruediv|ixor|len|long|lshift|mod|mul|neg|next|nonzero|oct|or|pos|pow|radd|rand|rcmp|rdivmod|rdiv|repeat|repr|rlshift|rmod|rmul|ror|rpow|rrshift|rshift|rsub|rxor|setattr|setitem|setslice|str|sub|xor)__\\b"
16
+ # types
17
+ - type: "\\b(bool|bytearray|bytes|classmethod|complex|dict|enumerate|filter|float|frozenset|int|list|map|memoryview|object|property|range|reversed|set|slice|staticmethod|str|super|tuple|type|zip)\\b"
18
+ # definitions
19
+ - identifier: "def [a-zA-Z_0-9]+"
20
+ # keywords
21
+ - statement: "\\b(and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|raise|return|try|while|with|yield)\\b"
22
+ # decorators
23
+ - preproc: "^\\s*@[^(]*"
24
+ # operators
25
+ - symbol.operator: "([~^.:;,+*|=!\\%@]|<|>|/|-|&)"
26
+ # parentheses
27
+ - symbol.brackets: "([(){}]|\\[|\\])"
28
+ # numbers
29
+ - constant.number: "\\b[0-9](_?[0-9])*(\\.([0-9](_?[0-9])*)?)?(e[0-9](_?[0-9])*)?\\b" # decimal
30
+ - constant.number: "\\b0b(_?[01])+\\b" # bin
31
+ - constant.number: "\\b0o(_?[0-7])+\\b" # oct
32
+ - constant.number: "\\b0x(_?[0-9a-fA-F])+\\b" # hex
33
+
34
+ - constant.string:
35
+ start: "\"\"\""
36
+ end: "\"\"\""
37
+ rules: []
38
+
39
+ - constant.string:
40
+ start: "'''"
41
+ end: "'''"
42
+ rules: []
43
+
44
+ - constant.string:
45
+ start: "\""
46
+ end: "(\"|$)"
47
+ skip: "\\\\."
48
+ rules:
49
+ - constant.specialChar: "\\\\."
50
+
51
+ - constant.string:
52
+ start: "'"
53
+ end: "('|$)"
54
+ skip: "\\\\."
55
+ rules:
56
+ - constant.specialChar: "\\\\."
57
+
58
+ - comment:
59
+ start: "#"
60
+ end: "$"
61
+ rules: # AKA Code tags (PEP 350)
62
+ - todo: "(TODO|FIXME|HACK|BUG|NOTE|FAQ|MNEMONIC|REQ|RFE|IDEA|PORT|\\?\\?\\?|!!!|GLOSS|SEE|TODOC|STAT|RVD|CRED):?"
@@ -0,0 +1,32 @@
1
+ filetype: r
2
+
3
+ detect:
4
+ filename: "\\.(r|R)$"
5
+
6
+ rules:
7
+
8
+ - statement: "\\b(library|require|break|else|for|function|if|ifelse|in|next|names|switch|repeat|print|try|tryCatch|isTRUE|return|while)\\b"
9
+ - constant: "\\b(T|TRUE|F|FALSE|NULL|Inf|NaN|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\\b"
10
+ - constant.number: "(\\b[0-9]+\\b|\\b0x[0-9A-Fa-f]+\\b)"
11
+ - symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&|\\^|\\$)"
12
+
13
+ - comment:
14
+ start: "#"
15
+ end: "$"
16
+ rules:
17
+ - todo: "(TODO|XXX|FIXME):?"
18
+
19
+ - constant.string:
20
+ start: "\""
21
+ end: "\""
22
+ skip: "\\\\."
23
+ rules:
24
+ - constant.specialChar: "\\\\."
25
+
26
+ - constant.string:
27
+ start: "'"
28
+ end: "'"
29
+ skip: "\\\\."
30
+ rules:
31
+ - constant.specialChar: "\\\\."
32
+
@@ -0,0 +1,42 @@
1
+ filetype: raku
2
+
3
+ detect:
4
+ filename: "\\.(p(l|m|od)?6|raku(mod|doc|test)?|nqp)$"
5
+
6
+ rules:
7
+ - type: "\\b(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\\b"
8
+ - statement: "\\b(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\\b"
9
+ - special: "\\b(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\\b"
10
+
11
+ - identifier: "[$@%&](\\.|!|\\^)?([[:alpha:]]|_)"
12
+ - identifier: "[$@%&](\\.|!|^)?([[:alpha:]]|_)([[:alnum:]]|-|_)*([[:alnum:]]|_)"
13
+ - identifier: "[$@%&](\\?|\\*)([A-Z])([A-Z]|-)*([A-Z])"
14
+
15
+ - constant.string:
16
+ start: "\""
17
+ end: "\""
18
+ skip: "\\\\."
19
+ rules:
20
+ - constant.specialChar: "\\\\."
21
+
22
+ - constant.string:
23
+ start: "'"
24
+ end: "'"
25
+ skip: "\\\\."
26
+ rules:
27
+ - constant.specialChar: "\\\\."
28
+
29
+ - preproc:
30
+ start: "(^use| = new)"
31
+ end: ";"
32
+ rules: []
33
+
34
+ - identifier.macro:
35
+ start: "<<EOSQL"
36
+ end: "EOSQL"
37
+ rules: []
38
+
39
+ - comment:
40
+ start: "#"
41
+ end: "$"
42
+ rules: []
@@ -0,0 +1,18 @@
1
+ filetype: rst
2
+
3
+ detect:
4
+ filename: "\\.rest$|\\.rst$"
5
+
6
+ rules:
7
+ - statement: "\\*\\*[^*]+\\*\\*"
8
+ - preproc: "::"
9
+ - constant.string: "`[^`]+`_{1,2}"
10
+ - constant.string: "``[^`]+``"
11
+ - identifier: "^\\.\\. .*$"
12
+ - identifier: "^__ .*$"
13
+ - type: "^###+$"
14
+ - type: "^\\*\\*\\*+$"
15
+ - special: "^===+$"
16
+ - special: "^---+$"
17
+ - special: "^\\^\\^\\^+$"
18
+ - special: "^\"\"\"+$"
@@ -0,0 +1,15 @@
1
+ filetype: renpy
2
+
3
+ detect:
4
+ filename: "\\.rpy$"
5
+
6
+ rules:
7
+ # Script language keywords.
8
+ - statement: "\\b(python|init|early|define|default|label|call|jump|image|layeredimage|screen|style|transform|menu|show|hide|scene|at|with|zorder|behind|pause|play|stop|fadeout|fadein|queue)\\b"
9
+ # ATL keywords.
10
+ - type: "\\b(repeat|block|choice|parallel|(x|y|)(pos|offset|anchor|align|center|tile|zoom)|time|linear|easein|alpha|subpixel)\\b"
11
+ - identifier: "\\bpersistent\\b"
12
+ - special: "\\$ "
13
+ # Tab characters are not allowed in Renpy scripts.
14
+ - error: "\\t"
15
+ - include: python
@@ -0,0 +1,43 @@
1
+ filetype: rpmspec
2
+
3
+ detect:
4
+ filename: "\\.spec$|\\.rpmspec$"
5
+
6
+ rules:
7
+ - preproc: "\\b(Icon|ExclusiveOs|ExcludeOs):"
8
+ - preproc: "\\b(BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch):"
9
+ - preproc: "\\b(Conflicts|Obsoletes|Provides|Requires|Requires\\(.*\\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements):"
10
+ - preproc: "\\b(Epoch|Serial|Nosource|Nopatch):"
11
+ - preproc: "\\b(AutoReq|AutoProv|AutoReqProv):"
12
+ - preproc: "\\b(Copyright|License|Summary|Summary\\(.*\\)|Distribution|Vendor|Packager|Group|Source[0-9]*|Patch[0-9]*|BuildRoot|Prefix):"
13
+ - preproc: "\\b(Name|Version|Release|Url|URL):"
14
+ - preproc:
15
+ start: "^(Source|Patch)"
16
+ end: ":"
17
+ rules: []
18
+
19
+ - preproc: "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)"
20
+ - preproc: "(ifarch|ifnarch|ifos|ifnos)"
21
+ - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
22
+ - statement: "%(if|else|endif|define|global|undefine)"
23
+ - statement: "%_?([A-Z_a-z_0-9_]*)"
24
+ - statement:
25
+ start: "%\\{"
26
+ end: "\\}"
27
+ rules: []
28
+
29
+ - statement:
30
+ start: "%\\{__"
31
+ end: "\\}"
32
+ rules: []
33
+
34
+ - statement: "\\$(RPM_BUILD_ROOT)\\>"
35
+ - special: "^%(build$|changelog|check$|clean$|description)"
36
+ - special: "^%(files|install$|package|prep$)"
37
+ - special: "^%(pre|preun|pretrans|post|postun|posttrans)"
38
+ - special: "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)"
39
+ - comment: "(^|[[:space:]])#([^{].*)?$"
40
+ - constant: "^\\*.*$"
41
+ - indent-char.whitespace: "[[:space:]]+$"
42
+ - indent-char: " + +| + +"
43
+ - todo: "TODO:?"
@@ -0,0 +1,73 @@
1
+ filetype: ruby
2
+
3
+ detect:
4
+ filename: '\.(rb|rake|gemspec)$|^(.*[\\/])?(Gemfile|config\.ru|Rakefile|Capfile|Vagrantfile|Guardfile|Appfile|Fastfile|Pluginfile|Podfile|\.?[Bb]rewfile)$'
5
+ header: "^#!.*/(env +)?ruby( |$)"
6
+
7
+ rules:
8
+ - comment.bright:
9
+ start: "##"
10
+ end: "$"
11
+ rules:
12
+ - todo: "(XXX|TODO|FIXME|BUG|\\?\\?\\?)"
13
+ - comment:
14
+ start: "#"
15
+ end: "$"
16
+ rules:
17
+ - todo: "(XXX|TODO|FIXME|BUG|\\?\\?\\?)"
18
+
19
+ - statement: "\\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\\?|do|else|elsif|end|ensure|for|if|in|module|next|nil|not|or|private|protected|public|redo|rescue|retry|return|self|super|then|undef|unless|until|when|while|yield)\\b"
20
+ - constant: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
21
+ - constant.number: "(?i)\\b0x[0-9a-fA-F][0-9a-f_]*\\b"
22
+ - constant.number: "(?i)\\b0b[01][01_]*\\b"
23
+ - constant.number: "(?i)\\b[0-9][0-9_]*(['.'][0-9_]+)?(e[\\-]?[0-9_]+)?\\b"
24
+ # Predefined global variables
25
+ - constant:
26
+ start: "[$]([!@&`'+~=/\\\\,;.<>*$?:\"_]|-[A-Za-z0-9_]|[0-9]+)"
27
+ end: "\\B|\\b"
28
+ rules: []
29
+ # Ruby "Symbols"
30
+ - constant: "(i?)([ ]|^):[0-9A-Z_]+\\b"
31
+ - constant: "\\b(__FILE__|__LINE__)\\b"
32
+ - constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
33
+
34
+ - constant.string:
35
+ start: "'"
36
+ end: "'"
37
+ skip: "\\\\."
38
+ rules: []
39
+
40
+ - constant.string:
41
+ start: "\""
42
+ end: "\""
43
+ skip: "\\\\."
44
+ rules:
45
+ - symbol.brackets:
46
+ start: "#\\{"
47
+ end: "\\}"
48
+ rules:
49
+ - default: ".*"
50
+
51
+ - constant.string.exec:
52
+ start: "`"
53
+ end: "`"
54
+ skip: "\\\\."
55
+ rules:
56
+ - symbol.brackets:
57
+ start: "#\\{"
58
+ end: "\\}"
59
+ rules:
60
+ - default: ".*"
61
+
62
+ - constant.string: "%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
63
+ - constant.string: "%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
64
+ - constant.string.exec: "%[x]\\{[^}]*\\}|%[x]\\([^)]*\\)|%[x]<[^>]*>|%[x]\\[[^]]*\\]|%[x]\\$[^$]*\\$|%[x]\\^[^^]*\\^|%[x]![^!]*!"
65
+ - constant.bool: "\\b(true|false|nil|TRUE|FALSE|NIL)\\b"
66
+ - symbol.operator: "[-+/*=<>!~%&|^]|\\b:"
67
+ - symbol.brackets: "([(){}]|\\[|\\])"
68
+ - constant.macro:
69
+ start: "<<-?'?EOT'?"
70
+ end: "^EOT"
71
+ rules: []
72
+
73
+ - preproc.shebang: "^#!.+?( |$)"