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,123 @@
|
|
|
1
|
+
filetype: asm
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(S|s|asm)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# This file is made mainly for NASM assembly
|
|
8
|
+
|
|
9
|
+
## Instructions
|
|
10
|
+
# x86
|
|
11
|
+
- statement: "\\b(?i)(mov|aaa|aad|aam|aas|adc|add|and|call|cbw|clc|cld|cli|cmc|cmp|cmpsb|cmpsw|cwd|daa|das|dec|div|esc|hlt|idiv|imul|in|inc|int|into|iret|ja|jae|jb|jbe|jc|je|jg|jge|jl|jle|jna|jnae|jnb|jnbe|jnc|jne|jng|jnge|jnl|jnle|jno|jnp|jns|jnz|jo|jp|jpe|jpo|js|jz|jcxz|jmp|lahf|lds|lea|les|lock|lodsb|lodsw|loop|loope|loopne|loopnz|loopz|movsb|movsw|mul|neg|nop|or|pop|popf|push|pushf|rcl|rcr|rep|repe|repne|repnz|repz|ret|retn|retf|rol|ror|sahf|sal|sar|sbb|scasb|scasw|shl|shr|stc|std|sti|stosb|stosw|sub|test|wait|xchg|xlat|xor)(?-i)\\b"
|
|
12
|
+
- statement: "\\b(?i)(bound|enter|ins|leave|outs|popa|pusha)(?-i)\\b"
|
|
13
|
+
- statement: "\\b(?i)(arpl|clts|lar|lgdt|lidt|lldt|lmsw|loadall|lsl|ltr|sgdt|sidt|sldt|smsw|str|verr|verw)(?-i)\\b"
|
|
14
|
+
- statement: "\\b(?i)(bsf|bsr|bt|btc|btr|bts|cdq|cmpsd|cwde|insd|iret|iretd|iretf|jecxz|lfs|lgs|lss|lodsd|loopw|loopew|loopnew|loopnzw|loopzw|loopd|looped|loopned|loopnzd|loopzd|cr|tr|dr|movsd|movsx|movzx|outsd|popad|popfd|pushad|pushfd|scasd|seta|setae|setb|setbe|setc|sete|setg|setge|setl|setle|setna|setnae|setnb|setnbe|setnc|setne|setng|setnge|setnl|setnle|setno|setnp|setns|setnz|seto|setp|setpe|setpo|sets|setz|shdl|shrd|stosd)(?-i)\\b"
|
|
15
|
+
- statement: "\\b(?i)(bswap|cmpxcgh|invd|invlpg|wbinvd|xadd)(?-i)\\b"
|
|
16
|
+
- statement: "\\b(?i)(cpuid|cmpxchg8b|rdmsr|rdtsc|wrmsr|rsm)(?-i)\\b"
|
|
17
|
+
- statement: "\\b(?i)(rdpmc)(?-i)\\b"
|
|
18
|
+
- statement: "\\b(?i)(syscall|sysret)(?-i)\\b"
|
|
19
|
+
- statement: "\\b(?i)(cmova|cmovae|cmovb|cmovbe|cmovc|cmove|cmovg|cmovge|cmovl|cmovle|cmovna|cmovnae|cmovnb|cmovnbe|cmovnc|cmovne|cmovng|cmovnge|cmovnle|cmovno|cmovpn|cmovns|cmovnz|cmovo|cmovp|cmovpe|cmovpo|cmovs|cmovz|sysenter|sysexit|ud2)(?-i)\\b"
|
|
20
|
+
- statement: "\\b(?i)(maskmovq|movntps|movntq|prefetch0|prefetch1|prefetch2|prefetchnta|sfence)(?-i)\\b"
|
|
21
|
+
- statement: "\\b(?i)(clflush|lfence|maskmovdqu|mfence|movntdq|movnti|movntpd|pause)(?-i)\\b"
|
|
22
|
+
- statement: "\\b(?i)(monitor|mwait)(?-i)\\b"
|
|
23
|
+
- statement: "\\b(?i)(cdqe|cqo|cmpsq|cmpxchg16b|iretq|jrcxz|lodsq|movsdx|popfq|pushfq|rdtscp|scasq|stosq|swapgs)(?-i)\\b"
|
|
24
|
+
- statement: "\\b(?i)(clgi|invlpga|skinit|stgi|vmload|vmmcall|vmrun|vmsave)(?-i)\\b"
|
|
25
|
+
- statement: "\\b(?i)(vmptrdl|vmptrst|vmclear|vmread|vmwrite|vmcall|vmlaunch|vmresume|vmxoff|vmxon)(?-i)\\b"
|
|
26
|
+
- statement: "\\b(?i)(lzcnt|popcnt)(?-i)\\b"
|
|
27
|
+
- statement: "\\b(?i)(bextr|blcfill|blci|blcic|blcmask|blcs|blsfill|blsic|t1mskc|tzmsk)(?-i)\\b"
|
|
28
|
+
|
|
29
|
+
# x87
|
|
30
|
+
- statement: "\\b(?i)(f2xm1|fabs|fadd|faddp|fbld|fbstp|fchs|fclex|fcom|fcomp|fcompp|fdecstp|fdisi|fdiv|fvidp|fdivr|fdivrp|feni|ffree|fiadd|ficom|ficomp|fidiv|fidivr|fild|fimul|fincstp|finit|fist|fistp|fisub|fisubr|fld|fld1|fldcw|fldenv|fldenvw|fldl2e|fldl2t|fldlg2|fldln2|fldpi|fldz|fmul|fmulp|fnclex|fndisi|fneni|fninit|fnop|fnsave|fnsavenew|fnstcw|fnstenv|fnstenvw|fnstsw|fpatan|fprem|fptan|frndint|frstor|frstorw|fsave|fsavew|fscale|fsqrt|fst|fstcw|fstenv|fstenvw|fstp|fstpsw|fsub|fsubp|fsubr|fsubrp|ftst|fwait|fxam|fxch|fxtract|fyl2x|fyl2xp1)(?-i)\\b"
|
|
31
|
+
- statement: "\\b(?i)(fsetpm)(?-i)\\b"
|
|
32
|
+
- statement: "\\b(?i)(fcos|fldenvd|fsaved|fstenvd|fprem1|frstord|fsin|fsincos|fstenvd|fucom|fucomp|fucompp)(?-i)\\b"
|
|
33
|
+
- statement: "\\b(?i)(fcmovb|fcmovbe|fcmove|fcmove|fcmovnb|fcmovnbe|fcmovne|fcmovnu|fcmovu)(?-i)\\b"
|
|
34
|
+
- statement: "\\b(?i)(fcomi|fcomip|fucomi|fucomip)(?-i)\\b"
|
|
35
|
+
- statement: "\\b(?i)(fxrstor|fxsave)(?-i)\\b"
|
|
36
|
+
- statement: "\\b(?i)(fisttp)(?-i)\\b"
|
|
37
|
+
- statement: "\\b(?i)(ffreep)(?-i)\\b"
|
|
38
|
+
|
|
39
|
+
# SIMD
|
|
40
|
+
- statement: "\\b(?i)(emms|movd|movq|packssdw|packsswb|packuswb|paddb|paddw|paddd|paddsb|paddsw|paddusb|paddusw|pand|pandn|por|pxor|pcmpeqb|pcmpeqw|pcmpeqd|pcmpgtb|pcmpgtw|pcmpgtd|pmaddwd|pmulhw|pmullw|psllw|pslld|psllq|psrad|psraw|psrlw|psrld|psrlq|psubb|psubw|psubd|psubsb|psubsw|psubusb|punpckhbw|punpckhwd|punpckhdq|punkcklbw|punpckldq|punpcklwd)(?-i)\\b"
|
|
41
|
+
- statement: "\\b(?i)(paveb|paddsiw|pmagw|pdistib|psubsiw|pmwzb|pmulhrw|pmvnzb|pmvlzb|pmvgezb|pmulhriw|pmachriw)(?-i)\\b"
|
|
42
|
+
- statement: "\\b(?i)(femms|pavgusb|pf2id|pfacc|pfadd|pfcmpeq|pfcmpge|pfcmpgt|pfmax|pfmin|pfmul|pfrcp|pfrcpit1|pfrcpit2|pfrsqit1|pfrsqrt|pfsub|pfsubr|pi2fd|pmulhrw|prefetch|prefetchw)(?-i)\\b"
|
|
43
|
+
- statement: "\\b(?i)(pf2iw|pfnacc|pfpnacc|pi2fw|pswapd)(?-i)\\b"
|
|
44
|
+
- statement: "\\b(?i)(pfrsqrtv|pfrcpv)(?-i)\\b"
|
|
45
|
+
- statement: "\\b(?i)(addps|addss|cmpps|cmpss|comiss|cvtpi2ps|cvtps2pi|cvtsi2ss|cvtss2si|cvttps2pi|cvttss2si|divps|divss|ldmxcsr|maxps|maxss|minps|minss|movaps|movhlps|movhps|movlhps|movlps|movmskps|movntps|movss|movups|mulps|mulss|rcpps|rcpss|rsqrtps|rsqrtss|shufps|sqrtps|sqrtss|stmxcsr|subps|subss|ucomiss|unpckhps|unpcklps)(?-i)\\b"
|
|
46
|
+
- statement: "\\b(?i)(andnps|andps|orps|pavgb|pavgw|pextrw|pinsrw|pmaxsw|pmaxub|pminsw|pminub|pmovmskb|pmulhuw|psadbw|pshufw|xorps)(?-i)\\b"
|
|
47
|
+
- statement: "\\b(?i)(movups|movss|movlps|movhlps|movlps|unpcklps|unpckhps|movhps|movlhps|prefetchnta|prefetch0|prefetch1|prefetch2|nop|movaps|cvtpi2ps|cvtsi2ss|cvtps2pi|cvttss2si|cvtps2pi|cvtss2si|ucomiss|comiss|sqrtps|sqrtss|rsqrtps|rsqrtss|rcpps|andps|orps|xorps|addps|addss|mulps|mulss|subps|subss|minps|minss|divps|divss|maxps|maxss|pshufw|ldmxcsr|stmxcsr|sfence|cmpps|cmpss|pinsrw|pextrw|shufps|pmovmskb|pminub|pmaxub|pavgb|pavgw|pmulhuw|movntq|pminsw|pmaxsw|psadbw|maskmovq)(?-i)\\b"
|
|
48
|
+
- statement: "\\b(?i)(addpd|addsd|addnpd|cmppd|cmpsd)(?-i)\\b"
|
|
49
|
+
- statement: "\\b(?i)(addpd|addsd|andnpd|andpd|cmppd|cmpsd|comisd|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtps2dq|cvtps2pd|cvtsd2si|cvtsd2ss|cvtsi2sd|cvtss2sd|cvttpd2dq|cvttpd2pi|cvttps2dq|cvttsd2si|divpd|divsd|maxpd|maxsd|minpd|minsd|movapd|movhpd|movlpd|movmskpd|movsd|movupd|mulpd|mulsd|orpd|shufpd|sqrtpd|sqrtsd|subpd|subsd|ucomisd|unpckhpd|unpcklpd|xorpd)(?-i)\\b"
|
|
50
|
+
- statement: "\\b(?i)(movdq2q|movdqa|movdqu|movq2dq|paddq|psubq|pmuludq|pshufhw|pshuflw|pshufd|pslldq|psrldq|punpckhqdq|punpcklqdq)(?-i)\\b"
|
|
51
|
+
- statement: "\\b(?i)(addsubpd|addsubps|haddpd|haddps|hsubpd|hsubps|movddup|movshdup|movsldu)(?-i)\\b"
|
|
52
|
+
- statement: "\\b(?i)(lddqu)(?-i)\\b"
|
|
53
|
+
- statement: "\\b(?i)(psignw|psignd|psignb|pshufb|pmulhrsw|pmaddubsw|phsubw|phsubsw|phsubd|phaddw|phaddsw|phaddd|palignr|pabsw|pabsd|pabsb)(?-i)\\b"
|
|
54
|
+
- statement: "\\b(?i)(dpps|dppd|blendps|blendpd|blendvps|blendvpd|roundps|roundss|roundpd|roundsd|insertps|extractps)(?-i)\\b"
|
|
55
|
+
- statement: "\\b(?i)(mpsadbw|phminposuw|pmulld|pmuldq|pblendvb|pblendw|pminsb|pmaxsb|pminuw|pmaxuw|pminud|pmaxud|pminsd|pmaxsd|pinsrb|pinsrd/pinsrq|pextrb|pextrw|pextrd/pextrq|pmovsxbw|pmovzxbw|pmovsxbd|pmovzxbd|pmovsxbq|pmovzxbq|pmovsxwd|pmovzxwd|pmovsxwq|pmovzxwq|pmovsxdq|pmovzxdq|ptest|pcmpeqq|packusdw|movntdqa)(?-i)\\b"
|
|
56
|
+
- statement: "\\b(?i)(extrq|insertq|movntsd|movntss)(?-i)\\b"
|
|
57
|
+
- statement: "\\b(?i)(crc32|pcmpestri|pcmpestrm|pcmpistri|pcmpistrm|pcmpgtq)(?-i)\\b"
|
|
58
|
+
- statement: "\\b(?i)(vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfmsubss|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubps|vfnmsubsd|vfnmsubss)(?-i)\\b"
|
|
59
|
+
|
|
60
|
+
# Crypto
|
|
61
|
+
- statement: "\\b(?i)(aesenc|aesenclast|aesdec|aesdeclast|aeskeygenassist|aesimc)(?-i)\\b"
|
|
62
|
+
- statement: "\\b(?i)(sha1rnds4|sha1nexte|sha1msg1|sha1msg2|sha256rnds2|sha256msg1|sha256msg2)(?-i)\\b"
|
|
63
|
+
|
|
64
|
+
# Undocumented
|
|
65
|
+
- statement: "\\b(?i)(aam|aad|salc|icebp|loadall|loadalld|ud1)(?-i)\\b"
|
|
66
|
+
|
|
67
|
+
## Registers
|
|
68
|
+
- identifier: "\\b(?i)(al|ah|bl|bh|cl|ch|dl|dh|bpl|sil|r8b|r9b|r10b|r11b|dil|spl|r12b|r13b|r14b|r15)(?-i)\\b"
|
|
69
|
+
- identifier: "\\b(?i)(cw|sw|tw|fp_ds|fp_opc|fp_ip|fp_dp|fp_cs|cs|ss|ds|es|fs|gs|gdtr|idtr|tr|ldtr|ax|bx|cx|dx|bp|si|r8w|r9w|r10w|r11w|di|sp|r12w|r13w|r14w|r15w|ip)(?-i)\\b"
|
|
70
|
+
- identifier: "\\b(?i)(fp_dp|fp_ip|eax|ebx|ecx|edx|ebp|esi|r8d|r9d|r10d|r11d|edi|esp|r12d|r13d|r14d|r15d|eip|eflags|mxcsr)(?-i)\\b"
|
|
71
|
+
- identifier: "\\b(?i)(mm0|mm1|mm2|mm3|mm4|mm5|mm6|mm7|rax|rbx|rcx|rdx|rbp|rsi|r8|r9|r10|r11|rdi|rsp|r12|r13|r14|r15|rip|rflags|cr0|cr1|cr2|cr3|cr4|cr5|cr6|cr7|cr8|cr9|cr10|cr11|cr12|cr13|cr14|cr15|msw|dr0|dr1|dr2|dr3|r4|dr5|dr6|dr7|dr8|dr9|dr10|dr11|dr12|dr13|dr14|dr15)(?-i)\\b"
|
|
72
|
+
- identifier: "\\b(?i)(st0|st1|st2|st3|st4|st5|st6|st7)(?-i)\\b"
|
|
73
|
+
- identifier: "\\b(?i)(xmm0|xmm1|xmm2|xmm3|xmm4|xmm5|xmm6|xmm7|xmm8|xmm9|xmm10|xmm11|xmm12|xmm13|xmm14|xmm15)(?-i)\\b"
|
|
74
|
+
- identifier: "\\b(?i)(ymm0|ymm1|ymm2|ymm3|ymm4|ymm5|ymm6|ymm7|ymm8|ymm9|ymm10|ymm11|ymm12|ymm13|ymm14|ymm15)(?-i)\\b"
|
|
75
|
+
- identifier: "\\b(?i)(zmm0|zmm1|zmm2|zmm3|zmm4|zmm5|zmm6|zmm7|zmm8|zmm9|zmm10|zmm11|zmm12|zmm13|zmm14|zmm15|zmm16|zmm17|zmm18|zmm19|zmm20|zmm21|zmm22|zmm23|zmm24|zmm25|zmm26|zmm27|zmm28|zmm29|zmm30|zmm31)(?-i)\\b"
|
|
76
|
+
|
|
77
|
+
## Constants
|
|
78
|
+
# Number - it works
|
|
79
|
+
- constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b"
|
|
80
|
+
- constant.number: "\\b0x[0-9 a-f A-F]+\\b"
|
|
81
|
+
|
|
82
|
+
## Preprocessor (NASM)
|
|
83
|
+
- preproc: "%+(\\+|\\?|\\?\\?|)[a-z A-Z 0-9]+"
|
|
84
|
+
- preproc: "%\\[[. a-z A-Z 0-9]*\\]"
|
|
85
|
+
|
|
86
|
+
## Other
|
|
87
|
+
- statement: "\\b(?i)(extern|global|section|segment|_start|\\.text|\\.data|\\.bss)(?-i)\\b"
|
|
88
|
+
- statement: "\\b(?i)(db|dw|dd|dq|dt|ddq|do)(?-i)\\b"
|
|
89
|
+
- identifier: "[a-z A-Z 0-9 _]+:"
|
|
90
|
+
|
|
91
|
+
- constant.string:
|
|
92
|
+
start: "\""
|
|
93
|
+
end: "\""
|
|
94
|
+
skip: "\\\\."
|
|
95
|
+
rules:
|
|
96
|
+
- constant.specialChar: "\\\\."
|
|
97
|
+
|
|
98
|
+
- constant.string:
|
|
99
|
+
start: "'"
|
|
100
|
+
end: "'"
|
|
101
|
+
skip: "\\\\."
|
|
102
|
+
rules:
|
|
103
|
+
- constant.specialChar: "\\\\."
|
|
104
|
+
|
|
105
|
+
- comment:
|
|
106
|
+
start: ";"
|
|
107
|
+
end: "$"
|
|
108
|
+
rules:
|
|
109
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
110
|
+
|
|
111
|
+
## C-like comments (supported by some assemblers)
|
|
112
|
+
|
|
113
|
+
- comment:
|
|
114
|
+
start: "//"
|
|
115
|
+
end: "$"
|
|
116
|
+
rules:
|
|
117
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
118
|
+
|
|
119
|
+
- comment:
|
|
120
|
+
start: "/\\*"
|
|
121
|
+
end: "\\*/"
|
|
122
|
+
rules:
|
|
123
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
filetype: ATS
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(d|h|s)ats$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- default: \b[[:alnum:]]+[^0-9A-Za-z]
|
|
8
|
+
|
|
9
|
+
# Operators
|
|
10
|
+
- symbol.operator: "[.:;+`|~<>?='\\&]|/|%|-|,|!|\\*|@|\\#"
|
|
11
|
+
- symbol.operator: \^
|
|
12
|
+
|
|
13
|
+
# Types, abstract types and some predefined sorts
|
|
14
|
+
- type: \b(addr|age?z|bool|char|cls|schar|uchar|double|ldouble|eff|exn|float|int(ptr)?|lincloptr|uint)\b
|
|
15
|
+
- type: \b(lint|ulint|llint|ullint|nat|ptr|real|ref|size_t|ssize_t|sint|usint|string|tkind|viewt|v?t0p|vt|void)\b
|
|
16
|
+
- type: \b(prop|t[@0]ype|type|viewt[@0]ype|viewtype|vt[@0]ype|vtype|view)\b
|
|
17
|
+
- type: \b(prop[+-]|t[@0]ype[+-]|type[+-]|viewt[@0]ype[+-]|viewtype[+-]|vt[@0]ype[+-]|vtype[+-]|view[+-])
|
|
18
|
+
|
|
19
|
+
# Statements
|
|
20
|
+
- statement: \b(abstype|abst|absprop|absviewt|absvt(ype)?|absview|and|andalso|as|(re)?assume|begin|(pr)?case|s?case)\b
|
|
21
|
+
- statement: \b(classdec|dataprop|data(v|view)?type|dataview|datasort|do|dynload|else|end|exception|extype|extva(r|l)|s?if)\b
|
|
22
|
+
- statement: \b(ifcase|import|for|in|infix(l|r)?|let|local|macrodef|macdef|not|of|op|or|orelse|overload|(pre|post|non)fix)\b
|
|
23
|
+
- statement: \b(propdef|rec|sortdef|stacst|stadef|staload|stavar|sta(tic)?|symelim|symintr|tkindef|then|try|viewdef|v?typedef)\b
|
|
24
|
+
- statement: \b(viewtypedef|(pr)?va(l|r)|when|where|while|with|withtype|withprop|withv(iew)?type|withview)\b
|
|
25
|
+
- statement: \b(abst[@0]ype|absviewt[@0]?ype|absvt[@0]ype|abstbox|abstflat|absvtbox|absvtflat|absimpl|absreimpl|abs)\b
|
|
26
|
+
- statement: \b(case[+-]|(pr)?va(l|r)[+-]|for\*|while\*)
|
|
27
|
+
|
|
28
|
+
# Numbers
|
|
29
|
+
- constant.number: \b[0-9.]+([eE][+-]?[0-9]+)?[fFlL]?\b
|
|
30
|
+
- constant.number: \b0[xX][0-9A-Fa-f]*(\.[0-9A-Fa-f]*)?[pP][+-]?[0-9]+[fFlL]?\b
|
|
31
|
+
- constant.number: \b([0-9]+|0[xX][0-9A-Fa-f]+)[lLuU]*\b
|
|
32
|
+
|
|
33
|
+
# Function-related keywords, special functions and namespaces. Not really identifiers
|
|
34
|
+
- identifier: \b(fix|(pr)?fu?n|fnx|castfn|praxi|extern|lam|llam|(pr)?implement|(pr)?implmnt)\b
|
|
35
|
+
- identifier: \b(fix@|fold@|free@|lam@|llam@|addr@|view@|ref@|fn\*)
|
|
36
|
+
- identifier: \$\w*\b
|
|
37
|
+
|
|
38
|
+
# Other keywords, function effects...
|
|
39
|
+
- special: (\$(arrpsz|arrptrsize|break|continue|d2ctype|delay|effmask_(ntm|exn|ref|wrt|all)))\b
|
|
40
|
+
- special: (\$(effmask|extern|extype_struct|extype|extkind|extval|extfcall|extmcall|ldelay|literal))\b
|
|
41
|
+
- special: (\$(li?st_vt|li?st_t|li?st|myfilename|myfunction|mylocation|raise|rec(ord)?_vt))\b
|
|
42
|
+
- special: (\$(rec(ord)?_t|rec(ord)?|showtype|solver_assert|solver_verify|tempenver))\b
|
|
43
|
+
- special: (\$(tup(le)?_vt|tup(le)?_t|tup(le)?|tyrep|vararg|vcopyenv_vt|vcopyenv_v))\b
|
|
44
|
+
- special: \!(wrt|exnref|exnwrt|exn|refwrt|ref|all|ntm|laz)\b
|
|
45
|
+
- special: \b(fun(0|1)|(lin)?cloptr(0|1)?|cloref(0|1)?|clo(0|1)?|lin|prf)\b
|
|
46
|
+
- special: \b(f?print(ln)?!|prerr(ln)?!|tupz!)
|
|
47
|
+
|
|
48
|
+
# Some C macros and other ATS macros
|
|
49
|
+
- preproc: ^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error|assert)\b
|
|
50
|
+
- preproc: ^[[:space:]]*#[[:space:]]*(codegen2|codegen3|elifdef|elifndef|prerr|print|require|then|staload|dynload)\b
|
|
51
|
+
|
|
52
|
+
# Boolean values
|
|
53
|
+
- constant.bool: \b(true|false|null)\b
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# The "%{ ... %}" block inserts foreign code into ATS at compile-time
|
|
57
|
+
# Code inside of it is generally C or JavaScript
|
|
58
|
+
- default:
|
|
59
|
+
start: "%{[#^$]?"
|
|
60
|
+
end: "%}"
|
|
61
|
+
skip: "\\."
|
|
62
|
+
limit-group: symbol.operator
|
|
63
|
+
rules:
|
|
64
|
+
- include: "c"
|
|
65
|
+
- include: "javascript"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# Strings and chars
|
|
69
|
+
- constant.string: \"[^"]*\"
|
|
70
|
+
- constant.string: \'[^']*\'
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Comments
|
|
74
|
+
# "////" comments everything until it reaches EOF
|
|
75
|
+
- comment.block:
|
|
76
|
+
start: ////
|
|
77
|
+
end: $a
|
|
78
|
+
rules:
|
|
79
|
+
- todo: (TODO|XXX|FIXME)
|
|
80
|
+
|
|
81
|
+
- comment.line:
|
|
82
|
+
start: //
|
|
83
|
+
end: $
|
|
84
|
+
rules:
|
|
85
|
+
- todo: (TODO|XXX|FIXME)
|
|
86
|
+
|
|
87
|
+
# ML-like block comment
|
|
88
|
+
- comment.block:
|
|
89
|
+
start: \(\*
|
|
90
|
+
end: \*\)
|
|
91
|
+
rules:
|
|
92
|
+
- todo: (TODO|XXX|FIXME)
|
|
93
|
+
|
|
94
|
+
# C-like block comment
|
|
95
|
+
- comment.block:
|
|
96
|
+
start: /\*
|
|
97
|
+
end: \*\/
|
|
98
|
+
rules:
|
|
99
|
+
- todo: (TODO|XXX|FIXME)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
filetype: awk
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.awk$"
|
|
5
|
+
header: "^#!.*bin/(env +)?awk( |$)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- preproc: "\\$[A-Za-z0-9_!@#$*?\\-]+"
|
|
9
|
+
- preproc: "\\b(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\\b"
|
|
10
|
+
- preproc: "\\b(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\\b"
|
|
11
|
+
- preproc: "\\b(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\\b"
|
|
12
|
+
- identifier.class: "\\b(function|extension|BEGIN|END)\\b"
|
|
13
|
+
- symbol.operator: "[\\-+*/%^|!=&<>?;:]|\\\\|\\[|\\]"
|
|
14
|
+
- statement: "\\b(for|if|while|do|else|in|delete|exit)\\b"
|
|
15
|
+
- special: "\\b(break|continue|return)\\b"
|
|
16
|
+
- statement: "\\b(close|getline|next|nextfile|print|printf|system|fflush)\\b"
|
|
17
|
+
- statement: "\\b(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\\b"
|
|
18
|
+
- statement: "\\b(asort|asorti|gensub|gsub|index|length|match)\\b"
|
|
19
|
+
- statement: "\\b(split|sprintf|strtonum|sub|substr|tolower|toupper)\\b"
|
|
20
|
+
- statement: "\\b(mktime|strftime|systime)\\b"
|
|
21
|
+
- statement: "\\b(and|compl|lshift|or|rshift|xor)\\b"
|
|
22
|
+
- statement: "\\b(bindtextdomain|dcgettext|dcngettext)\\b"
|
|
23
|
+
- special: "/.*[^\\\\]/"
|
|
24
|
+
|
|
25
|
+
- constant.string:
|
|
26
|
+
start: "\""
|
|
27
|
+
end: "\""
|
|
28
|
+
skip: "\\\\."
|
|
29
|
+
rules:
|
|
30
|
+
- constant.specialChar: "\\\\."
|
|
31
|
+
|
|
32
|
+
- constant.string:
|
|
33
|
+
start: "'"
|
|
34
|
+
end: "'"
|
|
35
|
+
skip: "\\\\."
|
|
36
|
+
rules:
|
|
37
|
+
- constant.specialChar: "\\\\."
|
|
38
|
+
|
|
39
|
+
- comment:
|
|
40
|
+
start: "#"
|
|
41
|
+
end: "$"
|
|
42
|
+
rules:
|
|
43
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
44
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
filetype: B
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: '\.b$'
|
|
5
|
+
# core control words + storage classes (Thompson B-ish)
|
|
6
|
+
signature: '\b(if|else|while|switch|case|default|break|return|goto|extrn|auto)\b'
|
|
7
|
+
|
|
8
|
+
rules:
|
|
9
|
+
# -------------------------
|
|
10
|
+
# Comments (B: /* ... */)
|
|
11
|
+
# -------------------------
|
|
12
|
+
- comment:
|
|
13
|
+
start: '/\*'
|
|
14
|
+
end: '\*/'
|
|
15
|
+
rules: []
|
|
16
|
+
|
|
17
|
+
# Optional: // line comments (convenient, not “original” B)
|
|
18
|
+
- comment:
|
|
19
|
+
start: '//'
|
|
20
|
+
end: '$'
|
|
21
|
+
rules: []
|
|
22
|
+
|
|
23
|
+
# -------------------------
|
|
24
|
+
# Strings + escapes
|
|
25
|
+
# -------------------------
|
|
26
|
+
- constant.string:
|
|
27
|
+
start: '"'
|
|
28
|
+
end: '"'
|
|
29
|
+
skip: '\\\\.'
|
|
30
|
+
rules:
|
|
31
|
+
# common escapes: \n \t \e \r \0 \" \\ \( \) \*
|
|
32
|
+
- constant.specialChar: '\\\\([0netr"\\\\\\*\\(\\)])'
|
|
33
|
+
# printf-ish: %s %c %d %o and %%
|
|
34
|
+
- constant.specialChar: '%(%|[scdo])'
|
|
35
|
+
|
|
36
|
+
- constant.string:
|
|
37
|
+
start: "'"
|
|
38
|
+
end: "'"
|
|
39
|
+
skip: '\\\\.'
|
|
40
|
+
rules:
|
|
41
|
+
- constant.specialChar: '\\\\([0netr"\\\\\\*\\(\\)])'
|
|
42
|
+
- constant.specialChar: '%(%|[scdo])'
|
|
43
|
+
|
|
44
|
+
# -------------------------
|
|
45
|
+
# Numbers
|
|
46
|
+
# (leading 0 commonly used for octal constants)
|
|
47
|
+
# -------------------------
|
|
48
|
+
- constant.number: '\b0[0-7]+\b'
|
|
49
|
+
- constant.number: '\b[0-9]+\b'
|
|
50
|
+
|
|
51
|
+
# -------------------------
|
|
52
|
+
# Keywords / storage (keep tight + old-school)
|
|
53
|
+
# -------------------------
|
|
54
|
+
- statement: '\b(if|else|while|switch|case|default|break|return|goto)\b'
|
|
55
|
+
- type: '\b(extrn|auto)\b'
|
|
56
|
+
|
|
57
|
+
# -------------------------
|
|
58
|
+
# Common B library calls (/etc/libb.a era list)
|
|
59
|
+
# -------------------------
|
|
60
|
+
- constant.builtin: '\b(char|getchr|putchr|exit|printf|seek|setuid|stat|time|unlink|wait|lchar|chdir|chmod|chown|close|creat|execl|execv|fork|fstat|getuid|intr|link|makdir|open|read|write|ctime)\b'
|
|
61
|
+
|
|
62
|
+
# -------------------------
|
|
63
|
+
# Labels and function-ish identifiers
|
|
64
|
+
# -------------------------
|
|
65
|
+
# label (often at bol)
|
|
66
|
+
- identifier: '^\s*[_A-Za-z][_A-Za-z0-9]*\s*:'
|
|
67
|
+
# function call/def name before '('
|
|
68
|
+
- identifier: '\b[_A-Za-z][_A-Za-z0-9]*\s*\('
|
|
69
|
+
|
|
70
|
+
# -------------------------
|
|
71
|
+
# Operators (order matters: longer first)
|
|
72
|
+
# Thompson-ish assignment operators in B are =+, =-, =*, =/, =%, =<<, =>>, =& , =|
|
|
73
|
+
# -------------------------
|
|
74
|
+
- symbol.operator: '(=<<|=>>|=\+|=-|=\*|=/|=%|=&|=\|)'
|
|
75
|
+
- symbol.operator: '(==|!=|<=|>=|<<|>>)'
|
|
76
|
+
- symbol.operator: '(\+\+|--|\*\*)'
|
|
77
|
+
- symbol.operator: '[-+*/%&|^~!=<>?:=]'
|
|
78
|
+
|
|
79
|
+
# -------------------------
|
|
80
|
+
# Brackets
|
|
81
|
+
# -------------------------
|
|
82
|
+
- symbol.brackets: '[(){}\[\]]'
|
|
83
|
+
|
|
84
|
+
# -------------------------
|
|
85
|
+
# Identifiers / variables (last so keywords win)
|
|
86
|
+
# -------------------------
|
|
87
|
+
- identifier: '\b[_A-Za-z][_A-Za-z0-9]*\b'
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
filetype: batch
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.bat$|\\.cmd$)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Numbers
|
|
8
|
+
- constant.number: "\\b[0-9]+\\b"
|
|
9
|
+
# Brackets and symbols
|
|
10
|
+
- special: "(\\{|\\}|\\(|\\)|\\;|\\]|\\[|`|\\\\|\\$|<|>|!|=|&|\\|)"
|
|
11
|
+
# Conditionals and control flow
|
|
12
|
+
# note (?i) means case insensitive match
|
|
13
|
+
- type: "\\b(?i)(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|then|until|while)\\b"
|
|
14
|
+
- type: "\\b(?i)(equ|neq|lss|leq|gtr|geq|on|off)\\b"
|
|
15
|
+
- type: "\\b(?i)(goto|for|in|do|call|exit|not|exist|errorlevel|defined)\\b"
|
|
16
|
+
- type: "\\b(?i)(prn|nul|lpt3|lpt2|lpt1|con|com4|com3|com2|com1|aux)\\b"
|
|
17
|
+
# keywords
|
|
18
|
+
- statement: "\\b(?i)(adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|break|brea)\\b"
|
|
19
|
+
- statement: "\\b(?i)(cacls|cd|certreq|certutil|chcp|change|choice|cipher|chdir|chkdsk|chkntfs|chglogon|chgport|chgusr|clip|cls|clscluadmin|cluster|cmd|cmdkey|cmstp|color)\\b"
|
|
20
|
+
- statement: "\\b(?i)(comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm)\\b"
|
|
21
|
+
- statement: "\\b(?i)(echo|edit|endlocal|erase|esentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract)\\b"
|
|
22
|
+
- statement: "\\b(?i)(fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fs|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl)\\b"
|
|
23
|
+
- statement: "\\b(?i)(hashgen|hep|help|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|keyb|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile)\\b"
|
|
24
|
+
- statement: "\\b(?i)(makecab|manage-bde|mapadmin|md|mkdir|mklink|mmc|mode|more|mount|mountvol|move|mqbup|mqsvc|mqtgsvc|msdt|msg|msiexec|msinfo32|mstsc|nbtstat|net computer|net group)\\b"
|
|
25
|
+
- statement: "\\b(?i)(net localgroup|net print|net session|net share|net start|net stop|net use|net user|net view|net|netcfg|netdiag|netdom|netsh|netstat|nfsadmin|nfsshare|nfsstat|nlb)\\b"
|
|
26
|
+
- statement: "\\b(?i)(nlbmgr|nltest|nslookup|ntackup|ntcmdprompt|ntdsutil|ntfrsutl|openfiles|pagefileconfig|path|pathping|pause|pbadmin|pentnt|perfmon|ping|pnpunatten|pnputil|popd)\\b"
|
|
27
|
+
- statement: "\\b(?i)(powercfg|powershell|powershell_ise|print|prncnfg|prndrvr|prnjobs|prnmngr|prnport|prnqctl|prompt|pubprn|pushd|pushprinterconnections|pwlauncher|qappsrv|qprocess)\\b"
|
|
28
|
+
- statement: "\\b(?i)(query|quser|qwinsta|rasdial|rcp|rd|rdpsign|regentc|recover|redircmp|redirusr|reg|regini|regsvr32|relog|ren|rename|rendom|repadmin|repair-bde|replace|reset|restore)\\b"
|
|
29
|
+
- statement: "\\b(?i)(rxec|risetup|rmdir|robocopy|route|rpcinfo|rpcping|rsh|runas|rundll32|rwinsta|scp|sc|setlocal|session|schtasks|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|set|setspn)\\b"
|
|
30
|
+
- statement: "\\b(?i)(setx|sfc|shadow|shift|showmount|shutdown|sort|ssh|start|storrept|subst|sxstrace|ysocmgr|systeminfo|takeown|tapicfg|taskkill|tasklist|tcmsetup|telnet|tftp|time)\\b"
|
|
31
|
+
- statement: "\\b(?i)(timeout|title|tlntadmn|tpmvscmgr|tpmvscmgr|tacerpt|tracert|tree|tscon|tsdiscon|tsecimp|tskill|tsprof|type|typeperf|tzutil|uddiconfig|umount|unlodctr|ver|verify)\\b"
|
|
32
|
+
- statement: "\\b(?i)(verifier|verif|vol|vssadmin|w32tm|waitfor|wbadmin|wdsutil|wecutil|wevtutil|where|whoami|winnt|winnt32|winpop|winrm|winrs|winsat|wlbs|mic|wscript|xcopy)\\b"
|
|
33
|
+
# / Flags
|
|
34
|
+
- constant: "(/\\w+)"
|
|
35
|
+
# Variables
|
|
36
|
+
- special: "(%%\\w+)"
|
|
37
|
+
- special: "(%\\w+%)"
|
|
38
|
+
# Conditional flags
|
|
39
|
+
- type: "--[a-z-]+"
|
|
40
|
+
- type: "\\ -[a-z]+"
|
|
41
|
+
|
|
42
|
+
- identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
|
43
|
+
- identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?"
|
|
44
|
+
# "" String
|
|
45
|
+
- constant.string:
|
|
46
|
+
start: \"
|
|
47
|
+
end: \"
|
|
48
|
+
skip: \.
|
|
49
|
+
rules:
|
|
50
|
+
- constant.specialChar: (\\0|\\\\|\\t|\\n|\\r|\\"|\\')
|
|
51
|
+
- constant.unicode: \\u\{[[:xdigit:]]+}
|
|
52
|
+
# '' string
|
|
53
|
+
- constant.string: "(\\'.+\\')"
|
|
54
|
+
# rem as comment
|
|
55
|
+
- comment.rem: "(?i)(rem\\s.*)"
|
|
56
|
+
# :: as comment
|
|
57
|
+
- comment.rem: "(?i)(\\:\\:\\s.*)"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
filetype: c
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.(c|C)$|\\.(h|H)$|\\.ii?$|\\.(def)$)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
|
8
|
+
- type: "\\b(_Atomic|_BitInt|float|double|_Decimal32|_Decimal64|_Decimal128|_Complex|complex|_Imaginary|imaginary|_Bool|bool|char|int|short|long|enum|void|struct|union|typedef|typeof|typeof_unqual|(un)?signed|inline|_Noreturn)\\b"
|
|
9
|
+
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr))|char(8|16|32)|wchar)_t\\b"
|
|
10
|
+
# GCC float/decimal/fixed types
|
|
11
|
+
- type: "\\b(_Float16|__fp16|_Float32|_Float32x|_Float64|_Float64x|__float80|_Float128|_Float128x|__float128|__ibm128|__int128|_Fract|_Sat|_Accum)\\b"
|
|
12
|
+
- type: "\\b[a-z_][0-9a-z_]+(_t|_T)\\b"
|
|
13
|
+
- statement: "\\b(auto|volatile|register|restrict|_Alignas|alignas|_Alignof|alignof|static|const|constexpr|extern|_Thread_local|thread_local)\\b"
|
|
14
|
+
- statement: "\\b(for|if|while|do|else|case|default|switch|_Generic|_Static_assert|static_assert)\\b"
|
|
15
|
+
- statement: "\\b(goto|continue|break|return)\\b"
|
|
16
|
+
- statement: "\\b(asm|fortran)\\b"
|
|
17
|
+
- preproc: "^[[:space:]]*#[[:space:]]*(define|embed|pragma|include|(un|ifn?)def|endif|el(if|ifdef|ifndef|se)|if|line|warning|error|__has_include|__has_embed|__has_c_attribute)"
|
|
18
|
+
- preproc: "^[[:space:]]*_Pragma\\b"
|
|
19
|
+
# GCC builtins
|
|
20
|
+
- statement: "__attribute__[[:space:]]*\\(\\([^)]*\\)\\)"
|
|
21
|
+
- statement: "__(aligned|asm|builtin|extension|hidden|inline|packed|restrict|section|typeof|weak)__"
|
|
22
|
+
# Operator Color
|
|
23
|
+
- symbol.operator: "[-+*/%=<>.:;,~&|^!?]|\\b(offsetof|sizeof)\\b"
|
|
24
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
25
|
+
# Integer Constants
|
|
26
|
+
- 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)"
|
|
27
|
+
# Decimal Floating Constants
|
|
28
|
+
- constant.number: "(\\b(([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)[FfLl]?\\b)"
|
|
29
|
+
# Hexadecimal Floating Constants
|
|
30
|
+
- 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)"
|
|
31
|
+
- constant.bool: "(\\b(true|false|NULL|nullptr|TRUE|FALSE)\\b)"
|
|
32
|
+
|
|
33
|
+
- constant.string:
|
|
34
|
+
start: "\""
|
|
35
|
+
end: "\""
|
|
36
|
+
skip: "\\\\."
|
|
37
|
+
rules:
|
|
38
|
+
- 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})"
|
|
39
|
+
|
|
40
|
+
- constant.string:
|
|
41
|
+
start: "'"
|
|
42
|
+
end: "'"
|
|
43
|
+
skip: "\\\\."
|
|
44
|
+
rules:
|
|
45
|
+
# TODO: Revert back to - error: "..+" once #3127 is merged
|
|
46
|
+
- error: "[[:graph:]]{2,}'"
|
|
47
|
+
- 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})"
|
|
48
|
+
|
|
49
|
+
- comment:
|
|
50
|
+
start: "//"
|
|
51
|
+
end: "$"
|
|
52
|
+
rules:
|
|
53
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
54
|
+
|
|
55
|
+
- comment:
|
|
56
|
+
start: "/\\*"
|
|
57
|
+
end: "\\*/"
|
|
58
|
+
rules:
|
|
59
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
60
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
filetype: caddyfile
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "Caddyfile"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "^\\s*\\S+(\\s|$)"
|
|
8
|
+
- type: "^([\\w.:/-]+,? ?)+[,{]$"
|
|
9
|
+
- constant.specialChar: "\\s{$"
|
|
10
|
+
- constant.specialChar: "^\\s*}$"
|
|
11
|
+
- constant.string:
|
|
12
|
+
start: "\""
|
|
13
|
+
end: "\""
|
|
14
|
+
skip: "\\\\."
|
|
15
|
+
rules:
|
|
16
|
+
- constant.specialChar: "\\\\."
|
|
17
|
+
|
|
18
|
+
- preproc: "\\{(\\w+|\\$\\w+|%\\w+%)\\}"
|
|
19
|
+
- comment:
|
|
20
|
+
start: "#"
|
|
21
|
+
end: "$"
|
|
22
|
+
rules: []
|
|
23
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
filetype: clojure
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(clj[sc]?|edn)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
|
|
8
|
+
# Constants
|
|
9
|
+
- constant.bool: "\\b(true|false)\\b"
|
|
10
|
+
- constant.macro: "\\b(nil)\\b"
|
|
11
|
+
# Valid numbers
|
|
12
|
+
- constant.number: "[\\-]?[0-9]+?\\b"
|
|
13
|
+
- constant.number: "0x[0-9][A-Fa-f]+?\\b"
|
|
14
|
+
- constant.number: "[\\-]?(3[0-6]|2[0-9]|1[0-9]|[2-9])r[0-9A-Z]+?\\b"
|
|
15
|
+
# Invalid numbers
|
|
16
|
+
- error: "[\\-]?([4-9][0-9]|3[7-9]|1|0)r[0-9A-Z]+?\\b"
|
|
17
|
+
|
|
18
|
+
# Symbols
|
|
19
|
+
- symbol.operator: "[=>+\\-*/'?]"
|
|
20
|
+
|
|
21
|
+
# Types/casting
|
|
22
|
+
- type: "\\b(byte|short|(big)?int(eger)?|long|float|num|bigdec|rationalize)\\b"
|
|
23
|
+
|
|
24
|
+
# String highlighting
|
|
25
|
+
- constant.string:
|
|
26
|
+
start: "\""
|
|
27
|
+
end: "\""
|
|
28
|
+
skip: "\\\\."
|
|
29
|
+
rules:
|
|
30
|
+
- constant.specialChar: "(\\\\u[0-9A-fa-f]{4,4}|\\\\newline|\\\\space|\\\\tab|\\\\formfeed|\\\\backspace|\\\\return|\\\\.)"
|
|
31
|
+
|
|
32
|
+
# Comments
|
|
33
|
+
- comment:
|
|
34
|
+
start: ";"
|
|
35
|
+
end: "$"
|
|
36
|
+
rules:
|
|
37
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
38
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
filetype: cmake
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(CMakeLists\\.txt|\\.cmake)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier.var: "^[[:space:]]*[A-Z0-9_]+"
|
|
8
|
+
- preproc: "^[[:space:]]*(include|include_directories|include_external_msproject)\\b"
|
|
9
|
+
|
|
10
|
+
- statement: "^[[:space:]]*\\b((else|end)?if|else|(end)?while|(end)?foreach|break)\\b"
|
|
11
|
+
- statement: "\\b(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\\b[[:space:]]"
|
|
12
|
+
- statement: "[[:space:]]\\b(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\\b[[:space:]]"
|
|
13
|
+
|
|
14
|
+
- special: "^[[:space:]]*\\b((end)?(function|macro)|return)"
|
|
15
|
+
|
|
16
|
+
- constant.string:
|
|
17
|
+
start: "\""
|
|
18
|
+
end: "\""
|
|
19
|
+
skip: "\\\\."
|
|
20
|
+
rules:
|
|
21
|
+
- constant.specialChar: "\\\\."
|
|
22
|
+
|
|
23
|
+
- constant.string:
|
|
24
|
+
start: "'"
|
|
25
|
+
end: "'"
|
|
26
|
+
skip: "\\\\."
|
|
27
|
+
rules:
|
|
28
|
+
- constant.specialChar: "\\\\."
|
|
29
|
+
|
|
30
|
+
- preproc:
|
|
31
|
+
start: "\\$(\\{|ENV\\{)"
|
|
32
|
+
end: "\\}"
|
|
33
|
+
rules: []
|
|
34
|
+
|
|
35
|
+
- identifier.macro: "\\b(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\\b"
|
|
36
|
+
|
|
37
|
+
- comment:
|
|
38
|
+
start: "#"
|
|
39
|
+
end: "$"
|
|
40
|
+
rules:
|
|
41
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
42
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
filetype: coffeescript
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.coffee$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- symbol.operator: "([-+/*=<>!~%?:&|]|[.]{3})|\\b(and|or|is|isnt|not)\\b"
|
|
8
|
+
- identifier.class: "([A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\\()|->)"
|
|
9
|
+
- symbol.brackets: "[()]"
|
|
10
|
+
|
|
11
|
+
- statement: "\\b(await|when|catch|continue|debugger|default|by|until)\\b"
|
|
12
|
+
- statement: "\\b(delete|do|else|export|finally|for|class|extends|while|then)\\b"
|
|
13
|
+
- statement: "\\b(get|if|import|from|in|instanceof|new|reject|resolve|return)\\b"
|
|
14
|
+
- statement: "\\b(set|super|switch|this|throw|try|typeof|with|yield|unless)\\b"
|
|
15
|
+
|
|
16
|
+
- constant.bool: "\\b(true|false|yes|no|on|off)\\b"
|
|
17
|
+
- constant.bool.false: "\\b(false|no|off)\\b"
|
|
18
|
+
- constant.bool.true: "\\b(true|yes|on)\\b"
|
|
19
|
+
|
|
20
|
+
- constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b"
|
|
21
|
+
- constant.number: "\\b[-+]?([0-9]+\\.[0-9]*|[0-9]*\\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
|
|
22
|
+
- constant.number: "\\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
|
|
23
|
+
- identifier: "@[A-Za-z0-9_]*"
|
|
24
|
+
|
|
25
|
+
- error: "\\b(enum|implements|interface|package|private|protected|public)"
|
|
26
|
+
- constant: "\\b(globalThis|Infinity|null|undefined|NaN)\\b"
|
|
27
|
+
- constant: "\\b(null|undefined|NaN)\\b"
|
|
28
|
+
- constant: "\\b(true|false|yes|no|on|off)\\b"
|
|
29
|
+
- type: "\\b(Array|Boolean|Date|Enumerator|Error|Function|Generator|Map|Math)\\b"
|
|
30
|
+
- type: "\\b(Number|Object|Promise|Proxy|Reflect|RegExp|Set|String|Symbol|WeakMap|WeakSet)\\b"
|
|
31
|
+
- type: "\\b(BigInt64Array|BigUint64Array|Float32Array|Float64Array|Int16Array)\\b"
|
|
32
|
+
|
|
33
|
+
- constant.string:
|
|
34
|
+
start: "\""
|
|
35
|
+
end: "\""
|
|
36
|
+
skip: "\\\\."
|
|
37
|
+
rules:
|
|
38
|
+
- constant.specialChar: "\\\\."
|
|
39
|
+
|
|
40
|
+
- constant.string:
|
|
41
|
+
start: "'"
|
|
42
|
+
end: "'"
|
|
43
|
+
skip: "\\\\."
|
|
44
|
+
rules:
|
|
45
|
+
- constant.specialChar: "\\\\."
|
|
46
|
+
|
|
47
|
+
- comment:
|
|
48
|
+
start: "###"
|
|
49
|
+
end: "###"
|
|
50
|
+
rules: []
|
|
51
|
+
|
|
52
|
+
- comment:
|
|
53
|
+
start: "#"
|
|
54
|
+
end: "$"
|
|
55
|
+
rules:
|
|
56
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
filetype: colortest
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "ColorTest$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- black: "\\bPLAIN\\b"
|
|
8
|
+
- red: "\\bred\\b"
|
|
9
|
+
- green: "\\bgreen\\b"
|
|
10
|
+
- yellow: "\\byellow\\b"
|
|
11
|
+
- blue: "\\bblue\\b"
|
|
12
|
+
- magenta: "\\bmagenta\\b"
|
|
13
|
+
- cyan: "\\bcyan\\b"
|
|
14
|
+
- brightred: "\\bbrightred\\b"
|
|
15
|
+
- brightgreen: "\\bbrightgreen\\b"
|
|
16
|
+
- brightyellow: "\\bbrightyellow\\b"
|
|
17
|
+
- brightblue: "\\bbrightblue\\b"
|
|
18
|
+
- brightmagenta: "\\bbrightmagenta\\b"
|
|
19
|
+
- brightcyan: "\\bbrightcyan\\b"
|