@shikijs/langs-precompiled 3.2.2 → 3.4.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 (225) hide show
  1. package/dist/abap.mjs +1 -1
  2. package/dist/actionscript-3.mjs +1 -1
  3. package/dist/ada.mjs +1 -1
  4. package/dist/angular-expression.mjs +1 -1
  5. package/dist/angular-html.mjs +1 -1
  6. package/dist/angular-inline-style.mjs +1 -1
  7. package/dist/angular-inline-template.mjs +1 -1
  8. package/dist/angular-let-declaration.mjs +1 -1
  9. package/dist/angular-template-blocks.mjs +1 -1
  10. package/dist/angular-ts.mjs +1 -1
  11. package/dist/apache.mjs +1 -1
  12. package/dist/apex.mjs +1 -1
  13. package/dist/apl.mjs +1 -1
  14. package/dist/applescript.mjs +1 -1
  15. package/dist/ara.mjs +1 -1
  16. package/dist/asciidoc.mjs +1 -1
  17. package/dist/asm.mjs +1 -1
  18. package/dist/astro.mjs +1 -1
  19. package/dist/awk.mjs +1 -1
  20. package/dist/ballerina.mjs +1 -1
  21. package/dist/bat.mjs +1 -1
  22. package/dist/beancount.mjs +1 -1
  23. package/dist/berry.mjs +1 -1
  24. package/dist/bibtex.mjs +1 -1
  25. package/dist/bicep.mjs +1 -1
  26. package/dist/blade.mjs +1 -1
  27. package/dist/bsl.mjs +1 -1
  28. package/dist/c.mjs +1 -1
  29. package/dist/cadence.mjs +1 -1
  30. package/dist/cairo.mjs +1 -1
  31. package/dist/clarity.mjs +1 -1
  32. package/dist/clojure.mjs +1 -1
  33. package/dist/cmake.mjs +1 -1
  34. package/dist/cobol.mjs +1 -1
  35. package/dist/codeql.mjs +1 -1
  36. package/dist/coffee.mjs +1 -1
  37. package/dist/common-lisp.mjs +1 -1
  38. package/dist/coq.mjs +1 -1
  39. package/dist/cpp-macro.mjs +1 -1
  40. package/dist/cpp.mjs +1 -1
  41. package/dist/crystal.mjs +1 -1
  42. package/dist/csharp.mjs +1 -1
  43. package/dist/css.mjs +1 -1
  44. package/dist/cue.mjs +1 -1
  45. package/dist/cypher.mjs +1 -1
  46. package/dist/d.mjs +1 -1
  47. package/dist/dart.mjs +1 -1
  48. package/dist/dax.mjs +1 -1
  49. package/dist/desktop.mjs +1 -1
  50. package/dist/diff.mjs +1 -1
  51. package/dist/dotenv.mjs +1 -1
  52. package/dist/dream-maker.mjs +1 -1
  53. package/dist/edge.mjs +1 -1
  54. package/dist/elixir.mjs +1 -1
  55. package/dist/elm.mjs +1 -1
  56. package/dist/emacs-lisp.mjs +1 -1
  57. package/dist/erb.mjs +1 -1
  58. package/dist/erlang.mjs +1 -1
  59. package/dist/es-tag-css.mjs +1 -1
  60. package/dist/es-tag-glsl.mjs +1 -1
  61. package/dist/es-tag-html.mjs +1 -1
  62. package/dist/es-tag-sql.mjs +1 -1
  63. package/dist/es-tag-xml.mjs +1 -1
  64. package/dist/fennel.mjs +1 -1
  65. package/dist/fish.mjs +1 -1
  66. package/dist/fluent.mjs +1 -1
  67. package/dist/fortran-fixed-form.mjs +1 -1
  68. package/dist/fortran-free-form.mjs +1 -1
  69. package/dist/fsharp.mjs +1 -1
  70. package/dist/gdresource.mjs +1 -1
  71. package/dist/gdscript.mjs +1 -1
  72. package/dist/gdshader.mjs +1 -1
  73. package/dist/genie.mjs +1 -1
  74. package/dist/gherkin.mjs +1 -1
  75. package/dist/gleam.mjs +1 -1
  76. package/dist/glimmer-js.mjs +1 -1
  77. package/dist/glimmer-ts.mjs +1 -1
  78. package/dist/glsl.mjs +1 -1
  79. package/dist/gnuplot.mjs +1 -1
  80. package/dist/go.mjs +1 -1
  81. package/dist/graphql.mjs +1 -1
  82. package/dist/groovy.mjs +1 -1
  83. package/dist/hack.mjs +1 -1
  84. package/dist/haml.mjs +1 -1
  85. package/dist/handlebars.mjs +1 -1
  86. package/dist/haskell.mjs +1 -1
  87. package/dist/haxe.mjs +1 -1
  88. package/dist/hcl.mjs +1 -1
  89. package/dist/hjson.mjs +1 -1
  90. package/dist/hlsl.mjs +1 -1
  91. package/dist/html-derivative.mjs +1 -1
  92. package/dist/html.mjs +1 -1
  93. package/dist/http.mjs +1 -1
  94. package/dist/hxml.mjs +1 -1
  95. package/dist/hy.mjs +1 -1
  96. package/dist/imba.mjs +1 -1
  97. package/dist/ini.mjs +1 -1
  98. package/dist/java.mjs +1 -1
  99. package/dist/javascript.mjs +1 -1
  100. package/dist/jinja.mjs +1 -1
  101. package/dist/jison.mjs +1 -1
  102. package/dist/json.mjs +1 -1
  103. package/dist/json5.mjs +1 -1
  104. package/dist/jsonc.mjs +1 -1
  105. package/dist/jsonl.mjs +1 -1
  106. package/dist/jsonnet.mjs +1 -1
  107. package/dist/jssm.mjs +1 -1
  108. package/dist/jsx.mjs +1 -1
  109. package/dist/julia.mjs +1 -1
  110. package/dist/kotlin.mjs +1 -1
  111. package/dist/kusto.mjs +1 -1
  112. package/dist/latex.mjs +1 -1
  113. package/dist/lean.mjs +1 -1
  114. package/dist/less.mjs +1 -1
  115. package/dist/liquid.mjs +1 -1
  116. package/dist/llvm.mjs +1 -1
  117. package/dist/log.mjs +1 -1
  118. package/dist/logo.mjs +1 -1
  119. package/dist/lua.mjs +1 -1
  120. package/dist/luau.mjs +1 -1
  121. package/dist/make.mjs +1 -1
  122. package/dist/markdown-vue.mjs +1 -1
  123. package/dist/markdown.mjs +1 -1
  124. package/dist/marko.mjs +1 -1
  125. package/dist/matlab.mjs +1 -1
  126. package/dist/mdc.mjs +1 -1
  127. package/dist/mdx.mjs +1 -1
  128. package/dist/mermaid.mjs +1 -1
  129. package/dist/mipsasm.mjs +1 -1
  130. package/dist/mojo.mjs +1 -1
  131. package/dist/move.mjs +1 -1
  132. package/dist/narrat.mjs +1 -1
  133. package/dist/nextflow.mjs +1 -1
  134. package/dist/nginx.mjs +1 -1
  135. package/dist/nim.mjs +1 -1
  136. package/dist/nix.mjs +1 -1
  137. package/dist/nushell.mjs +1 -1
  138. package/dist/objective-c.mjs +1 -1
  139. package/dist/objective-cpp.mjs +1 -1
  140. package/dist/ocaml.mjs +1 -1
  141. package/dist/pascal.mjs +1 -1
  142. package/dist/perl.mjs +1 -1
  143. package/dist/php.mjs +1 -1
  144. package/dist/plsql.mjs +1 -1
  145. package/dist/po.mjs +1 -1
  146. package/dist/polar.mjs +1 -1
  147. package/dist/postcss.mjs +1 -1
  148. package/dist/powerquery.mjs +1 -1
  149. package/dist/powershell.mjs +1 -1
  150. package/dist/prisma.mjs +1 -1
  151. package/dist/prolog.mjs +1 -1
  152. package/dist/proto.mjs +1 -1
  153. package/dist/pug.mjs +1 -1
  154. package/dist/puppet.mjs +1 -1
  155. package/dist/purescript.mjs +1 -1
  156. package/dist/python.mjs +1 -1
  157. package/dist/qml.mjs +1 -1
  158. package/dist/qss.mjs +1 -1
  159. package/dist/r.mjs +1 -1
  160. package/dist/racket.mjs +1 -1
  161. package/dist/raku.mjs +1 -1
  162. package/dist/razor.mjs +1 -1
  163. package/dist/reg.mjs +1 -1
  164. package/dist/regexp.mjs +1 -1
  165. package/dist/rel.mjs +1 -1
  166. package/dist/riscv.mjs +1 -1
  167. package/dist/rst.mjs +1 -1
  168. package/dist/ruby.mjs +1 -1
  169. package/dist/rust.mjs +1 -1
  170. package/dist/sas.mjs +1 -1
  171. package/dist/sass.mjs +1 -1
  172. package/dist/scala.mjs +1 -1
  173. package/dist/scheme.mjs +1 -1
  174. package/dist/scss.mjs +1 -1
  175. package/dist/sdbl.mjs +1 -1
  176. package/dist/shaderlab.mjs +1 -1
  177. package/dist/shellscript.mjs +1 -1
  178. package/dist/shellsession.mjs +1 -1
  179. package/dist/smalltalk.mjs +1 -3
  180. package/dist/solidity.mjs +1 -1
  181. package/dist/soy.mjs +1 -1
  182. package/dist/sparql.mjs +1 -1
  183. package/dist/splunk.mjs +1 -1
  184. package/dist/sql.mjs +1 -1
  185. package/dist/ssh-config.mjs +1 -1
  186. package/dist/stata.mjs +1 -1
  187. package/dist/stylus.mjs +1 -1
  188. package/dist/svelte.mjs +1 -1
  189. package/dist/system-verilog.mjs +1 -1
  190. package/dist/systemd.mjs +1 -1
  191. package/dist/talonscript.mjs +1 -1
  192. package/dist/tasl.mjs +1 -1
  193. package/dist/tcl.mjs +1 -1
  194. package/dist/templ.mjs +1 -1
  195. package/dist/terraform.mjs +1 -1
  196. package/dist/tex.mjs +1 -1
  197. package/dist/toml.mjs +1 -1
  198. package/dist/tsx.mjs +1 -1
  199. package/dist/turtle.mjs +1 -1
  200. package/dist/twig.mjs +1 -1
  201. package/dist/typescript.mjs +1 -1
  202. package/dist/typespec.mjs +1 -1
  203. package/dist/typst.mjs +1 -1
  204. package/dist/v.mjs +1 -1
  205. package/dist/vala.mjs +1 -1
  206. package/dist/vb.mjs +1 -1
  207. package/dist/verilog.mjs +1 -1
  208. package/dist/vhdl.mjs +1 -1
  209. package/dist/viml.mjs +1 -1
  210. package/dist/vue-html.mjs +1 -1
  211. package/dist/vue-sfc-style-variable-injection.mjs +1 -1
  212. package/dist/vue.mjs +3 -3
  213. package/dist/vyper.mjs +1 -1
  214. package/dist/wasm.mjs +1 -1
  215. package/dist/wenyan.mjs +1 -1
  216. package/dist/wgsl.mjs +1 -1
  217. package/dist/wikitext.mjs +1 -1
  218. package/dist/wit.mjs +1 -1
  219. package/dist/wolfram.mjs +1 -1
  220. package/dist/xml.mjs +1 -1
  221. package/dist/xsl.mjs +1 -1
  222. package/dist/yaml.mjs +1 -1
  223. package/dist/zenscript.mjs +1 -1
  224. package/dist/zig.mjs +1 -1
  225. package/package.json +4 -4
