@shikijs/langs-precompiled 3.2.2 → 3.3.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 (224) 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/cobol.mjs +1 -1
  34. package/dist/codeql.mjs +1 -1
  35. package/dist/coffee.mjs +1 -1
  36. package/dist/common-lisp.mjs +1 -1
  37. package/dist/coq.mjs +1 -1
  38. package/dist/cpp-macro.mjs +1 -1
  39. package/dist/cpp.mjs +1 -1
  40. package/dist/crystal.mjs +1 -1
  41. package/dist/csharp.mjs +1 -1
  42. package/dist/css.mjs +1 -1
  43. package/dist/cue.mjs +1 -1
  44. package/dist/cypher.mjs +1 -1
  45. package/dist/d.mjs +1 -1
  46. package/dist/dart.mjs +1 -1
  47. package/dist/dax.mjs +1 -1
  48. package/dist/desktop.mjs +1 -1
  49. package/dist/diff.mjs +1 -1
  50. package/dist/dotenv.mjs +1 -1
  51. package/dist/dream-maker.mjs +1 -1
  52. package/dist/edge.mjs +1 -1
  53. package/dist/elixir.mjs +1 -1
  54. package/dist/elm.mjs +1 -1
  55. package/dist/emacs-lisp.mjs +1 -1
  56. package/dist/erb.mjs +1 -1
  57. package/dist/erlang.mjs +1 -1
  58. package/dist/es-tag-css.mjs +1 -1
  59. package/dist/es-tag-glsl.mjs +1 -1
  60. package/dist/es-tag-html.mjs +1 -1
  61. package/dist/es-tag-sql.mjs +1 -1
  62. package/dist/es-tag-xml.mjs +1 -1
  63. package/dist/fennel.mjs +1 -1
  64. package/dist/fish.mjs +1 -1
  65. package/dist/fluent.mjs +1 -1
  66. package/dist/fortran-fixed-form.mjs +1 -1
  67. package/dist/fortran-free-form.mjs +1 -1
  68. package/dist/fsharp.mjs +1 -1
  69. package/dist/gdresource.mjs +1 -1
  70. package/dist/gdscript.mjs +1 -1
  71. package/dist/gdshader.mjs +1 -1
  72. package/dist/genie.mjs +1 -1
  73. package/dist/gherkin.mjs +1 -1
  74. package/dist/gleam.mjs +1 -1
  75. package/dist/glimmer-js.mjs +1 -1
  76. package/dist/glimmer-ts.mjs +1 -1
  77. package/dist/glsl.mjs +1 -1
  78. package/dist/gnuplot.mjs +1 -1
  79. package/dist/go.mjs +1 -1
  80. package/dist/graphql.mjs +1 -1
  81. package/dist/groovy.mjs +1 -1
  82. package/dist/hack.mjs +1 -1
  83. package/dist/haml.mjs +1 -1
  84. package/dist/handlebars.mjs +1 -1
  85. package/dist/haskell.mjs +1 -1
  86. package/dist/haxe.mjs +1 -1
  87. package/dist/hcl.mjs +1 -1
  88. package/dist/hjson.mjs +1 -1
  89. package/dist/hlsl.mjs +1 -1
  90. package/dist/html-derivative.mjs +1 -1
  91. package/dist/html.mjs +1 -1
  92. package/dist/http.mjs +1 -1
  93. package/dist/hxml.mjs +1 -1
  94. package/dist/hy.mjs +1 -1
  95. package/dist/imba.mjs +1 -1
  96. package/dist/ini.mjs +1 -1
  97. package/dist/java.mjs +1 -1
  98. package/dist/javascript.mjs +1 -1
  99. package/dist/jinja.mjs +1 -1
  100. package/dist/jison.mjs +1 -1
  101. package/dist/json.mjs +1 -1
  102. package/dist/json5.mjs +1 -1
  103. package/dist/jsonc.mjs +1 -1
  104. package/dist/jsonl.mjs +1 -1
  105. package/dist/jsonnet.mjs +1 -1
  106. package/dist/jssm.mjs +1 -1
  107. package/dist/jsx.mjs +1 -1
  108. package/dist/julia.mjs +1 -1
  109. package/dist/kotlin.mjs +1 -1
  110. package/dist/kusto.mjs +1 -1
  111. package/dist/latex.mjs +1 -1
  112. package/dist/lean.mjs +1 -1
  113. package/dist/less.mjs +1 -1
  114. package/dist/liquid.mjs +1 -1
  115. package/dist/llvm.mjs +1 -1
  116. package/dist/log.mjs +1 -1
  117. package/dist/logo.mjs +1 -1
  118. package/dist/lua.mjs +1 -1
  119. package/dist/luau.mjs +1 -1
  120. package/dist/make.mjs +1 -1
  121. package/dist/markdown-vue.mjs +1 -1
  122. package/dist/markdown.mjs +1 -1
  123. package/dist/marko.mjs +1 -1
  124. package/dist/matlab.mjs +1 -1
  125. package/dist/mdc.mjs +1 -1
  126. package/dist/mdx.mjs +1 -1
  127. package/dist/mermaid.mjs +1 -1
  128. package/dist/mipsasm.mjs +1 -1
  129. package/dist/mojo.mjs +1 -1
  130. package/dist/move.mjs +1 -1
  131. package/dist/narrat.mjs +1 -1
  132. package/dist/nextflow.mjs +1 -1
  133. package/dist/nginx.mjs +1 -1
  134. package/dist/nim.mjs +1 -1
  135. package/dist/nix.mjs +1 -1
  136. package/dist/nushell.mjs +1 -1
  137. package/dist/objective-c.mjs +1 -1
  138. package/dist/objective-cpp.mjs +1 -1
  139. package/dist/ocaml.mjs +1 -1
  140. package/dist/pascal.mjs +1 -1
  141. package/dist/perl.mjs +1 -1
  142. package/dist/php.mjs +1 -1
  143. package/dist/plsql.mjs +1 -1
  144. package/dist/po.mjs +1 -1
  145. package/dist/polar.mjs +1 -1
  146. package/dist/postcss.mjs +1 -1
  147. package/dist/powerquery.mjs +1 -1
  148. package/dist/powershell.mjs +1 -1
  149. package/dist/prisma.mjs +1 -1
  150. package/dist/prolog.mjs +1 -1
  151. package/dist/proto.mjs +1 -1
  152. package/dist/pug.mjs +1 -1
  153. package/dist/puppet.mjs +1 -1
  154. package/dist/purescript.mjs +1 -1
  155. package/dist/python.mjs +1 -1
  156. package/dist/qml.mjs +1 -1
  157. package/dist/qss.mjs +1 -1
  158. package/dist/r.mjs +1 -1
  159. package/dist/racket.mjs +1 -1
  160. package/dist/raku.mjs +1 -1
  161. package/dist/razor.mjs +1 -1
  162. package/dist/reg.mjs +1 -1
  163. package/dist/regexp.mjs +1 -1
  164. package/dist/rel.mjs +1 -1
  165. package/dist/riscv.mjs +1 -1
  166. package/dist/rst.mjs +1 -1
  167. package/dist/ruby.mjs +1 -1
  168. package/dist/rust.mjs +1 -1
  169. package/dist/sas.mjs +1 -1
  170. package/dist/sass.mjs +1 -1
  171. package/dist/scala.mjs +1 -1
  172. package/dist/scheme.mjs +1 -1
  173. package/dist/scss.mjs +1 -1
  174. package/dist/sdbl.mjs +1 -1
  175. package/dist/shaderlab.mjs +1 -1
  176. package/dist/shellscript.mjs +1 -1
  177. package/dist/shellsession.mjs +1 -1
  178. package/dist/smalltalk.mjs +1 -1
  179. package/dist/solidity.mjs +1 -1
  180. package/dist/soy.mjs +1 -1
  181. package/dist/sparql.mjs +1 -1
  182. package/dist/splunk.mjs +1 -1
  183. package/dist/sql.mjs +1 -1
  184. package/dist/ssh-config.mjs +1 -1
  185. package/dist/stata.mjs +1 -1
  186. package/dist/stylus.mjs +1 -1
  187. package/dist/svelte.mjs +1 -1
  188. package/dist/system-verilog.mjs +1 -1
  189. package/dist/systemd.mjs +1 -1
  190. package/dist/talonscript.mjs +1 -1
  191. package/dist/tasl.mjs +1 -1
  192. package/dist/tcl.mjs +1 -1
  193. package/dist/templ.mjs +1 -1
  194. package/dist/terraform.mjs +1 -1
  195. package/dist/tex.mjs +1 -1
  196. package/dist/toml.mjs +1 -1
  197. package/dist/tsx.mjs +1 -1
  198. package/dist/turtle.mjs +1 -1
  199. package/dist/twig.mjs +1 -1
  200. package/dist/typescript.mjs +1 -1
  201. package/dist/typespec.mjs +1 -1
  202. package/dist/typst.mjs +1 -1
  203. package/dist/v.mjs +1 -1
  204. package/dist/vala.mjs +1 -1
  205. package/dist/vb.mjs +1 -1
  206. package/dist/verilog.mjs +1 -1
  207. package/dist/vhdl.mjs +1 -1
  208. package/dist/viml.mjs +1 -1
  209. package/dist/vue-html.mjs +1 -1
  210. package/dist/vue-sfc-style-variable-injection.mjs +1 -1
  211. package/dist/vue.mjs +3 -3
  212. package/dist/vyper.mjs +1 -1
  213. package/dist/wasm.mjs +1 -1
  214. package/dist/wenyan.mjs +1 -1
  215. package/dist/wgsl.mjs +1 -1
  216. package/dist/wikitext.mjs +1 -1
  217. package/dist/wit.mjs +1 -1
  218. package/dist/wolfram.mjs +1 -1
  219. package/dist/xml.mjs +1 -1
  220. package/dist/xsl.mjs +1 -1
  221. package/dist/yaml.mjs +1 -1
  222. package/dist/zenscript.mjs +1 -1
  223. package/dist/zig.mjs +1 -1
  224. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
1
  import { EmulatedRegExp } from 'oniguruma-to-es'
2
2
 
