tm-grammars 1.22.19 → 1.23.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 (234) hide show
  1. package/NOTICE +286 -1
  2. package/README.md +241 -239
  3. package/grammars/abap.json +36 -36
  4. package/grammars/actionscript-3.json +29 -29
  5. package/grammars/ada.json +78 -78
  6. package/grammars/angular-expression.json +62 -62
  7. package/grammars/angular-html.json +0 -1
  8. package/grammars/angular-inline-style.json +3 -3
  9. package/grammars/angular-inline-template.json +2 -2
  10. package/grammars/angular-template-blocks.json +3 -3
  11. package/grammars/angular-template.json +1 -1
  12. package/grammars/angular-ts.json +251 -251
  13. package/grammars/apache.json +31 -31
  14. package/grammars/apex.json +108 -108
  15. package/grammars/apl.json +18 -18
  16. package/grammars/applescript.json +11 -11
  17. package/grammars/ara.json +13 -13
  18. package/grammars/asciidoc.json +234 -234
  19. package/grammars/asm.json +90 -90
  20. package/grammars/astro.json +25 -25
  21. package/grammars/awk.json +8 -8
  22. package/grammars/ballerina.json +150 -150
  23. package/grammars/bat.json +28 -28
  24. package/grammars/beancount.json +33 -33
  25. package/grammars/berry.json +11 -11
  26. package/grammars/bibtex.json +12 -12
  27. package/grammars/bicep.json +12 -12
  28. package/grammars/blade.json +183 -183
  29. package/grammars/bsl.json +58 -58
  30. package/grammars/c.json +162 -162
  31. package/grammars/cadence.json +20 -20
  32. package/grammars/cairo.json +10 -10
  33. package/grammars/clarity.json +20 -20
  34. package/grammars/clojure.json +25 -25
  35. package/grammars/cmake.json +3 -3
  36. package/grammars/cobol.json +91 -91
  37. package/grammars/codeql.json +154 -154
  38. package/grammars/coffee.json +45 -45
  39. package/grammars/common-lisp.json +50 -50
  40. package/grammars/coq.json +10 -10
  41. package/grammars/cpp-macro.json +410 -410
  42. package/grammars/cpp.json +641 -641
  43. package/grammars/crystal.json +68 -68
  44. package/grammars/csharp.json +196 -196
  45. package/grammars/css.json +83 -83
  46. package/grammars/csv.json +1 -1
  47. package/grammars/cue.json +55 -55
  48. package/grammars/cypher.json +11 -11
  49. package/grammars/d.json +127 -32
  50. package/grammars/dart.json +18 -18
  51. package/grammars/dax.json +9 -9
  52. package/grammars/desktop.json +9 -9
  53. package/grammars/diff.json +3 -3
  54. package/grammars/dotenv.json +3 -3
  55. package/grammars/dream-maker.json +20 -20
  56. package/grammars/edge.json +8 -8
  57. package/grammars/elixir.json +44 -44
  58. package/grammars/elm.json +23 -23
  59. package/grammars/emacs-lisp.json +76 -76
  60. package/grammars/erb.json +2 -2
  61. package/grammars/erlang.json +29 -29
  62. package/grammars/es-tag-css.json +3 -3
  63. package/grammars/es-tag-glsl.json +3 -3
  64. package/grammars/es-tag-html.json +3 -3
  65. package/grammars/es-tag-sql.json +2 -2
  66. package/grammars/es-tag-xml.json +2 -2
  67. package/grammars/fennel.json +8 -8
  68. package/grammars/fish.json +10 -10
  69. package/grammars/fluent.json +10 -10
  70. package/grammars/fortran-fixed-form.json +1 -1
  71. package/grammars/fortran-free-form.json +106 -106
  72. package/grammars/fsharp.json +70 -70
  73. package/grammars/gdresource.json +15 -15
  74. package/grammars/gdscript.json +31 -27
  75. package/grammars/gdshader.json +18 -18
  76. package/grammars/genie.json +6 -6
  77. package/grammars/gherkin.json +1 -1
  78. package/grammars/git-commit.json +1 -1
  79. package/grammars/git-rebase.json +1 -1
  80. package/grammars/gleam.json +11 -11
  81. package/grammars/glimmer-js.json +35 -35
  82. package/grammars/glimmer-ts.json +35 -35
  83. package/grammars/glsl.json +4 -4
  84. package/grammars/gnuplot.json +41 -41
  85. package/grammars/go.json +155 -155
  86. package/grammars/graphql.json +20 -20
  87. package/grammars/groovy.json +44 -44
  88. package/grammars/hack.json +74 -74
  89. package/grammars/haml.json +24 -24
  90. package/grammars/handlebars.json +25 -25
  91. package/grammars/haskell.json +99 -99
  92. package/grammars/haxe.json +51 -51
  93. package/grammars/hcl.json +43 -43
  94. package/grammars/hjson.json +29 -29
  95. package/grammars/hlsl.json +15 -15
  96. package/grammars/html-derivative.json +0 -1
  97. package/grammars/html.json +28 -29
  98. package/grammars/http.json +17 -17
  99. package/grammars/hxml.json +3 -3
  100. package/grammars/hy.json +10 -10
  101. package/grammars/imba.json +168 -173
  102. package/grammars/ini.json +2 -2
  103. package/grammars/java.json +54 -54
  104. package/grammars/javascript.json +262 -262
  105. package/grammars/jinja-html.json +3 -3
  106. package/grammars/jinja.json +15 -15
  107. package/grammars/jison.json +18 -18
  108. package/grammars/json.json +6 -6
  109. package/grammars/json5.json +12 -12
  110. package/grammars/jsonc.json +6 -6
  111. package/grammars/jsonl.json +6 -6
  112. package/grammars/jsonnet.json +15 -15
  113. package/grammars/jssm.json +4 -4
  114. package/grammars/jsx.json +262 -262
  115. package/grammars/julia.json +45 -45
  116. package/grammars/kotlin.json +15 -15
  117. package/grammars/kusto.json +13 -13
  118. package/grammars/latex.json +260 -260
  119. package/grammars/lean.json +12 -12
  120. package/grammars/less.json +91 -91
  121. package/grammars/liquid.json +96 -62
  122. package/grammars/llvm.json +122 -0
  123. package/grammars/log.json +22 -22
  124. package/grammars/logo.json +2 -2
  125. package/grammars/lua.json +34 -34
  126. package/grammars/luau.json +20 -20
  127. package/grammars/make.json +22 -22
  128. package/grammars/markdown-vue.json +1 -1
  129. package/grammars/markdown.json +83 -83
  130. package/grammars/marko.json +19 -19
  131. package/grammars/matlab.json +29 -29
  132. package/grammars/mdc.json +17 -17
  133. package/grammars/mdx.json +278 -278
  134. package/grammars/mermaid.json +97 -97
  135. package/grammars/mipsasm.json +2 -2
  136. package/grammars/mojo.json +122 -122
  137. package/grammars/move.json +35 -35
  138. package/grammars/narrat.json +10 -10
  139. package/grammars/nextflow.json +11 -11
  140. package/grammars/nginx.json +45 -45
  141. package/grammars/nim.json +44 -44
  142. package/grammars/nix.json +71 -71
  143. package/grammars/nushell.json +36 -36
  144. package/grammars/objective-c.json +129 -129
  145. package/grammars/objective-cpp.json +245 -245
  146. package/grammars/ocaml.json +229 -229
  147. package/grammars/pascal.json +4 -4
  148. package/grammars/perl.json +64 -64
  149. package/grammars/php.json +199 -199
  150. package/grammars/plsql.json +10 -10
  151. package/grammars/po.json +4 -4
  152. package/grammars/polar.json +13 -13
  153. package/grammars/postcss.json +31 -31
  154. package/grammars/powerquery.json +10 -10
  155. package/grammars/powershell.json +54 -54
  156. package/grammars/prisma.json +13 -13
  157. package/grammars/prolog.json +3 -3
  158. package/grammars/proto.json +11 -11
  159. package/grammars/pug.json +30 -30
  160. package/grammars/puppet.json +35 -35
  161. package/grammars/purescript.json +843 -467
  162. package/grammars/python.json +126 -126
  163. package/grammars/qml.json +18 -18
  164. package/grammars/qss.json +7 -7
  165. package/grammars/r.json +17 -17
  166. package/grammars/racket.json +58 -58
  167. package/grammars/raku.json +15 -15
  168. package/grammars/razor.json +30 -30
  169. package/grammars/reg.json +3 -3
  170. package/grammars/regexp.json +15 -15
  171. package/grammars/rel.json +4 -4
  172. package/grammars/riscv.json +15 -15
  173. package/grammars/rst.json +26 -26
  174. package/grammars/ruby.json +103 -106
  175. package/grammars/rust.json +13 -13
  176. package/grammars/sas.json +9 -9
  177. package/grammars/sass.json +35 -35
  178. package/grammars/scala.json +75 -75
  179. package/grammars/scheme.json +16 -16
  180. package/grammars/scss.json +68 -68
  181. package/grammars/sdbl.json +18 -18
  182. package/grammars/shaderlab.json +8 -8
  183. package/grammars/shellscript.json +111 -111
  184. package/grammars/shellsession.json +1 -1
  185. package/grammars/smalltalk.json +5 -5
  186. package/grammars/solidity.json +20 -20
  187. package/grammars/soy.json +30 -30
  188. package/grammars/sparql.json +1 -1
  189. package/grammars/splunk.json +6 -6
  190. package/grammars/sql.json +8 -8
  191. package/grammars/ssh-config.json +2 -2
  192. package/grammars/stata.json +90 -90
  193. package/grammars/stylus.json +48 -48
  194. package/grammars/svelte.json +35 -25
  195. package/grammars/swift.json +114 -114
  196. package/grammars/system-verilog.json +25 -25
  197. package/grammars/systemd.json +16 -16
  198. package/grammars/talonscript.json +12 -12
  199. package/grammars/tasl.json +10 -10
  200. package/grammars/tcl.json +11 -11
  201. package/grammars/templ.json +34 -34
  202. package/grammars/terraform.json +42 -42
  203. package/grammars/tex.json +14 -14
  204. package/grammars/toml.json +15 -15
  205. package/grammars/tsx.json +262 -262
  206. package/grammars/turtle.json +2 -2
  207. package/grammars/twig.json +37 -37
  208. package/grammars/typescript.json +251 -251
  209. package/grammars/typespec.json +54 -273
  210. package/grammars/typst.json +34 -34
  211. package/grammars/v.json +32 -32
  212. package/grammars/vala.json +6 -6
  213. package/grammars/vb.json +7 -7
  214. package/grammars/verilog.json +4 -4
  215. package/grammars/vhdl.json +10 -10
  216. package/grammars/viml.json +22 -22
  217. package/grammars/vue-html.json +10 -10
  218. package/grammars/vue-sfc-style-variable-injection.json +1 -1
  219. package/grammars/vue.json +65 -65
  220. package/grammars/vyper.json +126 -126
  221. package/grammars/wasm.json +26 -26
  222. package/grammars/wenyan.json +7 -7
  223. package/grammars/wgsl.json +9 -9
  224. package/grammars/wikitext.json +66 -66
  225. package/grammars/wit.json +1409 -0
  226. package/grammars/wolfram.json +446 -446
  227. package/grammars/xml.json +11 -11
  228. package/grammars/xsl.json +1 -1
  229. package/grammars/yaml.json +24 -24
  230. package/grammars/zenscript.json +8 -8
  231. package/grammars/zig.json +11 -11
  232. package/index.d.ts +7 -0
  233. package/index.js +1003 -283
  234. package/package.json +1 -1