package/dist/typespec.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"TypeSpec",fileTypes:["tsp"],name:"typespec",patterns:[{include:"#statement"}],repository:{"alias-id":{begin:/(=)\p{space}*/dgv,beginCaptures:{"1":{name:"keyword.operator.assignment.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.alias-id.typespec",patterns:[{include:"#expression"}]},"alias-statement":{begin:/\b(alias)\b\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)\p{space}*/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.type.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.alias-statement.typespec",patterns:[{include:"#alias-id"},{include:"#type-parameters"}]},"augment-decorator-statement":{begin:/((@@)\b[_\$\p{Alpha}](?:[_\$\p{Alpha}\p{Nd}]|\.[_\$\p{Alpha}])*\b)/dgv,beginCaptures:{"1":{name:"entity.name.tag.tsp"},"2":{name:"entity.name.tag.tsp"}},end:/(?=([_\$\p{Alpha}\`]))|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.augment-decorator-statement.typespec",patterns:[{include:"#token"},{include:"#parenthesized-expression"}]},"block-comment":{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block.tsp"},"boolean-literal":{match:/\b(true|false)\b/dgv,name:"constant.language.tsp"},callExpression:{begin:/(\b[_\$\p{Alpha}](?:[_\$\p{Alpha}\p{Nd}]|\.[_\$\p{Alpha}])*\b)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.tsp"},"2":{name:"punctuation.parenthesis.open.tsp"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.parenthesis.close.tsp"}},name:"meta.callExpression.typespec",patterns:[{include:"#token"},{include:"#expression"},{include:"#punctuation-comma"}]},"const-statement":{begin:/\b(const)\b\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"variable.name.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.const-statement.typespec",patterns:[{include:"#type-annotation"},{include:"#operator-assignment"},{include:"#expression"}]},decorator:{begin:/((@)\b[_\$\p{Alpha}](?:[_\$\p{Alpha}\p{Nd}]|\.[_\$\p{Alpha}])*\b)/dgv,beginCaptures:{"1":{name:"entity.name.tag.tsp"},"2":{name:"entity.name.tag.tsp"}},end:/(?=([_\$\p{Alpha}\`]))|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.decorator.typespec",patterns:[{include:"#token"},{include:"#parenthesized-expression"}]},"decorator-declaration-statement":{begin:/(?:(extern)\p{space}+)?\b(dec)\b\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"keyword.other.tsp"},"3":{name:"entity.name.function.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.decorator-declaration-statement.typespec",patterns:[{include:"#token"},{include:"#operation-parameters"}]},directive:{begin:/\p{space}*(#\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b)/dgv,beginCaptures:{"1":{name:"keyword.directive.name.tsp"}},end:/(?=\n?$)|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.directive.typespec",patterns:[{include:"#string-literal"},{include:"#identifier-expression"}]},"doc-comment":{begin:/\/\*\*/dgv,beginCaptures:{"0":{name:"comment.block.tsp"}},end:/\*\//dgv,endCaptures:{"0":{name:"comment.block.tsp"}},name:"comment.block.tsp",patterns:[{include:"#doc-comment-block"}]},"doc-comment-block":{patterns:[{include:"#doc-comment-param"},{include:"#doc-comment-return-tag"},{include:"#doc-comment-unknown-tag"}]},"doc-comment-param":{captures:{"1":{name:"keyword.tag.tspdoc"},"2":{name:"keyword.tag.tspdoc"},"3":{name:"variable.name.tsp"}},match:/((@)(?:param|template|prop))\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)\b/dgv,name:"comment.block.tsp"},"doc-comment-return-tag":{captures:{"1":{name:"keyword.tag.tspdoc"},"2":{name:"keyword.tag.tspdoc"}},match:/((@)returns)\b/dgv,name:"comment.block.tsp"},"doc-comment-unknown-tag":{captures:{"1":{name:"entity.name.tag.tsp"},"2":{name:"entity.name.tag.tsp"}},match:/((@)(?:\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`))\b/dgv,name:"comment.block.tsp"},"enum-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.enum-body.typespec",patterns:[{include:"#enum-member"},{include:"#token"},{include:"#directive"},{include:"#decorator"},{include:"#punctuation-comma"}]},"enum-member":{begin:/(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)\p{space}*(:?)/dgv,beginCaptures:{"1":{name:"variable.name.tsp"},"2":{name:"keyword.operator.type.annotation.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.enum-member.typespec",patterns:[{include:"#token"},{include:"#type-annotation"}]},"enum-statement":{begin:/\b(enum)\b\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.type.tsp"}},end:/(?<=\})|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.enum-statement.typespec",patterns:[{include:"#token"},{include:"#enum-body"}]},"escape-character":{match:/\\[^\n]/dgv,name:"constant.character.escape.tsp"},expression:{patterns:[{include:"#token"},{include:"#directive"},{include:"#parenthesized-expression"},{include:"#valueof"},{include:"#typeof"},{include:"#type-arguments"},{include:"#object-literal"},{include:"#tuple-literal"},{include:"#tuple-expression"},{include:"#model-expression"},{include:"#callExpression"},{include:"#identifier-expression"}]},"function-declaration-statement":{begin:/(?:(extern)\p{space}+)?\b(fn)\b\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"keyword.other.tsp"},"3":{name:"entity.name.function.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.function-declaration-statement.typespec",patterns:[{include:"#token"},{include:"#operation-parameters"},{include:"#type-annotation"}]},"identifier-expression":{match:/\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`/dgv,name:"entity.name.type.tsp"},"import-statement":{begin:/\b(import)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.import-statement.typespec",patterns:[{include:"#token"}]},"interface-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.interface-body.typespec",patterns:[{include:"#token"},{include:"#directive"},{include:"#decorator"},{include:"#interface-member"},{include:"#punctuation-semicolon"}]},"interface-heritage":{begin:/\b(extends)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/((?=\{)|(?=[\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b))/dgv,name:"meta.interface-heritage.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"interface-member":{begin:/(?:\b(op)\b\p{space}+)?(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.function.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.interface-member.typespec",patterns:[{include:"#token"},{include:"#operation-signature"}]},"interface-statement":{begin:/\b(interface)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?<=\})|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.interface-statement.typespec",patterns:[{include:"#token"},{include:"#type-parameters"},{include:"#interface-heritage"},{include:"#interface-body"},{include:"#expression"}]},"line-comment":{match:/\/\/[^\n]*(?=\n?$)/dgv,name:"comment.line.double-slash.tsp"},"model-expression":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.model-expression.typespec",patterns:[{include:"#model-property"},{include:"#token"},{include:"#directive"},{include:"#decorator"},{include:"#spread-operator"},{include:"#punctuation-semicolon"}]},"model-heritage":{begin:/\b(extends|is)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/((?=\{)|(?=[\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b))/dgv,name:"meta.model-heritage.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"model-property":{begin:/(?:(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)|("(?:[^"\\]|\\[^\n])*"))/dgv,beginCaptures:{"1":{name:"variable.name.tsp"},"2":{name:"string.quoted.double.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.model-property.typespec",patterns:[{include:"#token"},{include:"#type-annotation"},{include:"#operator-assignment"},{include:"#expression"}]},"model-statement":{begin:/\b(model)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?<=\})|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.model-statement.typespec",patterns:[{include:"#token"},{include:"#type-parameters"},{include:"#model-heritage"},{include:"#expression"}]},"namespace-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.namespace-body.typespec",patterns:[{include:"#statement"}]},"namespace-name":{begin:/(?=([_\$\p{Alpha}\`]))/dgv,end:/((?=\{)|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b))/dgv,name:"meta.namespace-name.typespec",patterns:[{include:"#identifier-expression"},{include:"#punctuation-accessor"}]},"namespace-statement":{begin:/\b(namespace)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/((?<=\})|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b))/dgv,name:"meta.namespace-statement.typespec",patterns:[{include:"#token"},{include:"#namespace-name"},{include:"#namespace-body"}]},"numeric-literal":{match:/(?:\b(?<!\$)0[xX]\p{AHex}[_\p{AHex}]*(n)?\b(?!\$)|\b(?<!\$)0[bB][01][01_]*(n)?\b(?!\$)|(?<!\$)(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][\+\-]?[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*(\.)[eE][\+\-]?[0-9][0-9_]*(n)?\b|\B(\.)[0-9][0-9_]*[eE][\+\-]?[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*[eE][\+\-]?[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*(\.)(n)?\B|\B(\.)[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*(n)?\b(?!\.))(?!\$))/dgv,name:"constant.numeric.tsp"},"object-literal":{begin:/#\{/dgv,beginCaptures:{"0":{name:"punctuation.hashcurlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.object-literal.typespec",patterns:[{include:"#token"},{include:"#object-literal-property"},{include:"#directive"},{include:"#spread-operator"},{include:"#punctuation-comma"}]},"object-literal-property":{begin:/(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"variable.name.tsp"},"2":{name:"keyword.operator.type.annotation.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.object-literal-property.typespec",patterns:[{include:"#token"},{include:"#expression"}]},"operation-heritage":{begin:/\b(is)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.operation-heritage.typespec",patterns:[{include:"#expression"}]},"operation-parameters":{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.parenthesis.open.tsp"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.parenthesis.close.tsp"}},name:"meta.operation-parameters.typespec",patterns:[{include:"#token"},{include:"#decorator"},{include:"#model-property"},{include:"#spread-operator"},{include:"#punctuation-comma"}]},"operation-signature":{patterns:[{include:"#type-parameters"},{include:"#operation-heritage"},{include:"#operation-parameters"},{include:"#type-annotation"}]},"operation-statement":{begin:/\b(op)\b\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.function.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.operation-statement.typespec",patterns:[{include:"#token"},{include:"#operation-signature"}]},"operator-assignment":{match:/=/dgv,name:"keyword.operator.assignment.tsp"},"parenthesized-expression":{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.parenthesis.open.tsp"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.parenthesis.close.tsp"}},name:"meta.parenthesized-expression.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"punctuation-accessor":{match:/\./dgv,name:"punctuation.accessor.tsp"},"punctuation-comma":{match:/,/dgv,name:"punctuation.comma.tsp"},"punctuation-semicolon":{match:/;/dgv,name:"punctuation.terminator.statement.tsp"},"scalar-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.scalar-body.typespec",patterns:[{include:"#token"},{include:"#directive"},{include:"#scalar-constructor"},{include:"#punctuation-semicolon"}]},"scalar-constructor":{begin:/\b(init)\b\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.function.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.scalar-constructor.typespec",patterns:[{include:"#token"},{include:"#operation-parameters"}]},"scalar-extends":{begin:/\b(extends)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=[\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.scalar-extends.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"scalar-statement":{begin:/\b(scalar)\b\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.type.tsp"}},end:/(?<=\})|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.scalar-statement.typespec",patterns:[{include:"#token"},{include:"#type-parameters"},{include:"#scalar-extends"},{include:"#scalar-body"}]},"spread-operator":{begin:/\.\.\./dgv,beginCaptures:{"0":{name:"keyword.operator.spread.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.spread-operator.typespec",patterns:[{include:"#expression"}]},statement:{patterns:[{include:"#token"},{include:"#directive"},{include:"#augment-decorator-statement"},{include:"#decorator"},{include:"#model-statement"},{include:"#scalar-statement"},{include:"#union-statement"},{include:"#interface-statement"},{include:"#enum-statement"},{include:"#alias-statement"},{include:"#const-statement"},{include:"#namespace-statement"},{include:"#operation-statement"},{include:"#import-statement"},{include:"#using-statement"},{include:"#decorator-declaration-statement"},{include:"#function-declaration-statement"},{include:"#punctuation-semicolon"}]},"string-literal":{begin:/"/dgv,end:/"|(?=\n?$)/dgv,name:"string.quoted.double.tsp",patterns:[{include:"#template-expression"},{include:"#escape-character"}]},"template-expression":{begin:/\$\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.template-expression.begin.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.template-expression.end.tsp"}},name:"meta.template-expression.typespec",patterns:[{include:"#expression"}]},token:{patterns:[{include:"#doc-comment"},{include:"#line-comment"},{include:"#block-comment"},{include:"#triple-quoted-string-literal"},{include:"#string-literal"},{include:"#boolean-literal"},{include:"#numeric-literal"}]},"triple-quoted-string-literal":{begin:/"""/dgv,end:/"""/dgv,name:"string.quoted.triple.tsp",patterns:[{include:"#template-expression"},{include:"#escape-character"}]},"tuple-expression":{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.squarebracket.open.tsp"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.squarebracket.close.tsp"}},name:"meta.tuple-expression.typespec",patterns:[{include:"#expression"}]},"tuple-literal":{begin:/#\[/dgv,beginCaptures:{"0":{name:"punctuation.hashsquarebracket.open.tsp"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.squarebracket.close.tsp"}},name:"meta.tuple-literal.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"type-annotation":{begin:/\p{space}*(\??)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.optional.tsp"},"2":{name:"keyword.operator.type.annotation.tsp"}},end:/(?=[\,\;\@\)\}\=]|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.type-annotation.typespec",patterns:[{include:"#expression"}]},"type-argument":{begin:/(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)\p{space}*(=)/dgv,beginCaptures:{"1":{name:"entity.name.type.tsp"},"2":{name:"keyword.operator.assignment.tsp"}},end:/(?=>)|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,endCaptures:{"0":{name:"keyword.operator.assignment.tsp"}},name:"meta.type-argument.typespec",patterns:[{include:"#token"},{include:"#expression"},{include:"#punctuation-comma"}]},"type-arguments":{begin:/</dgv,beginCaptures:{"0":{name:"punctuation.definition.typeparameters.begin.tsp"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.definition.typeparameters.end.tsp"}},name:"meta.type-arguments.typespec",patterns:[{include:"#type-argument"},{include:"#expression"},{include:"#punctuation-comma"}]},"type-parameter":{begin:/(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"entity.name.type.tsp"}},end:/(?=>)|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.type-parameter.typespec",patterns:[{include:"#token"},{include:"#type-parameter-constraint"},{include:"#type-parameter-default"}]},"type-parameter-constraint":{begin:/extends/dgv,beginCaptures:{"0":{name:"keyword.other.tsp"}},end:/(?=>)|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.type-parameter-constraint.typespec",patterns:[{include:"#expression"}]},"type-parameter-default":{begin:/=/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.tsp"}},end:/(?=>)|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.type-parameter-default.typespec",patterns:[{include:"#expression"}]},"type-parameters":{begin:/</dgv,beginCaptures:{"0":{name:"punctuation.definition.typeparameters.begin.tsp"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.definition.typeparameters.end.tsp"}},name:"meta.type-parameters.typespec",patterns:[{include:"#type-parameter"},{include:"#punctuation-comma"}]},typeof:{begin:/\b(typeof)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=>)|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.typeof.typespec",patterns:[{include:"#expression"}]},"union-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.union-body.typespec",patterns:[{include:"#union-variant"},{include:"#token"},{include:"#directive"},{include:"#decorator"},{include:"#expression"},{include:"#punctuation-comma"}]},"union-statement":{begin:/\b(union)\b\p{space}+(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.type.tsp"}},end:/(?<=\})|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.union-statement.typespec",patterns:[{include:"#token"},{include:"#union-body"}]},"union-variant":{begin:/(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b|`(?:[^\`\\]|\\[^\n])*`)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"variable.name.tsp"},"2":{name:"keyword.operator.type.annotation.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.union-variant.typespec",patterns:[{include:"#token"},{include:"#expression"}]},"using-statement":{begin:/\b(using)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.using-statement.typespec",patterns:[{include:"#token"},{include:"#identifier-expression"},{include:"#punctuation-accessor"}]},valueof:{begin:/\b(valueof)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=>)|(?=[\,\;\@\)\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.valueof.typespec",patterns:[{include:"#expression"}]}},scopeName:"source.tsp",embeddedLangs:undefined,aliases:["tsp"]})
1
+ const lang = Object.freeze({displayName:"TypeSpec",fileTypes:["tsp"],name:"typespec",patterns:[{include:"#statement"}],repository:{"alias-id":{begin:/(=)\p{space}*/dgv,beginCaptures:{"1":{name:"keyword.operator.assignment.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.alias-id.typespec",patterns:[{include:"#expression"}]},"alias-statement":{begin:/\b(alias)\b\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)\p{space}*/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.type.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.alias-statement.typespec",patterns:[{include:"#alias-id"},{include:"#type-parameters"}]},"augment-decorator-statement":{begin:/((@@)\b[\$_\p{Alpha}](?:[\$_\p{Alpha}\p{Nd}]|\.[\$_\p{Alpha}])*)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.tsp"},"2":{name:"entity.name.tag.tsp"}},end:/(?=([\$_\`\p{Alpha}]))|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.augment-decorator-statement.typespec",patterns:[{include:"#token"},{include:"#parenthesized-expression"}]},"block-comment":{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block.tsp"},"boolean-literal":{match:/\b(true|false)\b/dgv,name:"constant.language.tsp"},callExpression:{begin:/\b([\$_\p{Alpha}](?:[\$_\p{Alpha}\p{Nd}]|\.[\$_\p{Alpha}])*)\b\p{space}*(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.tsp"},"2":{name:"punctuation.parenthesis.open.tsp"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.parenthesis.close.tsp"}},name:"meta.callExpression.typespec",patterns:[{include:"#token"},{include:"#expression"},{include:"#punctuation-comma"}]},"const-statement":{begin:/\b(const)\b\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"variable.name.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.const-statement.typespec",patterns:[{include:"#type-annotation"},{include:"#operator-assignment"},{include:"#expression"}]},decorator:{begin:/((@)\b[\$_\p{Alpha}](?:[\$_\p{Alpha}\p{Nd}]|\.[\$_\p{Alpha}])*)\b/dgv,beginCaptures:{"1":{name:"entity.name.tag.tsp"},"2":{name:"entity.name.tag.tsp"}},end:/(?=([\$_\`\p{Alpha}]))|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.decorator.typespec",patterns:[{include:"#token"},{include:"#parenthesized-expression"}]},"decorator-declaration-statement":{begin:/(?:(extern)\p{space}+)?\b(dec)\b\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"keyword.other.tsp"},"3":{name:"entity.name.function.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.decorator-declaration-statement.typespec",patterns:[{include:"#token"},{include:"#operation-parameters"}]},directive:{begin:/\p{space}*(#\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\b/dgv,beginCaptures:{"1":{name:"keyword.directive.name.tsp"}},end:/(?=\n?$)|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.directive.typespec",patterns:[{include:"#string-literal"},{include:"#identifier-expression"}]},"doc-comment":{begin:/\/\*\*/dgv,beginCaptures:{"0":{name:"comment.block.tsp"}},end:/\*\//dgv,endCaptures:{"0":{name:"comment.block.tsp"}},name:"comment.block.tsp",patterns:[{include:"#doc-comment-block"}]},"doc-comment-block":{patterns:[{include:"#doc-comment-param"},{include:"#doc-comment-return-tag"},{include:"#doc-comment-unknown-tag"}]},"doc-comment-param":{captures:{"1":{name:"keyword.tag.tspdoc"},"2":{name:"keyword.tag.tspdoc"},"3":{name:"variable.name.tsp"}},match:/((@)(?:param|template|prop))\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)\b/dgv,name:"comment.block.tsp"},"doc-comment-return-tag":{captures:{"1":{name:"keyword.tag.tspdoc"},"2":{name:"keyword.tag.tspdoc"}},match:/((@)returns)\b/dgv,name:"comment.block.tsp"},"doc-comment-unknown-tag":{captures:{"1":{name:"entity.name.tag.tsp"},"2":{name:"entity.name.tag.tsp"}},match:/((@)(?:\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`))\b/dgv,name:"comment.block.tsp"},"enum-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.enum-body.typespec",patterns:[{include:"#enum-member"},{include:"#token"},{include:"#directive"},{include:"#decorator"},{include:"#punctuation-comma"}]},"enum-member":{begin:/(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)\p{space}*(:?)/dgv,beginCaptures:{"1":{name:"variable.name.tsp"},"2":{name:"keyword.operator.type.annotation.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.enum-member.typespec",patterns:[{include:"#token"},{include:"#type-annotation"}]},"enum-statement":{begin:/\b(enum)\b\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.type.tsp"}},end:/(?<=\})|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.enum-statement.typespec",patterns:[{include:"#token"},{include:"#enum-body"}]},"escape-character":{match:/\\[^\n]/dgv,name:"constant.character.escape.tsp"},expression:{patterns:[{include:"#token"},{include:"#directive"},{include:"#parenthesized-expression"},{include:"#valueof"},{include:"#typeof"},{include:"#type-arguments"},{include:"#object-literal"},{include:"#tuple-literal"},{include:"#tuple-expression"},{include:"#model-expression"},{include:"#callExpression"},{include:"#identifier-expression"}]},"function-declaration-statement":{begin:/(?:(extern)\p{space}+)?\b(fn)\b\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"keyword.other.tsp"},"3":{name:"entity.name.function.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.function-declaration-statement.typespec",patterns:[{include:"#token"},{include:"#operation-parameters"},{include:"#type-annotation"}]},"identifier-expression":{match:/\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`/dgv,name:"entity.name.type.tsp"},"import-statement":{begin:/\b(import)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.import-statement.typespec",patterns:[{include:"#token"}]},"interface-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.interface-body.typespec",patterns:[{include:"#token"},{include:"#directive"},{include:"#decorator"},{include:"#interface-member"},{include:"#punctuation-semicolon"}]},"interface-heritage":{begin:/\b(extends)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/((?=\{)|(?=[\)\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b))/dgv,name:"meta.interface-heritage.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"interface-member":{begin:/(?:\b(op)\b\p{space}+)?(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.function.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.interface-member.typespec",patterns:[{include:"#token"},{include:"#operation-signature"}]},"interface-statement":{begin:/\b(interface)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?<=\})|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.interface-statement.typespec",patterns:[{include:"#token"},{include:"#type-parameters"},{include:"#interface-heritage"},{include:"#interface-body"},{include:"#expression"}]},"line-comment":{match:/\/\/[^\n]*(?=\n?$)/dgv,name:"comment.line.double-slash.tsp"},"model-expression":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.model-expression.typespec",patterns:[{include:"#model-property"},{include:"#token"},{include:"#directive"},{include:"#decorator"},{include:"#spread-operator"},{include:"#punctuation-semicolon"}]},"model-heritage":{begin:/\b(extends|is)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/((?=\{)|(?=[\)\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b))/dgv,name:"meta.model-heritage.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"model-property":{begin:/(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)|("(?:[^"\\]|\\[^\n])*")/dgv,beginCaptures:{"1":{name:"variable.name.tsp"},"2":{name:"string.quoted.double.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.model-property.typespec",patterns:[{include:"#token"},{include:"#type-annotation"},{include:"#operator-assignment"},{include:"#expression"}]},"model-statement":{begin:/\b(model)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?<=\})|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.model-statement.typespec",patterns:[{include:"#token"},{include:"#type-parameters"},{include:"#model-heritage"},{include:"#expression"}]},"namespace-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.namespace-body.typespec",patterns:[{include:"#statement"}]},"namespace-name":{begin:/(?=([\$_\`\p{Alpha}]))/dgv,end:/((?=\{)|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b))/dgv,name:"meta.namespace-name.typespec",patterns:[{include:"#identifier-expression"},{include:"#punctuation-accessor"}]},"namespace-statement":{begin:/\b(namespace)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/((?<=\})|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b))/dgv,name:"meta.namespace-statement.typespec",patterns:[{include:"#token"},{include:"#namespace-name"},{include:"#namespace-body"}]},"numeric-literal":{match:/\b(?<!\$)0[Xx]\p{AHex}[_\p{AHex}]*(n)?\b(?!\$)|\b(?<!\$)0[Bb][01][01_]*(n)?\b(?!\$)|(?<!\$)(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[Ee][\-\+]?[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*(\.)[Ee][\-\+]?[0-9][0-9_]*(n)?\b|\B(\.)[0-9][0-9_]*[Ee][\-\+]?[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*[Ee][\-\+]?[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*(\.)(n)?\B|\B(\.)[0-9][0-9_]*(n)?\b|\b[0-9][0-9_]*(n)?\b(?!\.))(?!\$)/dgv,name:"constant.numeric.tsp"},"object-literal":{begin:/#\{/dgv,beginCaptures:{"0":{name:"punctuation.hashcurlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.object-literal.typespec",patterns:[{include:"#token"},{include:"#object-literal-property"},{include:"#directive"},{include:"#spread-operator"},{include:"#punctuation-comma"}]},"object-literal-property":{begin:/(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"variable.name.tsp"},"2":{name:"keyword.operator.type.annotation.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.object-literal-property.typespec",patterns:[{include:"#token"},{include:"#expression"}]},"operation-heritage":{begin:/\b(is)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.operation-heritage.typespec",patterns:[{include:"#expression"}]},"operation-parameters":{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.parenthesis.open.tsp"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.parenthesis.close.tsp"}},name:"meta.operation-parameters.typespec",patterns:[{include:"#token"},{include:"#decorator"},{include:"#model-property"},{include:"#spread-operator"},{include:"#punctuation-comma"}]},"operation-signature":{patterns:[{include:"#type-parameters"},{include:"#operation-heritage"},{include:"#operation-parameters"},{include:"#type-annotation"}]},"operation-statement":{begin:/\b(op)\b\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.function.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.operation-statement.typespec",patterns:[{include:"#token"},{include:"#operation-signature"}]},"operator-assignment":{match:/=/dgv,name:"keyword.operator.assignment.tsp"},"parenthesized-expression":{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.parenthesis.open.tsp"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.parenthesis.close.tsp"}},name:"meta.parenthesized-expression.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"punctuation-accessor":{match:/\./dgv,name:"punctuation.accessor.tsp"},"punctuation-comma":{match:/,/dgv,name:"punctuation.comma.tsp"},"punctuation-semicolon":{match:/;/dgv,name:"punctuation.terminator.statement.tsp"},"scalar-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.scalar-body.typespec",patterns:[{include:"#token"},{include:"#directive"},{include:"#scalar-constructor"},{include:"#punctuation-semicolon"}]},"scalar-constructor":{begin:/\b(init)\b\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.function.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.scalar-constructor.typespec",patterns:[{include:"#token"},{include:"#operation-parameters"}]},"scalar-extends":{begin:/\b(extends)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=[\)\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.scalar-extends.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"scalar-statement":{begin:/\b(scalar)\b\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.type.tsp"}},end:/(?<=\})|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.scalar-statement.typespec",patterns:[{include:"#token"},{include:"#type-parameters"},{include:"#scalar-extends"},{include:"#scalar-body"}]},"spread-operator":{begin:/\.\.\./dgv,beginCaptures:{"0":{name:"keyword.operator.spread.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.spread-operator.typespec",patterns:[{include:"#expression"}]},statement:{patterns:[{include:"#token"},{include:"#directive"},{include:"#augment-decorator-statement"},{include:"#decorator"},{include:"#model-statement"},{include:"#scalar-statement"},{include:"#union-statement"},{include:"#interface-statement"},{include:"#enum-statement"},{include:"#alias-statement"},{include:"#const-statement"},{include:"#namespace-statement"},{include:"#operation-statement"},{include:"#import-statement"},{include:"#using-statement"},{include:"#decorator-declaration-statement"},{include:"#function-declaration-statement"},{include:"#punctuation-semicolon"}]},"string-literal":{begin:/"/dgv,end:/"|(?=\n?$)/dgv,name:"string.quoted.double.tsp",patterns:[{include:"#template-expression"},{include:"#escape-character"}]},"template-expression":{begin:/\$\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.template-expression.begin.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.template-expression.end.tsp"}},name:"meta.template-expression.typespec",patterns:[{include:"#expression"}]},token:{patterns:[{include:"#doc-comment"},{include:"#line-comment"},{include:"#block-comment"},{include:"#triple-quoted-string-literal"},{include:"#string-literal"},{include:"#boolean-literal"},{include:"#numeric-literal"}]},"triple-quoted-string-literal":{begin:/"""/dgv,end:/"""/dgv,name:"string.quoted.triple.tsp",patterns:[{include:"#template-expression"},{include:"#escape-character"}]},"tuple-expression":{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.squarebracket.open.tsp"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.squarebracket.close.tsp"}},name:"meta.tuple-expression.typespec",patterns:[{include:"#expression"}]},"tuple-literal":{begin:/#\[/dgv,beginCaptures:{"0":{name:"punctuation.hashsquarebracket.open.tsp"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.squarebracket.close.tsp"}},name:"meta.tuple-literal.typespec",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},"type-annotation":{begin:/\p{space}*(\??)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.optional.tsp"},"2":{name:"keyword.operator.type.annotation.tsp"}},end:/(?=[\)\,\;\=\@\}]|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.type-annotation.typespec",patterns:[{include:"#expression"}]},"type-argument":{begin:/(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)\p{space}*(=)/dgv,beginCaptures:{"1":{name:"entity.name.type.tsp"},"2":{name:"keyword.operator.assignment.tsp"}},end:/(?=>)|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,endCaptures:{"0":{name:"keyword.operator.assignment.tsp"}},name:"meta.type-argument.typespec",patterns:[{include:"#token"},{include:"#expression"},{include:"#punctuation-comma"}]},"type-arguments":{begin:/</dgv,beginCaptures:{"0":{name:"punctuation.definition.typeparameters.begin.tsp"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.definition.typeparameters.end.tsp"}},name:"meta.type-arguments.typespec",patterns:[{include:"#type-argument"},{include:"#expression"},{include:"#punctuation-comma"}]},"type-parameter":{begin:/(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"entity.name.type.tsp"}},end:/(?=>)|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.type-parameter.typespec",patterns:[{include:"#token"},{include:"#type-parameter-constraint"},{include:"#type-parameter-default"}]},"type-parameter-constraint":{begin:/extends/dgv,beginCaptures:{"0":{name:"keyword.other.tsp"}},end:/(?=>)|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.type-parameter-constraint.typespec",patterns:[{include:"#expression"}]},"type-parameter-default":{begin:/=/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.tsp"}},end:/(?=>)|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.type-parameter-default.typespec",patterns:[{include:"#expression"}]},"type-parameters":{begin:/</dgv,beginCaptures:{"0":{name:"punctuation.definition.typeparameters.begin.tsp"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.definition.typeparameters.end.tsp"}},name:"meta.type-parameters.typespec",patterns:[{include:"#type-parameter"},{include:"#punctuation-comma"}]},typeof:{begin:/\b(typeof)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=>)|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.typeof.typespec",patterns:[{include:"#expression"}]},"union-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.curlybrace.open.tsp"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.curlybrace.close.tsp"}},name:"meta.union-body.typespec",patterns:[{include:"#union-variant"},{include:"#token"},{include:"#directive"},{include:"#decorator"},{include:"#expression"},{include:"#punctuation-comma"}]},"union-statement":{begin:/\b(union)\b\p{space}+(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"},"2":{name:"entity.name.type.tsp"}},end:/(?<=\})|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.union-statement.typespec",patterns:[{include:"#token"},{include:"#union-body"}]},"union-variant":{begin:/(\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b|`(?:[^\\\`]|\\[^\n])*`)\p{space}*(:)/dgv,beginCaptures:{"1":{name:"variable.name.tsp"},"2":{name:"keyword.operator.type.annotation.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.union-variant.typespec",patterns:[{include:"#token"},{include:"#expression"}]},"using-statement":{begin:/\b(using)\b/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.using-statement.typespec",patterns:[{include:"#token"},{include:"#identifier-expression"},{include:"#punctuation-accessor"}]},valueof:{begin:/\b(valueof)/dgv,beginCaptures:{"1":{name:"keyword.other.tsp"}},end:/(?=>)|(?=[\)\,\;\@\}]|\bextern\b|\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\b)/dgv,name:"meta.valueof.typespec",patterns:[{include:"#expression"}]}},scopeName:"source.tsp",embeddedLangs:undefined,aliases:["tsp"]})
2
2
 
3
3
  export default [
4
4
  lang
package/dist/typst.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"Typst",name:"typst",patterns:[{include:"#markup"}],repository:{arguments:{patterns:[{match:/\b[\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*(?=:)/dgv,name:"variable.parameter.typst"},{include:"#code"}]},code:{patterns:[{include:"#common"},{begin:/\{/dgv,captures:{"0":{name:"punctuation.definition.block.code.typst"}},end:/\}/dgv,name:"meta.block.code.typst",patterns:[{include:"#code"}]},{begin:/\[/dgv,captures:{"0":{name:"punctuation.definition.block.content.typst"}},end:/\]/dgv,name:"meta.block.content.typst",patterns:[{include:"#markup"}]},{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.typst"}},end:/\n/dgv,name:"comment.line.double-slash.typst"},{match:/:/dgv,name:"punctuation.separator.colon.typst"},{match:/,/dgv,name:"punctuation.separator.comma.typst"},{match:/=>|\.\./dgv,name:"keyword.operator.typst"},{match:/==|!=|<=|<|>=|>/dgv,name:"keyword.operator.relational.typst"},{match:/\+=|-=|\*=|\/=|=/dgv,name:"keyword.operator.assignment.typst"},{match:/[\+\*\/]|(?<![\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*)-(?![\:alnum]_-\]*[\p{Alpha}_])/dgv,name:"keyword.operator.arithmetic.typst"},{match:/\b(and|or|not)\b/dgv,name:"keyword.operator.word.typst"},{match:/\b(let|as|in|set|show)\b/dgv,name:"keyword.other.typst"},{match:/\b(if|else)\b/dgv,name:"keyword.control.conditional.typst"},{match:/\b(for|while|break|continue)\b/dgv,name:"keyword.control.loop.typst"},{match:/\b(import|include|export)\b/dgv,name:"keyword.control.import.typst"},{match:/\b(return)\b/dgv,name:"keyword.control.flow.typst"},{include:"#constants"},{match:/\b[\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*!?(?=[\[\(])/dgv,name:"entity.name.function.typst"},{match:/(?<=\bshow\p{space}*)\b[\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*(?=\p{space}*[\:\.])/dgv,name:"entity.name.function.typst"},{begin:/(?<=\b[\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*!?)\(/dgv,captures:{"0":{name:"punctuation.definition.group.typst"}},end:/\)/dgv,patterns:[{include:"#arguments"}]},{match:/\b[\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*\b/dgv,name:"variable.other.typst"},{begin:/\(/dgv,captures:{"0":{name:"punctuation.definition.group.typst"}},end:/\)|(?=;)/dgv,name:"meta.group.typst",patterns:[{include:"#code"}]}]},comments:{patterns:[{begin:/\/\*/dgv,captures:{"0":{name:"punctuation.definition.comment.typst"}},end:/\*\//dgv,name:"comment.block.typst",patterns:[{include:"#comments"}]},{begin:/(?<!:)\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.typst"}},end:/\n/dgv,name:"comment.line.double-slash.typst",patterns:[{include:"#comments"}]}]},common:{patterns:[{include:"#comments"}]},constants:{patterns:[{match:/\bnone\b/dgv,name:"constant.language.none.typst"},{match:/\bauto\b/dgv,name:"constant.language.auto.typst"},{match:/\b(true|false)\b/dgv,name:"constant.language.boolean.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([eE][\+\-]?\p{Nd}+)?(mm|pt|cm|in|em)\b/dgv,name:"constant.numeric.length.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([eE][\+\-]?\p{Nd}+)?(rad|deg)\b/dgv,name:"constant.numeric.angle.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([eE][\+\-]?\p{Nd}+)?%/dgv,name:"constant.numeric.percentage.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([eE][\+\-]?\p{Nd}+)?fr/dgv,name:"constant.numeric.fr.typst"},{match:/\b\p{Nd}+\b/dgv,name:"constant.numeric.integer.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([eE][\+\-]?\p{Nd}+)?\b/dgv,name:"constant.numeric.float.typst"},{begin:/"/dgv,captures:{"0":{name:"punctuation.definition.string.typst"}},end:/"/dgv,name:"string.quoted.double.typst",patterns:[{match:/\\([\\"nrt]|u\{?[0-9a-zA-Z]*\}?)/dgv,name:"constant.character.escape.string.typst"}]},{begin:/\$/dgv,captures:{"0":{name:"punctuation.definition.string.math.typst"}},end:/\$/dgv,name:"string.other.math.typst"}]},markup:{patterns:[{include:"#common"},{match:/\\([\\\/\[\]\{\}\#\*_\=\~\`\$-\.]|u\{[0-9a-zA-Z]*\}?)/dgv,name:"constant.character.escape.content.typst"},{match:/\\/dgv,name:"punctuation.definition.linebreak.typst"},{match:/~/dgv,name:"punctuation.definition.nonbreaking-space.typst"},{match:/-\?/dgv,name:"punctuation.definition.shy.typst"},{match:/---/dgv,name:"punctuation.definition.em-dash.typst"},{match:/--/dgv,name:"punctuation.definition.en-dash.typst"},{match:/\.\.\./dgv,name:"punctuation.definition.ellipsis.typst"},{match:/:([a-zA-Z0-9]+:)+/dgv,name:"constant.symbol.typst"},{begin:/(^\*|\*(?=\n?$)|((?<=[[^\p{L}\p{M}\p{N}\p{Pc}]_])\*)|(\*(?=[[^\p{L}\p{M}\p{N}\p{Pc}]_])))/dgv,captures:{"0":{name:"punctuation.definition.bold.typst"}},end:/(^\*|\*(?=\n?$)|((?<=[[^\p{L}\p{M}\p{N}\p{Pc}]_])\*)|(\*(?=[[^\p{L}\p{M}\p{N}\p{Pc}]_])))|\n|(?=\])/dgv,name:"markup.bold.typst",patterns:[{include:"#markup"}]},{begin:/(^_|_(?=\n?$)|((?<=[[^\p{L}\p{M}\p{N}\p{Pc}]_])_)|(_(?=[[^\p{L}\p{M}\p{N}\p{Pc}]_])))/dgv,captures:{"0":{name:"punctuation.definition.italic.typst"}},end:/(^_|_(?=\n?$)|((?<=[[^\p{L}\p{M}\p{N}\p{Pc}]_])_)|(_(?=[[^\p{L}\p{M}\p{N}\p{Pc}]_])))|\n|(?=\])/dgv,name:"markup.italic.typst",patterns:[{include:"#markup"}]},{match:/https?:\/\/[0-9a-zA-Z\~\/\%\#\&\='\,\;\.\+\?]*/dgv,name:"markup.underline.link.typst"},{begin:/`{3,}/dgv,captures:{"0":{name:"punctuation.definition.raw.typst"}},end:/\x00/dgv,name:"markup.raw.block.typst"},{begin:/`/dgv,captures:{"0":{name:"punctuation.definition.raw.typst"}},end:/`/dgv,name:"markup.raw.inline.typst"},{begin:/\$/dgv,captures:{"0":{name:"punctuation.definition.string.math.typst"}},end:/\$/dgv,name:"string.other.math.typst"},{begin:/^\p{space}*=+\p{space}+/dgv,beginCaptures:{"0":{name:"punctuation.definition.heading.typst"}},contentName:"entity.name.section.typst",end:/\n|(?=<)/dgv,name:"markup.heading.typst",patterns:[{include:"#markup"}]},{match:/^\p{space}*-\p{space}+/dgv,name:"punctuation.definition.list.unnumbered.typst"},{match:/^\p{space}*([0-9]*\.|\+)\p{space}+/dgv,name:"punctuation.definition.list.numbered.typst"},{captures:{"1":{name:"punctuation.definition.list.description.typst"},"2":{name:"markup.list.term.typst"}},match:/^\p{space}*(\/)\p{space}+([^\:]*:)/dgv},{captures:{"1":{name:"punctuation.definition.label.typst"}},match:/<[\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*>/dgv,name:"entity.other.label.typst"},{captures:{"1":{name:"punctuation.definition.reference.typst"}},match:/(@)[\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*/dgv,name:"entity.other.reference.typst"},{begin:/(#)(let|set|show)\b/dgv,beginCaptures:{"0":{name:"keyword.other.typst"},"1":{name:"punctuation.definition.keyword.typst"}},end:/\n|(;)|(?=\])/dgv,endCaptures:{"1":{name:"punctuation.terminator.statement.typst"}},patterns:[{include:"#code"}]},{captures:{"1":{name:"punctuation.definition.keyword.typst"}},match:/(#)(as|in)\b/dgv,name:"keyword.other.typst"},{begin:/((#)if|(?<=([\}\]])\p{space}*)else)\b/dgv,beginCaptures:{"0":{name:"keyword.control.conditional.typst"},"2":{name:"punctuation.definition.keyword.typst"}},end:/\n|(?=\])|(?<=[\}\]])/dgv,patterns:[{include:"#code"}]},{begin:/(#)(for|while)\b/dgv,beginCaptures:{"0":{name:"keyword.control.loop.typst"},"1":{name:"punctuation.definition.keyword.typst"}},end:/\n|(?=\])|(?<=[\}\]])/dgv,patterns:[{include:"#code"}]},{captures:{"1":{name:"punctuation.definition.keyword.typst"}},match:/(#)(break|continue)\b/dgv,name:"keyword.control.loop.typst"},{begin:/(#)(import|include|export)\b/dgv,beginCaptures:{"0":{name:"keyword.control.import.typst"},"1":{name:"punctuation.definition.keyword.typst"}},end:/\n|(;)|(?=\])/dgv,endCaptures:{"1":{name:"punctuation.terminator.statement.typst"}},patterns:[{include:"#code"}]},{captures:{"1":{name:"punctuation.definition.keyword.typst"}},match:/(#)(return)\b/dgv,name:"keyword.control.flow.typst"},{captures:{"2":{name:"punctuation.definition.function.typst"}},match:/((#)[\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*!?)(?=[\[\(])/dgv,name:"entity.name.function.typst"},{begin:/(?<=#[\p{Alpha}_][\p{Alpha}\p{Nd}_\-]*!?)\(/dgv,captures:{"0":{name:"punctuation.definition.group.typst"}},end:/\)/dgv,patterns:[{include:"#arguments"}]},{captures:{"1":{name:"punctuation.definition.variable.typst"}},match:/(#)[\p{Alpha}_][\.\p{Alpha}\p{Nd}_\-]*/dgv,name:"entity.other.interpolated.typst"},{begin:/#/dgv,end:/\p{space}/dgv,name:"meta.block.content.typst",patterns:[{include:"#code"}]}]}},scopeName:"source.typst",embeddedLangs:undefined,aliases:["typ"]})
1
+ const lang = Object.freeze({displayName:"Typst",name:"typst",patterns:[{include:"#markup"}],repository:{arguments:{patterns:[{match:/\b[_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*(?=:)/dgv,name:"variable.parameter.typst"},{include:"#code"}]},code:{patterns:[{include:"#common"},{begin:/\{/dgv,captures:{"0":{name:"punctuation.definition.block.code.typst"}},end:/\}/dgv,name:"meta.block.code.typst",patterns:[{include:"#code"}]},{begin:/\[/dgv,captures:{"0":{name:"punctuation.definition.block.content.typst"}},end:/\]/dgv,name:"meta.block.content.typst",patterns:[{include:"#markup"}]},{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.typst"}},end:/\n/dgv,name:"comment.line.double-slash.typst"},{match:/:/dgv,name:"punctuation.separator.colon.typst"},{match:/,/dgv,name:"punctuation.separator.comma.typst"},{match:/=>|\.\./dgv,name:"keyword.operator.typst"},{match:/==|!=|<=?|>=?/dgv,name:"keyword.operator.relational.typst"},{match:/(?:[\-\*\+]|\/?)=/dgv,name:"keyword.operator.assignment.typst"},{match:/[\*\+\/]|(?<![_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*)-(?![\:almnu]_-\]*[_\p{Alpha}])/dgv,name:"keyword.operator.arithmetic.typst"},{match:/\b(and|or|not)\b/dgv,name:"keyword.operator.word.typst"},{match:/\b(let|as|in|set|show)\b/dgv,name:"keyword.other.typst"},{match:/\b(if|else)\b/dgv,name:"keyword.control.conditional.typst"},{match:/\b(for|while|break|continue)\b/dgv,name:"keyword.control.loop.typst"},{match:/\b(import|include|export)\b/dgv,name:"keyword.control.import.typst"},{match:/\b(return)\b/dgv,name:"keyword.control.flow.typst"},{include:"#constants"},{match:/\b[_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*!?(?=[\(\[])/dgv,name:"entity.name.function.typst"},{match:/(?<=\bshow\p{space}*)\b[_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*(?=\p{space}*[\.\:])/dgv,name:"entity.name.function.typst"},{begin:/(?<=\b[_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*!?)\(/dgv,captures:{"0":{name:"punctuation.definition.group.typst"}},end:/\)/dgv,patterns:[{include:"#arguments"}]},{match:/\b[_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*\b/dgv,name:"variable.other.typst"},{begin:/\(/dgv,captures:{"0":{name:"punctuation.definition.group.typst"}},end:/\)|(?=;)/dgv,name:"meta.group.typst",patterns:[{include:"#code"}]}]},comments:{patterns:[{begin:/\/\*/dgv,captures:{"0":{name:"punctuation.definition.comment.typst"}},end:/\*\//dgv,name:"comment.block.typst",patterns:[{include:"#comments"}]},{begin:/(?<!:)\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.typst"}},end:/\n/dgv,name:"comment.line.double-slash.typst",patterns:[{include:"#comments"}]}]},common:{patterns:[{include:"#comments"}]},constants:{patterns:[{match:/\bnone\b/dgv,name:"constant.language.none.typst"},{match:/\bauto\b/dgv,name:"constant.language.auto.typst"},{match:/\b(true|false)\b/dgv,name:"constant.language.boolean.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([Ee][\-\+]?\p{Nd}+)?(mm|pt|cm|in|em)\b/dgv,name:"constant.numeric.length.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([Ee][\-\+]?\p{Nd}+)?(rad|deg)\b/dgv,name:"constant.numeric.angle.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([Ee][\-\+]?\p{Nd}+)?%/dgv,name:"constant.numeric.percentage.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([Ee][\-\+]?\p{Nd}+)?fr/dgv,name:"constant.numeric.fr.typst"},{match:/\b\p{Nd}+\b/dgv,name:"constant.numeric.integer.typst"},{match:/\b(\p{Nd}*)?\.?\p{Nd}+([Ee][\-\+]?\p{Nd}+)?\b/dgv,name:"constant.numeric.float.typst"},{begin:/"/dgv,captures:{"0":{name:"punctuation.definition.string.typst"}},end:/"/dgv,name:"string.quoted.double.typst",patterns:[{match:/\\(["\\nrt]|u\{?[0-9A-Za-z]*\}?)/dgv,name:"constant.character.escape.string.typst"}]},{begin:/\$/dgv,captures:{"0":{name:"punctuation.definition.string.math.typst"}},end:/\$/dgv,name:"string.other.math.typst"}]},markup:{patterns:[{include:"#common"},{match:/\\([\]\#-\/\=\[\\_\`\{\}\~]|u\{[0-9A-Za-z]*\}?)/dgv,name:"constant.character.escape.content.typst"},{match:/\\/dgv,name:"punctuation.definition.linebreak.typst"},{match:/~/dgv,name:"punctuation.definition.nonbreaking-space.typst"},{match:/-\?/dgv,name:"punctuation.definition.shy.typst"},{match:/---/dgv,name:"punctuation.definition.em-dash.typst"},{match:/--/dgv,name:"punctuation.definition.en-dash.typst"},{match:/\.\.\./dgv,name:"punctuation.definition.ellipsis.typst"},{match:/:([0-9A-Za-z]+:)+/dgv,name:"constant.symbol.typst"},{begin:/(^\*|\*(?=\n?$)|((?<=[_[^\p{L}\p{M}\p{N}\p{Pc}]])\*)|(\*(?=[_[^\p{L}\p{M}\p{N}\p{Pc}]])))/dgv,captures:{"0":{name:"punctuation.definition.bold.typst"}},end:/(^\*|\*(?=\n?$)|((?<=[_[^\p{L}\p{M}\p{N}\p{Pc}]])\*)|(\*(?=[_[^\p{L}\p{M}\p{N}\p{Pc}]])))|\n|(?=\])/dgv,name:"markup.bold.typst",patterns:[{include:"#markup"}]},{begin:/(^_|_(?=\n?$)|((?<=[_[^\p{L}\p{M}\p{N}\p{Pc}]])_)|(_(?=[_[^\p{L}\p{M}\p{N}\p{Pc}]])))/dgv,captures:{"0":{name:"punctuation.definition.italic.typst"}},end:/(^_|_(?=\n?$)|((?<=[_[^\p{L}\p{M}\p{N}\p{Pc}]])_)|(_(?=[_[^\p{L}\p{M}\p{N}\p{Pc}]])))|\n|(?=\])/dgv,name:"markup.italic.typst",patterns:[{include:"#markup"}]},{match:/https?:\/\/[\#\%\&'\+\,\.-9\;\=\?A-Za-z\~]*/dgv,name:"markup.underline.link.typst"},{begin:/`{3,}/dgv,captures:{"0":{name:"punctuation.definition.raw.typst"}},end:/\x00/dgv,name:"markup.raw.block.typst"},{begin:/`/dgv,captures:{"0":{name:"punctuation.definition.raw.typst"}},end:/`/dgv,name:"markup.raw.inline.typst"},{begin:/\$/dgv,captures:{"0":{name:"punctuation.definition.string.math.typst"}},end:/\$/dgv,name:"string.other.math.typst"},{begin:/^\p{space}*=+\p{space}+/dgv,beginCaptures:{"0":{name:"punctuation.definition.heading.typst"}},contentName:"entity.name.section.typst",end:/\n|(?=<)/dgv,name:"markup.heading.typst",patterns:[{include:"#markup"}]},{match:/^\p{space}*-\p{space}+/dgv,name:"punctuation.definition.list.unnumbered.typst"},{match:/^\p{space}*([0-9]*\.|\+)\p{space}+/dgv,name:"punctuation.definition.list.numbered.typst"},{captures:{"1":{name:"punctuation.definition.list.description.typst"},"2":{name:"markup.list.term.typst"}},match:/^\p{space}*(\/)\p{space}+([^\:]*:)/dgv},{captures:{"1":{name:"punctuation.definition.label.typst"}},match:/<[_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*>/dgv,name:"entity.other.label.typst"},{captures:{"1":{name:"punctuation.definition.reference.typst"}},match:/(@)[_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*/dgv,name:"entity.other.reference.typst"},{begin:/(#)(let|set|show)\b/dgv,beginCaptures:{"0":{name:"keyword.other.typst"},"1":{name:"punctuation.definition.keyword.typst"}},end:/\n|(;)|(?=\])/dgv,endCaptures:{"1":{name:"punctuation.terminator.statement.typst"}},patterns:[{include:"#code"}]},{captures:{"1":{name:"punctuation.definition.keyword.typst"}},match:/(#)(as|in)\b/dgv,name:"keyword.other.typst"},{begin:/((#)if|(?<=([\]\}])\p{space}*)else)\b/dgv,beginCaptures:{"0":{name:"keyword.control.conditional.typst"},"2":{name:"punctuation.definition.keyword.typst"}},end:/\n|(?=\])|(?<=[\]\}])/dgv,patterns:[{include:"#code"}]},{begin:/(#)(for|while)\b/dgv,beginCaptures:{"0":{name:"keyword.control.loop.typst"},"1":{name:"punctuation.definition.keyword.typst"}},end:/\n|(?=\])|(?<=[\]\}])/dgv,patterns:[{include:"#code"}]},{captures:{"1":{name:"punctuation.definition.keyword.typst"}},match:/(#)(break|continue)\b/dgv,name:"keyword.control.loop.typst"},{begin:/(#)(import|include|export)\b/dgv,beginCaptures:{"0":{name:"keyword.control.import.typst"},"1":{name:"punctuation.definition.keyword.typst"}},end:/\n|(;)|(?=\])/dgv,endCaptures:{"1":{name:"punctuation.terminator.statement.typst"}},patterns:[{include:"#code"}]},{captures:{"1":{name:"punctuation.definition.keyword.typst"}},match:/(#)(return)\b/dgv,name:"keyword.control.flow.typst"},{captures:{"2":{name:"punctuation.definition.function.typst"}},match:/((#)[_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*!?)(?=[\(\[])/dgv,name:"entity.name.function.typst"},{begin:/(?<=#[_\p{Alpha}][\-_\p{Alpha}\p{Nd}]*!?)\(/dgv,captures:{"0":{name:"punctuation.definition.group.typst"}},end:/\)/dgv,patterns:[{include:"#arguments"}]},{captures:{"1":{name:"punctuation.definition.variable.typst"}},match:/(#)[_\p{Alpha}][\-\._\p{Alpha}\p{Nd}]*/dgv,name:"entity.other.interpolated.typst"},{begin:/#/dgv,end:/\p{space}/dgv,name:"meta.block.content.typst",patterns:[{include:"#code"}]}]}},scopeName:"source.typst",embeddedLangs:undefined,aliases:["typ"]})
2
2
 
3
3
  export default [
4
4
  lang
package/dist/v.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { EmulatedRegExp } from 'oniguruma-to-es'
2
2
 
3
- const lang = Object.freeze({displayName:"V",fileTypes:[".v",".vh",".vsh",".vv","v.mod"],name:"v",patterns:[{include:"#comments"},{include:"#function-decl"},{include:"#as-is"},{include:"#attributes"},{include:"#assignment"},{include:"#module-decl"},{include:"#import-decl"},{include:"#hash-decl"},{include:"#brackets"},{include:"#builtin-fix"},{include:"#escaped-fix"},{include:"#operators"},{include:"#function-limited-overload-decl"},{include:"#function-extend-decl"},{include:"#function-exist"},{include:"#generic"},{include:"#constants"},{include:"#type"},{include:"#enum"},{include:"#interface"},{include:"#struct"},{include:"#keywords"},{include:"#storage"},{include:"#numbers"},{include:"#strings"},{include:"#types"},{include:"#punctuations"},{include:"#variable-assign"},{include:"#function-decl"}],repository:{"as-is":{begin:/\p{space}+(as|is)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.$1.v"}},end:/([\p{L}\p{M}\p{N}\p{Pc}\.]*)/dgv,endCaptures:{"1":{name:"entity.name.alias.v"}}},assignment:{captures:{"1":{patterns:[{include:"#operators"}]}},match:/\p{space}+([\:\+\-\*\/\%\&\|\^]?=)\p{space}+/dgv,name:"meta.definition.variable.v"},attributes:{captures:{"1":{name:"meta.function.attribute.v"},"2":{name:"punctuation.definition.begin.bracket.square.v"},"3":{name:"storage.modifier.attribute.v"},"4":{name:"punctuation.definition.end.bracket.square.v"}},match:/^\p{space}*((\[)(deprecated|unsafe|console|heap|manualfree|typedef|live|inline|flag|ref_only|direct_array_access|callconv)(\]))/dgv,name:"meta.definition.attribute.v"},brackets:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.bracket.curly.begin.v"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.bracket.curly.end.v"}},patterns:[{include:"$self"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.bracket.round.begin.v"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.bracket.round.end.v"}},patterns:[{include:"$self"}]},{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.bracket.square.begin.v"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.bracket.square.end.v"}},patterns:[{include:"$self"}]}]},"builtin-fix":{patterns:[{patterns:[{match:/(const)(?=\p{space}*\()/dgv,name:"storage.modifier.v"},{match:/\b(fn|type|enum|struct|union|interface|map|assert|sizeof|typeof|__offsetof)\b(?=\p{space}*\()/dgv,name:"keyword.$1.v"}]},{patterns:[{match:/(\$(?:if|else))(?=\p{space}*\()/dgv,name:"keyword.control.v"},{match:/\b(as|in|is|or|break|continue|default|unsafe|match|if|else|for|go|spawn|goto|defer|return|shared|select|rlock|lock|atomic|asm)\b(?=\p{space}*\()/dgv,name:"keyword.control.v"}]},{patterns:[{captures:{"1":{name:"storage.type.numeric.v"}},match:/(?<![^\n])(i?(?:8|16|nt|64|128)|u?(?:16|32|64|128)|f?(?:32|64))(?=\p{space}*\()/dgv,name:"meta.expr.numeric.cast.v"},{captures:{"1":{name:"storage.type.$1.v"}},match:/(bool|byte|byteptr|charptr|voidptr|string|rune|size_t|[ui]size)(?=\p{space}*\()/dgv,name:"meta.expr.bool.cast.v"}]}]},comments:{patterns:[{begin:/\/\*/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.v"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.v"}},name:"comment.block.documentation.v",patterns:[{include:"#comments"}]},{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.v"}},end:/(?=\n?$)/dgv,name:"comment.line.double-slash.v"}]},constants:{match:/\b(true|false|none)\b/dgv,name:"constant.language.v"},enum:{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"storage.type.enum.v"},"3":{name:"entity.name.enum.v"}},match:/^\p{space}*(?:(pub)?\p{space}+)?(enum)\p{space}+(?:[\p{L}\p{M}\p{N}\p{Pc}]+\.)?([\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.definition.enum.v"},"function-decl":{captures:{"1":{name:"storage.modifier.v"},"2":{name:"keyword.fn.v"},"3":{name:"entity.name.function.v"},"4":{patterns:[{include:"#generic"}]}},match:/^(\bpub\b\p{space}+)?(\bfn\b)\p{space}+(?:\([^\)]+\)\p{space}+)?(?:C\.)?([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*((?<=[\p{L}\p{M}\p{N}\p{Pc}\p{space}\+])(<)([\p{L}\p{M}\p{N}\p{Pc}]+)(>))?/dgv,name:"meta.definition.function.v"},"function-exist":{captures:{"0":{name:"meta.function.call.v"},"1":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.v"}]},"2":{patterns:[{include:"#generic"}]}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+)((?<=[\p{L}\p{M}\p{N}\p{Pc}\p{space}\+])(<)([\p{L}\p{M}\p{N}\p{Pc}]+)(>))?(?=\p{space}*\()/dgv,name:"meta.support.function.v"},"function-extend-decl":{captures:{"1":{name:"storage.modifier.v"},"2":{name:"keyword.fn.v"},"3":{name:"punctuation.definition.bracket.round.begin.v"},"4":{patterns:[{include:"#brackets"},{include:"#storage"},{include:"#generic"},{include:"#types"},{include:"#punctuation"}]},"5":{name:"punctuation.definition.bracket.round.end.v"},"6":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.v"}]},"7":{patterns:[{include:"#generic"}]}},match:/^\p{space}*(pub)?\p{space}*(fn)\p{space}*(\()([^\)]*)(\))\p{space}*(?:C\.)?([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*((?<=[\p{L}\p{M}\p{N}\p{Pc}\p{space}\+])(<)([\p{L}\p{M}\p{N}\p{Pc}]+)(>))?/dgv,name:"meta.definition.function.v"},"function-limited-overload-decl":{captures:{"1":{name:"storage.modifier.v"},"2":{name:"keyword.fn.v"},"3":{name:"punctuation.definition.bracket.round.begin.v"},"4":{patterns:[{include:"#brackets"},{include:"#storage"},{include:"#generic"},{include:"#types"},{include:"#punctuation"}]},"5":{name:"punctuation.definition.bracket.round.end.v"},"6":{patterns:[{include:"#operators"}]},"7":{name:"punctuation.definition.bracket.round.begin.v"},"8":{patterns:[{include:"#brackets"},{include:"#storage"},{include:"#generic"},{include:"#types"},{include:"#punctuation"}]},"9":{name:"punctuation.definition.bracket.round.end.v"},"10":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.v"}]}},match:/^\p{space}*(pub)?\p{space}*(fn)\p{space}*(\()([^\)]*)(\))\p{space}*([\+\-\*\/])?\p{space}*(\()([^\)]*)(\))\p{space}*(?:C\.)?([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,name:"meta.definition.function.v"},generic:{patterns:[{captures:{"1":{name:"punctuation.definition.bracket.angle.begin.v"},"2":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.generic.v"}]},"3":{name:"punctuation.definition.bracket.angle.end.v"}},match:/(?<=[\p{L}\p{M}\p{N}\p{Pc}\p{space}\+])(<)([\p{L}\p{M}\p{N}\p{Pc}]+)(>)/dgv,name:"meta.definition.generic.v"}]},"hash-decl":{begin:/^\p{space}*(#)/dgv,end:/(?=\n?$)/dgv,name:"markup.bold.v"},"illegal-name":{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"invalid.illegal.v"},"import-decl":{begin:/^\p{space}*(import)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.import.v"}},end:/([\p{L}\p{M}\p{N}\p{Pc}\.]+)/dgv,endCaptures:{"1":{name:"entity.name.import.v"}},name:"meta.import.v"},interface:{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"keyword.interface.v"},"3":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.interface.v"}]}},match:/^\p{space}*(?:(pub)?\p{space}+)?(interface)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.definition.interface.v"},keywords:{patterns:[{match:/(\$(?:if|else))/dgv,name:"keyword.control.v"},{match:/(?<!@)\b(as|it|is|in|or|break|continue|default|unsafe|match|if|else|for|go|spawn|goto|defer|return|shared|select|rlock|lock|atomic|asm)\b/dgv,name:"keyword.control.v"},{match:/(?<!@)\b(fn|type|typeof|enum|struct|interface|map|assert|sizeof|__offsetof)\b/dgv,name:"keyword.$1.v"}]},"module-decl":{begin:/^\p{space}*(module)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.module.v"}},end:/([\p{L}\p{M}\p{N}\p{Pc}\.]+)/dgv,endCaptures:{"1":{name:"entity.name.module.v"}},name:"meta.module.v"},numbers:{patterns:[{match:/([0-9]+(_?))+(\.)([0-9]+[eE][\-\+]?[0-9]+)/dgv,name:"constant.numeric.exponential.v"},{match:/([0-9]+(_?))+(\.)([0-9]+)/dgv,name:"constant.numeric.float.v"},{match:/0b(?:[0-1]+_?)+/dgv,name:"constant.numeric.binary.v"},{match:/0o(?:[0-7]+_?)+/dgv,name:"constant.numeric.octal.v"},{match:/0x(?:\p{AHex}+_?)+/dgv,name:"constant.numeric.hex.v"},{match:/(?:[0-9]+_?)+/dgv,name:"constant.numeric.integer.v"}]},operators:{patterns:[{match:/([\+\-\*\/\%]|\+\+|--|>>|<<)/dgv,name:"keyword.operator.arithmetic.v"},{match:/(==|!=|[\>\<]|>=|<=)/dgv,name:"keyword.operator.relation.v"},{match:/(:=|=|\+=|-=|\*=|\/=|%=|&=|\|=|\^=|~=|&&=|\|\|=|>>=|<<=)/dgv,name:"keyword.operator.assignment.v"},{match:/([\&\|\^\~]|<(?!<)|>(?!>))/dgv,name:"keyword.operator.bitwise.v"},{match:/(&&|\|\||!)/dgv,name:"keyword.operator.logical.v"},{match:/\?/dgv,name:"keyword.operator.optional.v"}]},punctuation:{patterns:[{match:/\./dgv,name:"punctuation.delimiter.period.dot.v"},{match:/,/dgv,name:"punctuation.delimiter.comma.v"},{match:/:/dgv,name:"punctuation.separator.key-value.colon.v"},{match:/;/dgv,name:"punctuation.definition.other.semicolon.v"},{match:/\?/dgv,name:"punctuation.definition.other.questionmark.v"},{match:/#/dgv,name:"punctuation.hash.v"}]},punctuations:{patterns:[{match:/\./dgv,name:"punctuation.accessor.v"},{match:/,/dgv,name:"punctuation.separator.comma.v"}]},storage:{match:/\b(const|mut|pub)\b/dgv,name:"storage.modifier.v"},"string-escaped-char":{patterns:[{match:/\\([0-7]{3}|[\$abfnrtv\\'"]|x\p{AHex}{2}|u\p{AHex}{4}|U\p{AHex}{8})/dgv,name:"constant.character.escape.v"},{match:/\\[^0-7\$xuUabfnrtv'"]/dgv,name:"invalid.illegal.unknown-escape.v"}]},"string-interpolation":{captures:{"1":{patterns:[{match:/\$\p{Nd}[\.\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"invalid.illegal.v"},{match:/\$([\.\p{L}\p{M}\p{N}\p{Pc}]+|\{[^\n]*?\})/dgv,name:"variable.other.interpolated.v"}]}},match:/(\$([\p{L}\p{M}\p{N}\p{Pc}\.]+|\{[^\n]*?\}))/dgv,name:"meta.string.interpolation.v"},"string-placeholder":{match:/%(\[\p{Nd}+\])?([\+\#\-0 ]{0,2}((\p{Nd}+|\*)?(\.?(\p{Nd}+|\*|(\[\p{Nd}+\])\*?)?(\[\p{Nd}+\])?)?))?[vT\%tbcdoqxXUeEfFgGsp]/dgv,name:"constant.other.placeholder.v"},strings:{patterns:[{begin:/`/dgv,end:/`/dgv,name:"string.quoted.rune.v",patterns:[{include:"#string-escaped-char"},{include:"#string-interpolation"},{include:"#string-placeholder"}]},{begin:/(r)'/dgv,beginCaptures:{"1":{name:"storage.type.string.v"}},end:/'/dgv,name:"string.quoted.raw.v",patterns:[{include:"#string-interpolation"},{include:"#string-placeholder"}]},{begin:/(r)"/dgv,beginCaptures:{"1":{name:"storage.type.string.v"}},end:/"/dgv,name:"string.quoted.raw.v",patterns:[{include:"#string-interpolation"},{include:"#string-placeholder"}]},{begin:/(c?)'/dgv,beginCaptures:{"1":{name:"storage.type.string.v"}},end:/'/dgv,name:"string.quoted.v",patterns:[{include:"#string-escaped-char"},{include:"#string-interpolation"},{include:"#string-placeholder"}]},{begin:/(c?)"/dgv,beginCaptures:{"1":{name:"storage.type.string.v"}},end:/"/dgv,name:"string.quoted.v",patterns:[{include:"#string-escaped-char"},{include:"#string-interpolation"},{include:"#string-placeholder"}]}]},struct:{patterns:[{begin:/^\p{space}*(?:(mut|pub(?:\p{space}+mut)?|__global)\p{space}+)?(struct|union)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\.]+)\p{space}*|(\{)/dgv,beginCaptures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"storage.type.struct.v"},"3":{name:"entity.name.type.v"},"4":{name:"punctuation.definition.bracket.curly.begin.v"}},end:/\p{space}*|(\})/dgv,endCaptures:{"1":{name:"punctuation.definition.bracket.curly.end.v"}},name:"meta.definition.struct.v",patterns:[{include:"#struct-access-modifier"},{captures:{"1":{name:"variable.other.property.v"},"2":{patterns:[{include:"#numbers"},{include:"#brackets"},{include:"#types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"storage.type.other.v"}]},"3":{name:"keyword.operator.assignment.v"},"4":{patterns:[{include:"$self"}]}},match:/*@__PURE__*/ new EmulatedRegExp("\\b([\\p{L}\\p{M}\\p{N}\\p{Pc}]+)\\p{space}+([\\p{L}\\p{M}\\p{N}\\p{Pc}\\[\\]\\*\\&\\.]+)(?:\\p{space}*(=)\\p{space}*((?:(?=((?:[^\\n](?=(?=\\n?$)|//|/\\*))*))\\5)))?","dgv",{"hiddenCaptures":[5]})},{include:"#types"},{include:"$self"}]},{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"storage.type.struct.v"},"3":{name:"entity.name.struct.v"}},match:/^\p{space}*(mut|pub(?:\p{space}+mut)?|__global)\p{space}+?(struct)\p{space}+(?:\p{space}+([\p{L}\p{M}\p{N}\p{Pc}\.]+))?/dgv,name:"meta.definition.struct.v"}]},"struct-access-modifier":{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"punctuation.separator.struct.key-value.v"}},match:/(?<=\p{space}|^)(mut|pub(?:\p{space}+mut)?|__global)(:|\b)/dgv},type:{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"storage.type.type.v"},"3":{patterns:[{include:"#illegal-name"},{include:"#types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.v"}]},"4":{patterns:[{include:"#illegal-name"},{include:"#types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.v"}]}},match:/^\p{space}*(?:(pub)?\p{space}+)?(type)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}+(?:[\p{L}\p{M}\p{N}\p{Pc}]+\.+)?([\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.definition.type.v"},types:{patterns:[{match:/(?<!\.)\b(i(8|16|nt|64|128)|u(8|16|32|64|128)|f(32|64))\b/dgv,name:"storage.type.numeric.v"},{match:/(?<!\.)\b(bool|byte|byteptr|charptr|voidptr|string|ustring|rune)\b/dgv,name:"storage.type.$1.v"}]},"variable-assign":{captures:{"0":{patterns:[{match:/[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"variable.other.assignment.v"},{include:"#punctuation"}]}},match:/[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*(?:,\p{space}*[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)*(?=\p{space}*(?:=|:=))/dgv}},scopeName:"source.v",embeddedLangs:undefined,aliases:undefined})
3
+ const lang = Object.freeze({displayName:"V",fileTypes:[".v",".vh",".vsh",".vv","v.mod"],name:"v",patterns:[{include:"#comments"},{include:"#function-decl"},{include:"#as-is"},{include:"#attributes"},{include:"#assignment"},{include:"#module-decl"},{include:"#import-decl"},{include:"#hash-decl"},{include:"#brackets"},{include:"#builtin-fix"},{include:"#escaped-fix"},{include:"#operators"},{include:"#function-limited-overload-decl"},{include:"#function-extend-decl"},{include:"#function-exist"},{include:"#generic"},{include:"#constants"},{include:"#type"},{include:"#enum"},{include:"#interface"},{include:"#struct"},{include:"#keywords"},{include:"#storage"},{include:"#numbers"},{include:"#strings"},{include:"#types"},{include:"#punctuations"},{include:"#variable-assign"},{include:"#function-decl"}],repository:{"as-is":{begin:/\p{space}+([ai]s)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.$1.v"}},end:/([\.\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,endCaptures:{"1":{name:"entity.name.alias.v"}}},assignment:{captures:{"1":{patterns:[{include:"#operators"}]}},match:/\p{space}+([\-\%\&\*\+\/\:\^\|]?=)\p{space}+/dgv,name:"meta.definition.variable.v"},attributes:{captures:{"1":{name:"meta.function.attribute.v"},"2":{name:"punctuation.definition.begin.bracket.square.v"},"3":{name:"storage.modifier.attribute.v"},"4":{name:"punctuation.definition.end.bracket.square.v"}},match:/^\p{space}*((\[)(deprecated|unsafe|console|heap|manualfree|typedef|live|inline|flag|ref_only|direct_array_access|callconv)(\]))/dgv,name:"meta.definition.attribute.v"},brackets:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.bracket.curly.begin.v"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.bracket.curly.end.v"}},patterns:[{include:"$self"}]},{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.bracket.round.begin.v"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.bracket.round.end.v"}},patterns:[{include:"$self"}]},{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.bracket.square.begin.v"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.bracket.square.end.v"}},patterns:[{include:"$self"}]}]},"builtin-fix":{patterns:[{patterns:[{match:/(const)(?=\p{space}*\()/dgv,name:"storage.modifier.v"},{match:/\b(fn|type|enum|struct|union|interface|map|assert|sizeof|typeof|__offsetof)\b(?=\p{space}*\()/dgv,name:"keyword.$1.v"}]},{patterns:[{match:/(\$(?:if|else))(?=\p{space}*\()/dgv,name:"keyword.control.v"},{match:/\b(as|in|is|or|break|continue|default|unsafe|match|if|else|for|go|spawn|goto|defer|return|shared|select|rlock|lock|atomic|asm)\b(?=\p{space}*\()/dgv,name:"keyword.control.v"}]},{patterns:[{captures:{"1":{name:"storage.type.numeric.v"}},match:/(?<![^\n])(i?(?:8|16|nt|64|128)|u?(?:16|32|64|128)|f?(?:32|64))(?=\p{space}*\()/dgv,name:"meta.expr.numeric.cast.v"},{captures:{"1":{name:"storage.type.$1.v"}},match:/(bool|byte|byteptr|charptr|voidptr|string|rune|size_t|[iu]size)(?=\p{space}*\()/dgv,name:"meta.expr.bool.cast.v"}]}]},comments:{patterns:[{begin:/\/\*/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.v"}},end:/\*\//dgv,endCaptures:{"0":{name:"punctuation.definition.comment.end.v"}},name:"comment.block.documentation.v",patterns:[{include:"#comments"}]},{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.begin.v"}},end:/(?=\n?$)/dgv,name:"comment.line.double-slash.v"}]},constants:{match:/\b(true|false|none)\b/dgv,name:"constant.language.v"},enum:{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"storage.type.enum.v"},"3":{name:"entity.name.enum.v"}},match:/^\p{space}*(?:(pub)?\p{space}+)?(enum)\p{space}+(?:[\p{L}\p{M}\p{N}\p{Pc}]+\.)?([\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.definition.enum.v"},"function-decl":{captures:{"1":{name:"storage.modifier.v"},"2":{name:"keyword.fn.v"},"3":{name:"entity.name.function.v"},"4":{patterns:[{include:"#generic"}]}},match:/^(\bpub\b\p{space}+)?\b(fn)\b\p{space}+(?:\([^\)]+\)\p{space}+)?(?:C\.)?([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*((?<=[\+\p{L}\p{M}\p{N}\p{Pc}\p{space}])(<)([\p{L}\p{M}\p{N}\p{Pc}]+)(>))?/dgv,name:"meta.definition.function.v"},"function-exist":{captures:{"0":{name:"meta.function.call.v"},"1":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.v"}]},"2":{patterns:[{include:"#generic"}]}},match:/([\p{L}\p{M}\p{N}\p{Pc}]+)((?<=[\+\p{L}\p{M}\p{N}\p{Pc}\p{space}])(<)([\p{L}\p{M}\p{N}\p{Pc}]+)(>))?(?=\p{space}*\()/dgv,name:"meta.support.function.v"},"function-extend-decl":{captures:{"1":{name:"storage.modifier.v"},"2":{name:"keyword.fn.v"},"3":{name:"punctuation.definition.bracket.round.begin.v"},"4":{patterns:[{include:"#brackets"},{include:"#storage"},{include:"#generic"},{include:"#types"},{include:"#punctuation"}]},"5":{name:"punctuation.definition.bracket.round.end.v"},"6":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.v"}]},"7":{patterns:[{include:"#generic"}]}},match:/^\p{space}*(pub)?\p{space}*(fn)\p{space}*(\()([^\)]*)(\))\p{space}*(?:C\.)?([\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*((?<=[\+\p{L}\p{M}\p{N}\p{Pc}\p{space}])(<)([\p{L}\p{M}\p{N}\p{Pc}]+)(>))?/dgv,name:"meta.definition.function.v"},"function-limited-overload-decl":{captures:{"1":{name:"storage.modifier.v"},"2":{name:"keyword.fn.v"},"3":{name:"punctuation.definition.bracket.round.begin.v"},"4":{patterns:[{include:"#brackets"},{include:"#storage"},{include:"#generic"},{include:"#types"},{include:"#punctuation"}]},"5":{name:"punctuation.definition.bracket.round.end.v"},"6":{patterns:[{include:"#operators"}]},"7":{name:"punctuation.definition.bracket.round.begin.v"},"8":{patterns:[{include:"#brackets"},{include:"#storage"},{include:"#generic"},{include:"#types"},{include:"#punctuation"}]},"9":{name:"punctuation.definition.bracket.round.end.v"},"10":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.function.v"}]}},match:/^\p{space}*(pub)?\p{space}*(fn)\p{space}*(\()([^\)]*)(\))\p{space}*([\-\*\+\/])?\p{space}*(\()([^\)]*)(\))\p{space}*(?:C\.)?([\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,name:"meta.definition.function.v"},generic:{patterns:[{captures:{"1":{name:"punctuation.definition.bracket.angle.begin.v"},"2":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.generic.v"}]},"3":{name:"punctuation.definition.bracket.angle.end.v"}},match:/(?<=[\+\p{L}\p{M}\p{N}\p{Pc}\p{space}])(<)([\p{L}\p{M}\p{N}\p{Pc}]+)(>)/dgv,name:"meta.definition.generic.v"}]},"hash-decl":{begin:/^\p{space}*(#)/dgv,end:/(?=\n?$)/dgv,name:"markup.bold.v"},"illegal-name":{match:/\p{Nd}[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"invalid.illegal.v"},"import-decl":{begin:/^\p{space}*(import)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.import.v"}},end:/([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,endCaptures:{"1":{name:"entity.name.import.v"}},name:"meta.import.v"},interface:{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"keyword.interface.v"},"3":{patterns:[{include:"#illegal-name"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.interface.v"}]}},match:/^\p{space}*(?:(pub)?\p{space}+)?(interface)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.definition.interface.v"},keywords:{patterns:[{match:/(\$(?:if|else))/dgv,name:"keyword.control.v"},{match:/(?<!@)\b(as|it|is|in|or|break|continue|default|unsafe|match|if|else|for|go|spawn|goto|defer|return|shared|select|rlock|lock|atomic|asm)\b/dgv,name:"keyword.control.v"},{match:/(?<!@)\b(fn|type|typeof|enum|struct|interface|map|assert|sizeof|__offsetof)\b/dgv,name:"keyword.$1.v"}]},"module-decl":{begin:/^\p{space}*(module)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.module.v"}},end:/([\.\p{L}\p{M}\p{N}\p{Pc}]+)/dgv,endCaptures:{"1":{name:"entity.name.module.v"}},name:"meta.module.v"},numbers:{patterns:[{match:/([0-9]+(_?))+(\.)([0-9]+[Ee][\-\+]?[0-9]+)/dgv,name:"constant.numeric.exponential.v"},{match:/([0-9]+(_?))+(\.)([0-9]+)/dgv,name:"constant.numeric.float.v"},{match:/0b(?:[01]+_?)+/dgv,name:"constant.numeric.binary.v"},{match:/0o(?:[0-7]+_?)+/dgv,name:"constant.numeric.octal.v"},{match:/0x(?:\p{AHex}+_?)+/dgv,name:"constant.numeric.hex.v"},{match:/(?:[0-9]+_?)+/dgv,name:"constant.numeric.integer.v"}]},operators:{patterns:[{match:/([\-\%\*\+\/]|\+\+|--|>>|<<)/dgv,name:"keyword.operator.arithmetic.v"},{match:/(==|!=|[\<\>]|>=|<=)/dgv,name:"keyword.operator.relation.v"},{match:/((?::?|[\-\%\&\*\+\/\^\|\~]|&&|\|\||>>|<<)=)/dgv,name:"keyword.operator.assignment.v"},{match:/([\&\^\|\~]|<(?!<)|>(?!>))/dgv,name:"keyword.operator.bitwise.v"},{match:/(&&|\|\||!)/dgv,name:"keyword.operator.logical.v"},{match:/\?/dgv,name:"keyword.operator.optional.v"}]},punctuation:{patterns:[{match:/\./dgv,name:"punctuation.delimiter.period.dot.v"},{match:/,/dgv,name:"punctuation.delimiter.comma.v"},{match:/:/dgv,name:"punctuation.separator.key-value.colon.v"},{match:/;/dgv,name:"punctuation.definition.other.semicolon.v"},{match:/\?/dgv,name:"punctuation.definition.other.questionmark.v"},{match:/#/dgv,name:"punctuation.hash.v"}]},punctuations:{patterns:[{match:/\./dgv,name:"punctuation.accessor.v"},{match:/,/dgv,name:"punctuation.separator.comma.v"}]},storage:{match:/\b(const|mut|pub)\b/dgv,name:"storage.modifier.v"},"string-escaped-char":{patterns:[{match:/\\([0-7]{3}|["\$'\\abfnrtv]|x\p{AHex}{2}|u\p{AHex}{4}|U\p{AHex}{8})/dgv,name:"constant.character.escape.v"},{match:/\\[^"\$'0-7Uabfnrtuvx]/dgv,name:"invalid.illegal.unknown-escape.v"}]},"string-interpolation":{captures:{"1":{patterns:[{match:/\$\p{Nd}[\.\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"invalid.illegal.v"},{match:/\$([\.\p{L}\p{M}\p{N}\p{Pc}]+|\{[^\n]*?\})/dgv,name:"variable.other.interpolated.v"}]}},match:/(\$([\.\p{L}\p{M}\p{N}\p{Pc}]+|\{[^\n]*?\}))/dgv,name:"meta.string.interpolation.v"},"string-placeholder":{match:/%(\[\p{Nd}+\])?([\- \#\+0]{0,2}((\p{Nd}+|\*)?(\.?(\p{Nd}+|\*|(\[\p{Nd}+\])\*?)?(\[\p{Nd}+\])?)?))?[\%EFGTUXb-gopqstvx]/dgv,name:"constant.other.placeholder.v"},strings:{patterns:[{begin:/`/dgv,end:/`/dgv,name:"string.quoted.rune.v",patterns:[{include:"#string-escaped-char"},{include:"#string-interpolation"},{include:"#string-placeholder"}]},{begin:/(r)'/dgv,beginCaptures:{"1":{name:"storage.type.string.v"}},end:/'/dgv,name:"string.quoted.raw.v",patterns:[{include:"#string-interpolation"},{include:"#string-placeholder"}]},{begin:/(r)"/dgv,beginCaptures:{"1":{name:"storage.type.string.v"}},end:/"/dgv,name:"string.quoted.raw.v",patterns:[{include:"#string-interpolation"},{include:"#string-placeholder"}]},{begin:/(c?)'/dgv,beginCaptures:{"1":{name:"storage.type.string.v"}},end:/'/dgv,name:"string.quoted.v",patterns:[{include:"#string-escaped-char"},{include:"#string-interpolation"},{include:"#string-placeholder"}]},{begin:/(c?)"/dgv,beginCaptures:{"1":{name:"storage.type.string.v"}},end:/"/dgv,name:"string.quoted.v",patterns:[{include:"#string-escaped-char"},{include:"#string-interpolation"},{include:"#string-placeholder"}]}]},struct:{patterns:[{begin:/^\p{space}*(?:(mut|pub(?:\p{space}+mut)?|__global)\p{space}+)?(struct|union)\p{space}+([\.\p{L}\p{M}\p{N}\p{Pc}]+)\p{space}*|(\{)/dgv,beginCaptures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"storage.type.struct.v"},"3":{name:"entity.name.type.v"},"4":{name:"punctuation.definition.bracket.curly.begin.v"}},end:/\p{space}*|(\})/dgv,endCaptures:{"1":{name:"punctuation.definition.bracket.curly.end.v"}},name:"meta.definition.struct.v",patterns:[{include:"#struct-access-modifier"},{captures:{"1":{name:"variable.other.property.v"},"2":{patterns:[{include:"#numbers"},{include:"#brackets"},{include:"#types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"storage.type.other.v"}]},"3":{name:"keyword.operator.assignment.v"},"4":{patterns:[{include:"$self"}]}},match:/*@__PURE__*/ new EmulatedRegExp("\\b([\\p{L}\\p{M}\\p{N}\\p{Pc}]+)\\p{space}+([\\]\\&\\*\\.\\[\\p{L}\\p{M}\\p{N}\\p{Pc}]+)(?:\\p{space}*(=)\\p{space}*((?:(?=((?:[^\\n](?=(?=\\n?$)|//|/\\*))*))\\5)))?","dgv",{"hiddenCaptures":[5]})},{include:"#types"},{include:"$self"}]},{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"storage.type.struct.v"},"3":{name:"entity.name.struct.v"}},match:/^\p{space}*(mut|pub(?:\p{space}+mut)?|__global)\p{space}+?(struct)\p{space}+(?:\p{space}+([\.\p{L}\p{M}\p{N}\p{Pc}]+))?/dgv,name:"meta.definition.struct.v"}]},"struct-access-modifier":{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"punctuation.separator.struct.key-value.v"}},match:/(?<=\p{space}|^)(mut|pub(?:\p{space}+mut)?|__global)(:|\b)/dgv},type:{captures:{"1":{name:"storage.modifier.$1.v"},"2":{name:"storage.type.type.v"},"3":{patterns:[{include:"#illegal-name"},{include:"#types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.v"}]},"4":{patterns:[{include:"#illegal-name"},{include:"#types"},{match:/[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"entity.name.type.v"}]}},match:/^\p{space}*(?:(pub)?\p{space}+)?(type)\p{space}+([\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}+(?:[\p{L}\p{M}\p{N}\p{Pc}]+\.+)?([\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.definition.type.v"},types:{patterns:[{match:/(?<!\.)\b(i(8|16|nt|64|128)|u(8|16|32|64|128)|f(32|64))\b/dgv,name:"storage.type.numeric.v"},{match:/(?<!\.)\b(bool|byte|byteptr|charptr|voidptr|string|ustring|rune)\b/dgv,name:"storage.type.$1.v"}]},"variable-assign":{captures:{"0":{patterns:[{match:/[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*/dgv,name:"variable.other.assignment.v"},{include:"#punctuation"}]}},match:/[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*(?:,\p{space}*[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)*(?=\p{space}*:??=)/dgv}},scopeName:"source.v",embeddedLangs:undefined,aliases:undefined})
4
4
 
5
5
  export default [
6
6
  lang
package/dist/vala.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"Vala",fileTypes:["vala","vapi","gs"],name:"vala",patterns:[{include:"#code"}],repository:{code:{patterns:[{include:"#comments"},{include:"#constants"},{include:"#strings"},{include:"#keywords"},{include:"#types"},{include:"#functions"},{include:"#variables"}]},comments:{patterns:[{captures:{"0":{name:"punctuation.definition.comment.vala"}},match:/\/\*\*\//dgv,name:"comment.block.empty.vala"},{include:"text.html.javadoc"},{include:"#comments-inline"}]},"comments-inline":{patterns:[{begin:/\/\*/dgv,captures:{"0":{name:"punctuation.definition.comment.vala"}},end:/\*\//dgv,name:"comment.block.vala"},{captures:{"1":{name:"comment.line.double-slash.vala"},"2":{name:"punctuation.definition.comment.vala"}},match:/\p{space}*((\/\/)[^\n]*(?=\n?$)\n?)/dgv}]},constants:{patterns:[{match:/\b((0([xX])\p{AHex}*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))(([eE])([\+\-])?[0-9]+)?)([LlFfUuDd]|UL|ul)?\b/dgv,name:"constant.numeric.vala"},{match:/\b([A-Z][A-Z0-9_]+)\b/dgv,name:"variable.other.constant.vala"}]},functions:{patterns:[{match:/([\p{L}\p{M}\p{N}\p{Pc}]+)(?=\p{space}*(<[\p{space}\p{L}\p{M}\p{N}\p{Pc}\.]+>\p{space}*)?\()/dgv,name:"entity.name.function.vala"}]},keywords:{patterns:[{match:/(?<=^|[^\@\p{L}\p{M}\p{N}\p{Pc}\.])(as|do|if|in|is|not|or|and|for|get|new|out|ref|set|try|var|base|case|else|enum|lock|null|this|true|void|weak|async|break|catch|class|const|false|owned|throw|using|while|with|yield|delete|extern|inline|params|public|return|sealed|signal|sizeof|static|struct|switch|throws|typeof|unlock|default|dynamic|ensures|finally|foreach|private|unowned|virtual|abstract|continue|delegate|internal|override|requires|volatile|construct|interface|namespace|protected|errordomain)\b/dgv,name:"keyword.vala"},{match:/(?<=^|[^\@\p{L}\p{M}\p{N}\p{Pc}\.])(bool|double|float|unichar|unichar2|char|uchar|int|uint|long|ulong|short|ushort|size_t|ssize_t|string|string16|string32|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64|va_list|time_t)\b/dgv,name:"keyword.vala"},{match:/(#(?:if|elif|else|endif))/dgv,name:"keyword.vala"}]},strings:{patterns:[{begin:/"""/dgv,end:/"""/dgv,name:"string.quoted.triple.vala"},{begin:/@"/dgv,end:/"/dgv,name:"string.quoted.interpolated.vala",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.vala"},{match:/\$[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"constant.character.escape.vala"},{match:/\$\(([^\)\(]|\(([^\)\(]|\([^\)]*\))*\))*\)/dgv,name:"constant.character.escape.vala"}]},{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.vala",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.vala"}]},{begin:/'/dgv,end:/'/dgv,name:"string.quoted.single.vala",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.vala"}]},{match:/\/((\\\/)|([^\/]))*\/(?=\p{space}*[\,\;\)\.\n])/dgv,name:"string.regexp.vala"}]},types:{patterns:[{match:/(?<=^|[^\@\p{L}\p{M}\p{N}\p{Pc}\.])(bool|double|float|unichar|unichar2|char|uchar|int|uint|long|ulong|short|ushort|size_t|ssize_t|string|string16|string32|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64|va_list|time_t)\b/dgv,name:"storage.type.primitive.vala"},{match:/\b([A-Z]+[\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.name.type.vala"}]},variables:{patterns:[{match:/\b([_a-z]+[\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"variable.other.vala"}]}},scopeName:"source.vala",embeddedLangs:undefined,aliases:undefined})
1
+ const lang = Object.freeze({displayName:"Vala",fileTypes:["vala","vapi","gs"],name:"vala",patterns:[{include:"#code"}],repository:{code:{patterns:[{include:"#comments"},{include:"#constants"},{include:"#strings"},{include:"#keywords"},{include:"#types"},{include:"#functions"},{include:"#variables"}]},comments:{patterns:[{captures:{"0":{name:"punctuation.definition.comment.vala"}},match:/\/\*\*\//dgv,name:"comment.block.empty.vala"},{include:"text.html.javadoc"},{include:"#comments-inline"}]},"comments-inline":{patterns:[{begin:/\/\*/dgv,captures:{"0":{name:"punctuation.definition.comment.vala"}},end:/\*\//dgv,name:"comment.block.vala"},{captures:{"1":{name:"comment.line.double-slash.vala"},"2":{name:"punctuation.definition.comment.vala"}},match:/\p{space}*((\/\/)[^\n]*(?=\n?$)\n?)/dgv}]},constants:{patterns:[{match:/\b((0([Xx])\p{AHex}*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))(([Ee])([\-\+])?[0-9]+)?)([DFLUdflu]|UL|ul)?\b/dgv,name:"constant.numeric.vala"},{match:/\b([A-Z][0-9A-Z_]+)\b/dgv,name:"variable.other.constant.vala"}]},functions:{patterns:[{match:/([\p{L}\p{M}\p{N}\p{Pc}]+)(?=\p{space}*(<[\.\p{space}\p{L}\p{M}\p{N}\p{Pc}]+>\p{space}*)?\()/dgv,name:"entity.name.function.vala"}]},keywords:{patterns:[{match:/(?<=^|[^\.\@\p{L}\p{M}\p{N}\p{Pc}])(as|do|if|in|is|not|or|and|for|get|new|out|ref|set|try|var|base|case|else|enum|lock|null|this|true|void|weak|async|break|catch|class|const|false|owned|throw|using|while|with|yield|delete|extern|inline|params|public|return|sealed|signal|sizeof|static|struct|switch|throws|typeof|unlock|default|dynamic|ensures|finally|foreach|private|unowned|virtual|abstract|continue|delegate|internal|override|requires|volatile|construct|interface|namespace|protected|errordomain)\b/dgv,name:"keyword.vala"},{match:/(?<=^|[^\.\@\p{L}\p{M}\p{N}\p{Pc}])(bool|double|float|unichar2??|char|uchar|int|uint|long|ulong|short|ushort|size_t|ssize_t|string|string16|string32|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64|va_list|time_t)\b/dgv,name:"keyword.vala"},{match:/(#(?:if|elif|else|endif))/dgv,name:"keyword.vala"}]},strings:{patterns:[{begin:/"""/dgv,end:/"""/dgv,name:"string.quoted.triple.vala"},{begin:/@"/dgv,end:/"/dgv,name:"string.quoted.interpolated.vala",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.vala"},{match:/\$[\p{L}\p{M}\p{N}\p{Pc}]+/dgv,name:"constant.character.escape.vala"},{match:/\$\(([^\(\)]|\(([^\(\)]|\([^\)]*\))*\))*\)/dgv,name:"constant.character.escape.vala"}]},{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.vala",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.vala"}]},{begin:/'/dgv,end:/'/dgv,name:"string.quoted.single.vala",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.vala"}]},{match:/\/((\\\/)|([^\/]))*\/(?=\p{space}*[\n\)\,\.\;])/dgv,name:"string.regexp.vala"}]},types:{patterns:[{match:/(?<=^|[^\.\@\p{L}\p{M}\p{N}\p{Pc}])(bool|double|float|unichar2??|char|uchar|int|uint|long|ulong|short|ushort|size_t|ssize_t|string|string16|string32|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64|va_list|time_t)\b/dgv,name:"storage.type.primitive.vala"},{match:/\b([A-Z]+[\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.name.type.vala"}]},variables:{patterns:[{match:/\b([_a-z]+[\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"variable.other.vala"}]}},scopeName:"source.vala",embeddedLangs:undefined,aliases:undefined})
2
2
 
3
3
  export default [
4
4
  lang
package/dist/vb.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { EmulatedRegExp } from 'oniguruma-to-es'
2
2
 
3
- const lang = Object.freeze({displayName:"Visual Basic",name:"vb",patterns:[{match:/\n/dgv,name:"meta.ending-space"},{include:"#round-brackets"},{begin:/^(?=\t)/dgv,end:/(?=[^\t])/dgv,name:"meta.leading-space",patterns:[{captures:{"1":{name:"meta.odd-tab.tabs"},"2":{name:"meta.even-tab.tabs"}},match:/(\t)(\t)?/dgv}]},{begin:/^(?= )/dgv,end:/(?=[^ ])/dgv,name:"meta.leading-space",patterns:[{captures:{"1":{name:"meta.odd-tab.spaces"},"2":{name:"meta.even-tab.spaces"}},match:/( )( )?/dgv}]},{captures:{"1":{name:"storage.type.function.asp"},"2":{name:"entity.name.function.asp"},"3":{name:"punctuation.definition.parameters.asp"},"4":{name:"variable.parameter.function.asp"},"5":{name:"punctuation.definition.parameters.asp"}},match:/^\p{space}*((?:[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|[Ssſ][Uu][Bb]))\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\()([^\)]*)(\))[^\n]*\n?/dgv,name:"meta.function.asp"},{begin:/(^[ \t]+)?(?=')/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.asp"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.asp"}},end:/\n/dgv,name:"comment.line.apostrophe.asp"}]},{match:/\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\b/dgiv,name:"keyword.control.asp"},{match:/\b(Mod|And|Not|Or|Xor|as)\b/dgiv,name:"keyword.operator.asp"},{captures:{"1":{name:"storage.type.asp"},"2":{name:"variable.other.bfeac.asp"},"3":{name:"meta.separator.comma.asp"}},match:/(dim)\p{space}*(\b[a-zA-Z_x7f-xf][a-zA-Z0-9_x7f-xf]*?\b)\p{space}*(,?)/dgiv,name:"variable.other.dim.asp"},{match:/\p{space}*\b(Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End Sub|End Function|End Class|End Property|Public Property|Private Property|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo)\b\p{space}*/dgiv,name:"storage.type.asp"},{match:/\b(Private|Public|Default)\b/dgiv,name:"storage.modifier.asp"},{match:/\p{space}*\b(Empty|False|Nothing|Null|True)\b/dgiv,name:"constant.language.asp"},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.asp"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.asp"}},name:"string.quoted.double.asp",patterns:[{match:/""/dgv,name:"constant.character.escape.apostrophe.asp"}]},{captures:{"1":{name:"punctuation.definition.variable.asp"}},match:/(\$)[a-zA-Z_x7f-xf][a-zA-Z0-9_x7f-xf]*?\b\p{space}*/dgv,name:"variable.other.asp"},{match:/\b(Application|ObjectContext|Request|Response|Server|Session)\b/dgiv,name:"support.class.asp"},{match:/\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\b/dgiv,name:"support.class.collection.asp"},{match:/\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\b/dgiv,name:"support.constant.asp"},{match:/\b(Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\b/dgiv,name:"support.function.asp"},{match:/\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\b/dgiv,name:"support.function.event.asp"},{match:/(?<=as )(\b[a-zA-Z_x7f-xf][a-zA-Z0-9_x7f-xf]*?\b)/dgiv,name:"support.type.vb.asp"},{match:/\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\b/dgiv,name:"support.function.vb.asp"},{match:/-?\b((0([xX])\p{AHex}*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))(([eE])([\+\-])?[0-9]+)?)([Ll]|UL|ul|[uUFf])?\b/dgv,name:"constant.numeric.asp"},{match:/\b(vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\b/dgiv,name:"support.type.vb.asp"},{captures:{"1":{name:"entity.name.function.asp"}},match:/(\b[a-zA-Z_x7f-xf][a-zA-Z0-9_x7f-xf]*?\b)(?=\(\)?)/dgiv,name:"support.function.asp"},{match:/((?<=([\+\=\-\&\\\/\<\>\(\,]))\p{space}*\b([a-zA-Z_x7f-xf][a-zA-Z0-9_x7f-xf]*?)\b(?!([\(\.]))|\b([a-zA-Z_x7f-xf][a-zA-Z0-9_x7f-xf]*?)\b(?=\p{space}*([\+\=\-\&\\\/\<\>\(\)])))/dgiv,name:"variable.other.asp"},{match:/[\!\$\%\&\*]|--|-|\+\+|[\+\~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|[\<\>\!]|&&|\|\||\?:|\*=|\/=|%=|\+=|-=|&=|\^=|\b(in|instanceof|new|delete|typeof|void)\b/dgv,name:"keyword.operator.js"}],repository:{"round-brackets":{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.round-brackets.begin.asp"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.round-brackets.end.asp"}},name:"meta.round-brackets",patterns:[{include:"source.asp.vb.net"}]}},scopeName:"source.asp.vb.net",embeddedLangs:undefined,aliases:["cmd"]})
3
+ const lang = Object.freeze({displayName:"Visual Basic",name:"vb",patterns:[{match:/\n/dgv,name:"meta.ending-space"},{include:"#round-brackets"},{begin:/^(?=\t)/dgv,end:/(?=[^\t])/dgv,name:"meta.leading-space",patterns:[{captures:{"1":{name:"meta.odd-tab.tabs"},"2":{name:"meta.even-tab.tabs"}},match:/(\t)(\t)?/dgv}]},{begin:/^(?= )/dgv,end:/(?=[^ ])/dgv,name:"meta.leading-space",patterns:[{captures:{"1":{name:"meta.odd-tab.spaces"},"2":{name:"meta.even-tab.spaces"}},match:/( )( )?/dgv}]},{captures:{"1":{name:"storage.type.function.asp"},"2":{name:"entity.name.function.asp"},"3":{name:"punctuation.definition.parameters.asp"},"4":{name:"variable.parameter.function.asp"},"5":{name:"punctuation.definition.parameters.asp"}},match:/^\p{space}*((?:[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|[Ssſ][Uu][Bb]))\p{space}*([A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(\()([^\)]*)(\))[^\n]*\n?/dgv,name:"meta.function.asp"},{begin:/(^[\t ]+)?(?=')/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.asp"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/'/dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.asp"}},end:/\n/dgv,name:"comment.line.apostrophe.asp"}]},{match:/\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\b/dgiv,name:"keyword.control.asp"},{match:/\b(Mod|And|Not|Or|Xor|as)\b/dgiv,name:"keyword.operator.asp"},{captures:{"1":{name:"storage.type.asp"},"2":{name:"variable.other.bfeac.asp"},"3":{name:"meta.separator.comma.asp"}},match:/(dim)\p{space}*\b([7A-Z_a-z][0-9A-Z_a-z]*?)\b\p{space}*(,?)/dgiv,name:"variable.other.dim.asp"},{match:/\p{space}*\b(Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End Sub|End Function|End Class|End Property|Public Property|Private Property|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo)\b\p{space}*/dgiv,name:"storage.type.asp"},{match:/\b(Private|Public|Default)\b/dgiv,name:"storage.modifier.asp"},{match:/\p{space}*\b(Empty|False|Nothing|Null|True)\b/dgiv,name:"constant.language.asp"},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.asp"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.asp"}},name:"string.quoted.double.asp",patterns:[{match:/""/dgv,name:"constant.character.escape.apostrophe.asp"}]},{captures:{"1":{name:"punctuation.definition.variable.asp"}},match:/(\$)[7A-Z_a-z][0-9A-Z_a-z]*?\b\p{space}*/dgv,name:"variable.other.asp"},{match:/\b(Application|ObjectContext|Request|Response|Server|Session)\b/dgiv,name:"support.class.asp"},{match:/\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\b/dgiv,name:"support.class.collection.asp"},{match:/\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\b/dgiv,name:"support.constant.asp"},{match:/\b(Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\b/dgiv,name:"support.function.asp"},{match:/\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\b/dgiv,name:"support.function.event.asp"},{match:/(?<=as )\b([7A-Z_a-z][0-9A-Z_a-z]*?)\b/dgiv,name:"support.type.vb.asp"},{match:/\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Items??|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Timer??|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\b/dgiv,name:"support.function.vb.asp"},{match:/-?\b((0([Xx])\p{AHex}*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))(([Ee])([\-\+])?[0-9]+)?)([Ll]|UL|ul|[FUfu])?\b/dgv,name:"constant.numeric.asp"},{match:/\b(vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\b/dgiv,name:"support.type.vb.asp"},{captures:{"1":{name:"entity.name.function.asp"}},match:/\b([7A-Z_a-z][0-9A-Z_a-z]*?)\b(?=\(\)?)/dgiv,name:"support.function.asp"},{match:/((?<=([\-\&\(\+\,\/\<\=\>\\]))\p{space}*\b([7A-Z_a-z][0-9A-Z_a-z]*?)\b(?!([\(\.]))|\b([7A-Z_a-z][0-9A-Z_a-z]*?)\b(?=\p{space}*([\-\&\(\)\+\/\<\=\>\\])))/dgiv,name:"variable.other.asp"},{match:/[\!\$\%\&\*]|--?|\+\+|[\+\~]|===?|=|!==??|<=|>=|<<=|>>=|>>>=|<>|[\!\<\>]|&&|\|\||\?:|\*=|\/=|%=|\+=|-=|&=|\^=|\b(in|instanceof|new|delete|typeof|void)\b/dgv,name:"keyword.operator.js"}],repository:{"round-brackets":{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.round-brackets.begin.asp"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.round-brackets.end.asp"}},name:"meta.round-brackets",patterns:[{include:"source.asp.vb.net"}]}},scopeName:"source.asp.vb.net",embeddedLangs:undefined,aliases:["cmd"]})
4
4
 
5
5
  export default [
6
6
  lang
package/dist/verilog.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { EmulatedRegExp } from 'oniguruma-to-es'
2
2
 
3
- const lang = Object.freeze({displayName:"Verilog",fileTypes:["v","vh"],name:"verilog",patterns:[{include:"#comments"},{include:"#module_pattern"},{include:"#keywords"},{include:"#constants"},{include:"#strings"},{include:"#operators"}],repository:{comments:{patterns:[{begin:/(^[ \t]+)?(?=\/\/)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.verilog"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.verilog"}},end:/\n/dgv,name:"comment.line.double-slash.verilog"}]},{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block.c-style.verilog"}]},constants:{patterns:[{match:/`(?!(celldefine|endcelldefine|default_nettype|define|undef|ifdef|ifndef|else|endif|include|resetall|timescale|unconnected_drive|nounconnected_drive))[a-z_A-Z][a-zA-Z0-9_\$]*/dgv,name:"variable.other.constant.verilog"},{match:/[0-9]*'[bBoOdDhH][_xXzZ\p{AHex}]+\b/dgv,name:"constant.numeric.sized_integer.verilog"},{captures:{"1":{name:"constant.numeric.integer.verilog"},"2":{name:"punctuation.separator.range.verilog"},"3":{name:"constant.numeric.integer.verilog"}},match:/\b(\p{Nd}+)(:)(\p{Nd}+)\b/dgv,name:"meta.block.numeric.range.verilog"},{match:/\b\p{Nd}[\p{Nd}_]*(?:e\p{Nd}+)?\b/dgiv,name:"constant.numeric.integer.verilog"},{match:/\b\p{Nd}+\.\p{Nd}+(?:e\p{Nd}+)?\b/dgiv,name:"constant.numeric.real.verilog"},{match:/#\p{Nd}+/dgv,name:"constant.numeric.delay.verilog"},{match:/\b[01xXzZ]+\b/dgv,name:"constant.numeric.logic.verilog"}]},instantiation_patterns:{patterns:[{include:"#keywords"},{begin:/^\p{space}*(?!always|and|assign|output|input|inout|wire|module)([a-zA-Z][a-zA-Z0-9_]*)\p{space}+([a-zA-Z][a-zA-Z0-9_]*)(?<!begin|if)\p{space}*(?=\(|(?=\n?$))/dgv,beginCaptures:{"1":{name:"entity.name.tag.module.reference.verilog"},"2":{name:"entity.name.tag.module.identifier.verilog"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.expression.verilog"}},name:"meta.block.instantiation.parameterless.verilog",patterns:[{include:"#comments"},{include:"#constants"},{include:"#strings"}]},{begin:/^\p{space}*([a-zA-Z][a-zA-Z0-9_]*)\p{space}*(#)(?=\p{space}*\()/dgv,beginCaptures:{"1":{name:"entity.name.tag.module.reference.verilog"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.expression.verilog"}},name:"meta.block.instantiation.with.parameters.verilog",patterns:[{include:"#parenthetical_list"},{match:/[a-zA-Z][a-zA-Z0-9_]*/dgv,name:"entity.name.tag.module.identifier.verilog"}]}]},keywords:{patterns:[{match:/\b(always|and|assign|attribute|begin|buf|bufif0|bufif1|case[xz]?|cmos|deassign|default|defparam|disable|edge|else|end(attribute|case|function|generate|module|primitive|specify|table|task)?|event|for|force|forever|fork|function|generate|genvar|highz(01)|if(none)?|initial|inout|input|integer|join|localparam|medium|module|large|macromodule|nand|negedge|nmos|nor|not|notif(01)|or|output|parameter|pmos|posedge|primitive|pull0|pull1|pulldown|pullup|rcmos|real|realtime|reg|release|repeat|rnmos|rpmos|rtran|rtranif(01)|scalared|signed|small|specify|specparam|strength|strong0|strong1|supply0|supply1|table|task|time|tran|tranif(01)|tri(01)?|tri(and|or|reg)|unsigned|vectored|wait|wand|weak(01)|while|wire|wor|xnor|xor)\b/dgv,name:"keyword.other.verilog"},{match:/^\p{space}*`((cell)?define|default_(decay_time|nettype|trireg_strength)|delay_mode_(path|unit|zero)|ifdef|ifndef|include|end(if|celldefine)|else|(no)?unconnected_drive|resetall|timescale|undef)\b/dgv,name:"keyword.other.compiler.directive.verilog"},{match:/\$(f(open|close)|readmem([bh])|timeformat|printtimescale|stop|finish|(s|real)?time|realtobits|bitstoreal|rtoi|itor|(f)?(display|write([hb])))\b/dgv,name:"support.function.system.console.tasks.verilog"},{match:/\$(random|dist_(chi_square|erlang|exponential|normal|poisson|t|uniform))\b/dgv,name:"support.function.system.random_number.tasks.verilog"},{match:/\$((a)?sync\$((n)?and|(n)or)\$(array|plane))\b/dgv,name:"support.function.system.pld_modeling.tasks.verilog"},{match:/\$(q_(initialize|add|remove|full|exam))\b/dgv,name:"support.function.system.stochastic.tasks.verilog"},{match:/\$(hold|nochange|period|recovery|setup(hold)?|skew|width)\b/dgv,name:"support.function.system.timing.tasks.verilog"},{match:/\$(dump(file|vars|off|on|all|limit|flush))\b/dgv,name:"support.function.system.vcd.tasks.verilog"},{match:/\$(countdrivers|list|input|scope|showscopes|(no)?(key|log)|reset(_(?:count|value))?|(inc)?save|restart|showvars|getpattern|sreadmem([bh])|scale)/dgv,name:"support.function.non-standard.tasks.verilog"}]},module_pattern:{patterns:[{begin:/\b(module)\p{space}+([a-zA-Z][a-zA-Z0-9_]*)/dgv,beginCaptures:{"1":{name:"storage.type.module.verilog"},"2":{name:"entity.name.type.module.verilog"}},end:/\bendmodule\b/dgv,endCaptures:{"0":{name:"storage.type.module.verilog"}},name:"meta.block.module.verilog",patterns:[{include:"#comments"},{include:"#keywords"},{include:"#constants"},{include:"#strings"},{include:"#instantiation_patterns"},{include:"#operators"}]}]},operators:{patterns:[{match:/[\+\-\*\/\%]|([\<\>])=?|([\!\=])?==?|!|&&?|\|\|?|\^?~|~\^?/dgv,name:"keyword.operator.verilog"}]},parenthetical_list:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.list.verilog"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.list.verilog"}},name:"meta.block.parenthetical_list.verilog",patterns:[{include:"#parenthetical_list"},{include:"#comments"},{include:"#keywords"},{include:"#constants"},{include:"#strings"}]}]},strings:{patterns:[{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.verilog",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.verilog"}]}]}},scopeName:"source.verilog",embeddedLangs:undefined,aliases:undefined})
3
+ const lang = Object.freeze({displayName:"Verilog",fileTypes:["v","vh"],name:"verilog",patterns:[{include:"#comments"},{include:"#module_pattern"},{include:"#keywords"},{include:"#constants"},{include:"#strings"},{include:"#operators"}],repository:{comments:{patterns:[{begin:/(^[\t ]+)?(?=\/\/)/dgv,beginCaptures:{"1":{name:"punctuation.whitespace.comment.leading.verilog"}},end:/*@__PURE__*/ new EmulatedRegExp("(?!^)","dgv",{"strategy":"clip_search"}),patterns:[{begin:/\/\//dgv,beginCaptures:{"0":{name:"punctuation.definition.comment.verilog"}},end:/\n/dgv,name:"comment.line.double-slash.verilog"}]},{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block.c-style.verilog"}]},constants:{patterns:[{match:/`(?!(celldefine|endcelldefine|default_nettype|define|undef|ifdef|ifndef|else|endif|include|resetall|timescale|unconnected_drive|nounconnected_drive))[A-Z_a-z][\$0-9A-Z_a-z]*/dgv,name:"variable.other.constant.verilog"},{match:/[0-9]*'[BDHObdho][XZ_xz\p{AHex}]+\b/dgv,name:"constant.numeric.sized_integer.verilog"},{captures:{"1":{name:"constant.numeric.integer.verilog"},"2":{name:"punctuation.separator.range.verilog"},"3":{name:"constant.numeric.integer.verilog"}},match:/\b(\p{Nd}+)(:)(\p{Nd}+)\b/dgv,name:"meta.block.numeric.range.verilog"},{match:/\b\p{Nd}[_\p{Nd}]*(?:e\p{Nd}+)?\b/dgiv,name:"constant.numeric.integer.verilog"},{match:/\b\p{Nd}+\.\p{Nd}+(?:e\p{Nd}+)?\b/dgiv,name:"constant.numeric.real.verilog"},{match:/#\p{Nd}+/dgv,name:"constant.numeric.delay.verilog"},{match:/\b[01XZxz]+\b/dgv,name:"constant.numeric.logic.verilog"}]},instantiation_patterns:{patterns:[{include:"#keywords"},{begin:/^\p{space}*(?!always|and|assign|output|input|inout|wire|module)([A-Za-z][0-9A-Z_a-z]*)\p{space}+([A-Za-z][0-9A-Z_a-z]*)(?<!begin|if)\p{space}*(?=\(|(?=\n?$))/dgv,beginCaptures:{"1":{name:"entity.name.tag.module.reference.verilog"},"2":{name:"entity.name.tag.module.identifier.verilog"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.expression.verilog"}},name:"meta.block.instantiation.parameterless.verilog",patterns:[{include:"#comments"},{include:"#constants"},{include:"#strings"}]},{begin:/^\p{space}*([A-Za-z][0-9A-Z_a-z]*)\p{space}*(#)(?=\p{space}*\()/dgv,beginCaptures:{"1":{name:"entity.name.tag.module.reference.verilog"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.expression.verilog"}},name:"meta.block.instantiation.with.parameters.verilog",patterns:[{include:"#parenthetical_list"},{match:/[A-Za-z][0-9A-Z_a-z]*/dgv,name:"entity.name.tag.module.identifier.verilog"}]}]},keywords:{patterns:[{match:/\b(always|and|assign|attribute|begin|buf|bufif0|bufif1|case[xz]?|cmos|deassign|default|defparam|disable|edge|else|end(attribute|case|function|generate|module|primitive|specify|table|task)?|event|for|force|forever|fork|function|generate|genvar|highz(01)|if(none)?|initial|inout|input|integer|join|localparam|medium|module|large|macromodule|nand|negedge|nmos|nor|not|notif(01)|or|output|parameter|pmos|posedge|primitive|pull0|pull1|pulldown|pullup|rcmos|real|realtime|reg|release|repeat|rnmos|rpmos|rtran|rtranif(01)|scalared|signed|small|specify|specparam|strength|strong0|strong1|supply0|supply1|table|task|time|tran|tranif(01)|tri(01)?|tri(and|or|reg)|unsigned|vectored|wait|wand|weak(01)|while|wire|wor|xnor|xor)\b/dgv,name:"keyword.other.verilog"},{match:/^\p{space}*`((cell)?define|default_(decay_time|nettype|trireg_strength)|delay_mode_(path|unit|zero)|ifdef|ifndef|include|end(if|celldefine)|else|(no)?unconnected_drive|resetall|timescale|undef)\b/dgv,name:"keyword.other.compiler.directive.verilog"},{match:/\$(f(open|close)|readmem([bh])|timeformat|printtimescale|stop|finish|(s|real)?time|realtobits|bitstoreal|rtoi|itor|(f)?(display|write([bh])))\b/dgv,name:"support.function.system.console.tasks.verilog"},{match:/\$(random|dist_(chi_square|erlang|exponential|normal|poisson|t|uniform))\b/dgv,name:"support.function.system.random_number.tasks.verilog"},{match:/\$((a)?sync\$((n)?and|(n)or)\$(array|plane))\b/dgv,name:"support.function.system.pld_modeling.tasks.verilog"},{match:/\$(q_(initialize|add|remove|full|exam))\b/dgv,name:"support.function.system.stochastic.tasks.verilog"},{match:/\$(hold|nochange|period|recovery|setup(hold)?|skew|width)\b/dgv,name:"support.function.system.timing.tasks.verilog"},{match:/\$(dump(file|vars|off|on|all|limit|flush))\b/dgv,name:"support.function.system.vcd.tasks.verilog"},{match:/\$(countdrivers|list|input|scope|showscopes|(no)?(key|log)|reset(_(?:count|value))?|(inc)?save|restart|showvars|getpattern|sreadmem([bh])|scale)/dgv,name:"support.function.non-standard.tasks.verilog"}]},module_pattern:{patterns:[{begin:/\b(module)\p{space}+([A-Za-z][0-9A-Z_a-z]*)/dgv,beginCaptures:{"1":{name:"storage.type.module.verilog"},"2":{name:"entity.name.type.module.verilog"}},end:/\bendmodule\b/dgv,endCaptures:{"0":{name:"storage.type.module.verilog"}},name:"meta.block.module.verilog",patterns:[{include:"#comments"},{include:"#keywords"},{include:"#constants"},{include:"#strings"},{include:"#instantiation_patterns"},{include:"#operators"}]}]},operators:{patterns:[{match:/[\-\%\*\+\/]|([\<\>])=?|([\!\=])?==?|!|&&?|\|\|?|\^?~|~\^?/dgv,name:"keyword.operator.verilog"}]},parenthetical_list:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.list.verilog"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.list.verilog"}},name:"meta.block.parenthetical_list.verilog",patterns:[{include:"#parenthetical_list"},{include:"#comments"},{include:"#keywords"},{include:"#constants"},{include:"#strings"}]}]},strings:{patterns:[{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.verilog",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.verilog"}]}]}},scopeName:"source.verilog",embeddedLangs:undefined,aliases:undefined})
4
4
 
5
5
  export default [
6
6
  lang
package/dist/vhdl.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"VHDL",fileTypes:["vhd","vhdl","vho","vht"],name:"vhdl",patterns:[{include:"#block_processing"},{include:"#cleanup"}],repository:{architecture_pattern:{patterns:[{begin:/\b([Aa][Rr][Cc][Hh][Ii][Tt][Ee][Cc][Tt][Uu][Rr][Ee])\p{space}+(([a-zA-z][a-zA-z0-9_]*)|([^\n]+))(?=\p{space})\p{space}+([Oo][Ff])\p{space}+(([a-zA-Z][a-zA-Z0-9_]*)|([^\n]+?))(?=\p{space}*[Ii][Ssſ])\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.architecture.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"},"7":{name:"entity.name.type.entity.reference.vhdl"},"8":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/\b([Ee][Nn][Dd])(\p{space}+([Aa][Rr][Cc][Hh][Ii][Tt][Ee][Cc][Tt][Uu][Rr][Ee]))?(\p{space}+((\3)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.type.architecture.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},name:"support.block.architecture",patterns:[{include:"#block_pattern"},{include:"#function_definition_pattern"},{include:"#procedure_definition_pattern"},{include:"#component_pattern"},{include:"#if_pattern"},{include:"#process_pattern"},{include:"#type_pattern"},{include:"#record_pattern"},{include:"#for_pattern"},{include:"#entity_instantiation_pattern"},{include:"#component_instantiation_pattern"},{include:"#cleanup"}]}]},attribute_list:{patterns:[{begin:/'\(/dgv,beginCaptures:{"0":{name:"punctuation.vhdl"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#cleanup"}]}]},block_pattern:{patterns:[{begin:/^\p{space}*(([a-zA-Z][a-zA-Z0-9_]*)\p{space}*(:)\p{space}*)?(\p{space}*[Bb][Ll][Oo][Cc][KKk])/dgv,beginCaptures:{"2":{name:"meta.block.block.name"},"3":{name:"keyword.language.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/(end\p{space}+block)(\p{space}+(((?!))|([^\n]+?)))?(?=\p{space}*;)/dgiv,endCaptures:{"1":{name:"keyword.language.vhdl"},"2":{name:"meta.block.block.end"},"5":{name:"invalid.illegal.mismatched.identifier.vhdl"}},name:"meta.block.block",patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]},block_processing:{patterns:[{include:"#package_pattern"},{include:"#package_body_pattern"},{include:"#entity_pattern"},{include:"#architecture_pattern"}]},case_pattern:{patterns:[{begin:/^\p{space}*((([a-zA-Z][a-zA-Z0-9_]*)|([^\n]+?))\p{space}*:\p{space}*)?\b([Cc][Aa][Ssſ][Ee])\b/dgv,beginCaptures:{"3":{name:"entity.name.tag.case.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}*(\p{space}+(([Cc][Aa][Ssſ][Ee])|([^\n]*?)))(\p{space}+((\2)|([^\n]*?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"4":{name:"keyword.language.vhdl"},"5":{name:"invalid.illegal.case.required.vhdl"},"8":{name:"entity.name.tag.case.end.vhdl"},"9":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]},cleanup:{patterns:[{include:"#comments"},{include:"#constants_numeric"},{include:"#strings"},{include:"#attribute_list"},{include:"#syntax_highlighting"}]},comments:{patterns:[{match:/--[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.double-dash.vhdl"}]},component_instantiation_pattern:{patterns:[{begin:/^\p{space}*([a-zA-Z][a-zA-Z0-9_]*)\p{space}*(:)\p{space}*([a-zA-Z][a-zA-Z0-9_]*)\b(?=\p{space}*((?=\n?$)|generic|port))/dgv,beginCaptures:{"1":{name:"entity.name.section.component_instantiation.vhdl"},"2":{name:"punctuation.vhdl"},"3":{name:"entity.name.tag.component.reference.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#cleanup"}]}]},component_pattern:{patterns:[{begin:/^\p{space}*\b([Cc][Oo][Mm][Pp][Oo][Nn][Ee][Nn][Tt])\p{space}+(([a-zA-Z_][a-zA-Z0-9_]*)\p{space}*|([^\n]+?))(?=\b(?:[Ii][Ssſ]|[Pp][Oo][Rr][Tt])\b|(?=\n?$)|--)(\b([Ii][Ssſ]\b))?/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.component.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"6":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+(([Cc][Oo][Mm][Pp][Oo][Nn][Ee][Nn][Tt]\b)|([^\n]+?))(?=\p{space}*|;)(\p{space}+((\3)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"invalid.illegal.component.keyword.required.vhdl"},"7":{name:"entity.name.type.component.end.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#generic_list_pattern"},{include:"#port_list_pattern"},{include:"#comments"}]}]},constants_numeric:{patterns:[{match:/\b([\+\-]?[\p{Nd}_]+\.[\p{Nd}_]+([eE][\+\-]?[\p{Nd}_]+)?)\b/dgv,name:"constant.numeric.floating_point.vhdl"},{match:/\b\p{Nd}+#[\p{AHex}_]+#\b/dgv,name:"constant.numeric.base_pound_number_pound.vhdl"},{match:/\b[\p{Nd}_]+([eE][\p{Nd}_]+)?\b/dgv,name:"constant.numeric.integer.vhdl"},{match:/[xX]"[_uUxXzZwWlLhH\-\p{AHex}]+"/dgv,name:"constant.numeric.quoted.double.string.hex.vhdl"},{match:/[oO]"[0-7_uUxXzZwWlLhH\-]+"/dgv,name:"constant.numeric.quoted.double.string.octal.vhdl"},{match:/[bB]?"[01_uUxXzZwWlLhH\-]+"/dgv,name:"constant.numeric.quoted.double.string.binary.vhdl"},{captures:{"1":{name:"invalid.illegal.quoted.double.string.vhdl"}},match:/([bBoOxX]"[^\n]+?")/dgv,name:"constant.numeric.quoted.double.string.illegal.vhdl"},{match:/'[01uUxXzZwWlLhH\-]'/dgv,name:"constant.numeric.quoted.single.std_logic"}]},control_patterns:{patterns:[{include:"#case_pattern"},{include:"#if_pattern"},{include:"#for_pattern"},{include:"#while_pattern"},{include:"#loop_pattern"}]},entity_instantiation_pattern:{patterns:[{begin:/^\p{space}*([a-zA-Z][a-zA-Z0-9_]*)\p{space}*(:)\p{space}*(([Uu][Ssſ][Ee])\p{space}+)?([Ee][Nn][Tt][Ii][Tt][Yy])\p{space}+((([a-zA-Z][a-zA-Z0-9_]*)|([^\n]+?))(\.))?(([a-zA-Z][a-zA-Z0-9_]*)|([^\n]+?))(?=\p{space}*(\(|(?=\n?$)|(?:[Pp][Oo][Rr][Tt]|[Gg][Ee][Nn][Ee][Rr][Ii][Cc])))(\p{space}*(\()\p{space}*(([a-zA-Z][a-zA-Z0-9_]*)|([^\n]+?))(?=\p{space}*\))\p{space}*(\)))?/dgv,beginCaptures:{"1":{name:"entity.name.section.entity_instantiation.vhdl"},"2":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"},"5":{name:"keyword.language.vhdl"},"8":{name:"entity.name.tag.library.reference.vhdl"},"9":{name:"invalid.illegal.invalid.identifier.vhdl"},"10":{name:"punctuation.vhdl"},"12":{name:"entity.name.tag.entity.reference.vhdl"},"13":{name:"invalid.illegal.invalid.identifier.vhdl"},"16":{name:"punctuation.vhdl"},"18":{name:"entity.name.tag.architecture.reference.vhdl"},"19":{name:"invalid.illegal.invalid.identifier.vhdl"},"21":{name:"punctuation.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#cleanup"}]}]},entity_pattern:{patterns:[{begin:/^\p{space}*([Ee][Nn][Tt][Ii][Tt][Yy]\b)\p{space}+(([a-zA-Z][a-zA-Z\p{Nd}_]*)|([^\n]+?))(?=\p{space})/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.entity.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/\b([Ee][Nn][Dd]\b)(\p{space}+([Ee][Nn][Tt][Ii][Tt][Yy]))?(\p{space}+((\3)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.type.entity.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#comments"},{include:"#generic_list_pattern"},{include:"#port_list_pattern"},{include:"#cleanup"}]}]},for_pattern:{patterns:[{begin:/^\p{space}*(([a-zA-Z][a-zA-Z0-9_]*)\p{space}*(:)\p{space}*)?(?![Ww][Aa][Ii][Tt]\p{space}*)\b([Ff][Oo][Rr])\b(?!\p{space}*[Aa][Ll][Ll])/dgv,beginCaptures:{"2":{name:"entity.name.tag.for.generate.begin.vhdl"},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+(((?:[Gg][Ee][Nn][Ee][Rr][Aa][Tt][Ee]|[Ll][Oo][Oo][Pp]))|(\P{space}+))\b(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"invalid.illegal.loop.or.generate.required.vhdl"},"7":{name:"entity.name.tag.for.generate.end.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#entity_instantiation_pattern"},{include:"#component_pattern"},{include:"#component_instantiation_pattern"},{include:"#process_pattern"},{include:"#cleanup"}]}]},function_definition_pattern:{patterns:[{begin:/^\p{space}*((?:[Ii][Mm][Pp][Uu][Rr][Ee])?\p{space}*[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn])\p{space}+(([a-zA-Z][a-zA-Z\p{Nd}_]*)|("\P{space}+")|(\\[^\n]+\\)|([^\n]+?))(?=\p{space}*(\(|\b[Rr][Ee][Tt][Uu][Rr][Nn]\b))/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.function.function.begin.vhdl"},"4":{name:"entity.name.function.function.begin.vhdl"},"5":{name:"entity.name.function.function.begin.vhdl"},"6":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/^\p{space}*([Ee][Nn][Dd])(\p{space}+([Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]))?(\p{space}+((\3|(?!)|(?!))|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.function.function.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#parenthetical_list"},{include:"#type_pattern"},{include:"#record_pattern"},{include:"#cleanup"}]}]},function_prototype_pattern:{patterns:[{begin:/^\p{space}*((?:[Ii][Mm][Pp][Uu][Rr][Ee])?\p{space}*[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn])\p{space}+(([a-zA-Z][a-zA-Z\p{Nd}_]*)|("\P{space}+")|(\\[^\n]+\\)|([^\n]+?))(?=\p{space}*(\(|\b[Rr][Ee][Tt][Uu][Rr][Nn]\b))/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.function.function.prototype.vhdl"},"4":{name:"entity.name.function.function.prototype.vhdl"},"5":{name:"entity.name.function.function.prototype.vhdl"},"6":{name:"invalid.illegal.function.name.vhdl"}},end:/(?<=;)/dgv,patterns:[{begin:/\breturn(?=\p{space}+[^\;]+\p{space}*;)/dgiv,beginCaptures:{"0":{name:"keyword.language.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.function_prototype.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#cleanup"}]},{include:"#parenthetical_list"},{include:"#cleanup"}]}]},generic_list_pattern:{patterns:[{begin:/\bgeneric\b/dgiv,beginCaptures:{"0":{name:"keyword.language.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"}]}]},if_pattern:{patterns:[{begin:/(([a-zA-Z][a-zA-Z0-9_]*)\p{space}*(:)\p{space}*)?\b([Ii][Ff])\b/dgv,beginCaptures:{"2":{name:"entity.name.tag.if.generate.begin.vhdl"},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/\b(end)\p{space}+((((?:generate|if))|(\P{space}+))\b(\p{space}+(((?!))|([^\n]+?)))?)?(?=\p{space}*;)/dgiv,endCaptures:{"1":{name:"keyword.language.vhdl"},"4":{name:"keyword.language.vhdl"},"5":{name:"invalid.illegal.if.or.generate.required.vhdl"},"8":{name:"entity.name.tag.if.generate.end.vhdl"},"9":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#process_pattern"},{include:"#entity_instantiation_pattern"},{include:"#component_pattern"},{include:"#component_instantiation_pattern"},{include:"#cleanup"}]}]},keywords:{patterns:[{match:/'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance|instance_name|last|last_value|left|leftof|length|low|path|path_name|pos|pred|quiet|range|reverse|reverse_range|right|rightof|simple|simple_name|stable|succ|transaction|val|value)\b/dgiv,name:"keyword.attributes.vhdl"},{match:/\b(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|context|deallocate|disconnect|downto|else|elsif|end|entity|exit|file|for|force|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|protected|pure|range|record|register|reject|release|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)\b/dgiv,name:"keyword.language.vhdl"},{match:/\b(?:std|ieee|work|standard|textio|std_logic_1164|std_logic_arith|std_logic_misc|std_logic_signed|std_logic_textio|std_logic_unsigned|numeric_bit|numeric_std|math_complex|math_real|vital_primitives|vital_timing)\b/dgiv,name:"standard.library.language.vhdl"},{match:/([\+\-]|<=|=|=>|:=|>=|[\>\<\/\|\&]|(\*{1,2}))/dgv,name:"keyword.operator.vhdl"}]},loop_pattern:{patterns:[{begin:/^\p{space}*(([a-zA-Z][a-zA-Z0-9_]*)\p{space}*(:)\p{space}*)?\b([Ll][Oo][Oo][Pp])\b/dgv,beginCaptures:{"2":{name:"entity.name.tag.loop.begin.vhdl"},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+(([Ll][Oo][Oo][Pp])|(\P{space}+))\b(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"invalid.illegal.loop.keyword.required.vhdl"},"7":{name:"entity.name.tag.loop.end.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]},package_body_pattern:{patterns:[{begin:/\b([Pp][Aa][Cc][KKk][Aa][Gg][Ee])\p{space}+([Bb][Oo][Dd][Yy])\p{space}+(([a-zA-Z][a-zA-Z\p{Nd}_]*)|([^\n]+?))\p{space}+([Ii][Ssſ])\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"2":{name:"keyword.language.vhdl"},"4":{name:"entity.name.section.package_body.begin.vhdl"},"5":{name:"invalid.illegal.invalid.identifier.vhdl"},"6":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd]\b)(\p{space}+([Pp][Aa][Cc][KKk][Aa][Gg][Ee])\p{space}+([Bb][Oo][Dd][Yy]))?(\p{space}+((\4)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"keyword.language.vhdl"},"7":{name:"entity.name.section.package_body.end.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#protected_body_pattern"},{include:"#function_definition_pattern"},{include:"#procedure_definition_pattern"},{include:"#type_pattern"},{include:"#subtype_pattern"},{include:"#record_pattern"},{include:"#cleanup"}]}]},package_pattern:{patterns:[{begin:/\b([Pp][Aa][Cc][KKk][Aa][Gg][Ee])\p{space}+(?![Bb][Oo][Dd][Yy])(([a-zA-Z][a-zA-Z\p{Nd}_]*)|([^\n]+?))\p{space}+([Ii][Ssſ])\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.section.package.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd]\b)(\p{space}+([Pp][Aa][Cc][KKk][Aa][Gg][Ee]))?(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.section.package.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#protected_pattern"},{include:"#function_prototype_pattern"},{include:"#procedure_prototype_pattern"},{include:"#type_pattern"},{include:"#subtype_pattern"},{include:"#record_pattern"},{include:"#component_pattern"},{include:"#cleanup"}]}]},parenthetical_list:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.vhdl"}},end:/(?<=\))/dgv,patterns:[{begin:/(?=['"a-zA-Z0-9])/dgv,end:/([\;\)\,])/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},name:"source.vhdl",patterns:[{include:"#comments"},{include:"#parenthetical_pair"},{include:"#cleanup"}]},{match:/\)/dgv,name:"invalid.illegal.unexpected.parenthesis.vhdl"},{include:"#cleanup"}]}]},parenthetical_pair:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.vhdl"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_pair"},{include:"#cleanup"}]}]},port_list_pattern:{patterns:[{begin:/\bport\b/dgiv,beginCaptures:{"0":{name:"keyword.language.vhdl"}},end:/(?<=\))\p{space}*;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"}]}]},procedure_definition_pattern:{patterns:[{begin:/^\p{space}*([Pp][Rr][Oo][Cc][Ee][Dd][Uu][Rr][Ee])\p{space}+(([a-zA-Z][a-zA-Z\p{Nd}_]*)|("\P{space}+")|([^\n]+?))(?=\p{space}*(\(|[Ii][Ssſ]))/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.function.procedure.begin.vhdl"},"4":{name:"entity.name.function.procedure.begin.vhdl"},"5":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/^\p{space}*([Ee][Nn][Dd])(\p{space}+([Pp][Rr][Oo][Cc][Ee][Dd][Uu][Rr][Ee]))?(\p{space}+((\3|(?!))|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.function.procedure.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#control_patterns"},{include:"#type_pattern"},{include:"#record_pattern"},{include:"#cleanup"}]}]},procedure_prototype_pattern:{patterns:[{begin:/\b([Pp][Rr][Oo][Cc][Ee][Dd][Uu][Rr][Ee])\p{space}+(([a-zA-Z][a-zA-Z0-9_]*)|([^\n]+?))(?=\p{space}*([\(\;]))/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.function.procedure.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctual.vhdl"}},patterns:[{include:"#parenthetical_list"}]}]},process_pattern:{patterns:[{begin:/^\p{space}*(([a-zA-Z][a-zA-Z0-9_]*)\p{space}*(:)\p{space}*)?((?:postponed\p{space}+)?[Pp][Rr][Oo][Cc][Ee][Ssſ][Ssſ]\b)/dgv,beginCaptures:{"2":{name:"entity.name.section.process.begin.vhdl"},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/([Ee][Nn][Dd])(\p{space}+((?:postponed\p{space}+)?[Pp][Rr][Oo][Cc][Ee][Ssſ][Ssſ]))(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.section.process.end.vhdl"},"7":{name:"invalid.illegal.invalid.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]},protected_body_pattern:{patterns:[{begin:/\b([Tt][Yy][Pp][Ee])\p{space}+(([a-zA-Z][a-zA-Z\p{Nd}_]*)|([^\n]+?))\p{space}+\b([Ii][Ssſ]\p{space}+[Pp][Rr][Oo][Tt][Ee][Cc][Tt][Ee][Dd]\p{space}+[Bb][Oo][Dd][Yy])\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.section.protected_body.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/\b(end\p{space}+protected\p{space}+body)(\p{space}+(((?!))|([^\n]+?)))?(?=\p{space}*;)/dgiv,endCaptures:{"1":{name:"keyword.language.vhdl"},"4":{name:"entity.name.section.protected_body.end.vhdl"},"5":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#function_definition_pattern"},{include:"#procedure_definition_pattern"},{include:"#type_pattern"},{include:"#subtype_pattern"},{include:"#record_pattern"},{include:"#cleanup"}]}]},protected_pattern:{patterns:[{begin:/\b([Tt][Yy][Pp][Ee])\p{space}+(([a-zA-Z][a-zA-Z\p{Nd}_]*)|([^\n]+?))\p{space}+\b([Ii][Ssſ]\p{space}+[Pp][Rr][Oo][Tt][Ee][Cc][Tt][Ee][Dd])\p{space}+(?![Bb][Oo][Dd][Yy])/dgv,beginCaptures:{"1":{name:"keyword.language.vhdls"},"3":{name:"entity.name.section.protected.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/\b(end\p{space}+protected)(\p{space}+(((?!))|([^\n]+?)))?(?!body)(?=\p{space}*;)/dgiv,endCaptures:{"1":{name:"keyword.language.vhdl"},"4":{name:"entity.name.section.protected.end.vhdl"},"5":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#function_prototype_pattern"},{include:"#procedure_prototype_pattern"},{include:"#type_pattern"},{include:"#subtype_pattern"},{include:"#record_pattern"},{include:"#component_pattern"},{include:"#cleanup"}]}]},punctuation:{patterns:[{match:/([\.\,\:\;\(\)])/dgv,name:"punctuation.vhdl"}]},record_pattern:{patterns:[{begin:/\brecord\b/dgiv,beginCaptures:{"0":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+([Rr][Ee][Cc][Oo][Rr][Dd])(\p{space}+(([a-zA-Z][a-zA-Z\p{Nd}_]*)|([^\n]*?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"2":{name:"keyword.language.vhdl"},"5":{name:"entity.name.type.record.vhdl"},"6":{name:"invalid.illegal.invalid.identifier.vhdl"}},patterns:[{include:"#cleanup"}]},{include:"#cleanup"}]},strings:{patterns:[{match:/'[^\n]'/dgv,name:"string.quoted.single.vhdl"},{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.vhdl",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.vhdl"}]},{begin:/\\/dgv,end:/\\/dgv,name:"string.other.backslash.vhdl"}]},subtype_pattern:{patterns:[{begin:/\b([Ssſ][Uu][Bb][Tt][Yy][Pp][Ee])\p{space}+(([a-zA-Z][a-zA-Z0-9_]*)|([^\n]+?))\p{space}+([Ii][Ssſ])\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.subtype.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#cleanup"}]}]},support_constants:{patterns:[{match:/\bmath_(?:1_over_e|1_over_pi|1_over_sqrt_2|2_pi|3_pi_over_2|deg_to_rad|e|log10_of_e|log2_of_e|log_of_10|log_of_2|pi|pi_over_2|pi_over_3|pi_over_4|rad_to_deg|sqrt_2|sqrt_pi)\b/dgiv,name:"support.constant.ieee.math_real.vhdl"},{match:/\b(?:math_cbase_1|math_cbase_j|math_czero|positive_real|principal_value)\b/dgiv,name:"support.constant.ieee.math_complex.vhdl"},{match:/\b(?:true|false)\b/dgiv,name:"support.constant.std.standard.vhdl"}]},support_functions:{patterns:[{match:/\b(?:finish|stop|resolution_limit)\b/dgiv,name:"support.function.std.env.vhdl"},{match:/\b(?:readline|read|writeline|write|endfile|endline)\b/dgiv,name:"support.function.std.textio.vhdl"},{match:/\b(?:rising_edge|falling_edge|to_bit|to_bitvector|to_stdulogic|to_stdlogicvector|to_stdulogicvector|is_x)\b/dgiv,name:"support.function.ieee.std_logic_1164.vhdl"},{match:/\b(?:shift_left|shift_right|rotate_left|rotate_right|resize|to_integer|to_unsigned|to_signed)\b/dgiv,name:"support.function.ieee.numeric_std.vhdl"},{match:/\b(?:arccos(h?)|arcsin(h?)|arctan|arctanh|cbrt|ceil|cos|cosh|exp|floor|log10|log2|log|realmax|realmin|round|sign|sin|sinh|sqrt|tan|tanh|trunc)\b/dgiv,name:"support.function.ieee.math_real.vhdl"},{match:/\b(?:arg|cmplx|complex_to_polar|conj|get_principal_value|polar_to_complex)\b/dgiv,name:"support.function.ieee.math_complex.vhdl"}]},support_types:{patterns:[{match:/\b(?:boolean|bit|character|severity_level|integer|real|time|delay_length|now|natural|positive|string|bit_vector|file_open_kind|file_open_status|fs|ps|ns|us|ms|sec|min|hr|severity_level|note|warning|error|failure)\b/dgiv,name:"support.type.std.standard.vhdl"},{match:/\b(?:line|text|side|width|input|output)\b/dgiv,name:"support.type.std.textio.vhdl"},{match:/\bstd_(?:logic|ulogic)(?:|_vector)\b/dgiv,name:"support.type.ieee.std_logic_1164.vhdl"},{match:/\b(?:signed|unsigned)\b/dgiv,name:"support.type.ieee.numeric_std.vhdl"},{match:/\bcomplex(?:|_polar)\b/dgiv,name:"support.type.ieee.math_complex.vhdl"}]},syntax_highlighting:{patterns:[{include:"#keywords"},{include:"#punctuation"},{include:"#support_constants"},{include:"#support_types"},{include:"#support_functions"}]},type_pattern:{patterns:[{begin:/\b([Tt][Yy][Pp][Ee])\p{space}+(([a-zA-Z][a-zA-Z0-9_]*)|([^\n]+?))((?=\p{space}*;)|(\p{space}+([Ii][Ssſ])))\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.type.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"7":{name:"keyword.language.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#record_pattern"},{include:"#cleanup"}]}]},while_pattern:{patterns:[{begin:/^\p{space}*(([a-zA-Z][a-zA-Z0-9_]*)\p{space}*(:)\p{space}*)?\b([Ww][Hh][Ii][Ll][Ee])\b/dgv,beginCaptures:{"2":{name:""},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+(([Ll][Oo][Oo][Pp])|(\P{space}+))\b(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"invalid.illegal.loop.keyword.required.vhdl"},"7":{name:"entity.name.tag.while.loop.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier"}},patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]}},scopeName:"source.vhdl",embeddedLangs:undefined,aliases:undefined})
1
+ const lang = Object.freeze({displayName:"VHDL",fileTypes:["vhd","vhdl","vho","vht"],name:"vhdl",patterns:[{include:"#block_processing"},{include:"#cleanup"}],repository:{architecture_pattern:{patterns:[{begin:/\b([Aa][Rr][Cc][Hh][Ii][Tt][Ee][Cc][Tt][Uu][Rr][Ee])\p{space}+(([A-z][0-9A-z]*)|([^\n]+))(?=\p{space})\p{space}+([Oo][Ff])\p{space}+(([A-Za-z][0-9A-Z_a-z]*)|([^\n]+?))(?=\p{space}*[Ii][Ssſ])\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.architecture.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"},"7":{name:"entity.name.type.entity.reference.vhdl"},"8":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/\b([Ee][Nn][Dd])(\p{space}+([Aa][Rr][Cc][Hh][Ii][Tt][Ee][Cc][Tt][Uu][Rr][Ee]))?(\p{space}+((\3)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.type.architecture.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},name:"support.block.architecture",patterns:[{include:"#block_pattern"},{include:"#function_definition_pattern"},{include:"#procedure_definition_pattern"},{include:"#component_pattern"},{include:"#if_pattern"},{include:"#process_pattern"},{include:"#type_pattern"},{include:"#record_pattern"},{include:"#for_pattern"},{include:"#entity_instantiation_pattern"},{include:"#component_instantiation_pattern"},{include:"#cleanup"}]}]},attribute_list:{patterns:[{begin:/'\(/dgv,beginCaptures:{"0":{name:"punctuation.vhdl"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#cleanup"}]}]},block_pattern:{patterns:[{begin:/^\p{space}*(([A-Za-z][0-9A-Z_a-z]*)\p{space}*(:)\p{space}*)?(\p{space}*[Bb][Ll][Oo][Cc][KKk])/dgv,beginCaptures:{"2":{name:"meta.block.block.name"},"3":{name:"keyword.language.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/(end\p{space}+block)(\p{space}+(((?!))|([^\n]+?)))?(?=\p{space}*;)/dgiv,endCaptures:{"1":{name:"keyword.language.vhdl"},"2":{name:"meta.block.block.end"},"5":{name:"invalid.illegal.mismatched.identifier.vhdl"}},name:"meta.block.block",patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]},block_processing:{patterns:[{include:"#package_pattern"},{include:"#package_body_pattern"},{include:"#entity_pattern"},{include:"#architecture_pattern"}]},case_pattern:{patterns:[{begin:/^\p{space}*((([A-Za-z][0-9A-Z_a-z]*)|([^\n]+?))\p{space}*:\p{space}*)?\b([Cc][Aa][Ssſ][Ee])\b/dgv,beginCaptures:{"3":{name:"entity.name.tag.case.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}*(\p{space}+(([Cc][Aa][Ssſ][Ee])|([^\n]*?)))(\p{space}+((\2)|([^\n]*?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"4":{name:"keyword.language.vhdl"},"5":{name:"invalid.illegal.case.required.vhdl"},"8":{name:"entity.name.tag.case.end.vhdl"},"9":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]},cleanup:{patterns:[{include:"#comments"},{include:"#constants_numeric"},{include:"#strings"},{include:"#attribute_list"},{include:"#syntax_highlighting"}]},comments:{patterns:[{match:/--[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.double-dash.vhdl"}]},component_instantiation_pattern:{patterns:[{begin:/^\p{space}*([A-Za-z][0-9A-Z_a-z]*)\p{space}*(:)\p{space}*([A-Za-z][0-9A-Z_a-z]*)\b(?=\p{space}*((?=\n?$)|generic|port))/dgv,beginCaptures:{"1":{name:"entity.name.section.component_instantiation.vhdl"},"2":{name:"punctuation.vhdl"},"3":{name:"entity.name.tag.component.reference.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#cleanup"}]}]},component_pattern:{patterns:[{begin:/^\p{space}*\b([Cc][Oo][Mm][Pp][Oo][Nn][Ee][Nn][Tt])\p{space}+(([A-Z_a-z][0-9A-Z_a-z]*)\p{space}*|([^\n]+?))(?=\b(?:[Ii][Ssſ]|[Pp][Oo][Rr][Tt])\b|(?=\n?$)|--)(\b([Ii][Ssſ]\b))?/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.component.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"6":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+(([Cc][Oo][Mm][Pp][Oo][Nn][Ee][Nn][Tt]\b)|([^\n]+?))(?=\p{space}*|;)(\p{space}+((\3)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"invalid.illegal.component.keyword.required.vhdl"},"7":{name:"entity.name.type.component.end.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#generic_list_pattern"},{include:"#port_list_pattern"},{include:"#comments"}]}]},constants_numeric:{patterns:[{match:/\b([\-\+]?[_\p{Nd}]+\.[_\p{Nd}]+([Ee][\-\+]?[_\p{Nd}]+)?)\b/dgv,name:"constant.numeric.floating_point.vhdl"},{match:/\b\p{Nd}+#[_\p{AHex}]+#\b/dgv,name:"constant.numeric.base_pound_number_pound.vhdl"},{match:/\b[_\p{Nd}]+([Ee][_\p{Nd}]+)?\b/dgv,name:"constant.numeric.integer.vhdl"},{match:/[Xx]"[\-HLUWXZ_hluwxz\p{AHex}]+"/dgv,name:"constant.numeric.quoted.double.string.hex.vhdl"},{match:/[Oo]"[\-0-7HLUWXZ_hluwxz]+"/dgv,name:"constant.numeric.quoted.double.string.octal.vhdl"},{match:/[Bb]?"[\-01HLUWXZ_hluwxz]+"/dgv,name:"constant.numeric.quoted.double.string.binary.vhdl"},{captures:{"1":{name:"invalid.illegal.quoted.double.string.vhdl"}},match:/([BOXbox]"[^\n]+?")/dgv,name:"constant.numeric.quoted.double.string.illegal.vhdl"},{match:/'[\-01HLUWXZhluwxz]'/dgv,name:"constant.numeric.quoted.single.std_logic"}]},control_patterns:{patterns:[{include:"#case_pattern"},{include:"#if_pattern"},{include:"#for_pattern"},{include:"#while_pattern"},{include:"#loop_pattern"}]},entity_instantiation_pattern:{patterns:[{begin:/^\p{space}*([A-Za-z][0-9A-Z_a-z]*)\p{space}*(:)\p{space}*(([Uu][Ssſ][Ee])\p{space}+)?([Ee][Nn][Tt][Ii][Tt][Yy])\p{space}+((([A-Za-z][0-9A-Z_a-z]*)|([^\n]+?))(\.))?(([A-Za-z][0-9A-Z_a-z]*)|([^\n]+?))(?=\p{space}*(\(|(?=\n?$)|(?:[Pp][Oo][Rr][Tt]|[Gg][Ee][Nn][Ee][Rr][Ii][Cc])))(\p{space}*(\()\p{space}*(([A-Za-z][0-9A-Z_a-z]*)|([^\n]+?))(?=\p{space}*\))\p{space}*(\)))?/dgv,beginCaptures:{"1":{name:"entity.name.section.entity_instantiation.vhdl"},"2":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"},"5":{name:"keyword.language.vhdl"},"8":{name:"entity.name.tag.library.reference.vhdl"},"9":{name:"invalid.illegal.invalid.identifier.vhdl"},"10":{name:"punctuation.vhdl"},"12":{name:"entity.name.tag.entity.reference.vhdl"},"13":{name:"invalid.illegal.invalid.identifier.vhdl"},"16":{name:"punctuation.vhdl"},"18":{name:"entity.name.tag.architecture.reference.vhdl"},"19":{name:"invalid.illegal.invalid.identifier.vhdl"},"21":{name:"punctuation.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#cleanup"}]}]},entity_pattern:{patterns:[{begin:/^\p{space}*([Ee][Nn][Tt][Ii][Tt][Yy]\b)\p{space}+(([A-Za-z][A-Z_a-z\p{Nd}]*)|([^\n]+?))(?=\p{space})/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.entity.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/\b([Ee][Nn][Dd]\b)(\p{space}+([Ee][Nn][Tt][Ii][Tt][Yy]))?(\p{space}+((\3)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.type.entity.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#comments"},{include:"#generic_list_pattern"},{include:"#port_list_pattern"},{include:"#cleanup"}]}]},for_pattern:{patterns:[{begin:/^\p{space}*(([A-Za-z][0-9A-Z_a-z]*)\p{space}*(:)\p{space}*)?(?![Ww][Aa][Ii][Tt]\p{space}*)\b([Ff][Oo][Rr])\b(?!\p{space}*[Aa][Ll][Ll])/dgv,beginCaptures:{"2":{name:"entity.name.tag.for.generate.begin.vhdl"},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+(((?:[Gg][Ee][Nn][Ee][Rr][Aa][Tt][Ee]|[Ll][Oo][Oo][Pp]))|(\P{space}+))\b(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"invalid.illegal.loop.or.generate.required.vhdl"},"7":{name:"entity.name.tag.for.generate.end.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#entity_instantiation_pattern"},{include:"#component_pattern"},{include:"#component_instantiation_pattern"},{include:"#process_pattern"},{include:"#cleanup"}]}]},function_definition_pattern:{patterns:[{begin:/^\p{space}*((?:[Ii][Mm][Pp][Uu][Rr][Ee])?\p{space}*[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn])\p{space}+(([A-Za-z][A-Z_a-z\p{Nd}]*)|("\P{space}+")|(\\[^\n]+\\)|([^\n]+?))(?=\p{space}*(\(|\b[Rr][Ee][Tt][Uu][Rr][Nn]\b))/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.function.function.begin.vhdl"},"4":{name:"entity.name.function.function.begin.vhdl"},"5":{name:"entity.name.function.function.begin.vhdl"},"6":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/^\p{space}*([Ee][Nn][Dd])(\p{space}+([Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]))?(\p{space}+((\3|(?!)|(?!))|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.function.function.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#parenthetical_list"},{include:"#type_pattern"},{include:"#record_pattern"},{include:"#cleanup"}]}]},function_prototype_pattern:{patterns:[{begin:/^\p{space}*((?:[Ii][Mm][Pp][Uu][Rr][Ee])?\p{space}*[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn])\p{space}+(([A-Za-z][A-Z_a-z\p{Nd}]*)|("\P{space}+")|(\\[^\n]+\\)|([^\n]+?))(?=\p{space}*(\(|\b[Rr][Ee][Tt][Uu][Rr][Nn]\b))/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.function.function.prototype.vhdl"},"4":{name:"entity.name.function.function.prototype.vhdl"},"5":{name:"entity.name.function.function.prototype.vhdl"},"6":{name:"invalid.illegal.function.name.vhdl"}},end:/(?<=;)/dgv,patterns:[{begin:/\breturn(?=\p{space}+[^\;]+\p{space}*;)/dgiv,beginCaptures:{"0":{name:"keyword.language.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.function_prototype.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#cleanup"}]},{include:"#parenthetical_list"},{include:"#cleanup"}]}]},generic_list_pattern:{patterns:[{begin:/\bgeneric\b/dgiv,beginCaptures:{"0":{name:"keyword.language.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"}]}]},if_pattern:{patterns:[{begin:/(([A-Za-z][0-9A-Z_a-z]*)\p{space}*(:)\p{space}*)?\b([Ii][Ff])\b/dgv,beginCaptures:{"2":{name:"entity.name.tag.if.generate.begin.vhdl"},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/\b(end)\p{space}+((((?:generate|if))|(\P{space}+))\b(\p{space}+(((?!))|([^\n]+?)))?)?(?=\p{space}*;)/dgiv,endCaptures:{"1":{name:"keyword.language.vhdl"},"4":{name:"keyword.language.vhdl"},"5":{name:"invalid.illegal.if.or.generate.required.vhdl"},"8":{name:"entity.name.tag.if.generate.end.vhdl"},"9":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#process_pattern"},{include:"#entity_instantiation_pattern"},{include:"#component_pattern"},{include:"#component_instantiation_pattern"},{include:"#cleanup"}]}]},keywords:{patterns:[{match:/'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance|instance_name|last|last_value|left|leftof|length|low|path|path_name|pos|pred|quiet|range|reverse|reverse_range|right|rightof|simple|simple_name|stable|succ|transaction|val|value)\b/dgiv,name:"keyword.attributes.vhdl"},{match:/\b(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|context|deallocate|disconnect|downto|else|elsif|end|entity|exit|file|for|force|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|protected|pure|range|record|register|reject|release|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)\b/dgiv,name:"keyword.language.vhdl"},{match:/\b(?:std|ieee|work|standard|textio|std_logic_1164|std_logic_arith|std_logic_misc|std_logic_signed|std_logic_textio|std_logic_unsigned|numeric_bit|numeric_std|math_complex|math_real|vital_primitives|vital_timing)\b/dgiv,name:"standard.library.language.vhdl"},{match:/([\-\+]|<=|=>??|:=|>=|[\&\/\<\>\|]|(\*{1,2}))/dgv,name:"keyword.operator.vhdl"}]},loop_pattern:{patterns:[{begin:/^\p{space}*(([A-Za-z][0-9A-Z_a-z]*)\p{space}*(:)\p{space}*)?\b([Ll][Oo][Oo][Pp])\b/dgv,beginCaptures:{"2":{name:"entity.name.tag.loop.begin.vhdl"},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+(([Ll][Oo][Oo][Pp])|(\P{space}+))\b(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"invalid.illegal.loop.keyword.required.vhdl"},"7":{name:"entity.name.tag.loop.end.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]},package_body_pattern:{patterns:[{begin:/\b([Pp][Aa][Cc][KKk][Aa][Gg][Ee])\p{space}+([Bb][Oo][Dd][Yy])\p{space}+(([A-Za-z][A-Z_a-z\p{Nd}]*)|([^\n]+?))\p{space}+([Ii][Ssſ])\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"2":{name:"keyword.language.vhdl"},"4":{name:"entity.name.section.package_body.begin.vhdl"},"5":{name:"invalid.illegal.invalid.identifier.vhdl"},"6":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd]\b)(\p{space}+([Pp][Aa][Cc][KKk][Aa][Gg][Ee])\p{space}+([Bb][Oo][Dd][Yy]))?(\p{space}+((\4)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"keyword.language.vhdl"},"7":{name:"entity.name.section.package_body.end.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#protected_body_pattern"},{include:"#function_definition_pattern"},{include:"#procedure_definition_pattern"},{include:"#type_pattern"},{include:"#subtype_pattern"},{include:"#record_pattern"},{include:"#cleanup"}]}]},package_pattern:{patterns:[{begin:/\b([Pp][Aa][Cc][KKk][Aa][Gg][Ee])\p{space}+(?![Bb][Oo][Dd][Yy])(([A-Za-z][A-Z_a-z\p{Nd}]*)|([^\n]+?))\p{space}+([Ii][Ssſ])\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.section.package.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd]\b)(\p{space}+([Pp][Aa][Cc][KKk][Aa][Gg][Ee]))?(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.section.package.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#protected_pattern"},{include:"#function_prototype_pattern"},{include:"#procedure_prototype_pattern"},{include:"#type_pattern"},{include:"#subtype_pattern"},{include:"#record_pattern"},{include:"#component_pattern"},{include:"#cleanup"}]}]},parenthetical_list:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.vhdl"}},end:/(?<=\))/dgv,patterns:[{begin:/(?=["'0-9A-Za-z])/dgv,end:/([\)\,\;])/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},name:"source.vhdl",patterns:[{include:"#comments"},{include:"#parenthetical_pair"},{include:"#cleanup"}]},{match:/\)/dgv,name:"invalid.illegal.unexpected.parenthesis.vhdl"},{include:"#cleanup"}]}]},parenthetical_pair:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.vhdl"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_pair"},{include:"#cleanup"}]}]},port_list_pattern:{patterns:[{begin:/\bport\b/dgiv,beginCaptures:{"0":{name:"keyword.language.vhdl"}},end:/(?<=\))\p{space}*;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#parenthetical_list"}]}]},procedure_definition_pattern:{patterns:[{begin:/^\p{space}*([Pp][Rr][Oo][Cc][Ee][Dd][Uu][Rr][Ee])\p{space}+(([A-Za-z][A-Z_a-z\p{Nd}]*)|("\P{space}+")|([^\n]+?))(?=\p{space}*(\(|[Ii][Ssſ]))/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.function.procedure.begin.vhdl"},"4":{name:"entity.name.function.procedure.begin.vhdl"},"5":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/^\p{space}*([Ee][Nn][Dd])(\p{space}+([Pp][Rr][Oo][Cc][Ee][Dd][Uu][Rr][Ee]))?(\p{space}+((\3|(?!))|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.function.procedure.end.vhdl"},"7":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#parenthetical_list"},{include:"#control_patterns"},{include:"#type_pattern"},{include:"#record_pattern"},{include:"#cleanup"}]}]},procedure_prototype_pattern:{patterns:[{begin:/\b([Pp][Rr][Oo][Cc][Ee][Dd][Uu][Rr][Ee])\p{space}+(([A-Za-z][0-9A-Z_a-z]*)|([^\n]+?))(?=\p{space}*([\(\;]))/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.function.procedure.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctual.vhdl"}},patterns:[{include:"#parenthetical_list"}]}]},process_pattern:{patterns:[{begin:/^\p{space}*(([A-Za-z][0-9A-Z_a-z]*)\p{space}*(:)\p{space}*)?((?:postponed\p{space}+)?[Pp][Rr][Oo][Cc][Ee][Ssſ][Ssſ]\b)/dgv,beginCaptures:{"2":{name:"entity.name.section.process.begin.vhdl"},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/([Ee][Nn][Dd])(\p{space}+((?:postponed\p{space}+)?[Pp][Rr][Oo][Cc][Ee][Ssſ][Ssſ]))(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"6":{name:"entity.name.section.process.end.vhdl"},"7":{name:"invalid.illegal.invalid.identifier.vhdl"}},patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]},protected_body_pattern:{patterns:[{begin:/\b([Tt][Yy][Pp][Ee])\p{space}+(([A-Za-z][A-Z_a-z\p{Nd}]*)|([^\n]+?))\p{space}+\b([Ii][Ssſ]\p{space}+[Pp][Rr][Oo][Tt][Ee][Cc][Tt][Ee][Dd]\p{space}+[Bb][Oo][Dd][Yy])\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.section.protected_body.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/\b(end\p{space}+protected\p{space}+body)(\p{space}+(((?!))|([^\n]+?)))?(?=\p{space}*;)/dgiv,endCaptures:{"1":{name:"keyword.language.vhdl"},"4":{name:"entity.name.section.protected_body.end.vhdl"},"5":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#function_definition_pattern"},{include:"#procedure_definition_pattern"},{include:"#type_pattern"},{include:"#subtype_pattern"},{include:"#record_pattern"},{include:"#cleanup"}]}]},protected_pattern:{patterns:[{begin:/\b([Tt][Yy][Pp][Ee])\p{space}+(([A-Za-z][A-Z_a-z\p{Nd}]*)|([^\n]+?))\p{space}+\b([Ii][Ssſ]\p{space}+[Pp][Rr][Oo][Tt][Ee][Cc][Tt][Ee][Dd])\p{space}+(?![Bb][Oo][Dd][Yy])/dgv,beginCaptures:{"1":{name:"keyword.language.vhdls"},"3":{name:"entity.name.section.protected.begin.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/\b(end\p{space}+protected)(\p{space}+(((?!))|([^\n]+?)))?(?!body)(?=\p{space}*;)/dgiv,endCaptures:{"1":{name:"keyword.language.vhdl"},"4":{name:"entity.name.section.protected.end.vhdl"},"5":{name:"invalid.illegal.mismatched.identifier.vhdl"}},patterns:[{include:"#function_prototype_pattern"},{include:"#procedure_prototype_pattern"},{include:"#type_pattern"},{include:"#subtype_pattern"},{include:"#record_pattern"},{include:"#component_pattern"},{include:"#cleanup"}]}]},punctuation:{patterns:[{match:/([\(\)\,\.\:\;])/dgv,name:"punctuation.vhdl"}]},record_pattern:{patterns:[{begin:/\brecord\b/dgiv,beginCaptures:{"0":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+([Rr][Ee][Cc][Oo][Rr][Dd])(\p{space}+(([A-Za-z][A-Z_a-z\p{Nd}]*)|([^\n]*?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"2":{name:"keyword.language.vhdl"},"5":{name:"entity.name.type.record.vhdl"},"6":{name:"invalid.illegal.invalid.identifier.vhdl"}},patterns:[{include:"#cleanup"}]},{include:"#cleanup"}]},strings:{patterns:[{match:/'[^\n]'/dgv,name:"string.quoted.single.vhdl"},{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.vhdl",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.vhdl"}]},{begin:/\\/dgv,end:/\\/dgv,name:"string.other.backslash.vhdl"}]},subtype_pattern:{patterns:[{begin:/\b([Ssſ][Uu][Bb][Tt][Yy][Pp][Ee])\p{space}+(([A-Za-z][0-9A-Z_a-z]*)|([^\n]+?))\p{space}+([Ii][Ssſ])\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.subtype.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"5":{name:"keyword.language.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#cleanup"}]}]},support_constants:{patterns:[{match:/\bmath_(?:1_over_e|1_over_pi|1_over_sqrt_2|2_pi|3_pi_over_2|deg_to_rad|e|log10_of_e|log2_of_e|log_of_10|log_of_2|pi|pi_over_2|pi_over_3|pi_over_4|rad_to_deg|sqrt_2|sqrt_pi)\b/dgiv,name:"support.constant.ieee.math_real.vhdl"},{match:/\b(?:math_cbase_1|math_cbase_j|math_czero|positive_real|principal_value)\b/dgiv,name:"support.constant.ieee.math_complex.vhdl"},{match:/\b(?:true|false)\b/dgiv,name:"support.constant.std.standard.vhdl"}]},support_functions:{patterns:[{match:/\b(?:finish|stop|resolution_limit)\b/dgiv,name:"support.function.std.env.vhdl"},{match:/\b(?:readline|read|writeline|write|endfile|endline)\b/dgiv,name:"support.function.std.textio.vhdl"},{match:/\b(?:rising_edge|falling_edge|to_bit|to_bitvector|to_stdulogic|to_stdlogicvector|to_stdulogicvector|is_x)\b/dgiv,name:"support.function.ieee.std_logic_1164.vhdl"},{match:/\b(?:shift_left|shift_right|rotate_left|rotate_right|resize|to_integer|to_unsigned|to_signed)\b/dgiv,name:"support.function.ieee.numeric_std.vhdl"},{match:/\b(?:arccos(h?)|arcsin(h?)|arctanh??|cbrt|ceil|cosh??|exp|floor|log10|log2?|realmax|realmin|round|sign|sinh??|sqrt|tanh??|trunc)\b/dgiv,name:"support.function.ieee.math_real.vhdl"},{match:/\b(?:arg|cmplx|complex_to_polar|conj|get_principal_value|polar_to_complex)\b/dgiv,name:"support.function.ieee.math_complex.vhdl"}]},support_types:{patterns:[{match:/\b(?:boolean|bit|character|severity_level|integer|real|time|delay_length|now|natural|positive|string|bit_vector|file_open_kind|file_open_status|fs|ps|ns|us|ms|sec|min|hr|severity_level|note|warning|error|failure)\b/dgiv,name:"support.type.std.standard.vhdl"},{match:/\b(?:line|text|side|width|input|output)\b/dgiv,name:"support.type.std.textio.vhdl"},{match:/\bstd_u??logic(?:|_vector)\b/dgiv,name:"support.type.ieee.std_logic_1164.vhdl"},{match:/\b(?:|un)signed\b/dgiv,name:"support.type.ieee.numeric_std.vhdl"},{match:/\bcomplex(?:|_polar)\b/dgiv,name:"support.type.ieee.math_complex.vhdl"}]},syntax_highlighting:{patterns:[{include:"#keywords"},{include:"#punctuation"},{include:"#support_constants"},{include:"#support_types"},{include:"#support_functions"}]},type_pattern:{patterns:[{begin:/\b([Tt][Yy][Pp][Ee])\p{space}+(([A-Za-z][0-9A-Z_a-z]*)|([^\n]+?))((?=\p{space}*;)|(\p{space}+([Ii][Ssſ])))\b/dgv,beginCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"entity.name.type.type.vhdl"},"4":{name:"invalid.illegal.invalid.identifier.vhdl"},"7":{name:"keyword.language.vhdl"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.vhdl"}},patterns:[{include:"#record_pattern"},{include:"#cleanup"}]}]},while_pattern:{patterns:[{begin:/^\p{space}*(([A-Za-z][0-9A-Z_a-z]*)\p{space}*(:)\p{space}*)?\b([Ww][Hh][Ii][Ll][Ee])\b/dgv,beginCaptures:{"2":{name:""},"3":{name:"punctuation.vhdl"},"4":{name:"keyword.language.vhdl"}},end:/\b([Ee][Nn][Dd])\p{space}+(([Ll][Oo][Oo][Pp])|(\P{space}+))\b(\p{space}+((\2)|([^\n]+?)))?(?=\p{space}*;)/dgv,endCaptures:{"1":{name:"keyword.language.vhdl"},"3":{name:"keyword.language.vhdl"},"4":{name:"invalid.illegal.loop.keyword.required.vhdl"},"7":{name:"entity.name.tag.while.loop.vhdl"},"8":{name:"invalid.illegal.mismatched.identifier"}},patterns:[{include:"#control_patterns"},{include:"#cleanup"}]}]}},scopeName:"source.vhdl",embeddedLangs:undefined,aliases:undefined})
2
2
 
3
3
  export default [
4
4
  lang