3
- const lang = Object.freeze({displayName:"Ballerina",fileTypes:["bal"],name:"ballerina",patterns:[{include:"#statements"}],repository:{"access-modifier":{patterns:[{match:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(p(?:ublic|rivate))(?![_\$\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))/dgv,name:"storage.modifier.ballerina keyword.other.ballerina"}]},annotationAttachment:{patterns:[{captures:{"1":{name:"punctuation.decorator.ballerina"},"2":{name:"support.type.ballerina"},"3":{name:"punctuation.decorator.ballerina"},"4":{name:"support.type.ballerina"}},match:/(@)([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\p{space}*(:?)\p{space}*((?:[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)?)/dgv}]},annotationDefinition:{patterns:[{begin:/\bannotation\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/;/dgv,patterns:[{include:"#code"}]}]},"array-literal":{begin:/\p{space}*(\[)/dgv,beginCaptures:{"1":{name:"meta.brace.square.ballerina"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.ballerina"}},name:"meta.array.literal.ballerina",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},booleans:{patterns:[{match:/\b(true|false)\b/dgv,name:"constant.language.boolean.ballerina"}]},butClause:{patterns:[{begin:/=>/dgv,beginCaptures:{"0":{name:"meta.arrow.ballerina storage.type.function.arrow.ballerina"}},end:/,|(?=\})/dgv,patterns:[{include:"#code"}]}]},butExp:{patterns:[{begin:/\bbut\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},patterns:[{include:"#butExpBody"},{include:"#comment"}]}]},butExpBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},patterns:[{include:"#parameter"},{include:"#butClause"},{include:"#comment"}]}]},call:{patterns:[{match:/'?([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\p{space}*(?=\()/dgv,name:"entity.name.function.ballerina"}]},callableUnitBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#workerDef"},{include:"#service-decl"},{include:"#objectDec"},{include:"#function-defn"},{include:"#forkStatement"},{include:"#code"}]}]},"class-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},name:"meta.class.body.ballerina",patterns:[{include:"#comment"},{include:"#mdDocumentation"},{include:"#function-defn"},{include:"#var-expr"},{include:"#variable-initializer"},{include:"#access-modifier"},{include:"#keywords"},{begin:/(?<=:)\p{space}*/dgv,end:/(?=[\p{space}\;\)\,\}\]\:\-\+]|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)/dgv},{include:"#decl-block"},{include:"#expression"},{include:"#punctuation-comma"},{include:"#punctuation-semicolon"}]},"class-defn":{begin:/(\p{space}+)(class\b)|^class\b(?=\p{space}+|\/[\/\*])/dgv,beginCaptures:{"0":{name:"storage.type.class.ballerina keyword.other.ballerina"}},end:/(?<=\})/dgv,name:"meta.class.ballerina",patterns:[{include:"#keywords"},{captures:{"0":{name:"entity.name.type.class.ballerina"}},match:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv},{include:"#class-body"}]},code:{patterns:[{include:"#booleans"},{include:"#matchStatement"},{include:"#butExp"},{include:"#xml"},{include:"#stringTemplate"},{include:"#keywords"},{include:"#strings"},{include:"#comment"},{include:"#mdDocumentation"},{include:"#annotationAttachment"},{include:"#numbers"},{include:"#maps"},{include:"#paranthesised"},{include:"#paranthesisedBracket"},{include:"#regex"}]},comment:{patterns:[{match:/\/\/[^\n]*/dgv,name:"comment.ballerina"}]},constrainType:{patterns:[{begin:/</dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.ballerina"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.ballerina"}},patterns:[{include:"#comment"},{include:"#constrainType"},{match:/\b([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\b/dgv,name:"storage.type.ballerina"}]}]},"control-statement":{patterns:[{begin:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_\$\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))/dgv,beginCaptures:{"0":{name:"keyword.control.flow.ballerina"}},end:/(?=[\;\}]|(?=\n?$)|;|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)/dgv,patterns:[{include:"#expression"}]},{include:"#for-loop"},{include:"#if-statement"},{match:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_\$\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))/dgv,name:"keyword.control.conditional.ballerina"}]},"decl-block":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/(?=\} external;)|(\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},name:"meta.block.ballerina",patterns:[{include:"#statements"},{include:"#mdDocumentation"}]},declaration:{patterns:[{include:"#import-declaration"},{include:"#var-expr"},{include:"#typeDefinition"},{include:"#function-defn"},{include:"#service-decl"},{include:"#class-defn"},{include:"#enum-decl"},{include:"#source"},{include:"#keywords"}]},defaultValue:{patterns:[{begin:/[\=\:]/dgv,beginCaptures:{"0":{name:"keyword.operator.ballerina"}},end:/(?=[\,\)])/dgv,patterns:[{include:"#code"}]}]},defaultWithParentheses:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}}}]},documentationBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},patterns:[{captures:{"1":{name:"keyword.other.ballerina.documentation"},"2":{name:"keyword.other.ballerina.documentation"},"3":{name:"variable.parameter.ballerina.documentation"},"4":{name:"keyword.other.ballerina.documentation"}},match:/([PRTFV])(\{\{)([^\n]*)(\}\})/dgv},{begin:/```/dgv,end:/```/dgv,name:"comment.block.code.ballerina.documentation"},{begin:/``/dgv,end:/``/dgv,name:"comment.block.code.ballerina.documentation"},{begin:/`/dgv,end:/`/dgv,name:"comment.block.code.ballerina.documentation"},{match:/[^\n]/dgv,name:"comment.block.ballerina.documentation"}]}]},documentationDef:{patterns:[{begin:/\bd(?:ocumentation|eprecated)\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"delimiter.curly"}},patterns:[{include:"#documentationBody"},{include:"#comment"}]}]},"enum-decl":{begin:/(?:\b(const)\p{space}+)?\b(enum)\p{space}+([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"1":{name:"storage.modifier.ballerina"},"2":{name:"keyword.other.ballerina"},"3":{name:"entity.name.type.enum.ballerina"}},end:/(?<=\})/dgv,name:"meta.enum.declaration.ballerina",patterns:[{include:"#comment"},{include:"#mdDocumentation"},{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#comment"},{include:"#mdDocumentation"},{begin:/([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"0":{name:"variable.other.enummember.ballerina"}},end:/(?=[\,\}]|(?=\n?$))/dgv,patterns:[{include:"#comment"},{include:"#variable-initializer"}]},{begin:/(?=(('([^'\\]|\\[^\n])*')|("([^"\\]|\\[^\n])*")|(`([^\`\\]|\\[^\n])*`)|(\[([^\[\]]|\[[^\[\]]*\])+\])))/dgv,end:/(?=[\,\}]|(?=\n?$))/dgv,patterns:[{include:"#string"},{include:"#array-literal"},{include:"#comment"},{include:"#variable-initializer"}]},{include:"#punctuation-comma"}]}]},errorDestructure:{patterns:[{begin:/error/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/(?==>)/dgv,patterns:[{include:"#code"}]}]},expression:{patterns:[{include:"#keywords"},{include:"#expressionWithoutIdentifiers"},{include:"#identifiers"},{include:"#regex"}]},"expression-operators":{patterns:[{match:/\*=|(?<!\()\/=|%=|\+=|-=/dgv,name:"keyword.operator.assignment.compound.ballerina"},{match:/&=|\^=|<<=|>>=|>>>=|\|=/dgv,name:"keyword.operator.assignment.compound.bitwise.ballerina"},{match:/<<|>>>|>>/dgv,name:"keyword.operator.bitwise.shift.ballerina"},{match:/(?:==|!=)(?:=|)/dgv,name:"keyword.operator.comparison.ballerina"},{match:/<=|>=|<>|[\<\>]/dgv,name:"keyword.operator.relational.ballerina"},{captures:{"1":{name:"keyword.operator.logical.ballerina"},"2":{name:"keyword.operator.assignment.compound.ballerina"},"3":{name:"keyword.operator.arithmetic.ballerina"}},match:/(?<=[_\$\p{Alpha}\p{Nd}])(!)\p{space}*(?:(\/=)|(\/)(?![\/\*]))/dgv},{match:/!|&&|\|\||\?\?/dgv,name:"keyword.operator.logical.ballerina"},{match:/[\&\~\^\|]/dgv,name:"keyword.operator.bitwise.ballerina"},{match:/=/dgv,name:"keyword.operator.assignment.ballerina"},{match:/--/dgv,name:"keyword.operator.decrement.ballerina"},{match:/\+\+/dgv,name:"keyword.operator.increment.ballerina"},{match:/[\%\*\/\-\+]/dgv,name:"keyword.operator.arithmetic.ballerina"}]},expressionWithoutIdentifiers:{patterns:[{include:"#xml"},{include:"#string"},{include:"#stringTemplate"},{include:"#comment"},{include:"#object-literal"},{include:"#ternary-expression"},{include:"#expression-operators"},{include:"#literal"},{include:"#paranthesised"},{include:"#regex"}]},"flags-on-off":{name:"meta.flags.regexp.ballerina",patterns:[{begin:/(\??)([imsx]*)(-?)([imsx]*)(:)/dgv,beginCaptures:{"1":{name:"punctuation.other.non-capturing-group-begin.regexp.ballerina"},"2":{name:"keyword.other.non-capturing-group.flags-on.regexp.ballerina"},"3":{name:"punctuation.other.non-capturing-group.off.regexp.ballerina"},"4":{name:"keyword.other.non-capturing-group.flags-off.regexp.ballerina"},"5":{name:"punctuation.other.non-capturing-group-end.regexp.ballerina"}},end:/()/dgv,name:"constant.other.flag.regexp.ballerina",patterns:[{include:"#regexp"},{include:"#template-substitution-element"}]}]},"for-loop":{begin:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))foreach\p{space}*/dgv,beginCaptures:{"0":{name:"keyword.control.loop.ballerina"},"1":{name:"support.type.primitive.ballerina"}},end:/(?=\{)/dgv,patterns:[{match:/\bin\b/dgv,name:"keyword.other.ballerina"},{include:"#identifiers"},{include:"#comment"},{include:"#var-expr"},{include:"#expression"}]},forkBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/(?=\})/dgv,patterns:[{include:"#workerDef"}]}]},forkStatement:{patterns:[{begin:/\bfork\b/dgv,beginCaptures:{"0":{name:"keyword.control.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#forkBody"}]}]},"function-body":{patterns:[{include:"#comment"},{include:"#functionParameters"},{include:"#decl-block"},{begin:/=>/dgv,beginCaptures:{"0":{name:"meta.arrow.ballerina storage.type.function.arrow.ballerina"}},end:/(?=;)|(?=,)|(?=)(?=\);)/dgv,name:"meta.block.ballerina",patterns:[{include:"#statements"},{include:"#punctuation-comma"}]},{match:/\*/dgv,name:"keyword.generator.asterisk.ballerina"}]},"function-defn":{begin:/(?:(p(?:ublic|rivate))\p{space}+)?(function\b)/dgv,beginCaptures:{"1":{name:"keyword.other.ballerina"},"2":{name:"keyword.other.ballerina"}},end:/(?<=;)|(?<=\})|(?<=,)|(?=)(?=\);)/dgv,name:"meta.function.ballerina",patterns:[{match:/\bexternal\b/dgv,name:"keyword.ballerina"},{include:"#stringTemplate"},{include:"#annotationAttachment"},{include:"#functionReturns"},{include:"#functionName"},{include:"#functionParameters"},{include:"#punctuation-semicolon"},{include:"#function-body"},{include:"#regex"}]},"function-parameters-body":{patterns:[{include:"#comment"},{include:"#numbers"},{include:"#string"},{include:"#annotationAttachment"},{include:"#recordLiteral"},{include:"#keywords"},{include:"#parameter-name"},{include:"#array-literal"},{include:"#variable-initializer"},{include:"#identifiers"},{include:"#regex"},{match:/,/dgv,name:"punctuation.separator.parameter.ballerina"}]},functionName:{patterns:[{match:/\bfunction\b/dgv,name:"keyword.other.ballerina"},{include:"#type-primitive"},{include:"#self-literal"},{include:"#string"},{captures:{"2":{name:"variable.language.this.ballerina"},"3":{name:"keyword.other.ballerina"},"4":{name:"support.type.primitive.ballerina"},"5":{name:"storage.type.ballerina"},"6":{name:"meta.definition.function.ballerina entity.name.function.ballerina"}},match:/\p{space}+(\b(self)|\b(is|new|isolated|null|function|in)\b|(string|int|boolean|float|byte|decimal|json|xml|anydata)\b|\b(readonly|error|map)\b|([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*))/dgv}]},functionParameters:{begin:/[\(\[]/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.ballerina"}},end:/[\)\]]/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.ballerina"}},name:"meta.parameters.ballerina",patterns:[{include:"#function-parameters-body"}]},functionReturns:{begin:/\p{space}*(returns)\p{space}*/dgv,beginCaptures:{"1":{name:"keyword.other.ballerina"}},end:/(?==>)|(=)|(?=\{)|(\))|(?=;)/dgv,endCaptures:{"1":{name:"keyword.operator.ballerina"}},name:"meta.type.function.return.ballerina",patterns:[{include:"#comment"},{include:"#string"},{include:"#numbers"},{include:"#keywords"},{include:"#type-primitive"},{captures:{"1":{name:"support.type.primitive.ballerina"}},match:/\p{space}*\b(var)(?=\p{space}+|[\[\?])/dgv},{match:/\|/dgv,name:"keyword.operator.ballerina"},{match:/\?/dgv,name:"keyword.operator.optional.ballerina"},{include:"#type-annotation"},{include:"#type-tuple"},{include:"#keywords"},{match:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,name:"variable.other.readwrite.ballerina"}]},functionType:{patterns:[{begin:/\bfunction\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/(?=,)|(?=\|)|(?=:)|(?==>)|(?=\))|(?=\])/dgv,patterns:[{include:"#comment"},{include:"#functionTypeParamList"},{include:"#functionTypeReturns"}]}]},functionTypeParamList:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"delimiter.parenthesis"}},end:/\)/dgv,endCaptures:{"0":{name:"delimiter.parenthesis"}},patterns:[{match:/public/dgv,name:"keyword"},{include:"#annotationAttachment"},{include:"#recordLiteral"},{include:"#record"},{include:"#objectDec"},{include:"#functionType"},{include:"#constrainType"},{include:"#parameterTuple"},{include:"#functionTypeType"},{include:"#comment"}]}]},functionTypeReturns:{patterns:[{begin:/\breturns\b/dgv,beginCaptures:{"0":{name:"keyword"}},end:/(?=,)|\||(?=\])|(?=\))/dgv,patterns:[{include:"#functionTypeReturnsParameter"},{include:"#comment"}]}]},functionTypeReturnsParameter:{patterns:[{begin:/((?=record|object|function)|[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/(?=,)|[\|\:]|(?==>)|(?=\))|(?=\])/dgv,patterns:[{include:"#record"},{include:"#objectDec"},{include:"#functionType"},{include:"#constrainType"},{include:"#defaultValue"},{include:"#comment"},{include:"#parameterTuple"},{match:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,name:"default.variable.parameter.ballerina"}]}]},functionTypeType:{patterns:[{begin:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/(?=,)|\||(?=\])|(?=\))/dgv}]},identifiers:{patterns:[{captures:{"1":{name:"punctuation.accessor.ballerina"},"2":{name:"punctuation.accessor.optional.ballerina"},"3":{name:"entity.name.function.ballerina"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?:(\\.)|(\\?\\.(?!\\p{space}*\\p{Nd})))\\p{space}*)?([_\\$\\p{Alpha}][_\\$\\p{Alpha}\\p{Nd}]*)(?=\\p{space}*=\\p{space}*((((function\\p{space}*[\\(\\<\\*])|(function\\p{space}+)|([_\\$\\p{Alpha}][_\\$\\p{Alpha}\\p{Nd}]*\\p{space}*=>)))|((((<\\p{space}*(?=\\n?$))|((<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*((([\\{\\[]\\p{space}*)?(?=\\n?$))|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\p{space}*((:\\p{space}*\\{?(?=\\n?$))|((\\p{space}*([^\\<\\>\\(\\)\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\p{space}*)?=\\p{space}*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\p{space}*((:\\p{space}*\\[?(?=\\n?$))|((\\p{space}*([^\\<\\>\\(\\)\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\p{space}*)?=\\p{space}*))))))|((<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*((\\)\\p{space}*:)|((\\.\\.\\.\\p{space}*)?[_\\$\\p{Alpha}][_\\$\\p{Alpha}\\p{Nd}]*\\p{space}*:)))|((<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*(([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\p{space}*[_\\$\\p{Alpha}]))([^\\(\\)'\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|('([^'\\\\]|\\\\[^\\n])*')|(\"([^\"\\\\]|\\\\[^\\n])*\")|(`([^\\`\\\\]|\\\\[^\\n])*`))*)?\\)(\\p{space}*:\\p{space}*([^\\<\\>\\(\\)\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)?\\p{space}*=>)))))","dgv",{"lazyCompile":true})},{captures:{"1":{name:"punctuation.accessor.ballerina"},"2":{name:"punctuation.accessor.optional.ballerina"},"3":{name:"entity.name.function.ballerina"}},match:/(?:(\.)|(\?\.(?!\p{space}*\p{Nd})))\p{space}*(#?[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\p{space}*(?=\()/dgv},{captures:{"1":{name:"punctuation.accessor.ballerina"},"2":{name:"punctuation.accessor.optional.ballerina"},"3":{name:"variable.other.property.ballerina"}},match:/(?:(\.)|(\?\.(?!\p{space}*\p{Nd})))\p{space}*(#?[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv},{include:"#type-primitive"},{include:"#self-literal"},{match:/\b(check|foreach|if|checkpanic)\b/dgv,name:"keyword.control.ballerina"},{include:"#call"},{match:/\b(var)\b/dgv,name:"support.type.primitive.ballerina"},{captures:{"1":{name:"variable.other.readwrite.ballerina"},"3":{name:"punctuation.accessor.ballerina"},"4":{name:"entity.name.function.ballerina"},"5":{name:"punctuation.definition.parameters.begin.ballerina"},"6":{name:"punctuation.definition.parameters.end.ballerina"}},match:/([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)((\.)([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)(\()(\)))?/dgv},{match:/(')([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,name:"variable.other.property.ballerina"},{include:"#type-annotation"}]},"if-statement":{patterns:[{begin:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(?=\bif\b\p{space}*(?!\{))/dgv,end:/(?<=\})/dgv,patterns:[{include:"#comment"},{begin:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(if)\p{space}*(\()?/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.ballerina"},"2":{name:"meta.brace.round.ballerina"}},end:/(\))|(?=\{)/dgv,endCaptures:{"1":{name:"meta.brace.round.ballerina"}},patterns:[{include:"#decl-block"},{include:"#keywords"},{include:"#identifiers"},{include:"#type-primitive"},{include:"#xml"},{include:"#string"},{include:"#stringTemplate"},{include:"#comment"},{include:"#ternary-expression"},{include:"#expression-operators"},{include:"#literal"},{include:"#paranthesised"},{include:"#regex"}]},{begin:/(?<=\))(?=[\p{space}\=])/dgv,end:/(?=\{)/dgv,patterns:[{include:"#literal"},{include:"#keywords"}]},{include:"#decl-block"}]}]},"import-clause":{patterns:[{include:"#comment"},{captures:{"1":{name:"keyword.control.default.ballerina"},"3":{name:"variable.other.readwrite.ballerina meta.import.module.ballerina"},"5":{name:"keyword.control.default.ballerina"},"6":{name:"variable.other.readwrite.alias.ballerina"}},match:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(?:(\bdefault)|(\*)|(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*))/dgv},{match:/([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,name:"variable.other.readwrite.alias.ballerina"}]},"import-declaration":{begin:/\bimport\b/dgv,beginCaptures:{"0":{name:"keyword.control.import.ballerina"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.statement.ballerina"}},name:"meta.import.ballerina",patterns:[{match:/(')([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,name:"variable.other.property.ballerina"},{include:"#keywords"},{include:"#comment"},{include:"#import-clause"},{include:"#punctuation-accessor"}]},keywords:{patterns:[{match:/\b(fork|join|while|returns|transaction|transactional|retry|commit|rollback|typeof|enum|wait|match)\b/dgv,name:"keyword.control.ballerina"},{match:/\b(return|break|continue|check|checkpanic|panic|trap|from|where)\b/dgv,name:"keyword.control.flow.ballerina"},{match:/\b(public|private|external|return|record|object|remote|abstract|client|true|false|fail|import|version)\b/dgv,name:"keyword.other.ballerina"},{match:/\b(as|on|function|resource|listener|const|final|is|null|lock|annotation|source|worker|parameter|field|isolated|in)\b/dgv,name:"keyword.other.ballerina"},{match:/\b(xmlns|table|key|let|new|select|start|flush|default|do|base16|base64|conflict)\b/dgv,name:"keyword.other.ballerina"},{match:/\b(limit|outer|equals|order|by|ascending|descending|class|configurable|variable|module|service|group|collect)\b/dgv,name:"keyword.other.ballerina"},{match:/(=>)/dgv,name:"meta.arrow.ballerina storage.type.function.arrow.ballerina"},{match:/([\!\%\+\-]|~=|===|==|=|!=|!==|[\<\>\&\|]|\?:|\.\.\.|<=|>=|&&|\|\||~|>>|>>>)/dgv,name:"keyword.operator.ballerina"},{include:"#types"},{include:"#self-literal"},{include:"#type-primitive"}]},literal:{patterns:[{include:"#booleans"},{include:"#numbers"},{include:"#strings"},{include:"#maps"},{include:"#self-literal"},{include:"#array-literal"}]},maps:{patterns:[{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#code"}]}]},matchBindingPattern:{patterns:[{begin:/var/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/(?==>)|,/dgv,patterns:[{include:"#errorDestructure"},{include:"#code"},{match:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,name:"variable.parameter.ballerina"}]}]},matchStatement:{patterns:[{begin:/\bmatch\b/dgv,beginCaptures:{"0":{name:"keyword.control.ballerina"}},end:/\}/dgv,patterns:[{include:"#matchStatementBody"},{include:"#comment"},{include:"#code"}]}]},matchStatementBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},patterns:[{include:"#literal"},{include:"#matchBindingPattern"},{include:"#matchStatementPatternClause"},{include:"#comment"},{include:"#code"}]}]},matchStatementPatternClause:{patterns:[{begin:/=>/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/((\})|[\;\,])/dgv,patterns:[{include:"#callableUnitBody"},{include:"#code"}]}]},mdDocumentation:{begin:/#/dgv,end:/[\r\n]+/dgv,name:"comment.mddocs.ballerina",patterns:[{include:"#mdDocumentationReturnParamDescription"},{include:"#mdDocumentationParamDescription"}]},mdDocumentationParamDescription:{patterns:[{begin:/(\+\p{space}+)('?[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)(\p{space}*-\p{space}+)/dgv,beginCaptures:{"1":{name:"keyword.operator.ballerina"},"2":{name:"variable.other.readwrite.ballerina"},"3":{name:"keyword.operator.ballerina"}},end:/(?=[^\#\r\n]|# *?\+)/dgv,patterns:[{match:/#[^\n]*/dgv,name:"comment.mddocs.paramdesc.ballerina"}]}]},mdDocumentationReturnParamDescription:{patterns:[{begin:/(#) *?(\+) *(return) *(-)?([^\n]*)/dgv,beginCaptures:{"1":{name:"comment.mddocs.ballerina"},"2":{name:"keyword.ballerina"},"3":{name:"keyword.ballerina"},"4":{name:"keyword.ballerina"},"5":{name:"comment.mddocs.returnparamdesc.ballerina"}},end:/(?=[^\#\r\n]|# *?\+)/dgv,patterns:[{match:/#[^\n]*/dgv,name:"comment.mddocs.returnparamdesc.ballerina"}]}]},multiType:{patterns:[{match:/(?<=\|)([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)|([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)(?=\|)/dgv,name:"storage.type.ballerina"},{match:/\|/dgv,name:"keyword.operator.ballerina"}]},numbers:{patterns:[{match:/\b(?:0[xX][\p{Nd}a-fA-F]+\b|\p{Nd}+(?:\.(?:\p{Nd}+|(?=\n?$)))?)/dgv,name:"constant.numeric.decimal.ballerina"}]},"object-literal":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},name:"meta.objectliteral.ballerina",patterns:[{include:"#object-member"},{include:"#punctuation-comma"}]},"object-member":{patterns:[{include:"#comment"},{include:"#function-defn"},{include:"#literal"},{include:"#keywords"},{include:"#expression"},{begin:/(?=\[)/dgv,end:/(?=:)|((?<=\])(?=\p{space}*[\(\<]))/dgv,name:"meta.object.member.ballerina meta.object-literal.key.ballerina",patterns:[{include:"#comment"}]},{begin:/(?=['"\`])/dgv,end:/(?=:)|((?<=['"\`])(?=((\p{space}*[\(\<\,\}])|(\n*\})|(\p{space}+(as)\p{space}+))))/dgv,name:"meta.object.member.ballerina meta.object-literal.key.ballerina",patterns:[{include:"#comment"},{include:"#string"}]},{begin:/(?=(\b(?<!\$)0[xX]\p{AHex}[_\p{AHex}]*(n)?\b(?!\$))|(\b(?<!\$)0[bB][01][01_]*(n)?\b(?!\$))|(\b(?<!\$)0[oO]?[0-7][0-7_]*(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,end:/(?=:)|(?=\p{space}*([\(\<\,\}])|(\p{space}+as\p{space}+))/dgv,name:"meta.object.member.ballerina meta.object-literal.key.ballerina",patterns:[{include:"#comment"},{include:"#numbers"}]},{begin:/(?<=[\]'"\`])(?=\p{space}*[\(\<])/dgv,end:/(?=[\}\;\,])|(?<=\})/dgv,name:"meta.method.declaration.ballerina",patterns:[{include:"#function-body"}]},{captures:{"0":{name:"meta.object-literal.key.ballerina"},"1":{name:"constant.numeric.decimal.ballerina"}},match:/(?![_\$\p{Alpha}])(\p{Nd}+)\p{space}*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\p{space}*)*:)/dgv,name:"meta.object.member.ballerina"},{captures:{"0":{name:"meta.object-literal.key.ballerina"},"1":{name:"entity.name.function.ballerina"}},match:/*@__PURE__*/ new EmulatedRegExp("([_\\$\\p{Alpha}][_\\$\\p{Alpha}\\p{Nd}]*)\\p{space}*(?=(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*:(\\p{space}*/\\*([^\\*]|(\\*[^\\/]))*\\*/)*\\p{space}*((((function\\p{space}*[\\(\\<\\*])|(function\\p{space}+)|([_\\$\\p{Alpha}][_\\$\\p{Alpha}\\p{Nd}]*\\p{space}*=>)))|((((<\\p{space}*(?=\\n?$))|((<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*((([\\{\\[]\\p{space}*)?(?=\\n?$))|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\p{space}*((:\\p{space}*\\{?(?=\\n?$))|((\\p{space}*([^\\<\\>\\(\\)\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\p{space}*)?=\\p{space}*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\p{space}*((:\\p{space}*\\[?(?=\\n?$))|((\\p{space}*([^\\<\\>\\(\\)\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\p{space}*)?=\\p{space}*))))))|((<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*((\\)\\p{space}*:)|((\\.\\.\\.\\p{space}*)?[_\\$\\p{Alpha}][_\\$\\p{Alpha}\\p{Nd}]*\\p{space}*:)))|((<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<]|<\\p{space}*([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^\\=\\<\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*(([_\\$\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\p{space}*[_\\$\\p{Alpha}]))([^\\(\\)'\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|('([^'\\\\]|\\\\[^\\n])*')|(\"([^\"\\\\]|\\\\[^\\n])*\")|(`([^\\`\\\\]|\\\\[^\\n])*`))*)?\\)(\\p{space}*:\\p{space}*([^\\<\\>\\(\\)\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)?\\p{space}*=>)))))","dgv",{"lazyCompile":true}),name:"meta.object.member.ballerina"},{captures:{"0":{name:"meta.object-literal.key.ballerina"}},match:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\p{space}*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\p{space}*)*:)/dgv,name:"meta.object.member.ballerina"},{begin:/\.\.\./dgv,beginCaptures:{"0":{name:"keyword.operator.spread.ballerina"}},end:/(?=[\,\}])/dgv,name:"meta.object.member.ballerina",patterns:[{include:"#expression"}]},{captures:{"1":{name:"variable.other.readwrite.ballerina"}},match:/([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\p{space}*(?=[\,\}]|(?=\n?$)|\/\/|\/\*)/dgv,name:"meta.object.member.ballerina"},{captures:{"1":{name:"keyword.control.as.ballerina"},"2":{name:"storage.modifier.ballerina"}},match:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(as)\p{space}+(const)(?=\p{space}*([\,\}]|(?=\n?$)))/dgv,name:"meta.object.member.ballerina"},{begin:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(as)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.control.as.ballerina"}},end:/(?=[\;\)\,\}\]\:\?\-\+\>]|\|\||&&|!==|(?=\n?$)|^|((?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(as)\p{space}+))/dgv,name:"meta.object.member.ballerina"},{begin:/(?=[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\p{space}*=)/dgv,end:/(?=[\,\}]|(?=\n?$)|\/\/|\/\*)/dgv,name:"meta.object.member.ballerina",patterns:[{include:"#expression"}]}]},objectDec:{patterns:[{begin:/\bobject\b(?!:)/dgv,beginCaptures:{"0":{name:"keyword.other.ballerina"}},end:/(?<=\})/dgv,patterns:[{include:"#decl-block"}]}]},objectInitBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#comment"},{include:"#code"}]}]},objectInitParameters:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.ballerina"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.ballerina"}},patterns:[{include:"#code"},{match:/\b([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\b/dgv,name:"variable.parameter.ballerina"}]}]},objectMemberFunctionDec:{patterns:[{begin:/\bfunction\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#functionParameters"},{match:/\breturns\b/dgv,name:"keyword.ballerina"},{include:"#code"}]}]},parameter:{patterns:[{begin:/((?=record|object|function)|([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)(?=\|)|[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/[\,\|\:]|(?==>)|(?=\))|(?=\])/dgv,patterns:[{include:"#parameterWithDescriptor"},{include:"#record"},{include:"#objectDec"},{include:"#functionType"},{include:"#constrainType"},{include:"#defaultValue"},{include:"#comment"},{include:"#parameterTuple"},{match:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,name:"default.variable.parameter.ballerina"}]}]},"parameter-name":{patterns:[{captures:{"1":{name:"support.type.primitive.ballerina"}},match:/\p{space}*\b(var)\p{space}+/dgv},{captures:{"2":{name:"keyword.operator.rest.ballerina"},"3":{name:"support.type.primitive.ballerina"},"4":{name:"keyword.other.ballerina"},"5":{name:"constant.language.boolean.ballerina"},"6":{name:"keyword.control.flow.ballerina"},"7":{name:"storage.type.ballerina"},"8":{name:"variable.parameter.ballerina"},"9":{name:"variable.parameter.ballerina"},"10":{name:"keyword.operator.optional.ballerina"}},match:/(?:(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))\p{space}+)?(?:(\.\.\.)\p{space}*)?(?<![\=\:])(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|(string|int|boolean|float|byte|decimal|json|xml|anydata)|\b(is|new|isolated|null|function|in)\b|\b(true|false)\b|\b(check|foreach|if|checkpanic)\b|\b(readonly|error|map)\b|([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*))(?![_\$\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))\p{space}*(\??)/dgv}]},parameterTuple:{patterns:[{begin:/\[/dgv,end:/(?=,)|(?=\|)|(?=:)|(?==>)|(?=\))/dgv,patterns:[{include:"#record"},{include:"#objectDec"},{include:"#parameterTupleType"},{include:"#parameterTupleEnd"},{include:"#comment"}]}]},parameterTupleEnd:{patterns:[{begin:/\]/dgv,end:/(?=,)|(?=\|)|(?=:)|(?==>)|(?=\))/dgv,patterns:[{include:"#defaultWithParentheses"},{match:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,name:"default.variable.parameter.ballerina"}]}]},parameterTupleType:{patterns:[{begin:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/[\,\|]|(?=\])/dgv}]},parameterWithDescriptor:{patterns:[{begin:/&/dgv,beginCaptures:{"0":{name:"keyword.operator.ballerina"}},end:/(?=,)|(?=\|)|(?=\))/dgv,patterns:[{include:"#parameter"}]}]},parameters:{patterns:[{match:/\p{space}*(return|break|continue|check|checkpanic|panic|trap|from|where)\b/dgv,name:"keyword.control.flow.ballerina"},{match:/\p{space}*(let|select)\b/dgv,name:"keyword.other.ballerina"},{match:/,/dgv,name:"punctuation.separator.parameter.ballerina"}]},paranthesised:{begin:/\(/dgv,beginCaptures:{"0":{name:"meta.brace.round.ballerina"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.ballerina"}},name:"meta.brace.round.block.ballerina",patterns:[{include:"#self-literal"},{include:"#function-defn"},{include:"#decl-block"},{include:"#comment"},{include:"#string"},{include:"#parameters"},{include:"#annotationAttachment"},{include:"#recordLiteral"},{include:"#stringTemplate"},{include:"#parameter-name"},{include:"#variable-initializer"},{include:"#expression"},{include:"#regex"}]},paranthesisedBracket:{patterns:[{begin:/\[/dgv,end:/\]/dgv,patterns:[{include:"#comment"},{include:"#code"}]}]},"punctuation-accessor":{patterns:[{captures:{"1":{name:"punctuation.accessor.ballerina"},"2":{name:"punctuation.accessor.optional.ballerina"}},match:/(?:(\.)|(\?\.(?!\p{space}*\p{Nd})))/dgv}]},"punctuation-comma":{patterns:[{match:/,/dgv,name:"punctuation.separator.comma.ballerina"}]},"punctuation-semicolon":{patterns:[{match:/;/dgv,name:"punctuation.terminator.statement.ballerina"}]},record:{begin:/\brecord\b/dgv,beginCaptures:{"0":{name:"keyword.other.ballerina"}},end:/(?<=\})/dgv,name:"meta.record.ballerina",patterns:[{include:"#recordBody"}]},recordBody:{patterns:[{include:"#decl-block"}]},recordLiteral:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#code"}]}]},regex:{patterns:[{begin:/(\bre)(\p{space}*)(`)/dgv,beginCaptures:{"1":{name:"support.type.primitive.ballerina"},"3":{name:"punctuation.definition.regexp.template.begin.ballerina"}},end:/`/dgv,endCaptures:{"1":{name:"punctuation.definition.regexp.template.end.ballerina"}},name:"regexp.template.ballerina",patterns:[{include:"#template-substitution-element"},{include:"#regexp"}]}]},"regex-character-class":{patterns:[{match:/\\[wWsSdDtrn]|\./dgv,name:"keyword.other.character-class.regexp.ballerina"},{match:/\\[^pPu]/dgv,name:"constant.character.escape.backslash.regexp"}]},"regex-unicode-properties-general-category":{patterns:[{match:/(Lu|Ll|Lt|Lm|Lo|L|Mn|Mc|Me|M|Nd|Nl|No|N|Pc|Pd|Ps|Pe|Pi|Pf|Po|P|Sm|Sc|Sk|So|S|Zs|Zl|Zp|Z|Cf|Cc|Cn|Co|C)/dgv,name:"constant.other.unicode-property-general-category.regexp.ballerina"}]},"regex-unicode-property-key":{patterns:[{begin:/(sc=|gc=)/dgv,beginCaptures:{"1":{name:"keyword.other.unicode-property-key.regexp.ballerina"}},end:/()/dgv,endCaptures:{"1":{name:"punctuation.other.unicode-property.end.regexp.ballerina"}},name:"keyword.other.unicode-property-key.regexp.ballerina",patterns:[{include:"#regex-unicode-properties-general-category"}]}]},regexp:{patterns:[{match:/[\^\$]/dgv,name:"keyword.control.assertion.regexp.ballerina"},{match:/[\?\+\*]|\{(\p{Nd}+,\p{Nd}+|\p{Nd}+,|,\p{Nd}+|\p{Nd}+)\}\??/dgv,name:"keyword.operator.quantifier.regexp.ballerina"},{match:/\|/dgv,name:"keyword.operator.or.regexp.ballerina"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.group.regexp.ballerina"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.group.regexp.ballerina"}},name:"meta.group.assertion.regexp.ballerina",patterns:[{include:"#template-substitution-element"},{include:"#regexp"},{include:"#flags-on-off"},{include:"#unicode-property-escape"}]},{begin:/(\[)(\^)?/dgv,beginCaptures:{"1":{name:"punctuation.definition.character-class.start.regexp.ballerina"},"2":{name:"keyword.operator.negation.regexp.ballerina"}},end:/(\])/dgv,endCaptures:{"1":{name:"punctuation.definition.character-class.end.regexp.ballerina"}},name:"constant.other.character-class.set.regexp.ballerina",patterns:[{captures:{"1":{name:"constant.character.numeric.regexp"},"2":{name:"constant.character.escape.backslash.regexp"},"3":{name:"constant.character.numeric.regexp"},"4":{name:"constant.character.escape.backslash.regexp"}},match:/(?:[^\n]|(\\(?:[0-7]{3}|x\p{AHex}{2}|u\p{AHex}{4}))|(\\[^pPu]))-(?:[^\]\\]|(\\(?:[0-7]{3}|x\p{AHex}{2}|u\p{AHex}{4}))|(\\[^pPu]))/dgv,name:"constant.other.character-class.range.regexp.ballerina"},{include:"#regex-character-class"},{include:"#unicode-values"},{include:"#unicode-property-escape"}]},{include:"#template-substitution-element"},{include:"#regex-character-class"},{include:"#unicode-values"},{include:"#unicode-property-escape"}]},"self-literal":{patterns:[{captures:{"1":{name:"variable.language.this.ballerina"},"2":{name:"punctuation.accessor.ballerina"},"3":{name:"entity.name.function.ballerina"}},match:/(\bself\b)\p{space}*([^\n])\p{space}*([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\p{space}*(?=\()/dgv},{match:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))self\b(?!\$)/dgv,name:"variable.language.this.ballerina"}]},"service-decl":{begin:/\bservice\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/(?=;|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)|(?<=\})|(?<=,)/dgv,name:"meta.service.declaration.ballerina",patterns:[{include:"#class-defn"},{include:"#serviceName"},{include:"#serviceOn"},{include:"#serviceBody"},{include:"#objectDec"}]},serviceBody:{patterns:[{include:"#comment"},{include:"#mdDocumentation"},{include:"#documentationDef"},{include:"#decl-block"}]},serviceName:{patterns:[{include:"#string"},{match:/(\/([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)|"[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*")/dgv,name:"entity.service.path.ballerina"}]},serviceOn:{patterns:[{begin:/on/dgv,beginCaptures:{"0":{name:"keyword.other.ballerina"}},end:/(?=\{)/dgv,patterns:[{include:"#code"}]}]},source:{patterns:[{begin:/(\bsource\b)\p{space}+([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"1":{name:"keyword.other.ballerina"},"2":{name:"variable.other.readwrite.ballerina"}},end:/(?=,)|(?=;)/dgv}]},statements:{patterns:[{include:"#stringTemplate"},{include:"#declaration"},{include:"#control-statement"},{include:"#decl-block"},{include:"#expression"},{include:"#punctuation-semicolon"},{include:"#string"},{include:"#comment"},{include:"#mdDocumentation"},{include:"#keywords"},{include:"#annotationAttachment"},{include:"#regex"}]},string:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.ballerina"}},end:/(")|([^\\\n](?=\n?$))/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.ballerina"},"2":{name:"invalid.illegal.newline.ballerina"}},name:"string.quoted.double.ballerina",patterns:[{include:"#string-character-escape"}]}]},"string-character-escape":{patterns:[{match:/\\(x\p{AHex}{2}|u\p{AHex}{4}|u\{\p{AHex}+\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|[^\n]|(?=\n?$))/dgv,name:"constant.character.escape.ballerina"}]},stringTemplate:{patterns:[{begin:/((string)|([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*))?(`)/dgv,beginCaptures:{"1":{name:"entity.name.function.tagged-template.ballerina"},"2":{name:"support.type.primitive.ballerina"},"4":{name:"punctuation.definition.string.template.begin.ballerina"}},end:/\\?`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.template.end.ballerina"}},name:"string.template.ballerina",patterns:[{include:"#template-substitution-element"},{include:"#string-character-escape"}]}]},strings:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"string.begin.ballerina"}},end:/"/dgv,endCaptures:{"0":{name:"string.end.ballerina"}},patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.ballerina"},{match:/[^\n]/dgv,name:"string"}]}]},"template-substitution-element":{patterns:[{begin:/\$\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.template-expression.begin.ballerina"}},contentName:"meta.embedded.line.ballerina",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.template-expression.end.ballerina"}},name:"meta.template.expression.ballerina",patterns:[{include:"#expression"}]}]},templateVariable:{patterns:[{begin:/\$\{/dgv,beginCaptures:{"0":{name:"constant.character.escape.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"constant.character.escape.ballerina"}},patterns:[{include:"#code"}]}]},"ternary-expression":{begin:/(?!\?\.\p{space}*\P{Nd})(\?)(?!\?)/dgv,beginCaptures:{"1":{name:"keyword.operator.ternary.ballerina"}},end:/\p{space}*/dgv,endCaptures:{"1":{name:"keyword.operator.ternary.ballerina"}},patterns:[{include:"#expression"}]},tupleType:{patterns:[{begin:/\[/dgv,end:/(?=[\]\;])/dgv,patterns:[{include:"#comment"},{include:"#constrainType"},{include:"#paranthesisedBracket"},{match:/\b([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\b/dgv,name:"storage.type.ballerina"}]}]},type:{patterns:[{include:"#comment"},{include:"#string"},{include:"#numbers"},{include:"#type-primitive"},{include:"#type-tuple"}]},"type-annotation":{patterns:[{begin:/(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.type.annotation.ballerina"}},end:/(?<![\:\|\&])((?=(?=\n?$)|^|[\,\)\;\}\]\?\>\=]|\/\/)|(?==[^\>])|((?<=[\}\>\]\)_\$\p{Alpha}])\p{space}*(?=\{)))(\?)?/dgv,name:"meta.type.annotation.ballerina",patterns:[{include:"#booleans"},{include:"#stringTemplate"},{include:"#regex"},{include:"#self-literal"},{include:"#xml"},{include:"#call"},{captures:{"1":{name:"keyword.other.ballerina"},"2":{name:"constant.language.boolean.ballerina"},"3":{name:"keyword.control.ballerina"},"4":{name:"storage.type.ballerina"},"5":{name:"support.type.primitive.ballerina"},"6":{name:"variable.other.readwrite.ballerina"},"8":{name:"punctuation.accessor.ballerina"},"9":{name:"entity.name.function.ballerina"},"10":{name:"punctuation.definition.parameters.begin.ballerina"},"11":{name:"punctuation.definition.parameters.end.ballerina"}},match:/\b(is|new|isolated|null|function|in)\b|\b(true|false)\b|\b(check|foreach|if|checkpanic)\b|\b(readonly|error|map)\b|\b(var)\b|([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)((\.)([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)(\()(\)))?/dgv},{match:/\?/dgv,name:"keyword.operator.optional.ballerina"},{include:"#multiType"},{include:"#type"},{include:"#paranthesised"}]}]},"type-primitive":{patterns:[{match:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(string|int|boolean|float|byte|decimal|json|xml|anydata)(?![_\$\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))/dgv,name:"support.type.primitive.ballerina"}]},"type-tuple":{begin:/\[/dgv,beginCaptures:{"0":{name:"meta.brace.square.ballerina"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.ballerina"}},name:"meta.type.tuple.ballerina",patterns:[{include:"#self-literal"},{include:"#booleans"},{match:/\.\.\./dgv,name:"keyword.operator.rest.ballerina"},{captures:{"1":{name:"entity.name.label.ballerina"},"2":{name:"keyword.operator.optional.ballerina"},"3":{name:"punctuation.separator.label.ballerina"}},match:/(?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\p{space}*(\?)?\p{space}*(:)/dgv},{include:"#identifiers"},{include:"#type"},{include:"#punctuation-comma"}]},typeDefinition:{patterns:[{begin:/(\btype\b)\p{space}+([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"1":{name:"keyword.other.ballerina"},"2":{name:"entity.name.type.ballerina"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.statement.ballerina"}},patterns:[{include:"#functionParameters"},{include:"#functionReturns"},{include:"#mdDocumentation"},{include:"#record"},{include:"#string"},{include:"#keywords"},{include:"#multiType"},{include:"#type-primitive"},{match:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,name:"variable.other.readwrite.ballerina"},{include:"#type-annotation"},{include:"#typeDescription"},{include:"#decl-block"}]}]},typeDescription:{patterns:[{begin:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,end:/(?=;)/dgv,patterns:[{include:"#numbers"},{include:"#decl-block"},{include:"#type-primitive"},{match:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*/dgv,name:"storage.type.ballerina"}]}]},types:{patterns:[{match:/\b(handle|any|future|typedesc)\b/dgv,name:"storage.type.ballerina"},{match:/\b(boolean|int|string|float|decimal|byte|json|xml|anydata)\b/dgv,name:"support.type.primitive.ballerina"},{match:/\b(map|error|never|readonly|distinct)\b/dgv,name:"storage.type.ballerina"},{match:/\b(stream)\b/dgv,name:"storage.type.ballerina"}]},"unicode-property-escape":{patterns:[{begin:/(\\[pP])(\{)/dgv,beginCaptures:{"1":{name:"keyword.other.unicode-property.regexp.ballerina"},"2":{name:"punctuation.other.unicode-property.begin.regexp.ballerina"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.other.unicode-property.end.regexp.ballerina"}},name:"keyword.other.unicode-property.regexp.ballerina",patterns:[{include:"#regex-unicode-properties-general-category"},{include:"#regex-unicode-property-key"}]}]},"unicode-values":{patterns:[{begin:/(\\u)(\{)/dgv,beginCaptures:{"1":{name:"keyword.other.unicode-value.regexp.ballerina"},"2":{name:"punctuation.other.unicode-value.begin.regexp.ballerina"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.other.unicode-value.end.regexp.ballerina"}},name:"keyword.other.unicode-value.ballerina",patterns:[{match:/(\p{AHex}{1,6})/dgv,name:"constant.other.unicode-value.regexp.ballerina"}]}]},"var-expr":{patterns:[{begin:/(?=\b(var))/dgv,beginCaptures:{"0":{name:"storage.modifier.ballerina support.type.primitive.ballerina"}},end:/(?!\b(var))((?=[\;\}]|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)|((?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(?=(if)\p{space}+))|((?<!^string|[^\._\$\p{Alpha}\p{Nd}]string|^int|[^\._\$\p{Alpha}\p{Nd}]int)(?=\p{space}*(?=\n?$))))/dgv,name:"meta.var.expr.ballerina",patterns:[{begin:/\b(var)(?=\p{space}+|[\[\?\|\:])/dgv,beginCaptures:{"0":{name:"support.type.primitive.ballerina"}},end:/(?=\P{space})/dgv},{match:/\|/dgv,name:"keyword.operator.type.annotation.ballerina"},{match:/\bin\b/dgv,name:"keyword.other.ballerina"},{include:"#comment"},{include:"#string"},{include:"#stringTemplate"},{include:"#numbers"},{include:"#multiType"},{include:"#self-literal"},{include:"#var-single-variable"},{include:"#variable-initializer"},{include:"#punctuation-comma"},{include:"#type-annotation"},{include:"#keywords"},{include:"#type-tuple"},{include:"#regex"}]},{include:"#punctuation-comma"},{begin:/(?=\b(const(?!\p{space}+enum\b)))/dgv,end:/(?!\b(const(?!\p{space}+enum\b)))((?=\bannotation\b|[\;\}]|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)|((?<!^string|[^\._\$\p{Alpha}\p{Nd}]string|^int|[^\._\$\p{Alpha}\p{Nd}]int)(?=\p{space}*(?=\n?$))))/dgv,name:"meta.var.expr.ballerina",patterns:[{begin:/\b(const(?!\p{space}+enum\b))\p{space}+/dgv,beginCaptures:{"0":{name:"keyword.other.ballerina"}},end:/(?=\P{space})/dgv},{include:"#comment"},{include:"#string"},{include:"#stringTemplate"},{include:"#var-single-const"},{include:"#variable-initializer"},{include:"#punctuation-comma"},{include:"#type-annotation"}]},{include:"#punctuation-comma"},{begin:/(string|int|boolean|float|byte|decimal|json|xml|anydata)(?=\p{space}+|[\[\?\|\:])/dgv,beginCaptures:{"0":{name:"support.type.primitive.ballerina"}},end:/(?!\b(var))((?=[\;\}]|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)|((?<!^string|[^\._\$\p{Alpha}\p{Nd}]string|^int|[^\._\$\p{Alpha}\p{Nd}]int)(?=\p{space}*(?=\n?$))))/dgv,name:"meta.var.expr.ballerina",patterns:[{include:"#xml"},{begin:/(string|int|boolean|float|byte|decimal|json|xml|anydata)(?=\p{space}+|[\[\?\|\:])/dgv,beginCaptures:{"0":{name:"support.type.primitive.ballerina"}},end:/(?=\P{space})/dgv},{match:/\|/dgv,name:"keyword.operator.type.annotation.ballerina"},{include:"#string"},{include:"#stringTemplate"},{include:"#numbers"},{include:"#multiType"},{include:"#var-single-variable"},{include:"#variable-initializer"},{include:"#punctuation-comma"},{include:"#type-annotation"},{include:"#keywords"},{include:"#type-tuple"},{include:"#regex"}]},{include:"#punctuation-comma"}]},"var-single-const":{patterns:[{name:"meta.var-single-variable.expr.ballerina"},{begin:/\b(var)\p{space}*/dgv,beginCaptures:{"0":{name:"support.type.primitive.ballerina"}},end:/(?=\P{space})/dgv},{include:"#types"},{begin:/([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"1":{name:"meta.definition.variable.ballerina variable.other.constant.ballerina"}},end:/(?=(?=\n?$)|^|[\;\,\=\}]|((?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))\p{space}+))/dgv}]},"var-single-variable":{patterns:[{begin:/((string|int|boolean|float|byte|decimal|json|xml|anydata)|\b(readonly|error|map)\b|([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*))(?=\p{space}+|[\;\>\|])/dgv,beginCaptures:{"2":{name:"support.type.primitive.ballerina"},"3":{name:"storage.type.ballerina"},"4":{name:"meta.definition.variable.ballerina variable.other.readwrite.ballerina"}},end:/(?=(?=\n?$)|^|[\;\,\=\}])/dgv,endCaptures:{"0":{name:"punctuation.terminator.statement.ballerina"}},name:"meta.var-single-variable.expr.ballerina",patterns:[{include:"#call"},{include:"#self-literal"},{include:"#if-statement"},{include:"#string"},{include:"#numbers"},{include:"#keywords"}]},{begin:/([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)\p{space}+(!)?/dgv,beginCaptures:{"1":{name:"meta.definition.variable.ballerina variable.other.readwrite.ballerina"},"2":{name:"keyword.operator.definiteassignment.ballerina"}},end:/(?=(?=\n?$)|^|[\;\,\=\}]|((?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))\p{space}+))/dgv,name:"meta.var-single-variable.expr.ballerina"}]},"variable-initializer":{patterns:[{begin:/(?<![\=\!])(=)(?![\=\>])(?=\p{space}*\P{space})/dgv,beginCaptures:{"1":{name:"keyword.operator.assignment.ballerina"}},end:/(?=(?=\n?$)|[\,\)\;\}\]])/dgv,patterns:[{match:/(')([_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*)/dgv,name:"variable.other.property.ballerina"},{include:"#xml"},{include:"#function-defn"},{include:"#expression"},{include:"#punctuation-accessor"},{include:"#regex"}]},{begin:/(?<![\=\!])(=)(?![\=\>])/dgv,beginCaptures:{"1":{name:"keyword.operator.assignment.ballerina"}},end:/(?=[\,\)\;\}\]]|((?<![_\$\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))\p{space}+))|(?=^\p{space}*(?=\n?$))|(?<=\P{space})(?<!=)(?=\p{space}*(?=\n?$))/dgv,patterns:[{include:"#expression"}]}]},variableDef:{patterns:[{begin:/(?!\+)[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*[ \t]|(?=\()/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*|(?=,)|(?=;)|\.\.\./dgv,patterns:[{include:"#tupleType"},{include:"#constrainType"},{include:"#comment"}]}]},variableDefInline:{patterns:[{begin:/(?=record)|(?=object)/dgv,end:/(?=;)/dgv,patterns:[{include:"#record"},{include:"#objectDec"}]}]},workerBody:{patterns:[{begin:/\{/dgv,end:/(?=\})/dgv,patterns:[{include:"#code"}]}]},workerDef:{patterns:[{begin:/\bworker\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/\}/dgv,patterns:[{include:"#functionReturns"},{include:"#workerBody"}]}]},xml:{patterns:[{begin:/(\bxml)(\p{space}*)(`)/dgv,beginCaptures:{"1":{name:"support.type.primitive.ballerina"},"3":{name:"punctuation.definition.string.template.begin.ballerina"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.template.end.ballerina"}},name:"string.template.ballerina",patterns:[{include:"#xmlTag"},{include:"#xmlComment"},{include:"#templateVariable"},{match:/[^\n]/dgv,name:"string"}]}]},xmlComment:{patterns:[{begin:/<!--/dgv,beginCaptures:{"0":{name:"comment.block.xml.ballerina"}},end:/-->/dgv,endCaptures:{"0":{name:"comment.block.xml.ballerina"}},name:"comment.block.xml.ballerina"}]},xmlDoubleQuotedString:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"string.begin.ballerina"}},end:/"/dgv,endCaptures:{"0":{name:"string.end.ballerina"}},patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.ballerina"},{match:/[^\n]/dgv,name:"string"}]}]},xmlSingleQuotedString:{patterns:[{begin:/'/dgv,beginCaptures:{"0":{name:"string.begin.ballerina"}},end:/'/dgv,endCaptures:{"0":{name:"string.end.ballerina"}},patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.ballerina"},{match:/[^\n]/dgv,name:"string"}]}]},xmlTag:{patterns:[{begin:/(<\/?\??)\p{space}*([\-_a-zA-Z0-9]+)/dgv,beginCaptures:{"1":{name:"punctuation.definition.tag.begin.xml.ballerina"},"2":{name:"entity.name.tag.xml.ballerina"}},end:/\??\/?>/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.xml.ballerina"}},patterns:[{include:"#xmlSingleQuotedString"},{include:"#xmlDoubleQuotedString"},{match:/xmlns/dgv,name:"keyword.other.ballerina"},{match:/([a-zA-Z0-9\-]+)/dgv,name:"entity.other.attribute-name.xml.ballerina"}]}]}},scopeName:"source.ballerina",embeddedLangs:undefined,aliases:undefined})
3
+ const lang = Object.freeze({displayName:"Ballerina",fileTypes:["bal"],name:"ballerina",patterns:[{include:"#statements"}],repository:{"access-modifier":{patterns:[{match:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(p(?:ublic|rivate))(?![\$_\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))/dgv,name:"storage.modifier.ballerina keyword.other.ballerina"}]},annotationAttachment:{patterns:[{captures:{"1":{name:"punctuation.decorator.ballerina"},"2":{name:"support.type.ballerina"},"3":{name:"punctuation.decorator.ballerina"},"4":{name:"support.type.ballerina"}},match:/(@)([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\p{space}*(:?)\p{space}*((?:[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)?)/dgv}]},annotationDefinition:{patterns:[{begin:/\bannotation\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/;/dgv,patterns:[{include:"#code"}]}]},"array-literal":{begin:/\p{space}*(\[)/dgv,beginCaptures:{"1":{name:"meta.brace.square.ballerina"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.ballerina"}},name:"meta.array.literal.ballerina",patterns:[{include:"#expression"},{include:"#punctuation-comma"}]},booleans:{patterns:[{match:/\b(true|false)\b/dgv,name:"constant.language.boolean.ballerina"}]},butClause:{patterns:[{begin:/=>/dgv,beginCaptures:{"0":{name:"meta.arrow.ballerina storage.type.function.arrow.ballerina"}},end:/,|(?=\})/dgv,patterns:[{include:"#code"}]}]},butExp:{patterns:[{begin:/\bbut\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},patterns:[{include:"#butExpBody"},{include:"#comment"}]}]},butExpBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},patterns:[{include:"#parameter"},{include:"#butClause"},{include:"#comment"}]}]},call:{patterns:[{match:/'?([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\p{space}*(?=\()/dgv,name:"entity.name.function.ballerina"}]},callableUnitBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#workerDef"},{include:"#service-decl"},{include:"#objectDec"},{include:"#function-defn"},{include:"#forkStatement"},{include:"#code"}]}]},"class-body":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},name:"meta.class.body.ballerina",patterns:[{include:"#comment"},{include:"#mdDocumentation"},{include:"#function-defn"},{include:"#var-expr"},{include:"#variable-initializer"},{include:"#access-modifier"},{include:"#keywords"},{begin:/(?<=:)\p{space}*/dgv,end:/(?=[\-\]\)\+\,\:\;\}\p{space}]|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)/dgv},{include:"#decl-block"},{include:"#expression"},{include:"#punctuation-comma"},{include:"#punctuation-semicolon"}]},"class-defn":{begin:/(\p{space}+)(class)\b|^class\b(?=\p{space}+|\/[\*\/])/dgv,beginCaptures:{"0":{name:"storage.type.class.ballerina keyword.other.ballerina"}},end:/(?<=\})/dgv,name:"meta.class.ballerina",patterns:[{include:"#keywords"},{captures:{"0":{name:"entity.name.type.class.ballerina"}},match:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv},{include:"#class-body"}]},code:{patterns:[{include:"#booleans"},{include:"#matchStatement"},{include:"#butExp"},{include:"#xml"},{include:"#stringTemplate"},{include:"#keywords"},{include:"#strings"},{include:"#comment"},{include:"#mdDocumentation"},{include:"#annotationAttachment"},{include:"#numbers"},{include:"#maps"},{include:"#paranthesised"},{include:"#paranthesisedBracket"},{include:"#regex"}]},comment:{patterns:[{match:/\/\/[^\n]*/dgv,name:"comment.ballerina"}]},constrainType:{patterns:[{begin:/</dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.ballerina"}},end:/>/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.ballerina"}},patterns:[{include:"#comment"},{include:"#constrainType"},{match:/\b([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\b/dgv,name:"storage.type.ballerina"}]}]},"control-statement":{patterns:[{begin:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(return)(?![\$_\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))/dgv,beginCaptures:{"0":{name:"keyword.control.flow.ballerina"}},end:/(?=[\;\}]|(?=\n?$)|;|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)/dgv,patterns:[{include:"#expression"}]},{include:"#for-loop"},{include:"#if-statement"},{match:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![\$_\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))/dgv,name:"keyword.control.conditional.ballerina"}]},"decl-block":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/(?=\} external;)|(\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},name:"meta.block.ballerina",patterns:[{include:"#statements"},{include:"#mdDocumentation"}]},declaration:{patterns:[{include:"#import-declaration"},{include:"#var-expr"},{include:"#typeDefinition"},{include:"#function-defn"},{include:"#service-decl"},{include:"#class-defn"},{include:"#enum-decl"},{include:"#source"},{include:"#keywords"}]},defaultValue:{patterns:[{begin:/[\:\=]/dgv,beginCaptures:{"0":{name:"keyword.operator.ballerina"}},end:/(?=[\)\,])/dgv,patterns:[{include:"#code"}]}]},defaultWithParentheses:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}}}]},documentationBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},patterns:[{captures:{"1":{name:"keyword.other.ballerina.documentation"},"2":{name:"keyword.other.ballerina.documentation"},"3":{name:"variable.parameter.ballerina.documentation"},"4":{name:"keyword.other.ballerina.documentation"}},match:/([FPRTV])(\{\{)([^\n]*)(\}\})/dgv},{begin:/```/dgv,end:/```/dgv,name:"comment.block.code.ballerina.documentation"},{begin:/``/dgv,end:/``/dgv,name:"comment.block.code.ballerina.documentation"},{begin:/`/dgv,end:/`/dgv,name:"comment.block.code.ballerina.documentation"},{match:/[^\n]/dgv,name:"comment.block.ballerina.documentation"}]}]},documentationDef:{patterns:[{begin:/\bd(?:ocumentation|eprecated)\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"delimiter.curly"}},patterns:[{include:"#documentationBody"},{include:"#comment"}]}]},"enum-decl":{begin:/(?:\b(const)\p{space}+)?\b(enum)\p{space}+([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"1":{name:"storage.modifier.ballerina"},"2":{name:"keyword.other.ballerina"},"3":{name:"entity.name.type.enum.ballerina"}},end:/(?<=\})/dgv,name:"meta.enum.declaration.ballerina",patterns:[{include:"#comment"},{include:"#mdDocumentation"},{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#comment"},{include:"#mdDocumentation"},{begin:/([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"0":{name:"variable.other.enummember.ballerina"}},end:/(?=[\,\}]|(?=\n?$))/dgv,patterns:[{include:"#comment"},{include:"#variable-initializer"}]},{begin:/(?=(('([^'\\]|\\[^\n])*')|("([^"\\]|\\[^\n])*")|(`([^\\\`]|\\[^\n])*`)|(\[([^\]\[]|\[[^\]\[]*\])+\])))/dgv,end:/(?=[\,\}]|(?=\n?$))/dgv,patterns:[{include:"#string"},{include:"#array-literal"},{include:"#comment"},{include:"#variable-initializer"}]},{include:"#punctuation-comma"}]}]},errorDestructure:{patterns:[{begin:/error/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/(?==>)/dgv,patterns:[{include:"#code"}]}]},expression:{patterns:[{include:"#keywords"},{include:"#expressionWithoutIdentifiers"},{include:"#identifiers"},{include:"#regex"}]},"expression-operators":{patterns:[{match:/(?:\*|(?<!\()\/|[\-\%\+])=/dgv,name:"keyword.operator.assignment.compound.ballerina"},{match:/(?:[\&\^]|<<|>>|>>>|\|)=/dgv,name:"keyword.operator.assignment.compound.bitwise.ballerina"},{match:/<<|>>>|>>/dgv,name:"keyword.operator.bitwise.shift.ballerina"},{match:/[\!\=]=(?:=|)/dgv,name:"keyword.operator.comparison.ballerina"},{match:/<=|>=|<>|[\<\>]/dgv,name:"keyword.operator.relational.ballerina"},{captures:{"1":{name:"keyword.operator.logical.ballerina"},"2":{name:"keyword.operator.assignment.compound.ballerina"},"3":{name:"keyword.operator.arithmetic.ballerina"}},match:/(?<=[\$_\p{Alpha}\p{Nd}])(!)\p{space}*(?:(\/=)|(\/)(?![\*\/]))/dgv},{match:/!|&&|\|\||\?\?/dgv,name:"keyword.operator.logical.ballerina"},{match:/[\&\^\|\~]/dgv,name:"keyword.operator.bitwise.ballerina"},{match:/=/dgv,name:"keyword.operator.assignment.ballerina"},{match:/--/dgv,name:"keyword.operator.decrement.ballerina"},{match:/\+\+/dgv,name:"keyword.operator.increment.ballerina"},{match:/[\-\%\*\+\/]/dgv,name:"keyword.operator.arithmetic.ballerina"}]},expressionWithoutIdentifiers:{patterns:[{include:"#xml"},{include:"#string"},{include:"#stringTemplate"},{include:"#comment"},{include:"#object-literal"},{include:"#ternary-expression"},{include:"#expression-operators"},{include:"#literal"},{include:"#paranthesised"},{include:"#regex"}]},"flags-on-off":{name:"meta.flags.regexp.ballerina",patterns:[{begin:/(\??)([imsx]*)(-?)([imsx]*)(:)/dgv,beginCaptures:{"1":{name:"punctuation.other.non-capturing-group-begin.regexp.ballerina"},"2":{name:"keyword.other.non-capturing-group.flags-on.regexp.ballerina"},"3":{name:"punctuation.other.non-capturing-group.off.regexp.ballerina"},"4":{name:"keyword.other.non-capturing-group.flags-off.regexp.ballerina"},"5":{name:"punctuation.other.non-capturing-group-end.regexp.ballerina"}},end:/()/dgv,name:"constant.other.flag.regexp.ballerina",patterns:[{include:"#regexp"},{include:"#template-substitution-element"}]}]},"for-loop":{begin:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))foreach\p{space}*/dgv,beginCaptures:{"0":{name:"keyword.control.loop.ballerina"},"1":{name:"support.type.primitive.ballerina"}},end:/(?=\{)/dgv,patterns:[{match:/\bin\b/dgv,name:"keyword.other.ballerina"},{include:"#identifiers"},{include:"#comment"},{include:"#var-expr"},{include:"#expression"}]},forkBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/(?=\})/dgv,patterns:[{include:"#workerDef"}]}]},forkStatement:{patterns:[{begin:/\bfork\b/dgv,beginCaptures:{"0":{name:"keyword.control.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#forkBody"}]}]},"function-body":{patterns:[{include:"#comment"},{include:"#functionParameters"},{include:"#decl-block"},{begin:/=>/dgv,beginCaptures:{"0":{name:"meta.arrow.ballerina storage.type.function.arrow.ballerina"}},end:/(?=;)|(?=,)|(?=\);)/dgv,name:"meta.block.ballerina",patterns:[{include:"#statements"},{include:"#punctuation-comma"}]},{match:/\*/dgv,name:"keyword.generator.asterisk.ballerina"}]},"function-defn":{begin:/(?:(p(?:ublic|rivate))\p{space}+)?(function)\b/dgv,beginCaptures:{"1":{name:"keyword.other.ballerina"},"2":{name:"keyword.other.ballerina"}},end:/(?<=;)|(?<=\})|(?<=,)|(?=\);)/dgv,name:"meta.function.ballerina",patterns:[{match:/\bexternal\b/dgv,name:"keyword.ballerina"},{include:"#stringTemplate"},{include:"#annotationAttachment"},{include:"#functionReturns"},{include:"#functionName"},{include:"#functionParameters"},{include:"#punctuation-semicolon"},{include:"#function-body"},{include:"#regex"}]},"function-parameters-body":{patterns:[{include:"#comment"},{include:"#numbers"},{include:"#string"},{include:"#annotationAttachment"},{include:"#recordLiteral"},{include:"#keywords"},{include:"#parameter-name"},{include:"#array-literal"},{include:"#variable-initializer"},{include:"#identifiers"},{include:"#regex"},{match:/,/dgv,name:"punctuation.separator.parameter.ballerina"}]},functionName:{patterns:[{match:/\bfunction\b/dgv,name:"keyword.other.ballerina"},{include:"#type-primitive"},{include:"#self-literal"},{include:"#string"},{captures:{"2":{name:"variable.language.this.ballerina"},"3":{name:"keyword.other.ballerina"},"4":{name:"support.type.primitive.ballerina"},"5":{name:"storage.type.ballerina"},"6":{name:"meta.definition.function.ballerina entity.name.function.ballerina"}},match:/\p{space}+(\b(self)|\b(is|new|isolated|null|function|in)\b|(string|int|boolean|float|byte|decimal|json|xml|anydata)\b|\b(readonly|error|map)\b|([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*))/dgv}]},functionParameters:{begin:/[\(\[]/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.ballerina"}},end:/[\]\)]/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.ballerina"}},name:"meta.parameters.ballerina",patterns:[{include:"#function-parameters-body"}]},functionReturns:{begin:/\p{space}*(returns)\p{space}*/dgv,beginCaptures:{"1":{name:"keyword.other.ballerina"}},end:/(?==>)|(=)|(?=\{)|(\))|(?=;)/dgv,endCaptures:{"1":{name:"keyword.operator.ballerina"}},name:"meta.type.function.return.ballerina",patterns:[{include:"#comment"},{include:"#string"},{include:"#numbers"},{include:"#keywords"},{include:"#type-primitive"},{captures:{"1":{name:"support.type.primitive.ballerina"}},match:/\p{space}*\b(var)(?=\p{space}+|[\?\[])/dgv},{match:/\|/dgv,name:"keyword.operator.ballerina"},{match:/\?/dgv,name:"keyword.operator.optional.ballerina"},{include:"#type-annotation"},{include:"#type-tuple"},{include:"#keywords"},{match:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,name:"variable.other.readwrite.ballerina"}]},functionType:{patterns:[{begin:/\bfunction\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/(?=,)|(?=\|)|(?=:)|(?==>)|(?=\))|(?=\])/dgv,patterns:[{include:"#comment"},{include:"#functionTypeParamList"},{include:"#functionTypeReturns"}]}]},functionTypeParamList:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"delimiter.parenthesis"}},end:/\)/dgv,endCaptures:{"0":{name:"delimiter.parenthesis"}},patterns:[{match:/public/dgv,name:"keyword"},{include:"#annotationAttachment"},{include:"#recordLiteral"},{include:"#record"},{include:"#objectDec"},{include:"#functionType"},{include:"#constrainType"},{include:"#parameterTuple"},{include:"#functionTypeType"},{include:"#comment"}]}]},functionTypeReturns:{patterns:[{begin:/\breturns\b/dgv,beginCaptures:{"0":{name:"keyword"}},end:/(?=,)|\||(?=\])|(?=\))/dgv,patterns:[{include:"#functionTypeReturnsParameter"},{include:"#comment"}]}]},functionTypeReturnsParameter:{patterns:[{begin:/((?=record|object|function)|[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/(?=,)|[\:\|]|(?==>)|(?=\))|(?=\])/dgv,patterns:[{include:"#record"},{include:"#objectDec"},{include:"#functionType"},{include:"#constrainType"},{include:"#defaultValue"},{include:"#comment"},{include:"#parameterTuple"},{match:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,name:"default.variable.parameter.ballerina"}]}]},functionTypeType:{patterns:[{begin:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/(?=,)|\||(?=\])|(?=\))/dgv}]},identifiers:{patterns:[{captures:{"1":{name:"punctuation.accessor.ballerina"},"2":{name:"punctuation.accessor.optional.ballerina"},"3":{name:"entity.name.function.ballerina"}},match:/*@__PURE__*/ new EmulatedRegExp("(?:(?:(\\.)|(\\?\\.(?!\\p{space}*\\p{Nd})))\\p{space}*)?([\\$_\\p{Alpha}][\\$_\\p{Alpha}\\p{Nd}]*)(?=\\p{space}*=\\p{space}*((((function\\p{space}*[\\(\\*\\<])|(function\\p{space}+)|([\\$_\\p{Alpha}][\\$_\\p{Alpha}\\p{Nd}]*\\p{space}*=>)))|((((<\\p{space}*)(?=\\n?$)|((<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*((([\\[\\{]\\p{space}*)?)(?=\\n?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\p{space}*((:\\p{space}*\\{?)(?=\\n?$)|((\\p{space}*([^\\(\\)\\<\\>\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\p{space}*)?=\\p{space}*)))|((\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\])\\p{space}*((:\\p{space}*\\[?)(?=\\n?$)|((\\p{space}*([^\\(\\)\\<\\>\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\p{space}*)?=\\p{space}*))))))|((<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*((\\)\\p{space}*:)|((\\.\\.\\.\\p{space}*)?[\\$_\\p{Alpha}][\\$_\\p{Alpha}\\p{Nd}]*\\p{space}*:)))|((<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*(([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\])|(\\.\\.\\.\\p{space}*[\\$_\\p{Alpha}]))([^\"'\\(\\)\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|('([^'\\\\]|\\\\[^\\n])*')|(\"([^\"\\\\]|\\\\[^\\n])*\")|(`([^\\\\\\`]|\\\\[^\\n])*`))*)?\\)(\\p{space}*:\\p{space}*([^\\(\\)\\<\\>\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)?\\p{space}*=>)))))","dgv",{"lazyCompile":true})},{captures:{"1":{name:"punctuation.accessor.ballerina"},"2":{name:"punctuation.accessor.optional.ballerina"},"3":{name:"entity.name.function.ballerina"}},match:/(?:(\.)|(\?\.(?!\p{space}*\p{Nd})))\p{space}*(#?[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\p{space}*(?=\()/dgv},{captures:{"1":{name:"punctuation.accessor.ballerina"},"2":{name:"punctuation.accessor.optional.ballerina"},"3":{name:"variable.other.property.ballerina"}},match:/(?:(\.)|(\?\.(?!\p{space}*\p{Nd})))\p{space}*(#?[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv},{include:"#type-primitive"},{include:"#self-literal"},{match:/\b(check|foreach|if|checkpanic)\b/dgv,name:"keyword.control.ballerina"},{include:"#call"},{match:/\b(var)\b/dgv,name:"support.type.primitive.ballerina"},{captures:{"1":{name:"variable.other.readwrite.ballerina"},"3":{name:"punctuation.accessor.ballerina"},"4":{name:"entity.name.function.ballerina"},"5":{name:"punctuation.definition.parameters.begin.ballerina"},"6":{name:"punctuation.definition.parameters.end.ballerina"}},match:/([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)((\.)([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)(\()(\)))?/dgv},{match:/(')([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,name:"variable.other.property.ballerina"},{include:"#type-annotation"}]},"if-statement":{patterns:[{begin:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(?=\bif\b\p{space}*(?!\{))/dgv,end:/(?<=\})/dgv,patterns:[{include:"#comment"},{begin:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(if)\p{space}*(\()?/dgv,beginCaptures:{"1":{name:"keyword.control.conditional.ballerina"},"2":{name:"meta.brace.round.ballerina"}},end:/(\))|(?=\{)/dgv,endCaptures:{"1":{name:"meta.brace.round.ballerina"}},patterns:[{include:"#decl-block"},{include:"#keywords"},{include:"#identifiers"},{include:"#type-primitive"},{include:"#xml"},{include:"#string"},{include:"#stringTemplate"},{include:"#comment"},{include:"#ternary-expression"},{include:"#expression-operators"},{include:"#literal"},{include:"#paranthesised"},{include:"#regex"}]},{begin:/(?<=\))(?=[\=\p{space}])/dgv,end:/(?=\{)/dgv,patterns:[{include:"#literal"},{include:"#keywords"}]},{include:"#decl-block"}]}]},"import-clause":{patterns:[{include:"#comment"},{captures:{"1":{name:"keyword.control.default.ballerina"},"3":{name:"variable.other.readwrite.ballerina meta.import.module.ballerina"},"5":{name:"keyword.control.default.ballerina"},"6":{name:"variable.other.readwrite.alias.ballerina"}},match:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(?:\b(default)|(\*)|\b([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*))/dgv},{match:/([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,name:"variable.other.readwrite.alias.ballerina"}]},"import-declaration":{begin:/\bimport\b/dgv,beginCaptures:{"0":{name:"keyword.control.import.ballerina"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.statement.ballerina"}},name:"meta.import.ballerina",patterns:[{match:/(')([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,name:"variable.other.property.ballerina"},{include:"#keywords"},{include:"#comment"},{include:"#import-clause"},{include:"#punctuation-accessor"}]},keywords:{patterns:[{match:/\b(fork|join|while|returns|transaction|transactional|retry|commit|rollback|typeof|enum|wait|match)\b/dgv,name:"keyword.control.ballerina"},{match:/\b(return|break|continue|check|checkpanic|panic|trap|from|where)\b/dgv,name:"keyword.control.flow.ballerina"},{match:/\b(public|private|external|return|record|object|remote|abstract|client|true|false|fail|import|version)\b/dgv,name:"keyword.other.ballerina"},{match:/\b(as|on|function|resource|listener|const|final|is|null|lock|annotation|source|worker|parameter|field|isolated|in)\b/dgv,name:"keyword.other.ballerina"},{match:/\b(xmlns|table|key|let|new|select|start|flush|default|do|base16|base64|conflict)\b/dgv,name:"keyword.other.ballerina"},{match:/\b(limit|outer|equals|order|by|ascending|descending|class|configurable|variable|module|service|group|collect)\b/dgv,name:"keyword.other.ballerina"},{match:/(=>)/dgv,name:"meta.arrow.ballerina storage.type.function.arrow.ballerina"},{match:/([\-\!\%\+]|~=|===|==|=|!=|!==|[\&\<\>\|]|\?:|\.\.\.|<=|>=|&&|\|\||~|>>|>>>)/dgv,name:"keyword.operator.ballerina"},{include:"#types"},{include:"#self-literal"},{include:"#type-primitive"}]},literal:{patterns:[{include:"#booleans"},{include:"#numbers"},{include:"#strings"},{include:"#maps"},{include:"#self-literal"},{include:"#array-literal"}]},maps:{patterns:[{begin:/\{/dgv,end:/\}/dgv,patterns:[{include:"#code"}]}]},matchBindingPattern:{patterns:[{begin:/var/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/(?==>)|,/dgv,patterns:[{include:"#errorDestructure"},{include:"#code"},{match:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,name:"variable.parameter.ballerina"}]}]},matchStatement:{patterns:[{begin:/\bmatch\b/dgv,beginCaptures:{"0":{name:"keyword.control.ballerina"}},end:/\}/dgv,patterns:[{include:"#matchStatementBody"},{include:"#comment"},{include:"#code"}]}]},matchStatementBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina.documentation"}},patterns:[{include:"#literal"},{include:"#matchBindingPattern"},{include:"#matchStatementPatternClause"},{include:"#comment"},{include:"#code"}]}]},matchStatementPatternClause:{patterns:[{begin:/=>/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/((\})|[\,\;])/dgv,patterns:[{include:"#callableUnitBody"},{include:"#code"}]}]},mdDocumentation:{begin:/#/dgv,end:/[\n\r]+/dgv,name:"comment.mddocs.ballerina",patterns:[{include:"#mdDocumentationReturnParamDescription"},{include:"#mdDocumentationParamDescription"}]},mdDocumentationParamDescription:{patterns:[{begin:/(\+\p{space}+)('?[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)(\p{space}*-\p{space}+)/dgv,beginCaptures:{"1":{name:"keyword.operator.ballerina"},"2":{name:"variable.other.readwrite.ballerina"},"3":{name:"keyword.operator.ballerina"}},end:/(?=[^\n\r\#]|# *?\+)/dgv,patterns:[{match:/#[^\n]*/dgv,name:"comment.mddocs.paramdesc.ballerina"}]}]},mdDocumentationReturnParamDescription:{patterns:[{begin:/(#) *?(\+) *(return) *(-)?([^\n]*)/dgv,beginCaptures:{"1":{name:"comment.mddocs.ballerina"},"2":{name:"keyword.ballerina"},"3":{name:"keyword.ballerina"},"4":{name:"keyword.ballerina"},"5":{name:"comment.mddocs.returnparamdesc.ballerina"}},end:/(?=[^\n\r\#]|# *?\+)/dgv,patterns:[{match:/#[^\n]*/dgv,name:"comment.mddocs.returnparamdesc.ballerina"}]}]},multiType:{patterns:[{match:/(?<=\|)([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)|([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)(?=\|)/dgv,name:"storage.type.ballerina"},{match:/\|/dgv,name:"keyword.operator.ballerina"}]},numbers:{patterns:[{match:/\b(?:0[Xx][A-Fa-f\p{Nd}]+\b|\p{Nd}+(?:\.(?:\p{Nd}+|(?=\n?$)))?)/dgv,name:"constant.numeric.decimal.ballerina"}]},"object-literal":{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},name:"meta.objectliteral.ballerina",patterns:[{include:"#object-member"},{include:"#punctuation-comma"}]},"object-member":{patterns:[{include:"#comment"},{include:"#function-defn"},{include:"#literal"},{include:"#keywords"},{include:"#expression"},{begin:/(?=\[)/dgv,end:/(?=:)|((?<=\])(?=\p{space}*[\(\<]))/dgv,name:"meta.object.member.ballerina meta.object-literal.key.ballerina",patterns:[{include:"#comment"}]},{begin:/(?=["'\`])/dgv,end:/(?=:)|((?<=["'\`])(?=((\p{space}*[\(\,\<\}])|(\n*\})|(\p{space}+(as)\p{space}+))))/dgv,name:"meta.object.member.ballerina meta.object-literal.key.ballerina",patterns:[{include:"#comment"},{include:"#string"}]},{begin:/(?=\b((?<!\$)0[Xx]\p{AHex}[_\p{AHex}]*(n)?\b(?!\$))|\b((?<!\$)0[Bb][01][01_]*(n)?\b(?!\$))|\b((?<!\$)0[Oo]?[0-7][0-7_]*(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,end:/(?=:)|(?=\p{space}*([\(\,\<\}])|(\p{space}+as\p{space}+))/dgv,name:"meta.object.member.ballerina meta.object-literal.key.ballerina",patterns:[{include:"#comment"},{include:"#numbers"}]},{begin:/(?<=[\]"'\`])(?=\p{space}*[\(\<])/dgv,end:/(?=[\,\;\}])|(?<=\})/dgv,name:"meta.method.declaration.ballerina",patterns:[{include:"#function-body"}]},{captures:{"0":{name:"meta.object-literal.key.ballerina"},"1":{name:"constant.numeric.decimal.ballerina"}},match:/(?![\$_\p{Alpha}])(\p{Nd}+)\p{space}*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\p{space}*)*:)/dgv,name:"meta.object.member.ballerina"},{captures:{"0":{name:"meta.object-literal.key.ballerina"},"1":{name:"entity.name.function.ballerina"}},match:/*@__PURE__*/ new EmulatedRegExp("([\\$_\\p{Alpha}][\\$_\\p{Alpha}\\p{Nd}]*)\\p{space}*(?=(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*:(\\p{space}*/\\*([^\\*]|(\\*[^\\/]))*\\*/)*\\p{space}*((((function\\p{space}*[\\(\\*\\<])|(function\\p{space}+)|([\\$_\\p{Alpha}][\\$_\\p{Alpha}\\p{Nd}]*\\p{space}*=>)))|((((<\\p{space}*)(?=\\n?$)|((<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*((([\\[\\{]\\p{space}*)?)(?=\\n?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\p{space}*((:\\p{space}*\\{?)(?=\\n?$)|((\\p{space}*([^\\(\\)\\<\\>\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\p{space}*)?=\\p{space}*)))|((\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\])\\p{space}*((:\\p{space}*\\[?)(?=\\n?$)|((\\p{space}*([^\\(\\)\\<\\>\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\p{space}*)?=\\p{space}*))))))|((<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*((\\)\\p{space}*:)|((\\.\\.\\.\\p{space}*)?[\\$_\\p{Alpha}][\\$_\\p{Alpha}\\p{Nd}]*\\p{space}*:)))|((<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<]|<\\p{space}*([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\]))([^\\<\\=\\>]|=[^\\<])*>)*>)*>\\p{space}*)?\\(\\p{space}*(/\\*([^\\*]|(\\*[^\\/]))*\\*/\\p{space}*)*(([\\$_\\p{Alpha}]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\]\\[]|(\\[([^\\]\\[]|\\[[^\\]\\[]*\\])*\\]))*\\])|(\\.\\.\\.\\p{space}*[\\$_\\p{Alpha}]))([^\"'\\(\\)\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|('([^'\\\\]|\\\\[^\\n])*')|(\"([^\"\\\\]|\\\\[^\\n])*\")|(`([^\\\\\\`]|\\\\[^\\n])*`))*)?\\)(\\p{space}*:\\p{space}*([^\\(\\)\\<\\>\\{\\}]|<([^\\<\\>]|<([^\\<\\>]|<[^\\<\\>]+>)+>)+>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)?\\p{space}*=>)))))","dgv",{"lazyCompile":true}),name:"meta.object.member.ballerina"},{captures:{"0":{name:"meta.object-literal.key.ballerina"}},match:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\p{space}*(?=(\/\*([^\*]|(\*[^\/]))*\*\/\p{space}*)*:)/dgv,name:"meta.object.member.ballerina"},{begin:/\.\.\./dgv,beginCaptures:{"0":{name:"keyword.operator.spread.ballerina"}},end:/(?=[\,\}])/dgv,name:"meta.object.member.ballerina",patterns:[{include:"#expression"}]},{captures:{"1":{name:"variable.other.readwrite.ballerina"}},match:/([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\p{space}*(?=[\,\}]|(?=\n?$)|\/\/|\/\*)/dgv,name:"meta.object.member.ballerina"},{captures:{"1":{name:"keyword.control.as.ballerina"},"2":{name:"storage.modifier.ballerina"}},match:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(as)\p{space}+(const)(?=\p{space}*([\,\}]|(?=\n?$)))/dgv,name:"meta.object.member.ballerina"},{begin:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(as)\p{space}+/dgv,beginCaptures:{"1":{name:"keyword.control.as.ballerina"}},end:/(?=[\-\]\)\+\,\:\;\>\?\}]|\|\||&&|!==|(?=\n?$)|^|((?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(as)\p{space}+))/dgv,name:"meta.object.member.ballerina"},{begin:/(?=[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\p{space}*=)/dgv,end:/(?=[\,\}]|(?=\n?$)|\/\/|\/\*)/dgv,name:"meta.object.member.ballerina",patterns:[{include:"#expression"}]}]},objectDec:{patterns:[{begin:/\bobject\b(?!:)/dgv,beginCaptures:{"0":{name:"keyword.other.ballerina"}},end:/(?<=\})/dgv,patterns:[{include:"#decl-block"}]}]},objectInitBody:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/(?=\})/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#comment"},{include:"#code"}]}]},objectInitParameters:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.definition.parameters.begin.ballerina"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.definition.parameters.end.ballerina"}},patterns:[{include:"#code"},{match:/\b([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\b/dgv,name:"variable.parameter.ballerina"}]}]},objectMemberFunctionDec:{patterns:[{begin:/\bfunction\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#functionParameters"},{match:/\breturns\b/dgv,name:"keyword.ballerina"},{include:"#code"}]}]},parameter:{patterns:[{begin:/((?=record|object|function)|([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)(?=\|)|[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/[\,\:\|]|(?==>)|(?=\))|(?=\])/dgv,patterns:[{include:"#parameterWithDescriptor"},{include:"#record"},{include:"#objectDec"},{include:"#functionType"},{include:"#constrainType"},{include:"#defaultValue"},{include:"#comment"},{include:"#parameterTuple"},{match:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,name:"default.variable.parameter.ballerina"}]}]},"parameter-name":{patterns:[{captures:{"1":{name:"support.type.primitive.ballerina"}},match:/\p{space}*\b(var)\p{space}+/dgv},{captures:{"2":{name:"keyword.operator.rest.ballerina"},"3":{name:"support.type.primitive.ballerina"},"4":{name:"keyword.other.ballerina"},"5":{name:"constant.language.boolean.ballerina"},"6":{name:"keyword.control.flow.ballerina"},"7":{name:"storage.type.ballerina"},"8":{name:"variable.parameter.ballerina"},"9":{name:"variable.parameter.ballerina"},"10":{name:"keyword.operator.optional.ballerina"}},match:/(?:(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))\p{space}+)?(?:(\.\.\.)\p{space}*)?(?<![\:\=])(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|(string|int|boolean|float|byte|decimal|json|xml|anydata)|\b(is|new|isolated|null|function|in)\b|\b(true|false)\b|\b(check|foreach|if|checkpanic)\b|\b(readonly|error|map)\b|([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*))(?![\$_\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))\p{space}*(\??)/dgv}]},parameterTuple:{patterns:[{begin:/\[/dgv,end:/(?=,)|(?=\|)|(?=:)|(?==>)|(?=\))/dgv,patterns:[{include:"#record"},{include:"#objectDec"},{include:"#parameterTupleType"},{include:"#parameterTupleEnd"},{include:"#comment"}]}]},parameterTupleEnd:{patterns:[{begin:/\]/dgv,end:/(?=,)|(?=\|)|(?=:)|(?==>)|(?=\))/dgv,patterns:[{include:"#defaultWithParentheses"},{match:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,name:"default.variable.parameter.ballerina"}]}]},parameterTupleType:{patterns:[{begin:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/[\,\|]|(?=\])/dgv}]},parameterWithDescriptor:{patterns:[{begin:/&/dgv,beginCaptures:{"0":{name:"keyword.operator.ballerina"}},end:/(?=,)|(?=\|)|(?=\))/dgv,patterns:[{include:"#parameter"}]}]},parameters:{patterns:[{match:/\p{space}*(return|break|continue|check|checkpanic|panic|trap|from|where)\b/dgv,name:"keyword.control.flow.ballerina"},{match:/\p{space}*(let|select)\b/dgv,name:"keyword.other.ballerina"},{match:/,/dgv,name:"punctuation.separator.parameter.ballerina"}]},paranthesised:{begin:/\(/dgv,beginCaptures:{"0":{name:"meta.brace.round.ballerina"}},end:/\)/dgv,endCaptures:{"0":{name:"meta.brace.round.ballerina"}},name:"meta.brace.round.block.ballerina",patterns:[{include:"#self-literal"},{include:"#function-defn"},{include:"#decl-block"},{include:"#comment"},{include:"#string"},{include:"#parameters"},{include:"#annotationAttachment"},{include:"#recordLiteral"},{include:"#stringTemplate"},{include:"#parameter-name"},{include:"#variable-initializer"},{include:"#expression"},{include:"#regex"}]},paranthesisedBracket:{patterns:[{begin:/\[/dgv,end:/\]/dgv,patterns:[{include:"#comment"},{include:"#code"}]}]},"punctuation-accessor":{patterns:[{captures:{"1":{name:"punctuation.accessor.ballerina"},"2":{name:"punctuation.accessor.optional.ballerina"}},match:/(\.)|(\?\.(?!\p{space}*\p{Nd}))/dgv}]},"punctuation-comma":{patterns:[{match:/,/dgv,name:"punctuation.separator.comma.ballerina"}]},"punctuation-semicolon":{patterns:[{match:/;/dgv,name:"punctuation.terminator.statement.ballerina"}]},record:{begin:/\brecord\b/dgv,beginCaptures:{"0":{name:"keyword.other.ballerina"}},end:/(?<=\})/dgv,name:"meta.record.ballerina",patterns:[{include:"#recordBody"}]},recordBody:{patterns:[{include:"#decl-block"}]},recordLiteral:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.block.ballerina"}},patterns:[{include:"#code"}]}]},regex:{patterns:[{begin:/\b(re)(\p{space}*)(`)/dgv,beginCaptures:{"1":{name:"support.type.primitive.ballerina"},"3":{name:"punctuation.definition.regexp.template.begin.ballerina"}},end:/`/dgv,endCaptures:{"1":{name:"punctuation.definition.regexp.template.end.ballerina"}},name:"regexp.template.ballerina",patterns:[{include:"#template-substitution-element"},{include:"#regexp"}]}]},"regex-character-class":{patterns:[{match:/\\[DSWdnrstw]|\./dgv,name:"keyword.other.character-class.regexp.ballerina"},{match:/\\[^Ppu]/dgv,name:"constant.character.escape.backslash.regexp"}]},"regex-unicode-properties-general-category":{patterns:[{match:/(Lu|Ll|Lt|Lm|Lo|L|Mn|Mc|Me|M|Nd|Nl|No|N|Pc|Pd|Ps|Pe|Pi|Pf|Po|P|Sm|Sc|Sk|So|S|Zs|Zl|Zp|Z|Cf|Cc|Cn|Co|C)/dgv,name:"constant.other.unicode-property-general-category.regexp.ballerina"}]},"regex-unicode-property-key":{patterns:[{begin:/([gs]c=)/dgv,beginCaptures:{"1":{name:"keyword.other.unicode-property-key.regexp.ballerina"}},end:/()/dgv,endCaptures:{"1":{name:"punctuation.other.unicode-property.end.regexp.ballerina"}},name:"keyword.other.unicode-property-key.regexp.ballerina",patterns:[{include:"#regex-unicode-properties-general-category"}]}]},regexp:{patterns:[{match:/[\$\^]/dgv,name:"keyword.control.assertion.regexp.ballerina"},{match:/[\*\+\?]|\{(\p{Nd}+,\p{Nd}+|\p{Nd}+,|,\p{Nd}+|\p{Nd}+)\}\??/dgv,name:"keyword.operator.quantifier.regexp.ballerina"},{match:/\|/dgv,name:"keyword.operator.or.regexp.ballerina"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.group.regexp.ballerina"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.group.regexp.ballerina"}},name:"meta.group.assertion.regexp.ballerina",patterns:[{include:"#template-substitution-element"},{include:"#regexp"},{include:"#flags-on-off"},{include:"#unicode-property-escape"}]},{begin:/(\[)(\^)?/dgv,beginCaptures:{"1":{name:"punctuation.definition.character-class.start.regexp.ballerina"},"2":{name:"keyword.operator.negation.regexp.ballerina"}},end:/(\])/dgv,endCaptures:{"1":{name:"punctuation.definition.character-class.end.regexp.ballerina"}},name:"constant.other.character-class.set.regexp.ballerina",patterns:[{captures:{"1":{name:"constant.character.numeric.regexp"},"2":{name:"constant.character.escape.backslash.regexp"},"3":{name:"constant.character.numeric.regexp"},"4":{name:"constant.character.escape.backslash.regexp"}},match:/(?:[^\n]|(\\(?:[0-7]{3}|x\p{AHex}{2}|u\p{AHex}{4}))|(\\[^Ppu]))-(?:[^\]\\]|(\\(?:[0-7]{3}|x\p{AHex}{2}|u\p{AHex}{4}))|(\\[^Ppu]))/dgv,name:"constant.other.character-class.range.regexp.ballerina"},{include:"#regex-character-class"},{include:"#unicode-values"},{include:"#unicode-property-escape"}]},{include:"#template-substitution-element"},{include:"#regex-character-class"},{include:"#unicode-values"},{include:"#unicode-property-escape"}]},"self-literal":{patterns:[{captures:{"1":{name:"variable.language.this.ballerina"},"2":{name:"punctuation.accessor.ballerina"},"3":{name:"entity.name.function.ballerina"}},match:/\b(self)\b\p{space}*([^\n])\p{space}*([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\p{space}*(?=\()/dgv},{match:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))self\b(?!\$)/dgv,name:"variable.language.this.ballerina"}]},"service-decl":{begin:/\bservice\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/(?=;|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)|(?<=\})|(?<=,)/dgv,name:"meta.service.declaration.ballerina",patterns:[{include:"#class-defn"},{include:"#serviceName"},{include:"#serviceOn"},{include:"#serviceBody"},{include:"#objectDec"}]},serviceBody:{patterns:[{include:"#comment"},{include:"#mdDocumentation"},{include:"#documentationDef"},{include:"#decl-block"}]},serviceName:{patterns:[{include:"#string"},{match:/(\/([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)|"[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*")/dgv,name:"entity.service.path.ballerina"}]},serviceOn:{patterns:[{begin:/on/dgv,beginCaptures:{"0":{name:"keyword.other.ballerina"}},end:/(?=\{)/dgv,patterns:[{include:"#code"}]}]},source:{patterns:[{begin:/\b(source)\b\p{space}+([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"1":{name:"keyword.other.ballerina"},"2":{name:"variable.other.readwrite.ballerina"}},end:/(?=,)|(?=;)/dgv}]},statements:{patterns:[{include:"#stringTemplate"},{include:"#declaration"},{include:"#control-statement"},{include:"#decl-block"},{include:"#expression"},{include:"#punctuation-semicolon"},{include:"#string"},{include:"#comment"},{include:"#mdDocumentation"},{include:"#keywords"},{include:"#annotationAttachment"},{include:"#regex"}]},string:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.ballerina"}},end:/(")|([^\n\\])(?=\n?$)/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.ballerina"},"2":{name:"invalid.illegal.newline.ballerina"}},name:"string.quoted.double.ballerina",patterns:[{include:"#string-character-escape"}]}]},"string-character-escape":{patterns:[{match:/\\(x\p{AHex}{2}|u\p{AHex}{4}|u\{\p{AHex}+\}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|[^\n]|(?=\n?$))/dgv,name:"constant.character.escape.ballerina"}]},stringTemplate:{patterns:[{begin:/((string)|([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*))?(`)/dgv,beginCaptures:{"1":{name:"entity.name.function.tagged-template.ballerina"},"2":{name:"support.type.primitive.ballerina"},"4":{name:"punctuation.definition.string.template.begin.ballerina"}},end:/\\?`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.template.end.ballerina"}},name:"string.template.ballerina",patterns:[{include:"#template-substitution-element"},{include:"#string-character-escape"}]}]},strings:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"string.begin.ballerina"}},end:/"/dgv,endCaptures:{"0":{name:"string.end.ballerina"}},patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.ballerina"},{match:/[^\n]/dgv,name:"string"}]}]},"template-substitution-element":{patterns:[{begin:/\$\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.template-expression.begin.ballerina"}},contentName:"meta.embedded.line.ballerina",end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.template-expression.end.ballerina"}},name:"meta.template.expression.ballerina",patterns:[{include:"#expression"}]}]},templateVariable:{patterns:[{begin:/\$\{/dgv,beginCaptures:{"0":{name:"constant.character.escape.ballerina"}},end:/\}/dgv,endCaptures:{"0":{name:"constant.character.escape.ballerina"}},patterns:[{include:"#code"}]}]},"ternary-expression":{begin:/(?!\?\.\p{space}*\P{Nd})(\?)(?!\?)/dgv,beginCaptures:{"1":{name:"keyword.operator.ternary.ballerina"}},end:/\p{space}*/dgv,endCaptures:{"1":{name:"keyword.operator.ternary.ballerina"}},patterns:[{include:"#expression"}]},tupleType:{patterns:[{begin:/\[/dgv,end:/(?=[\]\;])/dgv,patterns:[{include:"#comment"},{include:"#constrainType"},{include:"#paranthesisedBracket"},{match:/\b([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\b/dgv,name:"storage.type.ballerina"}]}]},type:{patterns:[{include:"#comment"},{include:"#string"},{include:"#numbers"},{include:"#type-primitive"},{include:"#type-tuple"}]},"type-annotation":{patterns:[{begin:/(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.type.annotation.ballerina"}},end:/(?<![\&\:\|])((?=(?=\n?$)|^|[\]\)\,\;\=\>\?\}]|\/\/)|(?==[^\>])|((?<=[\]\$\)\>_\}\p{Alpha}])\p{space}*(?=\{)))(\?)?/dgv,name:"meta.type.annotation.ballerina",patterns:[{include:"#booleans"},{include:"#stringTemplate"},{include:"#regex"},{include:"#self-literal"},{include:"#xml"},{include:"#call"},{captures:{"1":{name:"keyword.other.ballerina"},"2":{name:"constant.language.boolean.ballerina"},"3":{name:"keyword.control.ballerina"},"4":{name:"storage.type.ballerina"},"5":{name:"support.type.primitive.ballerina"},"6":{name:"variable.other.readwrite.ballerina"},"8":{name:"punctuation.accessor.ballerina"},"9":{name:"entity.name.function.ballerina"},"10":{name:"punctuation.definition.parameters.begin.ballerina"},"11":{name:"punctuation.definition.parameters.end.ballerina"}},match:/\b(is|new|isolated|null|function|in)\b|\b(true|false)\b|\b(check|foreach|if|checkpanic)\b|\b(readonly|error|map)\b|\b(var)\b|([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)((\.)([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)(\()(\)))?/dgv},{match:/\?/dgv,name:"keyword.operator.optional.ballerina"},{include:"#multiType"},{include:"#type"},{include:"#paranthesised"}]}]},"type-primitive":{patterns:[{match:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(string|int|boolean|float|byte|decimal|json|xml|anydata)(?![\$_\p{Alpha}\p{Nd}])(?:(?=\.\.\.)|(?!\.))/dgv,name:"support.type.primitive.ballerina"}]},"type-tuple":{begin:/\[/dgv,beginCaptures:{"0":{name:"meta.brace.square.ballerina"}},end:/\]/dgv,endCaptures:{"0":{name:"meta.brace.square.ballerina"}},name:"meta.type.tuple.ballerina",patterns:[{include:"#self-literal"},{include:"#booleans"},{match:/\.\.\./dgv,name:"keyword.operator.rest.ballerina"},{captures:{"1":{name:"entity.name.label.ballerina"},"2":{name:"keyword.operator.optional.ballerina"},"3":{name:"punctuation.separator.label.ballerina"}},match:/(?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\p{space}*(\?)?\p{space}*(:)/dgv},{include:"#identifiers"},{include:"#type"},{include:"#punctuation-comma"}]},typeDefinition:{patterns:[{begin:/\b(type)\b\p{space}+([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"1":{name:"keyword.other.ballerina"},"2":{name:"entity.name.type.ballerina"}},end:/;/dgv,endCaptures:{"0":{name:"punctuation.terminator.statement.ballerina"}},patterns:[{include:"#functionParameters"},{include:"#functionReturns"},{include:"#mdDocumentation"},{include:"#record"},{include:"#string"},{include:"#keywords"},{include:"#multiType"},{include:"#type-primitive"},{match:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,name:"variable.other.readwrite.ballerina"},{include:"#type-annotation"},{include:"#typeDescription"},{include:"#decl-block"}]}]},typeDescription:{patterns:[{begin:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,end:/(?=;)/dgv,patterns:[{include:"#numbers"},{include:"#decl-block"},{include:"#type-primitive"},{match:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*/dgv,name:"storage.type.ballerina"}]}]},types:{patterns:[{match:/\b(handle|any|future|typedesc)\b/dgv,name:"storage.type.ballerina"},{match:/\b(boolean|int|string|float|decimal|byte|json|xml|anydata)\b/dgv,name:"support.type.primitive.ballerina"},{match:/\b(map|error|never|readonly|distinct)\b/dgv,name:"storage.type.ballerina"},{match:/\b(stream)\b/dgv,name:"storage.type.ballerina"}]},"unicode-property-escape":{patterns:[{begin:/(\\[Pp])(\{)/dgv,beginCaptures:{"1":{name:"keyword.other.unicode-property.regexp.ballerina"},"2":{name:"punctuation.other.unicode-property.begin.regexp.ballerina"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.other.unicode-property.end.regexp.ballerina"}},name:"keyword.other.unicode-property.regexp.ballerina",patterns:[{include:"#regex-unicode-properties-general-category"},{include:"#regex-unicode-property-key"}]}]},"unicode-values":{patterns:[{begin:/(\\u)(\{)/dgv,beginCaptures:{"1":{name:"keyword.other.unicode-value.regexp.ballerina"},"2":{name:"punctuation.other.unicode-value.begin.regexp.ballerina"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.other.unicode-value.end.regexp.ballerina"}},name:"keyword.other.unicode-value.ballerina",patterns:[{match:/(\p{AHex}{1,6})/dgv,name:"constant.other.unicode-value.regexp.ballerina"}]}]},"var-expr":{patterns:[{begin:/(?=\b(var))/dgv,beginCaptures:{"0":{name:"storage.modifier.ballerina support.type.primitive.ballerina"}},end:/(?!\b(var))((?=[\;\}]|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)|((?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))(?=(if)\p{space}+))|((?<!^string|[^\$\._\p{Alpha}\p{Nd}]string|^int|[^\$\._\p{Alpha}\p{Nd}]int)(?=\p{space}*(?=\n?$))))/dgv,name:"meta.var.expr.ballerina",patterns:[{begin:/\b(var)(?=\p{space}+|[\:\?\[\|])/dgv,beginCaptures:{"0":{name:"support.type.primitive.ballerina"}},end:/(?=\P{space})/dgv},{match:/\|/dgv,name:"keyword.operator.type.annotation.ballerina"},{match:/\bin\b/dgv,name:"keyword.other.ballerina"},{include:"#comment"},{include:"#string"},{include:"#stringTemplate"},{include:"#numbers"},{include:"#multiType"},{include:"#self-literal"},{include:"#var-single-variable"},{include:"#variable-initializer"},{include:"#punctuation-comma"},{include:"#type-annotation"},{include:"#keywords"},{include:"#type-tuple"},{include:"#regex"}]},{include:"#punctuation-comma"},{begin:/(?=\b(const(?!\p{space}+enum\b)))/dgv,end:/(?!\b(const(?!\p{space}+enum\b)))((?=\bannotation\b|[\;\}]|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)|((?<!^string|[^\$\._\p{Alpha}\p{Nd}]string|^int|[^\$\._\p{Alpha}\p{Nd}]int)(?=\p{space}*(?=\n?$))))/dgv,name:"meta.var.expr.ballerina",patterns:[{begin:/\b(const(?!\p{space}+enum\b))\p{space}+/dgv,beginCaptures:{"0":{name:"keyword.other.ballerina"}},end:/(?=\P{space})/dgv},{include:"#comment"},{include:"#string"},{include:"#stringTemplate"},{include:"#var-single-const"},{include:"#variable-initializer"},{include:"#punctuation-comma"},{include:"#type-annotation"}]},{include:"#punctuation-comma"},{begin:/(string|int|boolean|float|byte|decimal|json|xml|anydata)(?=\p{space}+|[\:\?\[\|])/dgv,beginCaptures:{"0":{name:"support.type.primitive.ballerina"}},end:/(?!\b(var))((?=[\;\}]|^\p{space}*(?=\n?$)|^\p{space}*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|service|type|var)\b)|((?<!^string|[^\$\._\p{Alpha}\p{Nd}]string|^int|[^\$\._\p{Alpha}\p{Nd}]int)(?=\p{space}*(?=\n?$))))/dgv,name:"meta.var.expr.ballerina",patterns:[{include:"#xml"},{begin:/(string|int|boolean|float|byte|decimal|json|xml|anydata)(?=\p{space}+|[\:\?\[\|])/dgv,beginCaptures:{"0":{name:"support.type.primitive.ballerina"}},end:/(?=\P{space})/dgv},{match:/\|/dgv,name:"keyword.operator.type.annotation.ballerina"},{include:"#string"},{include:"#stringTemplate"},{include:"#numbers"},{include:"#multiType"},{include:"#var-single-variable"},{include:"#variable-initializer"},{include:"#punctuation-comma"},{include:"#type-annotation"},{include:"#keywords"},{include:"#type-tuple"},{include:"#regex"}]},{include:"#punctuation-comma"}]},"var-single-const":{patterns:[{name:"meta.var-single-variable.expr.ballerina"},{begin:/\b(var)\p{space}*/dgv,beginCaptures:{"0":{name:"support.type.primitive.ballerina"}},end:/(?=\P{space})/dgv},{include:"#types"},{begin:/([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,beginCaptures:{"1":{name:"meta.definition.variable.ballerina variable.other.constant.ballerina"}},end:/(?=(?=\n?$)|^|[\,\;\=\}]|((?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))\p{space}+))/dgv}]},"var-single-variable":{patterns:[{begin:/((string|int|boolean|float|byte|decimal|json|xml|anydata)|\b(readonly|error|map)\b|([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*))(?=\p{space}+|[\;\>\|])/dgv,beginCaptures:{"2":{name:"support.type.primitive.ballerina"},"3":{name:"storage.type.ballerina"},"4":{name:"meta.definition.variable.ballerina variable.other.readwrite.ballerina"}},end:/(?=(?=\n?$)|^|[\,\;\=\}])/dgv,endCaptures:{"0":{name:"punctuation.terminator.statement.ballerina"}},name:"meta.var-single-variable.expr.ballerina",patterns:[{include:"#call"},{include:"#self-literal"},{include:"#if-statement"},{include:"#string"},{include:"#numbers"},{include:"#keywords"}]},{begin:/([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\p{space}+(!)?/dgv,beginCaptures:{"1":{name:"meta.definition.variable.ballerina variable.other.readwrite.ballerina"},"2":{name:"keyword.operator.definiteassignment.ballerina"}},end:/(?=(?=\n?$)|^|[\,\;\=\}]|((?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))\p{space}+))/dgv,name:"meta.var-single-variable.expr.ballerina"}]},"variable-initializer":{patterns:[{begin:/(?<![\!\=])(=)(?![\=\>])(?=\p{space}*\P{space})/dgv,beginCaptures:{"1":{name:"keyword.operator.assignment.ballerina"}},end:/(?=(?=\n?$)|[\]\)\,\;\}])/dgv,patterns:[{match:/(')([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)/dgv,name:"variable.other.property.ballerina"},{include:"#xml"},{include:"#function-defn"},{include:"#expression"},{include:"#punctuation-accessor"},{include:"#regex"}]},{begin:/(?<![\!\=])(=)(?![\=\>])/dgv,beginCaptures:{"1":{name:"keyword.operator.assignment.ballerina"}},end:/(?=[\]\)\,\;\}]|((?<![\$_\p{Alpha}\p{Nd}])(?:(?<=\.\.\.)|(?<!\.))\p{space}+))|(?=^\p{space}*(?=\n?$))|(?<=\P{space})(?<!=)(?=\p{space}*(?=\n?$))/dgv,patterns:[{include:"#expression"}]}]},variableDef:{patterns:[{begin:/(?!\+)[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*[\t ]|(?=\()/dgv,beginCaptures:{"0":{name:"storage.type.ballerina"}},end:/[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*|(?=,)|(?=;)|\.\.\./dgv,patterns:[{include:"#tupleType"},{include:"#constrainType"},{include:"#comment"}]}]},variableDefInline:{patterns:[{begin:/(?=record)|(?=object)/dgv,end:/(?=;)/dgv,patterns:[{include:"#record"},{include:"#objectDec"}]}]},workerBody:{patterns:[{begin:/\{/dgv,end:/(?=\})/dgv,patterns:[{include:"#code"}]}]},workerDef:{patterns:[{begin:/\bworker\b/dgv,beginCaptures:{"0":{name:"keyword.ballerina"}},end:/\}/dgv,patterns:[{include:"#functionReturns"},{include:"#workerBody"}]}]},xml:{patterns:[{begin:/\b(xml)(\p{space}*)(`)/dgv,beginCaptures:{"1":{name:"support.type.primitive.ballerina"},"3":{name:"punctuation.definition.string.template.begin.ballerina"}},end:/`/dgv,endCaptures:{"0":{name:"punctuation.definition.string.template.end.ballerina"}},name:"string.template.ballerina",patterns:[{include:"#xmlTag"},{include:"#xmlComment"},{include:"#templateVariable"},{match:/[^\n]/dgv,name:"string"}]}]},xmlComment:{patterns:[{begin:/<!--/dgv,beginCaptures:{"0":{name:"comment.block.xml.ballerina"}},end:/-->/dgv,endCaptures:{"0":{name:"comment.block.xml.ballerina"}},name:"comment.block.xml.ballerina"}]},xmlDoubleQuotedString:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"string.begin.ballerina"}},end:/"/dgv,endCaptures:{"0":{name:"string.end.ballerina"}},patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.ballerina"},{match:/[^\n]/dgv,name:"string"}]}]},xmlSingleQuotedString:{patterns:[{begin:/'/dgv,beginCaptures:{"0":{name:"string.begin.ballerina"}},end:/'/dgv,endCaptures:{"0":{name:"string.end.ballerina"}},patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.ballerina"},{match:/[^\n]/dgv,name:"string"}]}]},xmlTag:{patterns:[{begin:/(<\/?\??)\p{space}*([\-0-9A-Z_a-z]+)/dgv,beginCaptures:{"1":{name:"punctuation.definition.tag.begin.xml.ballerina"},"2":{name:"entity.name.tag.xml.ballerina"}},end:/\??\/?>/dgv,endCaptures:{"0":{name:"punctuation.definition.tag.end.xml.ballerina"}},patterns:[{include:"#xmlSingleQuotedString"},{include:"#xmlDoubleQuotedString"},{match:/xmlns/dgv,name:"keyword.other.ballerina"},{match:/([\-0-9A-Za-z]+)/dgv,name:"entity.other.attribute-name.xml.ballerina"}]}]}},scopeName:"source.ballerina",embeddedLangs:undefined,aliases:undefined})
4
4
 
5
5
  export default [
6
6
  lang
package/dist/bat.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"Batch File",injections:{"L:meta.block.repeat.batchfile":{patterns:[{include:"#repeatParameter"}]}},name:"bat",patterns:[{include:"#commands"},{include:"#comments"},{include:"#constants"},{include:"#controls"},{include:"#escaped_characters"},{include:"#labels"},{include:"#numbers"},{include:"#operators"},{include:"#parens"},{include:"#strings"},{include:"#variables"}],repository:{command_set:{patterns:[{begin:/(?<=^|[\p{space}\@])SET(?=(?=\n?$)|\p{space})/dgiv,beginCaptures:{"0":{name:"keyword.command.batchfile"}},end:/(?=(?=\n?$)\n|[\&\|\>\<\)])/dgv,patterns:[{include:"#command_set_inside"}]}]},command_set_group:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.group.begin.batchfile"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.batchfile"}},patterns:[{include:"#command_set_inside_arithmetic"}]}]},command_set_inside:{patterns:[{include:"#escaped_characters"},{include:"#variables"},{include:"#numbers"},{include:"#parens"},{include:"#command_set_strings"},{include:"#strings"},{begin:/([^ ][^\=]*)(=)/dgv,beginCaptures:{"1":{name:"variable.other.readwrite.batchfile"},"2":{name:"keyword.operator.assignment.batchfile"}},end:/(?=(?=\n?$)\n|[\&\|\>\<\)])/dgv,patterns:[{include:"#escaped_characters"},{include:"#variables"},{include:"#numbers"},{include:"#parens"},{include:"#strings"}]},{begin:/\p{space}+\/[aA]\p{space}+/dgv,end:/(?=(?=\n?$)\n|[\&\|\>\<\)])/dgv,name:"meta.expression.set.batchfile",patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.batchfile"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.batchfile"}},name:"string.quoted.double.batchfile",patterns:[{include:"#command_set_inside_arithmetic"},{include:"#command_set_group"},{include:"#variables"}]},{include:"#command_set_inside_arithmetic"},{include:"#command_set_group"}]},{begin:/\p{space}+\/[pP]\p{space}+/dgv,end:/(?=(?=\n?$)\n|[\&\|\>\<\)])/dgv,patterns:[{include:"#command_set_strings"},{begin:/([^ ][^\=]*)(=)/dgv,beginCaptures:{"1":{name:"variable.other.readwrite.batchfile"},"2":{name:"keyword.operator.assignment.batchfile"}},end:/(?=(?=\n?$)\n|[\&\|\>\<\)])/dgv,name:"meta.prompt.set.batchfile",patterns:[{include:"#strings"}]}]}]},command_set_inside_arithmetic:{patterns:[{include:"#command_set_operators"},{include:"#numbers"},{match:/,/dgv,name:"punctuation.separator.batchfile"}]},command_set_operators:{patterns:[{captures:{"1":{name:"variable.other.readwrite.batchfile"},"2":{name:"keyword.operator.assignment.augmented.batchfile"}},match:/([^ ]*)(\+=|-=|\*=|\/=|%%=|&=|\|=|\^=|<<=|>>=)/dgv},{match:/[\+\-\/\*]|%%|[\|\&\^]|<<|>>|~/dgv,name:"keyword.operator.arithmetic.batchfile"},{match:/!/dgv,name:"keyword.operator.logical.batchfile"},{captures:{"1":{name:"variable.other.readwrite.batchfile"},"2":{name:"keyword.operator.assignment.batchfile"}},match:/([^ \=]*)(=)/dgv}]},command_set_strings:{patterns:[{begin:/(")\p{space}*([^ ][^\=]*)(=)/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.batchfile"},"2":{name:"variable.other.readwrite.batchfile"},"3":{name:"keyword.operator.assignment.batchfile"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.batchfile"}},name:"string.quoted.double.batchfile",patterns:[{include:"#variables"},{include:"#numbers"},{include:"#escaped_characters"}]}]},commands:{patterns:[{match:/(?<=^|[\p{space}\@])(?:adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|brea|cacls|cd|certreq|certutil|change|chcp|chdir|chglogon|chgport|chgusr|chkdsk|chkntfs|choice|cipher|clip|cls|clscluadmin|cluster|cmd|cmdkey|cmstp|color|comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm|edit|endlocal|eraseesentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract|fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl|hashgen|hep|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile|makecab|manage-bde|mapadmin|md|mkdir|mklink|mmc|mode|more|mount|mountvol|move|mqbup|mqsvc|mqtgsvc|msdt|msg|msiexec|msinfo32|mstsc|nbtstat|net computer|net group|net localgroup|net print|net session|net share|net start|net stop|net use|net user|net view|net|netcfg|netdiag|netdom|netsh|netstat|nfsadmin|nfsshare|nfsstat|nlb|nlbmgr|nltest|nslookup|ntackup|ntcmdprompt|ntdsutil|ntfrsutl|openfiles|pagefileconfig|path|pathping|pause|pbadmin|pentnt|perfmon|ping|pnpunatten|pnputil|popd|powercfg|powershell|powershell_ise|print|prncnfg|prndrvr|prnjobs|prnmngr|prnport|prnqctl|prompt|pubprn|pushd|pushprinterconnections|pwlauncher|qappsrv|qprocess|query|quser|qwinsta|rasdial|rcp|rd|rdpsign|regentc|recover|redircmp|redirusr|reg|regini|regsvr32|relog|ren|rename|rendom|repadmin|repair-bde|replace|reset session|rxec|risetup|rmdir|robocopy|route|rpcinfo|rpcping|rsh|runas|rundll32|rwinsta|sc|schtasks|scp|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|setspn|setx|sfc|sftp|shadow|shift|showmount|shutdown|sort|ssh|ssh-add|ssh-agent|ssh-keygen|ssh-keyscan|start|storrept|subst|sxstrace|ysocmgr|systeminfo|takeown|tapicfg|taskkill|tasklist|tcmsetup|telnet|tftp|time|timeout|title|tlntadmn|tpmvscmgr|tpmvscmgr|tacerpt|tracert|tree|tscon|tsdiscon|tsecimp|tskill|tsprof|type|typeperf|tzutil|uddiconfig|umount|unlodctr|ver|verifier|verif|vol|vssadmin|w32tm|waitfor|wbadmin|wdsutil|wecutil|wevtutil|where|whoami|winnt|winnt32|winpop|winrm|winrs|winsat|wlbs|wmic|wscript|wsl|xcopy)(?=(?=\n?$)|\p{space})/dgiv,name:"keyword.command.batchfile"},{begin:/(?<=^|[\p{space}\@])(echo)(?:(?=(?=\n?$)|[\.\:])|\p{space}+(?:(o(?:n|ff))(?=\p{space}*(?=\n?$)))?)/dgiv,beginCaptures:{"1":{name:"keyword.command.batchfile"},"2":{name:"keyword.other.special-method.batchfile"}},end:/(?=(?=\n?$)\n|[\&\|\>\<\)])/dgv,patterns:[{include:"#escaped_characters"},{include:"#variables"},{include:"#numbers"},{include:"#strings"}]},{captures:{"1":{name:"keyword.command.batchfile"},"2":{name:"keyword.other.special-method.batchfile"}},match:/(?<=^|[\p{space}\@])(setlocal)(?:\p{space}*(?=\n?$)|\p{space}+((?:Enable|Disable)(?:Extensions|DelayedExpansion))(?=\p{space}*(?=\n?$)))/dgiv},{include:"#command_set"}]},comments:{patterns:[{begin:/(?:^|(&))\p{space}*(?=(:[\+\=\,\;\: ]))/dgv,beginCaptures:{"1":{name:"keyword.operator.conditional.batchfile"}},end:/\n/dgv,patterns:[{begin:/(:[\+\=\,\;\: ])/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.batchfile"}},end:/(?=\n)/dgv,name:"comment.line.colon.batchfile"}]},{begin:/(?<=^|[\p{space}\@])(REM)(\.)/dgiv,beginCaptures:{"1":{name:"keyword.command.rem.batchfile"},"2":{name:"punctuation.separator.batchfile"}},end:/(?=(?=\n?$)\n|[\&\|\>\<\)])/dgv,name:"comment.line.rem.batchfile"},{begin:/(?<=^|[\p{space}\@])rem\b/dgiv,beginCaptures:{"0":{name:"keyword.command.rem.batchfile"}},end:/\n/dgv,name:"comment.line.rem.batchfile",patterns:[{match:/[\>\<\|]/dgv,name:"invalid.illegal.unexpected-character.batchfile"}]}]},constants:{patterns:[{match:/\bNUL\b/dgiv,name:"constant.language.batchfile"}]},controls:{patterns:[{match:/(?<=^|\p{space})(?:call|exit(?=(?=\n?$)|\p{space})|goto(?=(?=\n?$)|[\p{space}\:]))/dgiv,name:"keyword.control.statement.batchfile"},{captures:{"1":{name:"keyword.control.conditional.batchfile"},"2":{name:"keyword.operator.logical.batchfile"},"3":{name:"keyword.other.special-method.batchfile"}},match:/(?<=^|\p{space})(if)\p{space}+(?:(not)\p{space}+)?(exist|defined|errorlevel|cmdextversion)(?=\p{space})/dgiv},{match:/(?<=^|\p{space})(?:if|else)(?=(?=\n?$)|\p{space})/dgiv,name:"keyword.control.conditional.batchfile"},{begin:/(?<=^|[\p{space}\(\&\^])for(?=\p{space})/dgiv,beginCaptures:{"0":{name:"keyword.control.repeat.batchfile"}},end:/\n/dgv,name:"meta.block.repeat.batchfile",patterns:[{begin:/(?<=[\p{space}\^])in(?=\p{space})/dgiv,beginCaptures:{"0":{name:"keyword.control.repeat.in.batchfile"}},end:/(?<=[\p{space}\)\^])do(?=\p{space})|\n/dgiv,endCaptures:{"0":{name:"keyword.control.repeat.do.batchfile"}},patterns:[{include:"$self"}]},{include:"$self"}]}]},escaped_characters:{patterns:[{match:/%%|\^\^!|\^(?=[^\n])|\^\n/dgv,name:"constant.character.escape.batchfile"}]},labels:{patterns:[{captures:{"1":{name:"punctuation.separator.batchfile"},"2":{name:"keyword.other.special-method.batchfile"}},match:/(?:^\p{space}*|(?<=call|goto)\p{space}*)(:)([^\+\=\,\;\:\p{space}]\P{space}*)/dgiv}]},numbers:{patterns:[{match:/(?<=^|[\p{space}\=])(0[xX]\p{AHex}*|[\+\-]?\p{Nd}+)(?=(?=\n?$)|[\p{space}\<\>])/dgv,name:"constant.numeric.batchfile"}]},operators:{patterns:[{match:/@(?=\P{space})/dgv,name:"keyword.operator.at.batchfile"},{match:/(?<=\p{space})(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)(?=\p{space})|==/dgiv,name:"keyword.operator.comparison.batchfile"},{match:/(?<=\p{space})(NOT)(?=\p{space})/dgiv,name:"keyword.operator.logical.batchfile"},{match:/(?<!\^)&&?|\|\|/dgv,name:"keyword.operator.conditional.batchfile"},{match:/(?<!\^)\|/dgv,name:"keyword.operator.pipe.batchfile"},{match:/<&?|>[\&\>]?/dgv,name:"keyword.operator.redirection.batchfile"}]},parens:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.group.begin.batchfile"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.batchfile"}},name:"meta.group.batchfile",patterns:[{match:/[\,\;]/dgv,name:"punctuation.separator.batchfile"},{include:"$self"}]}]},repeatParameter:{patterns:[{captures:{"1":{name:"punctuation.definition.variable.batchfile"}},match:/(%%)(?:~[FfDdPpNnXxSsſAaTtZz]*(?:\$[Pp][Aa][Tt][Hh]:)?)?[a-zA-Z]/dgv,name:"variable.parameter.repeat.batchfile"}]},strings:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.batchfile"}},end:/(")|(\n)/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.batchfile"},"2":{name:"invalid.illegal.newline.batchfile"}},name:"string.quoted.double.batchfile",patterns:[{match:/%%/dgv,name:"constant.character.escape.batchfile"},{include:"#variables"}]}]},variable:{patterns:[{begin:/%(?=[^\%]+%)/dgv,beginCaptures:{"0":{name:"punctuation.definition.variable.begin.batchfile"}},end:/(%)|\n/dgv,endCaptures:{"1":{name:"punctuation.definition.variable.end.batchfile"}},name:"variable.other.readwrite.batchfile",patterns:[{begin:/:~/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\%\n])/dgv,name:"meta.variable.substring.batchfile",patterns:[{include:"#variable_substring"}]},{begin:/:/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\%\n])/dgv,name:"meta.variable.substitution.batchfile",patterns:[{include:"#variable_replace"},{begin:/=/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\%\n])/dgv,patterns:[{include:"#variable_delayed_expansion"},{match:/[^\%]+/dgv,name:"string.unquoted.batchfile"}]}]}]}]},variable_delayed_expansion:{patterns:[{begin:/!(?=[^\!]+!)/dgv,beginCaptures:{"0":{name:"punctuation.definition.variable.begin.batchfile"}},end:/(!)|\n/dgv,endCaptures:{"1":{name:"punctuation.definition.variable.end.batchfile"}},name:"variable.other.readwrite.batchfile",patterns:[{begin:/:~/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\!\n])/dgv,name:"meta.variable.substring.batchfile",patterns:[{include:"#variable_substring"}]},{begin:/:/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\!\n])/dgv,name:"meta.variable.substitution.batchfile",patterns:[{include:"#escaped_characters"},{include:"#variable_replace"},{include:"#variable"},{begin:/=/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\!\n])/dgv,patterns:[{include:"#variable"},{match:/[^\!]+/dgv,name:"string.unquoted.batchfile"}]}]}]}]},variable_replace:{patterns:[{match:/[^\=\%\!\n]+/dgv,name:"string.unquoted.batchfile"}]},variable_substring:{patterns:[{captures:{"1":{name:"constant.numeric.batchfile"},"2":{name:"punctuation.separator.batchfile"},"3":{name:"constant.numeric.batchfile"}},match:/([\+\-]?\p{Nd}+)(?:(,)([\+\-]?\p{Nd}+))?/dgv}]},variables:{patterns:[{captures:{"1":{name:"punctuation.definition.variable.batchfile"}},match:/(%)(?:(?:~[fdpnxsatz]*(?:\$PATH:)?)?\p{Nd}|\*)/dgiv,name:"variable.parameter.batchfile"},{include:"#variable"},{include:"#variable_delayed_expansion"}]}},scopeName:"source.batchfile",embeddedLangs:undefined,aliases:["batch"]})
1
+ const lang = Object.freeze({displayName:"Batch File",injections:{"L:meta.block.repeat.batchfile":{patterns:[{include:"#repeatParameter"}]}},name:"bat",patterns:[{include:"#commands"},{include:"#comments"},{include:"#constants"},{include:"#controls"},{include:"#escaped_characters"},{include:"#labels"},{include:"#numbers"},{include:"#operators"},{include:"#parens"},{include:"#strings"},{include:"#variables"}],repository:{command_set:{patterns:[{begin:/(?<=^|[\@\p{space}])SET(?=(?=\n?$)|\p{space})/dgiv,beginCaptures:{"0":{name:"keyword.command.batchfile"}},end:/(?=(?=\n?$)\n|[\&\)\<\>\|])/dgv,patterns:[{include:"#command_set_inside"}]}]},command_set_group:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.group.begin.batchfile"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.batchfile"}},patterns:[{include:"#command_set_inside_arithmetic"}]}]},command_set_inside:{patterns:[{include:"#escaped_characters"},{include:"#variables"},{include:"#numbers"},{include:"#parens"},{include:"#command_set_strings"},{include:"#strings"},{begin:/([^ ][^\=]*)(=)/dgv,beginCaptures:{"1":{name:"variable.other.readwrite.batchfile"},"2":{name:"keyword.operator.assignment.batchfile"}},end:/(?=(?=\n?$)\n|[\&\)\<\>\|])/dgv,patterns:[{include:"#escaped_characters"},{include:"#variables"},{include:"#numbers"},{include:"#parens"},{include:"#strings"}]},{begin:/\p{space}+\/[Aa]\p{space}+/dgv,end:/(?=(?=\n?$)\n|[\&\)\<\>\|])/dgv,name:"meta.expression.set.batchfile",patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.batchfile"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.batchfile"}},name:"string.quoted.double.batchfile",patterns:[{include:"#command_set_inside_arithmetic"},{include:"#command_set_group"},{include:"#variables"}]},{include:"#command_set_inside_arithmetic"},{include:"#command_set_group"}]},{begin:/\p{space}+\/[Pp]\p{space}+/dgv,end:/(?=(?=\n?$)\n|[\&\)\<\>\|])/dgv,patterns:[{include:"#command_set_strings"},{begin:/([^ ][^\=]*)(=)/dgv,beginCaptures:{"1":{name:"variable.other.readwrite.batchfile"},"2":{name:"keyword.operator.assignment.batchfile"}},end:/(?=(?=\n?$)\n|[\&\)\<\>\|])/dgv,name:"meta.prompt.set.batchfile",patterns:[{include:"#strings"}]}]}]},command_set_inside_arithmetic:{patterns:[{include:"#command_set_operators"},{include:"#numbers"},{match:/,/dgv,name:"punctuation.separator.batchfile"}]},command_set_operators:{patterns:[{captures:{"1":{name:"variable.other.readwrite.batchfile"},"2":{name:"keyword.operator.assignment.augmented.batchfile"}},match:/([^ ]*)((?:[\-\*\+\/]|%%|[\&\^\|]|<<|>>)=)/dgv},{match:/[\-\*\+\/]|%%|[\&\^\|]|<<|>>|~/dgv,name:"keyword.operator.arithmetic.batchfile"},{match:/!/dgv,name:"keyword.operator.logical.batchfile"},{captures:{"1":{name:"variable.other.readwrite.batchfile"},"2":{name:"keyword.operator.assignment.batchfile"}},match:/([^ \=]*)(=)/dgv}]},command_set_strings:{patterns:[{begin:/(")\p{space}*([^ ][^\=]*)(=)/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.batchfile"},"2":{name:"variable.other.readwrite.batchfile"},"3":{name:"keyword.operator.assignment.batchfile"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.batchfile"}},name:"string.quoted.double.batchfile",patterns:[{include:"#variables"},{include:"#numbers"},{include:"#escaped_characters"}]}]},commands:{patterns:[{match:/(?<=^|[\@\p{space}])(?:adprep|append|arp|assoc|at|atmadm|attrib|auditpol|autochk|autoconv|autofmt|bcdboot|bcdedit|bdehdcfg|bitsadmin|bootcfg|brea|cacls|cd|certreq|certutil|change|chcp|chdir|chglogon|chgport|chgusr|chkdsk|chkntfs|choice|cipher|clip|cls|clscluadmin|cluster|cmd|cmdkey|cmstp|color|comp|compact|convert|copy|cprofile|cscript|csvde|date|dcdiag|dcgpofix|dcpromo|defra|del|dfscmd|dfsdiag|dfsrmig|diantz|dir|dirquota|diskcomp|diskcopy|diskpart|diskperf|diskraid|diskshadow|dispdiag|doin|dnscmd|doskey|driverquery|dsacls|dsadd|dsamain|dsdbutil|dsget|dsmgmt|dsmod|dsmove|dsquery|dsrm|edit|endlocal|eraseesentutl|eventcreate|eventquery|eventtriggers|evntcmd|expand|extract|fc|filescrn|find|findstr|finger|flattemp|fonde|forfiles|format|freedisk|fsutil|ftp|ftype|fveupdate|getmac|gettype|gpfixup|gpresult|gpupdate|graftabl|hashgen|hep|helpctr|hostname|icacls|iisreset|inuse|ipconfig|ipxroute|irftp|ismserv|jetpack|klist|ksetup|ktmutil|ktpass|label|ldifd|ldp|lodctr|logman|logoff|lpq|lpr|macfile|makecab|manage-bde|mapadmin|md|mkdir|mklink|mmc|mode|more|mount|mountvol|move|mqbup|mqsvc|mqtgsvc|msdt|msg|msiexec|msinfo32|mstsc|nbtstat|net computer|net group|net localgroup|net print|net session|net share|net start|net stop|net use|net user|net view|net|netcfg|netdiag|netdom|netsh|netstat|nfsadmin|nfsshare|nfsstat|nlb|nlbmgr|nltest|nslookup|ntackup|ntcmdprompt|ntdsutil|ntfrsutl|openfiles|pagefileconfig|path|pathping|pause|pbadmin|pentnt|perfmon|ping|pnpunatten|pnputil|popd|powercfg|powershell|powershell_ise|print|prncnfg|prndrvr|prnjobs|prnmngr|prnport|prnqctl|prompt|pubprn|pushd|pushprinterconnections|pwlauncher|qappsrv|qprocess|query|quser|qwinsta|rasdial|rcp|rd|rdpsign|regentc|recover|redircmp|redirusr|reg|regini|regsvr32|relog|ren|rename|rendom|repadmin|repair-bde|replace|reset session|rxec|risetup|rmdir|robocopy|route|rpcinfo|rpcping|rsh|runas|rundll32|rwinsta|sc|schtasks|scp|scwcmd|secedit|serverceipoptin|servrmanagercmd|serverweroptin|setspn|setx|sfc|sftp|shadow|shift|showmount|shutdown|sort|ssh|ssh-add|ssh-agent|ssh-keygen|ssh-keyscan|start|storrept|subst|sxstrace|ysocmgr|systeminfo|takeown|tapicfg|taskkill|tasklist|tcmsetup|telnet|tftp|time|timeout|title|tlntadmn|tpmvscmgr|tpmvscmgr|tacerpt|tracert|tree|tscon|tsdiscon|tsecimp|tskill|tsprof|type|typeperf|tzutil|uddiconfig|umount|unlodctr|ver|verifier|verif|vol|vssadmin|w32tm|waitfor|wbadmin|wdsutil|wecutil|wevtutil|where|whoami|winnt|winnt32|winpop|winrm|winrs|winsat|wlbs|wmic|wscript|wsl|xcopy)(?=(?=\n?$)|\p{space})/dgiv,name:"keyword.command.batchfile"},{begin:/(?<=^|[\@\p{space}])(echo)(?:(?=(?=\n?$)|[\.\:])|\p{space}+(?:(o(?:n|ff))(?=\p{space}*(?=\n?$)))?)/dgiv,beginCaptures:{"1":{name:"keyword.command.batchfile"},"2":{name:"keyword.other.special-method.batchfile"}},end:/(?=(?=\n?$)\n|[\&\)\<\>\|])/dgv,patterns:[{include:"#escaped_characters"},{include:"#variables"},{include:"#numbers"},{include:"#strings"}]},{captures:{"1":{name:"keyword.command.batchfile"},"2":{name:"keyword.other.special-method.batchfile"}},match:/(?<=^|[\@\p{space}])(setlocal)(?:\p{space}*(?=\n?$)|\p{space}+((?:En|Dis)able(?:Extensions|DelayedExpansion))(?=\p{space}*(?=\n?$)))/dgiv},{include:"#command_set"}]},comments:{patterns:[{begin:/(?:^|(&))\p{space}*(?=(:[ \+\,\:\;\=]))/dgv,beginCaptures:{"1":{name:"keyword.operator.conditional.batchfile"}},end:/\n/dgv,patterns:[{begin:/(:[ \+\,\:\;\=])/dgv,beginCaptures:{"1":{name:"punctuation.definition.comment.batchfile"}},end:/(?=\n)/dgv,name:"comment.line.colon.batchfile"}]},{begin:/(?<=^|[\@\p{space}])(REM)(\.)/dgiv,beginCaptures:{"1":{name:"keyword.command.rem.batchfile"},"2":{name:"punctuation.separator.batchfile"}},end:/(?=(?=\n?$)\n|[\&\)\<\>\|])/dgv,name:"comment.line.rem.batchfile"},{begin:/(?<=^|[\@\p{space}])rem\b/dgiv,beginCaptures:{"0":{name:"keyword.command.rem.batchfile"}},end:/\n/dgv,name:"comment.line.rem.batchfile",patterns:[{match:/[\<\>\|]/dgv,name:"invalid.illegal.unexpected-character.batchfile"}]}]},constants:{patterns:[{match:/\bNUL\b/dgiv,name:"constant.language.batchfile"}]},controls:{patterns:[{match:/(?<=^|\p{space})(?:call|exit(?=(?=\n?$)|\p{space})|goto(?=(?=\n?$)|[\:\p{space}]))/dgiv,name:"keyword.control.statement.batchfile"},{captures:{"1":{name:"keyword.control.conditional.batchfile"},"2":{name:"keyword.operator.logical.batchfile"},"3":{name:"keyword.other.special-method.batchfile"}},match:/(?<=^|\p{space})(if)\p{space}+(?:(not)\p{space}+)?(exist|defined|errorlevel|cmdextversion)(?=\p{space})/dgiv},{match:/(?<=^|\p{space})(?:if|else)(?=(?=\n?$)|\p{space})/dgiv,name:"keyword.control.conditional.batchfile"},{begin:/(?<=^|[\&\(\^\p{space}])for(?=\p{space})/dgiv,beginCaptures:{"0":{name:"keyword.control.repeat.batchfile"}},end:/\n/dgv,name:"meta.block.repeat.batchfile",patterns:[{begin:/(?<=[\^\p{space}])in(?=\p{space})/dgiv,beginCaptures:{"0":{name:"keyword.control.repeat.in.batchfile"}},end:/(?<=[\)\^\p{space}])do(?=\p{space})|\n/dgiv,endCaptures:{"0":{name:"keyword.control.repeat.do.batchfile"}},patterns:[{include:"$self"}]},{include:"$self"}]}]},escaped_characters:{patterns:[{match:/%%|\^\^!|\^(?=[^\n])|\^\n/dgv,name:"constant.character.escape.batchfile"}]},labels:{patterns:[{captures:{"1":{name:"punctuation.separator.batchfile"},"2":{name:"keyword.other.special-method.batchfile"}},match:/(?:^\p{space}*|(?<=call|goto)\p{space}*)(:)([^\+\,\:\;\=\p{space}]\P{space}*)/dgiv}]},numbers:{patterns:[{match:/(?<=^|[\=\p{space}])(0[Xx]\p{AHex}*|[\-\+]?\p{Nd}+)(?=(?=\n?$)|[\<\>\p{space}])/dgv,name:"constant.numeric.batchfile"}]},operators:{patterns:[{match:/@(?=\P{space})/dgv,name:"keyword.operator.at.batchfile"},{match:/(?<=\p{space})(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)(?=\p{space})|==/dgiv,name:"keyword.operator.comparison.batchfile"},{match:/(?<=\p{space})(NOT)(?=\p{space})/dgiv,name:"keyword.operator.logical.batchfile"},{match:/(?<!\^)&&?|\|\|/dgv,name:"keyword.operator.conditional.batchfile"},{match:/(?<!\^)\|/dgv,name:"keyword.operator.pipe.batchfile"},{match:/<&?|>[\&\>]?/dgv,name:"keyword.operator.redirection.batchfile"}]},parens:{patterns:[{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.section.group.begin.batchfile"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.group.end.batchfile"}},name:"meta.group.batchfile",patterns:[{match:/[\,\;]/dgv,name:"punctuation.separator.batchfile"},{include:"$self"}]}]},repeatParameter:{patterns:[{captures:{"1":{name:"punctuation.definition.variable.batchfile"}},match:/(%%)(?:~[AaDdFfNnPpSsſTtXxZz]*(?:\$[Pp][Aa][Tt][Hh]:)?)?[A-Za-z]/dgv,name:"variable.parameter.repeat.batchfile"}]},strings:{patterns:[{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.batchfile"}},end:/(")|(\n)/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.batchfile"},"2":{name:"invalid.illegal.newline.batchfile"}},name:"string.quoted.double.batchfile",patterns:[{match:/%%/dgv,name:"constant.character.escape.batchfile"},{include:"#variables"}]}]},variable:{patterns:[{begin:/%(?=[^\%]+%)/dgv,beginCaptures:{"0":{name:"punctuation.definition.variable.begin.batchfile"}},end:/(%)|\n/dgv,endCaptures:{"1":{name:"punctuation.definition.variable.end.batchfile"}},name:"variable.other.readwrite.batchfile",patterns:[{begin:/:~/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\n\%])/dgv,name:"meta.variable.substring.batchfile",patterns:[{include:"#variable_substring"}]},{begin:/:/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\n\%])/dgv,name:"meta.variable.substitution.batchfile",patterns:[{include:"#variable_replace"},{begin:/=/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\n\%])/dgv,patterns:[{include:"#variable_delayed_expansion"},{match:/[^\%]+/dgv,name:"string.unquoted.batchfile"}]}]}]}]},variable_delayed_expansion:{patterns:[{begin:/!(?=[^\!]+!)/dgv,beginCaptures:{"0":{name:"punctuation.definition.variable.begin.batchfile"}},end:/(!)|\n/dgv,endCaptures:{"1":{name:"punctuation.definition.variable.end.batchfile"}},name:"variable.other.readwrite.batchfile",patterns:[{begin:/:~/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\n\!])/dgv,name:"meta.variable.substring.batchfile",patterns:[{include:"#variable_substring"}]},{begin:/:/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\n\!])/dgv,name:"meta.variable.substitution.batchfile",patterns:[{include:"#escaped_characters"},{include:"#variable_replace"},{include:"#variable"},{begin:/=/dgv,beginCaptures:{"0":{name:"punctuation.separator.batchfile"}},end:/(?=[\n\!])/dgv,patterns:[{include:"#variable"},{match:/[^\!]+/dgv,name:"string.unquoted.batchfile"}]}]}]}]},variable_replace:{patterns:[{match:/[^\n\!\%\=]+/dgv,name:"string.unquoted.batchfile"}]},variable_substring:{patterns:[{captures:{"1":{name:"constant.numeric.batchfile"},"2":{name:"punctuation.separator.batchfile"},"3":{name:"constant.numeric.batchfile"}},match:/([\-\+]?\p{Nd}+)(?:(,)([\-\+]?\p{Nd}+))?/dgv}]},variables:{patterns:[{captures:{"1":{name:"punctuation.definition.variable.batchfile"}},match:/(%)(?:(?:~[adfnpstxz]*(?:\$PATH:)?)?\p{Nd}|\*)/dgiv,name:"variable.parameter.batchfile"},{include:"#variable"},{include:"#variable_delayed_expansion"}]}},scopeName:"source.batchfile",embeddedLangs:undefined,aliases:["batch"]})
2
2
 
3
3
  export default [
4
4
  lang
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"Beancount",fileTypes:["beancount"],name:"beancount",patterns:[{match:/;[^\n]*/dgv,name:"comment.line.beancount"},{begin:/^\p{space}*(p(?:optag|ushtag))\p{space}+(#)([A-Za-z0-9\-_\/\.]+)/dgv,beginCaptures:{"1":{name:"support.function.beancount"},"2":{name:"keyword.operator.tag.beancount"},"3":{name:"entity.name.tag.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.tag.beancount",patterns:[{include:"#comments"},{include:"#illegal"}]},{begin:/^\p{space}*(include)\p{space}+("[^\n]*")/dgv,beginCaptures:{"1":{name:"support.function.beancount"},"2":{name:"string.quoted.double.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.include.beancount",patterns:[{include:"#comments"},{include:"#illegal"}]},{begin:/^\p{space}*(option)\p{space}+("[^\n]*")\p{space}+("[^\n]*")/dgv,beginCaptures:{"1":{name:"support.function.beancount"},"2":{name:"support.variable.beancount"},"3":{name:"string.quoted.double.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.option.beancount",patterns:[{include:"#comments"},{include:"#illegal"}]},{begin:/^\p{space}*(plugin)\p{space}*("([^\n]*?)")\p{space}*("[^\n]*?")?/dgv,beginCaptures:{"1":{name:"support.function.beancount"},"2":{name:"string.quoted.double.beancount"},"3":{name:"entity.name.function.beancount"},"4":{name:"string.quoted.double.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"keyword.operator.directive.beancount",patterns:[{include:"#comments"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\|\/])([0-9]{2})([\-\|\/])([0-9]{2})\p{space}+(open|close|pad)\b/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#account"},{include:"#commodity"},{match:/,/dgv,name:"punctuation.separator.beancount"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\|\/])([0-9]{2})([\-\|\/])([0-9]{2})\p{space}+(custom)\b/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#string"},{include:"#bool"},{include:"#amount"},{include:"#number"},{include:"#date"},{include:"#account"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\|\/])([0-9]{2})([\-\|\/])([0-9]{2})\p{space}(event)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#string"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\|\/])([0-9]{2})([\-\|\/])([0-9]{2})\p{space}(commodity)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#commodity"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\|\/])([0-9]{2})([\-\|\/])([0-9]{2})\p{space}(note|document)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#account"},{include:"#string"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\|\/])([0-9]{2})([\-\|\/])([0-9]{2})\p{space}(price)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#commodity"},{include:"#amount"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\|\/])([0-9]{2})([\-\|\/])([0-9]{2})\p{space}(balance)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#account"},{include:"#amount"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\|\/])([0-9]{2})([\-\|\/])([0-9]{2})\p{space}*(txn|[\*\!\&\#\?\%PSTCURM])\p{space}*("[^\n]*?")?\p{space}*("[^\n]*?")?/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"},"7":{name:"string.quoted.tiers.beancount"},"8":{name:"string.quoted.narration.beancount"}},end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space})))/dgv,name:"meta.directive.transaction.beancount",patterns:[{include:"#comments"},{include:"#posting"},{include:"#meta"},{include:"#tag"},{include:"#link"},{include:"#illegal"}]}],repository:{account:{begin:/([A-Z][a-z]+)(:)/dgv,beginCaptures:{"1":{name:"variable.language.beancount"},"2":{name:"punctuation.separator.beancount"}},end:/\p{space}/dgv,name:"meta.account.beancount",patterns:[{begin:/(\P{space}+)(:?)/dgv,beginCaptures:{"1":{name:"variable.other.account.beancount"},"2":{name:"punctuation.separator.beancount"}},end:/(:?)|(\p{space})/dgv,patterns:[{include:"$self"},{include:"#illegal"}]}]},amount:{captures:{"1":{name:"keyword.operator.modifier.beancount"},"2":{name:"constant.numeric.currency.beancount"},"3":{name:"entity.name.type.commodity.beancount"}},match:/([\-\|\+]?)(\p{Nd}+(?:,\p{Nd}{3})*(?:\.\p{Nd}*)?)\p{space}*([A-Z][A-Z0-9'\._\-]{0,22}[A-Z0-9])/dgv,name:"meta.amount.beancount"},bool:{captures:{"0":{name:"constant.language.bool.beancount"},"2":{name:"constant.numeric.currency.beancount"},"3":{name:"entity.name.type.commodity.beancount"}},match:/TRUE|FALSE/dgv},comments:{captures:{"1":{name:"comment.line.beancount"}},match:/(;[^\n]*)(?=\n?$)/dgv},commodity:{match:/([A-Z][A-Z0-9'\._\-]{0,22}[A-Z0-9])/dgv,name:"entity.name.type.commodity.beancount"},cost:{begin:/\{\{?/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.beancount"}},end:/\}\}?/dgv,endCaptures:{"0":{name:"keyword.operator.assignment.beancount"}},name:"meta.cost.beancount",patterns:[{include:"#amount"},{include:"#date"},{match:/,/dgv,name:"punctuation.separator.beancount"},{include:"#illegal"}]},date:{captures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"}},match:/([0-9]{4})([\-\|\/])([0-9]{2})([\-\|\/])([0-9]{2})/dgv,name:"meta.date.beancount"},flag:{match:/(?<=\p{space})([\*\!\&\#\?\%PSTCURM])(?=\p{space}+)/dgv,name:"keyword.other.beancount"},illegal:{match:/\P{space}/dgv,name:"invalid.illegal.unrecognized.beancount"},link:{captures:{"1":{name:"keyword.operator.link.beancount"},"2":{name:"markup.underline.link.beancount"}},match:/(\^)([A-Za-z0-9\-_\/\.]+)/dgv},meta:{begin:/^\p{space}*([a-z][A-Za-z0-9\-_]+)(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.directive.beancount"},"2":{name:"punctuation.separator.beancount"}},end:/\n/dgv,name:"meta.meta.beancount",patterns:[{include:"#string"},{include:"#account"},{include:"#bool"},{include:"#commodity"},{include:"#date"},{include:"#tag"},{include:"#amount"},{include:"#number"},{include:"#comments"},{include:"#illegal"}]},number:{captures:{"1":{name:"keyword.operator.modifier.beancount"},"2":{name:"constant.numeric.currency.beancount"}},match:/([\-\|\+]?)(\p{Nd}+(?:,\p{Nd}{3})*(?:\.\p{Nd}*)?)/dgv},posting:{begin:/^\p{space}+(?=([A-Z\!]))/dgv,end:/(?=(^(?:\p{space}*(?=\n?$)|\P{space}|\p{space}*[A-Z])))/dgv,name:"meta.posting.beancount",patterns:[{include:"#meta"},{include:"#comments"},{include:"#flag"},{include:"#account"},{include:"#amount"},{include:"#cost"},{include:"#date"},{include:"#price"},{include:"#illegal"}]},price:{begin:/@@?/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.beancount"}},end:/(?=([\;\n]))/dgv,name:"meta.price.beancount",patterns:[{include:"#amount"},{include:"#illegal"}]},string:{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.beancount",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.beancount"}]},tag:{captures:{"1":{name:"keyword.operator.tag.beancount"},"2":{name:"entity.name.tag.beancount"}},match:/(#)([A-Za-z0-9\-_\/\.]+)/dgv}},scopeName:"text.beancount",embeddedLangs:undefined,aliases:undefined})
1
+ const lang = Object.freeze({displayName:"Beancount",fileTypes:["beancount"],name:"beancount",patterns:[{match:/;[^\n]*/dgv,name:"comment.line.beancount"},{begin:/^\p{space}*(p(?:op|ush)tag)\p{space}+(#)([\--9A-Z_a-z]+)/dgv,beginCaptures:{"1":{name:"support.function.beancount"},"2":{name:"keyword.operator.tag.beancount"},"3":{name:"entity.name.tag.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.tag.beancount",patterns:[{include:"#comments"},{include:"#illegal"}]},{begin:/^\p{space}*(include)\p{space}+("[^\n]*")/dgv,beginCaptures:{"1":{name:"support.function.beancount"},"2":{name:"string.quoted.double.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.include.beancount",patterns:[{include:"#comments"},{include:"#illegal"}]},{begin:/^\p{space}*(option)\p{space}+("[^\n]*")\p{space}+("[^\n]*")/dgv,beginCaptures:{"1":{name:"support.function.beancount"},"2":{name:"support.variable.beancount"},"3":{name:"string.quoted.double.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.option.beancount",patterns:[{include:"#comments"},{include:"#illegal"}]},{begin:/^\p{space}*(plugin)\p{space}*("([^\n]*?)")\p{space}*("[^\n]*?")?/dgv,beginCaptures:{"1":{name:"support.function.beancount"},"2":{name:"string.quoted.double.beancount"},"3":{name:"entity.name.function.beancount"},"4":{name:"string.quoted.double.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"keyword.operator.directive.beancount",patterns:[{include:"#comments"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\/\|])([0-9]{2})([\-\/\|])([0-9]{2})\p{space}+(open|close|pad)\b/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#account"},{include:"#commodity"},{match:/,/dgv,name:"punctuation.separator.beancount"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\/\|])([0-9]{2})([\-\/\|])([0-9]{2})\p{space}+(custom)\b/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#string"},{include:"#bool"},{include:"#amount"},{include:"#number"},{include:"#date"},{include:"#account"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\/\|])([0-9]{2})([\-\/\|])([0-9]{2})\p{space}(event)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#string"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\/\|])([0-9]{2})([\-\/\|])([0-9]{2})\p{space}(commodity)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#commodity"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\/\|])([0-9]{2})([\-\/\|])([0-9]{2})\p{space}(note|document)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#account"},{include:"#string"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\/\|])([0-9]{2})([\-\/\|])([0-9]{2})\p{space}(price)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#commodity"},{include:"#amount"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\/\|])([0-9]{2})([\-\/\|])([0-9]{2})\p{space}(balance)/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.dated.beancount",patterns:[{include:"#comments"},{include:"#meta"},{include:"#account"},{include:"#amount"},{include:"#illegal"}]},{begin:/([0-9]{4})([\-\/\|])([0-9]{2})([\-\/\|])([0-9]{2})\p{space}*(txn|[\!\#\%\&\*\?CMPR-U])\p{space}*("[^\n]*?")?\p{space}*("[^\n]*?")?/dgv,beginCaptures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"},"6":{name:"support.function.directive.beancount"},"7":{name:"string.quoted.tiers.beancount"},"8":{name:"string.quoted.narration.beancount"}},end:/(?=^(\p{space}*(?=\n?$)|\P{space}))/dgv,name:"meta.directive.transaction.beancount",patterns:[{include:"#comments"},{include:"#posting"},{include:"#meta"},{include:"#tag"},{include:"#link"},{include:"#illegal"}]}],repository:{account:{begin:/([A-Z][a-z]+)(:)/dgv,beginCaptures:{"1":{name:"variable.language.beancount"},"2":{name:"punctuation.separator.beancount"}},end:/\p{space}/dgv,name:"meta.account.beancount",patterns:[{begin:/(\P{space}+)(:?)/dgv,beginCaptures:{"1":{name:"variable.other.account.beancount"},"2":{name:"punctuation.separator.beancount"}},end:/(:?)|(\p{space})/dgv,patterns:[{include:"$self"},{include:"#illegal"}]}]},amount:{captures:{"1":{name:"keyword.operator.modifier.beancount"},"2":{name:"constant.numeric.currency.beancount"},"3":{name:"entity.name.type.commodity.beancount"}},match:/([\-\+\|]?)(\p{Nd}+(?:,\p{Nd}{3})*(?:\.\p{Nd}*)?)\p{space}*([A-Z][\-'\.0-9A-Z_]{0,22}[0-9A-Z])/dgv,name:"meta.amount.beancount"},bool:{captures:{"0":{name:"constant.language.bool.beancount"},"2":{name:"constant.numeric.currency.beancount"},"3":{name:"entity.name.type.commodity.beancount"}},match:/TRUE|FALSE/dgv},comments:{captures:{"1":{name:"comment.line.beancount"}},match:/(;[^\n]*)(?=\n?$)/dgv},commodity:{match:/([A-Z][\-'\.0-9A-Z_]{0,22}[0-9A-Z])/dgv,name:"entity.name.type.commodity.beancount"},cost:{begin:/\{\{?/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.beancount"}},end:/\}\}?/dgv,endCaptures:{"0":{name:"keyword.operator.assignment.beancount"}},name:"meta.cost.beancount",patterns:[{include:"#amount"},{include:"#date"},{match:/,/dgv,name:"punctuation.separator.beancount"},{include:"#illegal"}]},date:{captures:{"1":{name:"constant.numeric.date.year.beancount"},"2":{name:"punctuation.separator.beancount"},"3":{name:"constant.numeric.date.month.beancount"},"4":{name:"punctuation.separator.beancount"},"5":{name:"constant.numeric.date.day.beancount"}},match:/([0-9]{4})([\-\/\|])([0-9]{2})([\-\/\|])([0-9]{2})/dgv,name:"meta.date.beancount"},flag:{match:/(?<=\p{space})([\!\#\%\&\*\?CMPR-U])(?=\p{space}+)/dgv,name:"keyword.other.beancount"},illegal:{match:/\P{space}/dgv,name:"invalid.illegal.unrecognized.beancount"},link:{captures:{"1":{name:"keyword.operator.link.beancount"},"2":{name:"markup.underline.link.beancount"}},match:/(\^)([\--9A-Z_a-z]+)/dgv},meta:{begin:/^\p{space}*([a-z][\-0-9A-Z_a-z]+)(:)/dgv,beginCaptures:{"1":{name:"keyword.operator.directive.beancount"},"2":{name:"punctuation.separator.beancount"}},end:/\n/dgv,name:"meta.meta.beancount",patterns:[{include:"#string"},{include:"#account"},{include:"#bool"},{include:"#commodity"},{include:"#date"},{include:"#tag"},{include:"#amount"},{include:"#number"},{include:"#comments"},{include:"#illegal"}]},number:{captures:{"1":{name:"keyword.operator.modifier.beancount"},"2":{name:"constant.numeric.currency.beancount"}},match:/([\-\+\|]?)(\p{Nd}+(?:,\p{Nd}{3})*(?:\.\p{Nd}*)?)/dgv},posting:{begin:/^\p{space}+(?=([\!A-Z]))/dgv,end:/(?=^(\p{space}*(?=\n?$)|\P{space}|\p{space}*[A-Z]))/dgv,name:"meta.posting.beancount",patterns:[{include:"#meta"},{include:"#comments"},{include:"#flag"},{include:"#account"},{include:"#amount"},{include:"#cost"},{include:"#date"},{include:"#price"},{include:"#illegal"}]},price:{begin:/@@?/dgv,beginCaptures:{"0":{name:"keyword.operator.assignment.beancount"}},end:/(?=([\n\;]))/dgv,name:"meta.price.beancount",patterns:[{include:"#amount"},{include:"#illegal"}]},string:{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.beancount",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.beancount"}]},tag:{captures:{"1":{name:"keyword.operator.tag.beancount"},"2":{name:"entity.name.tag.beancount"}},match:/(#)([\--9A-Z_a-z]+)/dgv}},scopeName:"text.beancount",embeddedLangs:undefined,aliases:undefined})
2
2
 
3
3
  export default [
4
4
  lang
package/dist/berry.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"Berry",name:"berry",patterns:[{include:"#controls"},{include:"#strings"},{include:"#comment-block"},{include:"#comments"},{include:"#keywords"},{include:"#function"},{include:"#member"},{include:"#identifier"},{include:"#number"},{include:"#operator"}],repository:{"comment-block":{begin:/#-/dgv,end:/-#/dgv,name:"comment.berry",patterns:[{}]},comments:{begin:/#/dgv,end:/\n/dgv,name:"comment.line.berry",patterns:[{}]},controls:{patterns:[{match:/\b(if|elif|else|for|while|do|end|break|continue|return|try|except|raise)\b/dgv,name:"keyword.control.berry"}]},function:{patterns:[{match:/\b([a-zA-Z_][a-zA-Z0-9_]*(?=\p{space}*\())/dgv,name:"entity.name.function.berry"}]},identifier:{patterns:[{match:/\b[_A-Za-z][\p{L}\p{M}\p{N}\p{Pc}]+\b/dgv,name:"identifier.berry"}]},keywords:{patterns:[{match:/\b(var|static|def|class|true|false|nil|self|super|import|as|_class)\b/dgv,name:"keyword.berry"}]},member:{patterns:[{captures:{"0":{name:"entity.other.attribute-name.berry"}},match:/\.([a-zA-Z_][a-zA-Z0-9_]*)/dgv}]},number:{patterns:[{match:/0x\p{AHex}+|\p{Nd}+|(\p{Nd}+\.?|\.\p{Nd})\p{Nd}*([eE][\+\-]?\p{Nd}+)?/dgv,name:"constant.numeric.berry"}]},operator:{patterns:[{match:/[\(\)\[\]\.\-\!\~\*\/\%\+\&\^\|\<\>\=\:]/dgv,name:"keyword.operator.berry"}]},strings:{patterns:[{begin:/(["'])/dgv,end:/\1()/dgv,name:"string.quoted.double.berry",patterns:[{match:/(\\x\p{AHex}{2})|(\\[0-7]{3})|(\\\\)|(\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)/dgv,name:"constant.character.escape.berry"}]},{begin:/f(["'])/dgv,end:/\1()/dgv,name:"string.quoted.other.berry",patterns:[{match:/(\\x\p{AHex}{2})|(\\[0-7]{3})|(\\\\)|(\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)/dgv,name:"constant.character.escape.berry"},{match:/\{\{[^\}]*\}\}/dgv,name:"string.quoted.other.berry"},{begin:/\{/dgv,end:/\}/dgv,name:"keyword.other.unit.berry",patterns:[{include:"#keywords"},{include:"#numbers"},{include:"#identifier"},{include:"#operator"},{include:"#member"},{include:"#function"}]}]}]}},scopeName:"source.berry",embeddedLangs:undefined,aliases:["be"]})
1
+ const lang = Object.freeze({displayName:"Berry",name:"berry",patterns:[{include:"#controls"},{include:"#strings"},{include:"#comment-block"},{include:"#comments"},{include:"#keywords"},{include:"#function"},{include:"#member"},{include:"#identifier"},{include:"#number"},{include:"#operator"}],repository:{"comment-block":{begin:/#-/dgv,end:/-#/dgv,name:"comment.berry",patterns:[{}]},comments:{begin:/#/dgv,end:/\n/dgv,name:"comment.line.berry",patterns:[{}]},controls:{patterns:[{match:/\b(if|elif|else|for|while|do|end|break|continue|return|try|except|raise)\b/dgv,name:"keyword.control.berry"}]},function:{patterns:[{match:/\b([A-Z_a-z][0-9A-Z_a-z]*(?=\p{space}*\())/dgv,name:"entity.name.function.berry"}]},identifier:{patterns:[{match:/\b[A-Z_a-z][\p{L}\p{M}\p{N}\p{Pc}]+\b/dgv,name:"identifier.berry"}]},keywords:{patterns:[{match:/\b(var|static|def|class|true|false|nil|self|super|import|as|_class)\b/dgv,name:"keyword.berry"}]},member:{patterns:[{captures:{"0":{name:"entity.other.attribute-name.berry"}},match:/\.([A-Z_a-z][0-9A-Z_a-z]*)/dgv}]},number:{patterns:[{match:/0x\p{AHex}+|\p{Nd}+|(\p{Nd}+\.?|\.\p{Nd})\p{Nd}*([Ee][\-\+]?\p{Nd}+)?/dgv,name:"constant.numeric.berry"}]},operator:{patterns:[{match:/[\-\]\!\%\&\(-\+\.\/\:\<\=\>\[\^\|\~]/dgv,name:"keyword.operator.berry"}]},strings:{patterns:[{begin:/(["'])/dgv,end:/\1()/dgv,name:"string.quoted.double.berry",patterns:[{match:/(\\x\p{AHex}{2})|(\\[0-7]{3})|(\\\\)|(\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)/dgv,name:"constant.character.escape.berry"}]},{begin:/f(["'])/dgv,end:/\1()/dgv,name:"string.quoted.other.berry",patterns:[{match:/(\\x\p{AHex}{2})|(\\[0-7]{3})|(\\\\)|(\\")|(\\')|(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)/dgv,name:"constant.character.escape.berry"},{match:/\{\{[^\}]*\}\}/dgv,name:"string.quoted.other.berry"},{begin:/\{/dgv,end:/\}/dgv,name:"keyword.other.unit.berry",patterns:[{include:"#keywords"},{include:"#numbers"},{include:"#identifier"},{include:"#operator"},{include:"#member"},{include:"#function"}]}]}]}},scopeName:"source.berry",embeddedLangs:undefined,aliases:["be"]})
2
2
 
3
3
  export default [
4
4
  lang
package/dist/bibtex.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"BibTeX",name:"bibtex",patterns:[{captures:{"0":{name:"punctuation.definition.comment.bibtex"}},match:/@comment(?=[\p{space}\{\(])/dgiv,name:"comment.block.at-sign.bibtex"},{include:"#preamble"},{include:"#string"},{include:"#entry"},{begin:/[^\@\n]/dgv,end:/(?=@)/dgv,name:"comment.block.bibtex"}],repository:{entry:{patterns:[{begin:/((@)[a-zA-Z\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~][a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~]*)\p{space}*(\{)\p{space}*([^\p{space}\,\}]*)/dgv,beginCaptures:{"1":{name:"keyword.other.entry-type.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.entry.begin.bibtex"},"4":{name:"entity.name.type.entry-key.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.entry.end.bibtex"}},name:"meta.entry.braces.bibtex",patterns:[{begin:/([a-zA-Z\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~][a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~]*)\p{space}*(=)/dgv,beginCaptures:{"1":{name:"support.function.key.bibtex"},"2":{name:"punctuation.separator.key-value.bibtex"}},end:/(?=[\,\}])/dgv,name:"meta.key-assignment.bibtex",patterns:[{include:"#field_value"}]}]},{begin:/((@)[a-zA-Z\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~][a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~]*)\p{space}*(\()\p{space}*([^\p{space}\,]*)/dgv,beginCaptures:{"1":{name:"keyword.other.entry-type.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.entry.begin.bibtex"},"4":{name:"entity.name.type.entry-key.bibtex"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.entry.end.bibtex"}},name:"meta.entry.parenthesis.bibtex",patterns:[{begin:/([a-zA-Z\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~][a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~]*)\p{space}*(=)/dgv,beginCaptures:{"1":{name:"support.function.key.bibtex"},"2":{name:"punctuation.separator.key-value.bibtex"}},end:/(?=[\,\)])/dgv,name:"meta.key-assignment.bibtex",patterns:[{include:"#field_value"}]}]}]},field_value:{patterns:[{include:"#string_content"},{include:"#integer"},{include:"#string_var"},{match:/#/dgv,name:"keyword.operator.bibtex"}]},integer:{captures:{"1":{name:"constant.numeric.bibtex"}},match:/\p{space}*(\p{Nd}+)\p{space}*/dgv},nested_braces:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.begin.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.group.end.bibtex"}},patterns:[{include:"#nested_braces"}]},preamble:{patterns:[{begin:/((@)preamble)\p{space}*(\{)\p{space}*/dgiv,beginCaptures:{"1":{name:"keyword.other.preamble.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.preamble.begin.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.preamble.end.bibtex"}},name:"meta.preamble.braces.bibtex",patterns:[{include:"#field_value"}]},{begin:/((@)preamble)\p{space}*(\()\p{space}*/dgiv,beginCaptures:{"1":{name:"keyword.other.preamble.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.preamble.begin.bibtex"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.preamble.end.bibtex"}},name:"meta.preamble.parenthesis.bibtex",patterns:[{include:"#field_value"}]}]},string:{patterns:[{begin:/((@)[Ssſ][Tt][Rr][Ii][Nn][Gg])\p{space}*(\{)\p{space}*([a-zA-Z\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~][a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~]*)/dgv,beginCaptures:{"1":{name:"keyword.other.string-constant.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.string-constant.begin.bibtex"},"4":{name:"variable.other.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.string-constant.end.bibtex"}},name:"meta.string-constant.braces.bibtex",patterns:[{include:"#field_value"}]},{begin:/((@)[Ssſ][Tt][Rr][Ii][Nn][Gg])\p{space}*(\()\p{space}*([a-zA-Z\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~][a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~]*)/dgv,beginCaptures:{"1":{name:"keyword.other.string-constant.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.string-constant.begin.bibtex"},"4":{name:"variable.other.bibtex"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.string-constant.end.bibtex"}},name:"meta.string-constant.parenthesis.bibtex",patterns:[{include:"#field_value"}]}]},string_content:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.bibtex"}},patterns:[{include:"#nested_braces"}]},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.bibtex"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.bibtex"}},patterns:[{include:"#nested_braces"}]}]},string_var:{captures:{"0":{name:"support.variable.bibtex"}},match:/[a-zA-Z\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~][a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\@\[\\\]\^_\`\|\~]*/dgv}},scopeName:"text.bibtex",embeddedLangs:undefined,aliases:undefined})
1
+ const lang = Object.freeze({displayName:"BibTeX",name:"bibtex",patterns:[{captures:{"0":{name:"punctuation.definition.comment.bibtex"}},match:/@comment(?=[\(\{\p{space}])/dgiv,name:"comment.block.at-sign.bibtex"},{include:"#preamble"},{include:"#string"},{include:"#entry"},{begin:/[^\n\@]/dgv,end:/(?=@)/dgv,name:"comment.block.bibtex"}],repository:{entry:{patterns:[{begin:/((@)[\-\!\$\&\*\+\.\/\:\;\<\>-z\|\~][\!\$\&\*\+\--\<\>-z\|\~]*)\p{space}*(\{)\p{space}*([^\,\}\p{space}]*)/dgv,beginCaptures:{"1":{name:"keyword.other.entry-type.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.entry.begin.bibtex"},"4":{name:"entity.name.type.entry-key.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.entry.end.bibtex"}},name:"meta.entry.braces.bibtex",patterns:[{begin:/([\-\!\$\&\*\+\.\/\:\;\<\>-z\|\~][\!\$\&\*\+\--\<\>-z\|\~]*)\p{space}*(=)/dgv,beginCaptures:{"1":{name:"support.function.key.bibtex"},"2":{name:"punctuation.separator.key-value.bibtex"}},end:/(?=[\,\}])/dgv,name:"meta.key-assignment.bibtex",patterns:[{include:"#field_value"}]}]},{begin:/((@)[\-\!\$\&\*\+\.\/\:\;\<\>-z\|\~][\!\$\&\*\+\--\<\>-z\|\~]*)\p{space}*(\()\p{space}*([^\,\p{space}]*)/dgv,beginCaptures:{"1":{name:"keyword.other.entry-type.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.entry.begin.bibtex"},"4":{name:"entity.name.type.entry-key.bibtex"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.entry.end.bibtex"}},name:"meta.entry.parenthesis.bibtex",patterns:[{begin:/([\-\!\$\&\*\+\.\/\:\;\<\>-z\|\~][\!\$\&\*\+\--\<\>-z\|\~]*)\p{space}*(=)/dgv,beginCaptures:{"1":{name:"support.function.key.bibtex"},"2":{name:"punctuation.separator.key-value.bibtex"}},end:/(?=[\)\,])/dgv,name:"meta.key-assignment.bibtex",patterns:[{include:"#field_value"}]}]}]},field_value:{patterns:[{include:"#string_content"},{include:"#integer"},{include:"#string_var"},{match:/#/dgv,name:"keyword.operator.bibtex"}]},integer:{captures:{"1":{name:"constant.numeric.bibtex"}},match:/\p{space}*(\p{Nd}+)\p{space}*/dgv},nested_braces:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.group.begin.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.group.end.bibtex"}},patterns:[{include:"#nested_braces"}]},preamble:{patterns:[{begin:/((@)preamble)\p{space}*(\{)\p{space}*/dgiv,beginCaptures:{"1":{name:"keyword.other.preamble.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.preamble.begin.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.preamble.end.bibtex"}},name:"meta.preamble.braces.bibtex",patterns:[{include:"#field_value"}]},{begin:/((@)preamble)\p{space}*(\()\p{space}*/dgiv,beginCaptures:{"1":{name:"keyword.other.preamble.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.preamble.begin.bibtex"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.preamble.end.bibtex"}},name:"meta.preamble.parenthesis.bibtex",patterns:[{include:"#field_value"}]}]},string:{patterns:[{begin:/((@)[Ssſ][Tt][Rr][Ii][Nn][Gg])\p{space}*(\{)\p{space}*([\-\!\$\&\*\+\.\/\:\;\<\>-z\|\~][\!\$\&\*\+\--\<\>-z\|\~]*)/dgv,beginCaptures:{"1":{name:"keyword.other.string-constant.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.string-constant.begin.bibtex"},"4":{name:"variable.other.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.section.string-constant.end.bibtex"}},name:"meta.string-constant.braces.bibtex",patterns:[{include:"#field_value"}]},{begin:/((@)[Ssſ][Tt][Rr][Ii][Nn][Gg])\p{space}*(\()\p{space}*([\-\!\$\&\*\+\.\/\:\;\<\>-z\|\~][\!\$\&\*\+\--\<\>-z\|\~]*)/dgv,beginCaptures:{"1":{name:"keyword.other.string-constant.bibtex"},"2":{name:"punctuation.definition.keyword.bibtex"},"3":{name:"punctuation.section.string-constant.begin.bibtex"},"4":{name:"variable.other.bibtex"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.section.string-constant.end.bibtex"}},name:"meta.string-constant.parenthesis.bibtex",patterns:[{include:"#field_value"}]}]},string_content:{patterns:[{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.bibtex"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.bibtex"}},patterns:[{include:"#nested_braces"}]},{begin:/"/dgv,beginCaptures:{"0":{name:"punctuation.definition.string.begin.bibtex"}},end:/"/dgv,endCaptures:{"0":{name:"punctuation.definition.string.end.bibtex"}},patterns:[{include:"#nested_braces"}]}]},string_var:{captures:{"0":{name:"support.variable.bibtex"}},match:/[\-\!\$\&\*\+\.\/\:\;\<\>-z\|\~][\!\$\&\*\+\--\<\>-z\|\~]*/dgv}},scopeName:"text.bibtex",embeddedLangs:undefined,aliases:undefined})
2
2
 
3
3
  export default [
4
4
  lang
package/dist/bicep.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const lang = Object.freeze({displayName:"Bicep",fileTypes:[".bicep",".bicepparam"],name:"bicep",patterns:[{include:"#expression"},{include:"#comments"}],repository:{"array-literal":{begin:/\[(?!(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\bfor\b)/dgv,end:/\]/dgv,name:"meta.array-literal.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},"block-comment":{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block.bicep"},comments:{patterns:[{include:"#line-comment"},{include:"#block-comment"}]},decorator:{begin:/@(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*(?=\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b)/dgv,end:"",name:"meta.decorator.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},directive:{begin:/#\b[_a-zA-Z\-0-9]+\b/dgv,end:/(?=\n?$)/dgv,name:"meta.directive.bicep",patterns:[{include:"#directive-variable"},{include:"#comments"}]},"directive-variable":{match:/\b[_a-zA-Z\-0-9]+\b/dgv,name:"keyword.control.declaration.bicep"},"escape-character":{match:/\\(u\{\p{AHex}+\}|[nrt\\']|\$\{)/dgv,name:"constant.character.escape.bicep"},expression:{patterns:[{include:"#string-literal"},{include:"#string-verbatim"},{include:"#numeric-literal"},{include:"#named-literal"},{include:"#object-literal"},{include:"#array-literal"},{include:"#keyword"},{include:"#identifier"},{include:"#function-call"},{include:"#decorator"},{include:"#lambda-start"},{include:"#directive"}]},"function-call":{begin:/(\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b)(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\(/dgv,beginCaptures:{"1":{name:"entity.name.function.bicep"}},end:/\)/dgv,name:"meta.function-call.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},identifier:{match:/\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b(?!(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\()/dgv,name:"variable.other.readwrite.bicep"},keyword:{match:/\b(metadata|targetScope|resource|module|param|var|output|for|in|if|existing|import|as|type|with|using|extends|func|assert|extension)\b/dgv,name:"keyword.control.declaration.bicep"},"lambda-start":{begin:/(\((?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*(,(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*)*\)|\((?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\)|(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*)(?=(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*=>)/dgv,beginCaptures:{"1":{name:"meta.undefined.bicep",patterns:[{include:"#identifier"},{include:"#comments"}]}},end:/(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*=>/dgv,name:"meta.lambda-start.bicep"},"line-comment":{match:/\/\/[^\n]*(?=(?=\n?$))/dgv,name:"comment.line.double-slash.bicep"},"named-literal":{match:/\b(true|false|null)\b/dgv,name:"constant.language.bicep"},"numeric-literal":{match:/[0-9]+/dgv,name:"constant.numeric.bicep"},"object-literal":{begin:/\{/dgv,end:/\}/dgv,name:"meta.object-literal.bicep",patterns:[{include:"#object-property-key"},{include:"#expression"},{include:"#comments"}]},"object-property-key":{match:/\b[_\$\p{Alpha}][_\$\p{Alpha}\p{Nd}]*\b(?=(?:[ \t\r\n]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*:)/dgv,name:"variable.other.property.bicep"},"string-literal":{begin:/'(?!'')/dgv,end:/'/dgv,name:"string.quoted.single.bicep",patterns:[{include:"#escape-character"},{include:"#string-literal-subst"}]},"string-literal-subst":{begin:/(?<!\\)(\$\{)/dgv,beginCaptures:{"1":{name:"punctuation.definition.template-expression.begin.bicep"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.definition.template-expression.end.bicep"}},name:"meta.string-literal-subst.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},"string-verbatim":{begin:/'''/dgv,end:/'''(?!')/dgv,name:"string.quoted.multi.bicep",patterns:[]}},scopeName:"source.bicep",embeddedLangs:undefined,aliases:undefined})
1
+ const lang = Object.freeze({displayName:"Bicep",fileTypes:[".bicep",".bicepparam"],name:"bicep",patterns:[{include:"#expression"},{include:"#comments"}],repository:{"array-literal":{begin:/\[(?!(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\bfor\b)/dgv,end:/\]/dgv,name:"meta.array-literal.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},"block-comment":{begin:/\/\*/dgv,end:/\*\//dgv,name:"comment.block.bicep"},comments:{patterns:[{include:"#line-comment"},{include:"#block-comment"}]},decorator:{begin:/@(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*(?=\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b)/dgv,end:"",name:"meta.decorator.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},directive:{begin:/#\b[\-0-9A-Z_a-z]+\b/dgv,end:/(?=\n?$)/dgv,name:"meta.directive.bicep",patterns:[{include:"#directive-variable"},{include:"#comments"}]},"directive-variable":{match:/\b[\-0-9A-Z_a-z]+\b/dgv,name:"keyword.control.declaration.bicep"},"escape-character":{match:/\\(u\{\p{AHex}+\}|['\\nrt]|\$\{)/dgv,name:"constant.character.escape.bicep"},expression:{patterns:[{include:"#string-literal"},{include:"#string-verbatim"},{include:"#numeric-literal"},{include:"#named-literal"},{include:"#object-literal"},{include:"#array-literal"},{include:"#keyword"},{include:"#identifier"},{include:"#function-call"},{include:"#decorator"},{include:"#lambda-start"},{include:"#directive"}]},"function-call":{begin:/\b([\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*)\b(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\(/dgv,beginCaptures:{"1":{name:"entity.name.function.bicep"}},end:/\)/dgv,name:"meta.function-call.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},identifier:{match:/\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b(?!(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\()/dgv,name:"variable.other.readwrite.bicep"},keyword:{match:/\b(metadata|targetScope|resource|module|param|var|output|for|in|if|existing|import|as|type|with|using|extends|func|assert|extension)\b/dgv,name:"keyword.control.declaration.bicep"},"lambda-start":{begin:/(\((?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*(,(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*)*\)|\((?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\)|(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*)(?=(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*=>)/dgv,beginCaptures:{"1":{name:"meta.undefined.bicep",patterns:[{include:"#identifier"},{include:"#comments"}]}},end:/(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*=>/dgv,name:"meta.lambda-start.bicep"},"line-comment":{match:/\/\/[^\n]*(?=(?=\n?$))/dgv,name:"comment.line.double-slash.bicep"},"named-literal":{match:/\b(true|false|null)\b/dgv,name:"constant.language.bicep"},"numeric-literal":{match:/[0-9]+/dgv,name:"constant.numeric.bicep"},"object-literal":{begin:/\{/dgv,end:/\}/dgv,name:"meta.object-literal.bicep",patterns:[{include:"#object-property-key"},{include:"#expression"},{include:"#comments"}]},"object-property-key":{match:/\b[\$_\p{Alpha}][\$_\p{Alpha}\p{Nd}]*\b(?=(?:[\t\n\r ]|\/\*(?:\*(?!\/)|[^\*])*\*\/)*:)/dgv,name:"variable.other.property.bicep"},"string-literal":{begin:/'(?!'')/dgv,end:/'/dgv,name:"string.quoted.single.bicep",patterns:[{include:"#escape-character"},{include:"#string-literal-subst"}]},"string-literal-subst":{begin:/(?<!\\)(\$\{)/dgv,beginCaptures:{"1":{name:"punctuation.definition.template-expression.begin.bicep"}},end:/(\})/dgv,endCaptures:{"1":{name:"punctuation.definition.template-expression.end.bicep"}},name:"meta.string-literal-subst.bicep",patterns:[{include:"#expression"},{include:"#comments"}]},"string-verbatim":{begin:/'''/dgv,end:/'''(?!')/dgv,name:"string.quoted.multi.bicep",patterns:[]}},scopeName:"source.bicep",embeddedLangs:undefined,aliases:undefined})
2
2
 
3
3
  export default [
4
4
  lang