@@ -63,7 +63,7 @@
63
63
  "name": "support.type.wat"
64
64
  }
65
65
  },
66
- "match": "\\b(i8x16)(?:\\s+0x[0-9a-fA-F]{1,2}){16}\\b",
66
+ "match": "\\b(i8x16)(?:\\s+0x\\h{1,2}){16}\\b",
67
67
  "name": "constant.numeric.vector.wat"
68
68
  },
69
69
  {
@@ -72,7 +72,7 @@
72
72
  "name": "support.type.wat"
73
73
  }
74
74
  },
75
- "match": "\\b(i16x8)(?:\\s+0x[0-9a-fA-F]{1,4}){8}\\b",
75
+ "match": "\\b(i16x8)(?:\\s+0x\\h{1,4}){8}\\b",
76
76
  "name": "constant.numeric.vector.wat"
77
77
  },
78
78
  {
@@ -81,7 +81,7 @@
81
81
  "name": "support.type.wat"
82
82
  }
83
83
  },
84
- "match": "\\b(i32x4)(?:\\s+0x[0-9a-fA-F]{1,8}){4}\\b",
84
+ "match": "\\b(i32x4)(?:\\s+0x\\h{1,8}){4}\\b",
85
85
  "name": "constant.numeric.vector.wat"
86
86
  },
87
87
  {
@@ -90,7 +90,7 @@
90
90
  "name": "support.type.wat"
91
91
  }
92
92
  },
93
- "match": "\\b(i64x2)(?:\\s+0x[0-9a-fA-F]{1,16}){2}\\b",
93
+ "match": "\\b(i64x2)(?:\\s+0x\\h{1,16}){2}\\b",
94
94
  "name": "constant.numeric.vector.wat"
95
95
  }
96
96
  ]
@@ -98,23 +98,23 @@
98
98
  {
99
99
  "patterns": [
100
100
  {
101
- "match": "[+-]?\\b[0-9][0-9]*(?:\\.[0-9][0-9]*)?(?:[eE][+-]?[0-9]+)?\\b",
101
+ "match": "[+\\-]?\\b[0-9][0-9]*(?:\\.[0-9][0-9]*)?(?:[eE][+\\-]?[0-9]+)?\\b",
102
102
  "name": "constant.numeric.float.wat"
103
103
  },
104
104
  {
105
- "match": "[+-]?\\b0x([0-9a-fA-F]*\\.[0-9a-fA-F]+|[0-9a-fA-F]+\\.?)[Pp][+-]?[0-9]+\\b",
105
+ "match": "[+\\-]?\\b0x(\\h*\\.\\h+|\\h+\\.?)[Pp][+\\-]?[0-9]+\\b",
106
106
  "name": "constant.numeric.float.wat"
107
107
  },
108
108
  {
109
- "match": "[+-]?\\binf\\b",
109
+ "match": "[+\\-]?\\binf\\b",
110
110
  "name": "constant.numeric.float.wat"
111
111
  },
112
112
  {
113
- "match": "[+-]?\\bnan:0x[0-9a-fA-F][0-9a-fA-F]*\\b",
113
+ "match": "[+\\-]?\\bnan:0x\\h\\h*\\b",
114
114
  "name": "constant.numeric.float.wat"
115
115
  },
116
116
  {
117
- "match": "[+-]?\\b(?:0x[0-9a-fA-F][0-9a-fA-F]*|\\d[\\d]*)\\b",
117
+ "match": "[+\\-]?\\b(?:0x\\h\\h*|\\d\\d*)\\b",
118
118
  "name": "constant.numeric.integer.wat"
119
119
  }
120
120
  ]
@@ -131,7 +131,7 @@
131
131
  "name": "support.class.wat"
132
132
  }
133
133
  },
134
- "match": "\\b(i32|i64)\\.trunc_sat_f(?:32|64)_[su]\\b",
134
+ "match": "\\b(i(?:32|64))\\.trunc_sat_f(?:32|64)_[su]\\b",
135
135
  "name": "keyword.operator.word.wat"
136
136
  }
137
137
  ]
@@ -144,7 +144,7 @@
144
144
  "name": "support.class.wat"
145
145
  }
146
146
  },
147
- "match": "\\b(i32)\\.(?:extend(?:8|16)_s)\\b",
147
+ "match": "\\b(i32)\\.extend(?:8|16)_s\\b",
148
148
  "name": "keyword.operator.word.wat"
149
149
  },
150
150
  {
@@ -153,7 +153,7 @@
153
153
  "name": "support.class.wat"
154
154
  }
155
155
  },
156
- "match": "\\b(i64)\\.(?:extend(?:8|16|32)_s)\\b",
156
+ "match": "\\b(i64)\\.extend(?:8|16|32)_s\\b",
157
157
  "name": "keyword.operator.word.wat"
158
158
  }
159
159
  ]
@@ -291,7 +291,7 @@
291
291
  "name": "support.class.wat"
292
292
  }
293
293
  },
294
- "match": "\\b(i32)\\.(atomic)\\.(?:load(?:8_u|16_u)?|store(?:8|16)?|wait|(rmw)\\.(?:add|sub|and|or|xor|xchg|cmpxchg)|(rmw8|rmw16)\\.(?:add_u|sub_u|and_u|or_u|xor_u|xchg_u|cmpxchg_u))\\b",
294
+ "match": "\\b(i32)\\.(atomic)\\.(?:load(?:8_u|16_u)?|store(?:8|16)?|wait|(rmw)\\.(?:add|sub|and|or|xor|xchg|cmpxchg)|(rmw(?:8|16))\\.(?:add_u|sub_u|and_u|or_u|xor_u|xchg_u|cmpxchg_u))\\b",
295
295
  "name": "keyword.operator.word.wat"
296
296
  },
297
297
  {
@@ -309,7 +309,7 @@
309
309
  "name": "support.class.wat"
310
310
  }
311
311
  },
312
- "match": "\\b(i64)\\.(atomic)\\.(?:load(?:8_u|16_u|32_u)?|store(?:8|16|32)?|wait|(rmw)\\.(?:add|sub|and|or|xor|xchg|cmpxchg)|(rmw8|rmw16|rmw32)\\.(?:add_u|sub_u|and_u|or_u|xor_u|xchg_u|cmpxchg_u))\\b",
312
+ "match": "\\b(i64)\\.(atomic)\\.(?:load(?:8_u|16_u|32_u)?|store(?:8|16|32)?|wait|(rmw)\\.(?:add|sub|and|or|xor|xchg|cmpxchg)|(rmw(?:8|16|32))\\.(?:add_u|sub_u|and_u|or_u|xor_u|xchg_u|cmpxchg_u))\\b",
313
313
  "name": "keyword.operator.word.wat"
314
314
  },
315
315
  {
@@ -381,7 +381,7 @@
381
381
  "name": "support.class.wat"
382
382
  }
383
383
  },
384
- "match": "\\b(i32|i64|f32|f64|externref|funcref|nullref|exnref)\\.(?:push|pop)\\b",
384
+ "match": "\\b(i32|i64|f32|f64|externref|funcref|nullref|exnref)\\.p(?:ush|op)\\b",
385
385
  "name": "keyword.operator.word.wat"
386
386
  }
387
387
  ]
@@ -412,7 +412,7 @@
412
412
  "name": "support.class.type.wat"
413
413
  }
414
414
  },
415
- "match": "\\b(f32|f64)\\.(?:load|store)\\b",
415
+ "match": "\\b(f(?:32|64))\\.(?:load|store)\\b",
416
416
  "name": "keyword.operator.word.wat"
417
417
  },
418
418
  {
@@ -456,7 +456,7 @@
456
456
  "name": "support.class.type.wat"
457
457
  }
458
458
  },
459
- "match": "\\b(i32|i64)\\.(const|eqz|eq|ne|lt_[su]|gt_[su]|le_[su]|ge_[su]|clz|ctz|popcnt|add|sub|mul|div_[su]|rem_[su]|and|or|xor|shl|shr_[su]|rotl|rotr)\\b",
459
+ "match": "\\b(i(?:32|64))\\.(const|eqz|eq|ne|lt_[su]|gt_[su]|le_[su]|ge_[su]|clz|ctz|popcnt|add|sub|mul|div_[su]|rem_[su]|and|or|xor|shl|shr_[su]|rotl|rotr)\\b",
460
460
  "name": "keyword.operator.word.wat"
461
461
  },
462
462
  {
@@ -465,7 +465,7 @@
465
465
  "name": "support.class.type.wat"
466
466
  }
467
467
  },
468
- "match": "\\b(f32|f64)\\.(const|eq|ne|lt|gt|le|ge|abs|neg|ceil|floor|trunc|nearest|sqrt|add|sub|mul|div|min|max|copysign)\\b",
468
+ "match": "\\b(f(?:32|64))\\.(const|eq|ne|lt|gt|le|ge|abs|neg|ceil|floor|trunc|nearest|sqrt|add|sub|mul|div|min|max|copysign)\\b",
469
469
  "name": "keyword.operator.word.wat"
470
470
  },
471
471
  {
@@ -474,7 +474,7 @@
474
474
  "name": "support.class.type.wat"
475
475
  }
476
476
  },
477
- "match": "\\b(i32)\\.(wrap_i64|trunc_(f32|f64)_[su]|reinterpret_f32)\\b",
477
+ "match": "\\b(i32)\\.(wrap_i64|trunc_(f(?:32|64))_[su]|reinterpret_f32)\\b",
478
478
  "name": "keyword.operator.word.wat"
479
479
  },
480
480
  {
@@ -558,7 +558,7 @@
558
558
  "name": "support.class.wat"
559
559
  }
560
560
  },
561
- "match": "\\b(?:br_on_non_null|br_on_cast|br_on_cast_fail)\\b",
561
+ "match": "\\bbr_on_(?:non_null|cast|cast_fail)\\b",
562
562
  "name": "keyword.operator.word.wat"
563
563
  },
564
564
  {
@@ -617,10 +617,10 @@
617
617
  "name": "entity.name.function.wat"
618
618
  }
619
619
  },
620
- "match": "(?<=\\(func|\\(start|call|return_call|ref\\.func)\\s+(\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*)"
620
+ "match": "(?<=\\(func|\\(start|call|return_call|ref\\.func)\\s+(\\$[0-9A-Za-z!#$%\\&'*+\\-./:<=>?@\\\\\\^_`|~]*)"
621
621
  },
622
622
  {
623
- "begin": "\\)\\s+(\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*)",
623
+ "begin": "\\)\\s+(\\$[0-9A-Za-z!#$%\\&'*+\\-./:<=>?@\\\\\\^_`|~]*)",
624
624
  "beginCaptures": {
625
625
  "1": {
626
626
  "name": "entity.name.function.wat"
@@ -629,7 +629,7 @@
629
629
  "end": "\\)",
630
630
  "patterns": [
631
631
  {
632
- "match": "(?<=\\s)\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*",
632
+ "match": "(?<=\\s)\\$[0-9A-Za-z!#$%\\&'*+\\-./:<=>?@\\\\\\^_`|~]*",
633
633
  "name": "entity.name.function.wat"
634
634
  }
635
635
  ]
@@ -640,10 +640,10 @@
640
640
  "name": "support.type.function.wat"
641
641
  }
642
642
  },
643
- "match": "(?<=\\(type)\\s+(\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*)"
643
+ "match": "(?<=\\(type)\\s+(\\$[0-9A-Za-z!#$%\\&'*+\\-./:<=>?@\\\\\\^_`|~]*)"
644
644
  },
645
645
  {
646
- "match": "\\$[0-9A-Za-z!#$%&'*+\\-./:<=>?@\\\\^_`|~]*\\b",
646
+ "match": "\\$[0-9A-Za-z!#$%\\&'*+\\-./:<=>?@\\\\\\^_`|~]*\\b",
647
647
  "name": "variable.other.wat"
648
648
  }
649
649
  ]
@@ -666,7 +666,7 @@
666
666
  "name": "string.quoted.double.wat",
667
667
  "patterns": [
668
668
  {
669
- "match": "\\\\(n|t|\\\\|'|\"|[0-9a-fA-F]{2})",
669
+ "match": "\\\\([nt\\\\'\"]|\\h{2})",
670
670
  "name": "constant.character.escape.wat"
671
671
  }
672
672
  ]
@@ -50,11 +50,11 @@
50
50
  "constants": {
51
51
  "patterns": [
52
52
  {
53
- "match": "負|·|又|零|〇|一|二|三|四|五|六|七|八|九|十|百|千|萬|億|兆|京|垓|秭|穰|溝|澗|正|載|極|分|釐|毫|絲|忽|微|纖|沙|塵|埃|渺|漠",
53
+ "match": "[負·又零〇一二三四五六七八九十百千萬億兆京垓秭穰溝澗正載極分釐毫絲忽微纖沙塵埃渺漠]",
54
54
  "name": "constant.numeric"
55
55
  },
56
56
  {
57
- "match": "其|陰|陽",
57
+ "match": "[其陰陽]",
58
58
  "name": "constant.language"
59
59
  },
60
60
  {
@@ -80,7 +80,7 @@
80
80
  "keywords": {
81
81
  "patterns": [
82
82
  {
83
- "match": "數|列|言|術|爻|物|元",
83
+ "match": "[數列言術爻物元]",
84
84
  "name": "storage.type"
85
85
  },
86
86
  {
@@ -92,15 +92,15 @@
92
92
  "name": "keyword.control"
93
93
  },
94
94
  {
95
- "match": "中有陽乎|中無陰乎|所餘幾何|不等於|不大於|不小於|等於|大於|小於|加|減|乘|除|變|以|於",
95
+ "match": "中有陽乎|中無陰乎|所餘幾何|不等於|不大於|不小於|等於|大於|小於|[加減乘除變以於]",
96
96
  "name": "keyword.operator"
97
97
  },
98
98
  {
99
- "match": "不知何禍歟|不復存矣|姑妄行此|如事不諧|名之曰|吾嘗觀|之禍歟|乃作罷|吾有|今有|物之|書之|以施|昔之|是矣|之書|方悟|之義|嗚呼|之禍|有|施|曰|噫|取|今|夫|中|豈",
99
+ "match": "不知何禍歟|不復存矣|姑妄行此|如事不諧|名之曰|吾嘗觀|之禍歟|乃作罷|吾有|今有|物之|書之|以施|昔之|是矣|之書|方悟|之義|嗚呼|之禍|[有施曰噫取今夫中豈]",
100
100
  "name": "keyword.other"
101
101
  },
102
102
  {
103
- "match": "也|凡|遍|若|者|之|充|銜",
103
+ "match": "[也凡遍若者之充銜]",
104
104
  "name": "keyword.control"
105
105
  }
106
106
  ]
@@ -108,7 +108,7 @@
108
108
  "symbols": {
109
109
  "patterns": [
110
110
  {
111
- "match": "。|、",
111
+ "match": "[。、]",
112
112
  "name": "punctuation.separator"
113
113
  }
114
114
  ]
@@ -81,15 +81,15 @@
81
81
  "constants": {
82
82
  "patterns": [
83
83
  {
84
- "match": "(-?\\b[0-9][0-9]*\\.[0-9][0-9]*)([eE][+-]?[0-9]+)?\\b",
84
+ "match": "(-?\\b[0-9][0-9]*\\.[0-9][0-9]*)([eE][+\\-]?[0-9]+)?\\b",
85
85
  "name": "constant.numeric.float.wgsl"
86
86
  },
87
87
  {
88
- "match": "-?\\b0x[0-9a-fA-F]+\\b|\\b0\\b|-?\\b[1-9][0-9]*\\b",
88
+ "match": "-?\\b0x\\h+\\b|\\b0\\b|-?\\b[1-9][0-9]*\\b",
89
89
  "name": "constant.numeric.decimal.wgsl"
90
90
  },
91
91
  {
92
- "match": "\\b0x[0-9a-fA-F]+u\\b|\\b0u\\b|\\b[1-9][0-9]*u\\b",
92
+ "match": "\\b(?:0x\\h+u\\b|0u\\b|[1-9][0-9]*u\\b)",
93
93
  "name": "constant.numeric.decimal.wgsl"
94
94
  },
95
95
  {
@@ -234,11 +234,11 @@
234
234
  "name": "keyword.other.fn.wgsl"
235
235
  },
236
236
  {
237
- "match": "(\\^|\\||\\|\\||&&|<<|>>|!)(?!=)",
237
+ "match": "([\\^|]|\\|\\||&&|<<|>>|!)(?!=)",
238
238
  "name": "keyword.operator.logical.wgsl"
239
239
  },
240
240
  {
241
- "match": "&(?![&=])",
241
+ "match": "&(?![\\&=])",
242
242
  "name": "keyword.operator.borrow.and.wgsl"
243
243
  },
244
244
  {
@@ -246,7 +246,7 @@
246
246
  "name": "keyword.operator.assignment.wgsl"
247
247
  },
248
248
  {
249
- "match": "(?<![<>])=(?!=|>)",
249
+ "match": "(?<![<>])=(?![=>])",
250
250
  "name": "keyword.operator.assignment.equal.wgsl"
251
251
  },
252
252
  {
@@ -294,7 +294,7 @@
294
294
  "name": "punctuation.brackets.square.wgsl"
295
295
  },
296
296
  {
297
- "match": "(?<![=-])[<>]",
297
+ "match": "(?<![=\\-])[<>]",
298
298
  "name": "punctuation.brackets.angle.wgsl"
299
299
  }
300
300
  ]
@@ -311,11 +311,11 @@
311
311
  "name": "storage.type.wgsl"
312
312
  },
313
313
  {
314
- "match": "\\b(vec2i|vec3i|vec4i|vec2u|vec3u|vec4u|vec2f|vec3f|vec4f|vec2h|vec3h|vec4h)\\b",
314
+ "match": "\\b(vec(?:2i|3i|4i|2u|3u|4u|2f|3f|4f|2h|3h|4h))\\b",
315
315
  "name": "storage.type.wgsl"
316
316
  },
317
317
  {
318
- "match": "\\b(mat2x2f|mat2x3f|mat2x4f|mat3x2f|mat3x3f|mat3x4f|mat4x2f|mat4x3f|mat4x4f|mat2x2h|mat2x3h|mat2x4h|mat3x2h|mat3x3h|mat3x4h|mat4x2h|mat4x3h|mat4x4h)\\b",
318
+ "match": "\\b(mat(?:2x2f|2x3f|2x4f|3x2f|3x3f|3x4f|4x2f|4x3f|4x4f|2x2h|2x3h|2x4h|3x2h|3x3h|3x4h|4x2h|4x3h|4x4h))\\b",
319
319
  "name": "storage.type.wgsl"
320
320
  },
321
321
  {