@shikijs/langs-precompiled 2.3.1 → 2.3.2

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 (88) hide show
  1. package/dist/actionscript-3.mjs +1 -1
  2. package/dist/applescript.mjs +1 -1
  3. package/dist/ara.mjs +1 -1
  4. package/dist/asciidoc.mjs +1 -1
  5. package/dist/beancount.mjs +1 -1
  6. package/dist/bsl.mjs +1 -1
  7. package/dist/cadence.mjs +1 -1
  8. package/dist/clarity.mjs +1 -1
  9. package/dist/cmake.mjs +1 -1
  10. package/dist/cobol.mjs +1 -1
  11. package/dist/coq.mjs +1 -1
  12. package/dist/crystal.mjs +1 -1
  13. package/dist/cypher.mjs +1 -1
  14. package/dist/dax.mjs +1 -1
  15. package/dist/diff.mjs +1 -1
  16. package/dist/docker.mjs +1 -1
  17. package/dist/dotenv.mjs +1 -1
  18. package/dist/dream-maker.mjs +1 -1
  19. package/dist/elixir.mjs +1 -1
  20. package/dist/elm.mjs +1 -1
  21. package/dist/erlang.mjs +1 -1
  22. package/dist/fish.mjs +1 -1
  23. package/dist/fortran-free-form.mjs +1 -1
  24. package/dist/fsharp.mjs +1 -1
  25. package/dist/gdresource.mjs +1 -1
  26. package/dist/gdscript.mjs +1 -1
  27. package/dist/git-commit.mjs +1 -1
  28. package/dist/go.mjs +1 -1
  29. package/dist/graphql.mjs +1 -1
  30. package/dist/groovy.mjs +1 -1
  31. package/dist/hack.mjs +1 -1
  32. package/dist/haml.mjs +1 -1
  33. package/dist/haskell.mjs +1 -1
  34. package/dist/hcl.mjs +1 -1
  35. package/dist/html.mjs +1 -1
  36. package/dist/json.mjs +1 -1
  37. package/dist/json5.mjs +1 -1
  38. package/dist/jsonc.mjs +1 -1
  39. package/dist/jsonl.mjs +1 -1
  40. package/dist/jssm.mjs +1 -1
  41. package/dist/julia.mjs +1 -1
  42. package/dist/kusto.mjs +1 -1
  43. package/dist/latex.mjs +1 -1
  44. package/dist/less.mjs +1 -1
  45. package/dist/markdown.mjs +1 -1
  46. package/dist/marko.mjs +1 -1
  47. package/dist/matlab.mjs +1 -1
  48. package/dist/mermaid.mjs +1 -1
  49. package/dist/mipsasm.mjs +1 -1
  50. package/dist/mojo.mjs +1 -1
  51. package/dist/move.mjs +1 -1
  52. package/dist/nim.mjs +1 -1
  53. package/dist/nushell.mjs +1 -1
  54. package/dist/objective-c.mjs +1 -1
  55. package/dist/objective-cpp.mjs +1 -1
  56. package/dist/perl.mjs +1 -1
  57. package/dist/po.mjs +1 -1
  58. package/dist/polar.mjs +1 -1
  59. package/dist/powershell.mjs +1 -1
  60. package/dist/pug.mjs +1 -1
  61. package/dist/puppet.mjs +1 -1
  62. package/dist/python.mjs +1 -1
  63. package/dist/regexp.mjs +1 -1
  64. package/dist/riscv.mjs +1 -1
  65. package/dist/ruby.mjs +1 -1
  66. package/dist/rust.mjs +1 -1
  67. package/dist/sas.mjs +1 -1
  68. package/dist/scala.mjs +1 -1
  69. package/dist/scheme.mjs +1 -1
  70. package/dist/sdbl.mjs +1 -1
  71. package/dist/shellscript.mjs +1 -1
  72. package/dist/smalltalk.mjs +1 -1
  73. package/dist/splunk.mjs +1 -1
  74. package/dist/sql.mjs +1 -1
  75. package/dist/stata.mjs +1 -1
  76. package/dist/stylus.mjs +1 -1
  77. package/dist/tcl.mjs +1 -1
  78. package/dist/terraform.mjs +1 -1
  79. package/dist/toml.mjs +1 -1
  80. package/dist/twig.mjs +1 -1
  81. package/dist/typst.mjs +1 -1
  82. package/dist/vue.mjs +1 -1
  83. package/dist/vyper.mjs +1 -1
  84. package/dist/wasm.mjs +1 -1
  85. package/dist/wgsl.mjs +1 -1
  86. package/dist/zenscript.mjs +1 -1
  87. package/dist/zig.mjs +1 -1
  88. package/package.json +3 -3
package/dist/fsharp.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import markdown from './markdown.mjs'
2
2
 
3
- const lang = Object.freeze({displayName:"F#",name:"fsharp",patterns:[{include:"#compiler_directives"},{include:"#comments"},{include:"#constants"},{include:"#strings"},{include:"#chars"},{include:"#double_tick"},{include:"#definition"},{include:"#abstract_definition"},{include:"#attributes"},{include:"#modules"},{include:"#anonymous_functions"},{include:"#du_declaration"},{include:"#record_declaration"},{include:"#records"},{include:"#strp_inlined"},{include:"#keywords"},{include:"#cexprs"},{include:"#text"}],repository:{abstract_definition:{begin:/\b(static\p{space}+)?(abstract)\p{space}+(member)?(\p{space}+\[<[^\n]*>\])?\p{space}*([_\p{Alpha}0-9\,\._\`\p{space}]+)(<)?/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.fsharp"},"3":{name:"keyword.fsharp"},"4":{name:"support.function.attribute.fsharp"},"5":{name:"keyword.symbol.fsharp"}},end:/\p{space}*(with)\b|=|(?=\n?$)/dgv,endCaptures:{"1":{name:"keyword.fsharp"}},name:"abstract.definition.fsharp",patterns:[{include:"#comments"},{include:"#common_declaration"},{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"},"3":{name:"keyword.symbol.fsharp"},"4":{name:"entity.name.type.fsharp"}},match:/(\??)([\p{Alpha}0-9'\`\^\._ ]+)\p{space}*(:)((?!with\b)\b([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._ ]+))?/dgv},{captures:{"1":{name:"entity.name.type.fsharp"}},comments:"Here we need the \\w modifier in order to check that the words isn't blacklisted",match:/(?!with|get|set\b)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._]+)/dgv},{include:"#keywords"}]},anonymous_functions:{patterns:[{begin:/\b(fun)\b/dgv,beginCaptures:{"1":{name:"keyword.fsharp"}},end:/(->)/dgv,endCaptures:{"1":{name:"keyword.symbol.arrow.fsharp"}},name:"function.anonymous",patterns:[{include:"#comments"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/\p{space}*(?=(->))/dgv,endCaptures:{"1":{name:"keyword.symbol.arrow.fsharp"}},patterns:[{include:"#member_declaration"}]},{include:"#variables"}]}]},anonymous_record_declaration:{begin:/(\{\|)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\|\})/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"keyword.symbol.fsharp"}},match:/[\p{Alpha}0-9'\`\^_ ]+(:)/dgv},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\^_ ]+)/dgv},{include:"#anonymous_record_declaration"},{include:"#keywords"}]},attributes:{patterns:[{begin:/\[</dgv,end:/>\]|\]/dgv,name:"support.function.attribute.fsharp",patterns:[{include:"$self"}]}]},cexprs:{patterns:[{captures:{"0":{name:"keyword.fsharp"}},match:/\b(async|seq|promise|task|maybe|asyncMaybe|controller|scope|application|pipeline)(?=\p{space}*\{)/dgv,name:"cexpr.fsharp"}]},chars:{patterns:[{captures:{"1":{name:"string.quoted.single.fsharp"}},match:/('\\?[^\n]')/dgv,name:"char.fsharp"}]},comments:{patterns:[{beginCaptures:{"1":{name:"comment.block.fsharp"}},match:/(\(\*{3}[^\n]*\*{3}\))/dgv,name:"comment.literate.command.fsharp"},{begin:/^\p{space}*(\(\*\*(?!\)))((?!\*\))[^\n])*(?=\n?$)/dgv,beginCaptures:{"1":{name:"comment.block.fsharp"}},endCaptures:{"1":{name:"comment.block.fsharp"}},name:"comment.block.markdown.fsharp",patterns:[{include:"text.html.markdown"}],while:/^(?!\p{space}*(\*)+\)\p{space}*(?=\n?$))/dgv},{begin:/(\(\*(?!\)))/dgv,beginCaptures:{"1":{name:"comment.block.fsharp"}},end:/(\*+\))/dgv,endCaptures:{"1":{name:"comment.block.fsharp"}},name:"comment.block.fsharp",patterns:[{comments:"Capture // when inside of (* *) like that the rule which capture comments starting by // is not trigger. See https://github.com/ionide/ionide-fsgrammar/issues/155",match:/\/\//dgv,name:"fast-capture.comment.line.double-slash.fsharp"},{comments:"Capture (*) when inside of (* *) so that it doesn't prematurely end the comment block.",match:/\(\*\)/dgv,name:"fast-capture.comment.line.mul-operator.fsharp"},{include:"#comments"}]},{captures:{"1":{name:"comment.block.fsharp"}},match:/((?<!\()(\*)+\))/dgv,name:"comment.block.markdown.fsharp.end"},{begin:/(?<![\!\%\&\+-\.\<\=\>\?\@\^\|\/])\/\/\/(?!\/)/dgv,name:"comment.line.markdown.fsharp",patterns:[{include:"text.html.markdown"}],while:/(?<![\!\%\&\+-\.\<\=\>\?\@\^\|\/])\/\/\/(?!\/)/dgv},{match:/(?<![\!\%\&\+-\.\<\=\>\?\@\^\|\/])\/\/([^\n]*(?=\n?$))/dgv,name:"comment.line.double-slash.fsharp"}]},common_binding_definition:{patterns:[{include:"#comments"},{include:"#attributes"},{begin:/(:)\p{space}*(\()\p{space}*(static member|member)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"keyword.fsharp"}},comments:"SRTP syntax support",end:/(\))\p{space}*((?=,)|(?==))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(\^[\p{Alpha}0-9'\._]+)/dgv},{include:"#variables"},{include:"#keywords"}]},{begin:/(:)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"}},end:/(\)\p{space}*(([\?\p{Alpha}0-9'\`\^\._ ]*)))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"}},patterns:[{include:"#tuple_signature"}]},{begin:/(:)\p{space}*(\^[\p{Alpha}0-9'\._]+)\p{space}*(when)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"},"3":{name:"keyword.fsharp"}},end:/(?=:)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{match:/\b(and|when|or)\b/dgv,name:"keyword.fsharp"},{captures:{"1":{name:"entity.name.type.fsharp"}},comment:"Because we first capture the keywords, we can capture what looks like a word and assume it's an entity definition",match:/([\p{Alpha}0-9'\^\._]+)/dgv},{match:/(\(|\))/dgv,name:"keyword.symbol.fsharp"}]},{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"}},match:/(:)\p{space}*([\?\p{Alpha}0-9'\`\^\._ ]+)/dgv},{captures:{"1":{name:"keyword.symbol.arrow.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"entity.name.type.fsharp"}},match:/(->)\p{space}*(\()?\p{space}*([\?\p{Alpha}0-9'\`\^\._ ]+)*/dgv},{begin:/(\*)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"}},end:/(\)\p{space}*(([\?\p{Alpha}0-9'\`\^\._ ]+))*)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"}},patterns:[{include:"#tuple_signature"}]},{begin:/(\*)(\p{space}*([\?\p{Alpha}0-9'\`\^\._ ]+))*/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"}},end:/(?==)|(?=\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#tuple_signature"}]},{begin:/(<+(?![\p{space}]*\)))/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},beginComment:"The group (?![[:space:]]*\\) is for protection against overload operator. static member (<)",end:/((?<!:)>|\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},endComment:"The group (?<!:) prevent us from stopping on :> when using SRTP synthax",patterns:[{include:"#generic_declaration"}]},{include:"#anonymous_record_declaration"},{begin:/(\{)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\})/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#record_signature"}]},{include:"#definition"},{include:"#variables"},{include:"#keywords"}]},common_declaration:{patterns:[{begin:/\p{space}*(->)\p{space}*([\p{Alpha}0-9'\`\^\._ ]+)(<)/dgv,beginCaptures:{"1":{name:"keyword.symbol.arrow.fsharp"},"2":{name:"entity.name.type.fsharp"},"3":{name:"keyword.symbol.fsharp"}},end:/(>)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\^\._ ]+)/dgv},{include:"#keywords"}]},{captures:{"1":{name:"keyword.symbol.arrow.fsharp"},"2":{name:"entity.name.type.fsharp"}},match:/\p{space}*(->)\p{space}*(?!with|get|set\b)\b([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._]+)/dgv},{include:"#anonymous_record_declaration"},{begin:/(\??)([\p{Alpha}0-9'\`\^\._ ]+)\p{space}*(:)(\p{space}*([\?\p{Alpha}0-9'\`\^\._ ]+)(<))/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"},"3":{name:"keyword.symbol.fsharp"},"4":{name:"keyword.symbol.fsharp"},"5":{name:"entity.name.type.fsharp"}},end:/(>)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\^\._ ]+)/dgv},{include:"#keywords"}]}]},compiler_directives:{patterns:[{captures:{},match:/\p{space}?(#if|#elif|#elseif|#else|#endif|#light|#nowarn)/dgv,name:"keyword.control.directive.fsharp"}]},constants:{patterns:[{match:/\(\)/dgv,name:"keyword.symbol.fsharp"},{match:/\b-?[0-9][0-9_]*((\.(?!\.)([0-9][0-9_]*([eE][\+\-]??[0-9][0-9_]*)?)?)|([eE][\+\-]??[0-9][0-9_]*))/dgv,name:"constant.numeric.float.fsharp"},{match:/\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))/dgv,name:"constant.numeric.integer.nativeint.fsharp"},{match:/\b(true|false)\b/dgv,name:"constant.language.boolean.fsharp"},{match:/\b(null|void)\b/dgv,name:"constant.other.fsharp"}]},definition:{patterns:[{begin:/\b(let mutable|static let mutable|static let|let inline|let|and|member val|member inline|static member inline|static member val|static member|default|member|override|let!)(\p{space}+rec|mutable)?(\p{space}+\[<[^\n]*>\])?\p{space}*(private|internal|public)?\p{space}+(\[[^\-\=]*\]|[_\p{Alpha}]([_\p{Alpha}0-9\._]+)*|``[_\p{Alpha}]([_\p{Alpha}0-9\._\`\p{space}]+|(?<=,)\p{space})*)?/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.fsharp"},"3":{name:"support.function.attribute.fsharp"},"4":{name:"storage.modifier.fsharp"},"5":{name:"variable.fsharp"}},end:/\p{space}*((with\b)|(=|\n+=|(?<==)))/dgv,endCaptures:{"2":{name:"keyword.fsharp"},"3":{name:"keyword.symbol.fsharp"}},name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]},{begin:/\b(use|use!|and|and!)\p{space}+(\[[^\-\=]*\]|[_\p{Alpha}]([_\p{Alpha}0-9\._]+)*|``[_\p{Alpha}]([_\p{Alpha}0-9\._\`\p{space}]+|(?<=,)\p{space})*)?/dgv,beginCaptures:{"1":{name:"keyword.fsharp"}},end:/\p{space}*(=)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]},{begin:/(?<=with|and)\p{space}*\b((get|set)\p{space}*(?=\())(\[[^\-\=]*\]|[_\p{Alpha}]([_\p{Alpha}0-9\._]+)*|``[_\p{Alpha}]([_\p{Alpha}0-9\._\`\p{space}]+|(?<=,)\p{space})*)?/dgv,beginCaptures:{"4":{name:"variable.fsharp"}},end:/\p{space}*(=|\n+=|(?<==))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]},{begin:/\b(static val mutable|val mutable|val inline|val)(\p{space}+rec|mutable)?(\p{space}+\[<[^\n]*>\])?\p{space}*(private|internal|public)?\p{space}+(\[[^\-\=]*\]|[_\p{Alpha}]([_\p{Alpha}0-9\,\._]+)*|``[_\p{Alpha}]([_\p{Alpha}0-9\,\._\`\p{space}]+|(?<=,)\p{space})*)?/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.fsharp"},"3":{name:"support.function.attribute.fsharp"},"4":{name:"storage.modifier.fsharp"},"5":{name:"variable.fsharp"}},end:/\n(?=\n?$)/dgv,name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]},{begin:/\b(new)\b\p{space}+(\()/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]}]},double_tick:{patterns:[{captures:{"1":{name:"string.quoted.single.fsharp"},"2":{name:"variable.other.binding.fsharp"},"3":{name:"string.quoted.single.fsharp"}},match:/(``)([^\`]*)(``)/dgv,name:"variable.other.binding.fsharp"}]},du_declaration:{patterns:[{begin:/\b(of)\b/dgv,beginCaptures:{"1":{name:"keyword.fsharp"}},end:/(?=\n?$)|(\|)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"du_declaration.fsharp",patterns:[{include:"#comments"},{captures:{"1":{name:"variable.parameter.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\<\>\^\._]+|``[\p{Alpha}0-9' \<\>\^\._]+``)\p{space}*(:)\p{space}*([\p{Alpha}0-9'\`\<\>\^\._]+|``[\p{Alpha}0-9' \<\>\^\._]+``)/dgv},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(``([\p{Alpha}0-9'\^\._ ]+)``|[\p{Alpha}0-9'\`\^\._]+)/dgv},{include:"#anonymous_record_declaration"},{include:"#keywords"}]}]},generic_declaration:{patterns:[{begin:/(:)\p{space}*(\()\p{space}*(static member|member)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"keyword.fsharp"}},comments:"SRTP syntax support",end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#member_declaration"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(('|\^)[\p{Alpha}0-9'\._]+)/dgv},{include:"#variables"},{include:"#keywords"}]},{match:/\b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let!|return!|return|interface|with|abstract|enum|member|try|finally|and|when|or|use|use!|struct|while|mutable|assert|base|done|downcast|downto|extern|fixed|global|lazy|upcast|not)(?!')\b/dgv,name:"keyword.fsharp"},{match:/:/dgv,name:"keyword.symbol.fsharp"},{include:"#constants"},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(('|\^)[\p{Alpha}0-9'\._]+)/dgv},{begin:/(<)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(>)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(('|\^)[\p{Alpha}0-9'\._]+)/dgv},{include:"#tuple_signature"},{include:"#generic_declaration"}]},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(([\?\p{Alpha}0-9'\`\^\._ ]+))+/dgv},{include:"#tuple_signature"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},comments:"Here we need the \\w modifier in order to check that the words are allowed",match:/(?!when|and|or\b)\b([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._]+)/dgv},{captures:{"1":{name:"keyword.symbol.fsharp"}},comments:"Prevent captures of `|>` as a keyword when defining custom operator like `<|>`",match:/(\|)/dgv},{include:"#keywords"}]},keywords:{patterns:[{match:/\b(private|public|internal)\b/dgv,name:"storage.modifier"},{match:/\b(private|to|public|internal|function|class|exception|delegate|of|new|as|begin|end|inherit|let!|interface|abstract|enum|member|and|when|or|use|use!|struct|mutable|assert|base|done|downcast|downto|extern|fixed|global|lazy|upcast|not)(?!')\b/dgv,name:"keyword.fsharp"},{match:/\b(match|yield|yield!|with|if|then|else|elif|for|in|return!|return|try|finally|while|do)(?!')\b/dgv,name:"keyword.control"},{match:/(->|<-)/dgv,name:"keyword.symbol.arrow.fsharp"},{match:/[\.\?]*(&&&|\|\|\||\^\^\^|~~~|~\+|~-|<<<|>>>|\|>|:>|:\?>|:|\[|\]|;|<>|=|@|\|\||&&|&|%|\{|\}|\||_|\.\.|,|\+|-|\*|\/|\^|!|>|>=|>>|<|<=|\(|\)|<<)[\.\?]*/dgv,name:"keyword.symbol.fsharp"}]},member_declaration:{patterns:[{include:"#comments"},{include:"#common_declaration"},{begin:/(:)\p{space}*(\()\p{space}*(static member|member)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"keyword.fsharp"}},comments:"SRTP syntax support",end:/(\))\p{space}*((?=,)|(?==))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#member_declaration"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(\^[\p{Alpha}0-9'\._]+)/dgv},{include:"#variables"},{include:"#keywords"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(\^[\p{Alpha}0-9'\._]+)/dgv},{match:/\b(and|when|or)\b/dgv,name:"keyword.fsharp"},{match:/(\(|\))/dgv,name:"keyword.symbol.fsharp"},{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"},"3":{name:"keyword.symbol.fsharp"},"4":{name:"entity.name.type.fsharp"}},match:/(\??)([\p{Alpha}0-9'\`\^\._]+|``[\p{Alpha}0-9'\`\^\:\,\._ ]+``)\p{space}*(:?)(\p{space}*([\?\p{Alpha}0-9'\`\<\>\._ ]+))?/dgv},{include:"#keywords"}]},modules:{patterns:[{begin:/\b(namespace global)|\b(namespace|module)\p{space}*(public|internal|private|rec)?\p{space}+([\p{Alpha}\|\`\`][\p{Alpha}0-9'_\. ]*)/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.fsharp"},"3":{name:"storage.modifier.fsharp"},"4":{name:"entity.name.section.fsharp"}},end:/(\p{space}?=|\p{space}|(?=\n?$))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"entity.name.section.fsharp",patterns:[{captures:{"1":{name:"punctuation.separator.namespace-reference.fsharp"},"2":{name:"entity.name.section.fsharp"}},match:/(\.)([A-Z][\p{Alpha}0-9'_]*)/dgv,name:"entity.name.section.fsharp"}]},{begin:/\b(open type|open)\p{space}+([\p{Alpha}\|\`\`][\p{Alpha}0-9'_]*)(?=(\.[A-Z][\p{Alpha}0-9_]*)*)/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"entity.name.section.fsharp"}},end:/(\p{space}|(?=\n?$))/dgv,name:"namespace.open.fsharp",patterns:[{captures:{"1":{name:"punctuation.separator.namespace-reference.fsharp"},"2":{name:"entity.name.section.fsharp"}},match:/(\.)([\p{Alpha}][\p{Alpha}0-9'_]*)/dgv,name:"entity.name.section.fsharp"},{include:"#comments"}]},{begin:/^\p{space}*(module)\p{space}+([A-Z][\p{Alpha}0-9'_]*)\p{space}*(=)\p{space}*([A-Z][\p{Alpha}0-9'_]*)/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"entity.name.type.namespace.fsharp"},"3":{name:"keyword.symbol.fsharp"},"4":{name:"entity.name.section.fsharp"}},end:/(\p{space}|(?=\n?$))/dgv,name:"namespace.alias.fsharp",patterns:[{captures:{"1":{name:"punctuation.separator.namespace-reference.fsharp"},"2":{name:"entity.name.section.fsharp"}},match:/(\.)([A-Z][\p{Alpha}0-9'_]*)/dgv,name:"entity.name.section.fsharp"}]}]},record_declaration:{patterns:[{begin:/(\{)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(?<=\})/dgv,patterns:[{include:"#comments"},{begin:/(((mutable)\p{space}[\p{Alpha}]+)|[\p{Alpha}0-9'\`\<\>\^\._]*)\p{space}*((?<!:):(?!:))\p{space}*/dgv,beginCaptures:{"3":{name:"keyword.fsharp"},"4":{name:"keyword.symbol.fsharp"}},end:/(?=\n?$)|(;|\})/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#comments"},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\^_ ]+)/dgv},{include:"#keywords"}]},{include:"#compiler_directives"},{include:"#constants"},{include:"#strings"},{include:"#chars"},{include:"#double_tick"},{include:"#definition"},{include:"#attributes"},{include:"#anonymous_functions"},{include:"#keywords"},{include:"#cexprs"},{include:"#text"}]}]},record_signature:{patterns:[{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"}},match:/[\p{Alpha}0-9'\`\^_ ]+(=)([\p{Alpha}0-9'\`\^_ ]+)/dgv},{begin:/(\{)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\})/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"}},match:/[\p{Alpha}0-9'\`\^_ ]+(=)([\p{Alpha}0-9'\`\^_ ]+)/dgv},{include:"#record_signature"}]},{include:"#keywords"}]},records:{patterns:[{begin:/\b(type)[\p{space}]+(private|internal|public)?\p{space}*/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"storage.modifier.fsharp"}},end:/\p{space}*((with)|((as)\p{space}+([\p{Alpha}0-9']+))|(=)|[\n\=]|(\(\)))/dgv,endCaptures:{"2":{name:"keyword.fsharp"},"3":{name:"keyword.fsharp"},"4":{name:"keyword.fsharp"},"5":{name:"variable.parameter.fsharp"},"6":{name:"keyword.symbol.fsharp"},"7":{name:"keyword.symbol.fsharp"}},name:"record.fsharp",patterns:[{include:"#comments"},{include:"#attributes"},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\^\._]+|``[\p{Alpha}0-9'\`\^\:\,\._ ]+``)/dgv},{begin:/(<)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/((?<!:)>)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(('|\^)``[\p{Alpha}0-9\`\^\:\,\._ ]+``|('|\^)[\p{Alpha}0-9\`\^\:\._]+)/dgv},{match:/\b(interface|with|abstract|and|when|or|not|struct|equality|comparison|unmanaged|delegate|enum)\b/dgv,name:"keyword.fsharp"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"keyword.fsharp"}},match:/(static member|member|new)/dgv},{include:"#common_binding_definition"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},comments:"Here we need the \\w modifier in order to check that the words isn't blacklisted",match:/([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._]+)/dgv},{include:"#keywords"}]},{captures:{"1":{name:"storage.modifier.fsharp"}},match:/\p{space}*(private|internal|public)/dgv},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/\p{space}*(?=(=)|[\n\=]|(\(\))|(as))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#member_declaration"}]},{include:"#keywords"}]}]},string_formatter:{patterns:[{captures:{"1":{name:"keyword.format.specifier.fsharp"}},match:/(%0?-?(\p{Nd}+)?((a|t)|(\.\p{Nd}+)?(f|F|e|E|g|G|M)|(b|c|s|d|i|x|X|o|u)|(s|b|O)|(\+?A)))/dgv,name:"entity.name.type.format.specifier.fsharp"}]},strings:{patterns:[{begin:/(?=[^\\])(@")/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.fsharp"}},end:/(")(?!")/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.fsharp"}},name:"string.quoted.literal.fsharp",patterns:[{match:/"(")/dgv,name:"constant.character.string.escape.fsharp"}]},{begin:/(?=[^\\])(""")/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.fsharp"}},end:/(""")/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.fsharp"}},name:"string.quoted.triple.fsharp",patterns:[{include:"#string_formatter"}]},{begin:/(?=[^\\])(")/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.fsharp"}},end:/(")/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.fsharp"}},name:"string.quoted.double.fsharp",patterns:[{match:/\\(?=\n?$)[ \t]*/dgv,name:"punctuation.separator.string.ignore-eol.fsharp"},{match:/\\(['"\\abfnrtv]|([01][0-9][0-9]|2[0-4][0-9]|25[0-5])|(x[0-9a-fA-F]{2})|(u[0-9a-fA-F]{4})|(U00(0[0-9a-fA-F]|10)[0-9a-fA-F]{4}))/dgv,name:"constant.character.string.escape.fsharp"},{match:/\\(([0-9]{1,3})|(x[^\p{space}]{0,2})|(u[^\p{space}]{0,4})|(U[^\p{space}]{0,8})|[^\p{space}])/dgv,name:"invalid.illegal.character.string.fsharp"},{include:"#string_formatter"}]}]},strp_inlined:{patterns:[{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#strp_inlined_body"}]}]},strp_inlined_body:{patterns:[{include:"#comments"},{include:"#anonymous_functions"},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(\^[\p{Alpha}0-9'\._]+)/dgv},{match:/\b(and|when|or)\b/dgv,name:"keyword.fsharp"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#strp_inlined_body"}]},{captures:{"1":{name:"keyword.fsharp"},"2":{name:"variable.fsharp"},"3":{name:"keyword.symbol.fsharp"}},match:/(static member|member)\p{space}*([\p{Alpha}0-9'\`\<\>\^\._]+|``[\p{Alpha}0-9' \<\>\^\._]+``)\p{space}*(:)/dgv},{include:"#compiler_directives"},{include:"#constants"},{include:"#strings"},{include:"#chars"},{include:"#double_tick"},{include:"#keywords"},{include:"#text"},{include:"#definition"},{include:"#attributes"},{include:"#keywords"},{include:"#cexprs"},{include:"#text"}]},text:{patterns:[{match:/\\/dgv,name:"text.fsharp"}]},tuple_signature:{patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(([\?\p{Alpha}0-9'\`\^\._ ]+))+/dgv},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(([\?\p{Alpha}0-9'\`\^\._ ]+))+/dgv},{include:"#tuple_signature"}]},{include:"#keywords"}]},variables:{patterns:[{match:/\(\)/dgv,name:"keyword.symbol.fsharp"},{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"}},match:/(\??)(``[\p{Alpha}0-9'\`\^\:\,\._ ]+``|(?!private|struct\b)\b[\p{L}\p{M}\p{N}\p{Pc}\p{Alpha}0-9'\`\<\>\^\._ ]+)/dgv}]}},scopeName:"source.fsharp",embeddedLangs:["markdown"],aliases:["f#","fs"]})
3
+ const lang = Object.freeze({displayName:"F#",name:"fsharp",patterns:[{include:"#compiler_directives"},{include:"#comments"},{include:"#constants"},{include:"#strings"},{include:"#chars"},{include:"#double_tick"},{include:"#definition"},{include:"#abstract_definition"},{include:"#attributes"},{include:"#modules"},{include:"#anonymous_functions"},{include:"#du_declaration"},{include:"#record_declaration"},{include:"#records"},{include:"#strp_inlined"},{include:"#keywords"},{include:"#cexprs"},{include:"#text"}],repository:{abstract_definition:{begin:/\b(static\p{space}+)?(abstract)\p{space}+(member)?(\p{space}+\[<[^\n]*>\])?\p{space}*([_\p{Alpha}0-9\,\._\`\p{space}]+)(<)?/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.fsharp"},"3":{name:"keyword.fsharp"},"4":{name:"support.function.attribute.fsharp"},"5":{name:"keyword.symbol.fsharp"}},end:/\p{space}*(with)\b|=|(?=\n?$)/dgv,endCaptures:{"1":{name:"keyword.fsharp"}},name:"abstract.definition.fsharp",patterns:[{include:"#comments"},{include:"#common_declaration"},{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"},"3":{name:"keyword.symbol.fsharp"},"4":{name:"entity.name.type.fsharp"}},match:/(\??)([\p{Alpha}0-9'\`\^\._ ]+)\p{space}*(:)((?!with\b)\b([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._ ]+))?/dgv},{captures:{"1":{name:"entity.name.type.fsharp"}},comments:"Here we need the \\w modifier in order to check that the words isn't blacklisted",match:/(?!with|get|set\b)\p{space}*([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._]+)/dgv},{include:"#keywords"}]},anonymous_functions:{patterns:[{begin:/\b(fun)\b/dgv,beginCaptures:{"1":{name:"keyword.fsharp"}},end:/(->)/dgv,endCaptures:{"1":{name:"keyword.symbol.arrow.fsharp"}},name:"function.anonymous",patterns:[{include:"#comments"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/\p{space}*(?=(->))/dgv,endCaptures:{"1":{name:"keyword.symbol.arrow.fsharp"}},patterns:[{include:"#member_declaration"}]},{include:"#variables"}]}]},anonymous_record_declaration:{begin:/(\{\|)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\|\})/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"keyword.symbol.fsharp"}},match:/[\p{Alpha}0-9'\`\^_ ]+(:)/dgv},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\^_ ]+)/dgv},{include:"#anonymous_record_declaration"},{include:"#keywords"}]},attributes:{patterns:[{begin:/\[</dgv,end:/>\]|\]/dgv,name:"support.function.attribute.fsharp",patterns:[{include:"$self"}]}]},cexprs:{patterns:[{captures:{"0":{name:"keyword.fsharp"}},match:/\b(async|seq|promise|task|maybe|asyncMaybe|controller|scope|application|pipeline)(?=\p{space}*\{)/dgv,name:"cexpr.fsharp"}]},chars:{patterns:[{captures:{"1":{name:"string.quoted.single.fsharp"}},match:/('\\?[^\n]')/dgv,name:"char.fsharp"}]},comments:{patterns:[{beginCaptures:{"1":{name:"comment.block.fsharp"}},match:/(\(\*{3}[^\n]*\*{3}\))/dgv,name:"comment.literate.command.fsharp"},{begin:/^\p{space}*(\(\*\*(?!\)))((?!\*\))[^\n])*(?=\n?$)/dgv,beginCaptures:{"1":{name:"comment.block.fsharp"}},endCaptures:{"1":{name:"comment.block.fsharp"}},name:"comment.block.markdown.fsharp",patterns:[{include:"text.html.markdown"}],while:/^(?!\p{space}*(\*)+\)\p{space}*(?=\n?$))/dgv},{begin:/(\(\*(?!\)))/dgv,beginCaptures:{"1":{name:"comment.block.fsharp"}},end:/(\*+\))/dgv,endCaptures:{"1":{name:"comment.block.fsharp"}},name:"comment.block.fsharp",patterns:[{comments:"Capture // when inside of (* *) like that the rule which capture comments starting by // is not trigger. See https://github.com/ionide/ionide-fsgrammar/issues/155",match:/\/\//dgv,name:"fast-capture.comment.line.double-slash.fsharp"},{comments:"Capture (*) when inside of (* *) so that it doesn't prematurely end the comment block.",match:/\(\*\)/dgv,name:"fast-capture.comment.line.mul-operator.fsharp"},{include:"#comments"}]},{captures:{"1":{name:"comment.block.fsharp"}},match:/((?<!\()(\*)+\))/dgv,name:"comment.block.markdown.fsharp.end"},{begin:/(?<![\!\%\&\+-\.\<\=\>\?\@\^\|\/])\/\/\/(?!\/)/dgv,name:"comment.line.markdown.fsharp",patterns:[{include:"text.html.markdown"}],while:/(?<![\!\%\&\+-\.\<\=\>\?\@\^\|\/])\/\/\/(?!\/)/dgv},{match:/(?<![\!\%\&\+-\.\<\=\>\?\@\^\|\/])\/\/([^\n]*(?=\n?$))/dgv,name:"comment.line.double-slash.fsharp"}]},common_binding_definition:{patterns:[{include:"#comments"},{include:"#attributes"},{begin:/(:)\p{space}*(\()\p{space}*(static member|member)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"keyword.fsharp"}},comments:"SRTP syntax support",end:/(\))\p{space}*((?=,)|(?==))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(\^[\p{Alpha}0-9'\._]+)/dgv},{include:"#variables"},{include:"#keywords"}]},{begin:/(:)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"}},end:/(\)\p{space}*(([\?\p{Alpha}0-9'\`\^\._ ]*)))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"}},patterns:[{include:"#tuple_signature"}]},{begin:/(:)\p{space}*(\^[\p{Alpha}0-9'\._]+)\p{space}*(when)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"},"3":{name:"keyword.fsharp"}},end:/(?=:)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{match:/\b(and|when|or)\b/dgv,name:"keyword.fsharp"},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\^\._]+)/dgv},{match:/(\(|\))/dgv,name:"keyword.symbol.fsharp"}]},{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"}},match:/(:)\p{space}*([\?\p{Alpha}0-9'\`\^\._ ]+)/dgv},{captures:{"1":{name:"keyword.symbol.arrow.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"entity.name.type.fsharp"}},match:/(->)\p{space}*(\()?\p{space}*([\?\p{Alpha}0-9'\`\^\._ ]+)*/dgv},{begin:/(\*)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"}},end:/(\)\p{space}*(([\?\p{Alpha}0-9'\`\^\._ ]+))*)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"}},patterns:[{include:"#tuple_signature"}]},{begin:/(\*)(\p{space}*([\?\p{Alpha}0-9'\`\^\._ ]+))*/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"entity.name.type.fsharp"}},end:/(?==)|(?=\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#tuple_signature"}]},{begin:/(<+(?![\p{space}]*\)))/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},beginComment:"The group (?![[:space:]]*\\) is for protection against overload operator. static member (<)",end:/((?<!:)>|\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},endComment:"The group (?<!:) prevent us from stopping on :> when using SRTP synthax",patterns:[{include:"#generic_declaration"}]},{include:"#anonymous_record_declaration"},{begin:/(\{)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\})/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#record_signature"}]},{include:"#definition"},{include:"#variables"},{include:"#keywords"}]},common_declaration:{patterns:[{begin:/\p{space}*(->)\p{space}*([\p{Alpha}0-9'\`\^\._ ]+)(<)/dgv,beginCaptures:{"1":{name:"keyword.symbol.arrow.fsharp"},"2":{name:"entity.name.type.fsharp"},"3":{name:"keyword.symbol.fsharp"}},end:/(>)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\^\._ ]+)/dgv},{include:"#keywords"}]},{captures:{"1":{name:"keyword.symbol.arrow.fsharp"},"2":{name:"entity.name.type.fsharp"}},match:/\p{space}*(->)\p{space}*(?!with|get|set\b)\b([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._]+)/dgv},{include:"#anonymous_record_declaration"},{begin:/(\??)([\p{Alpha}0-9'\`\^\._ ]+)\p{space}*(:)(\p{space}*([\?\p{Alpha}0-9'\`\^\._ ]+)(<))/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"},"3":{name:"keyword.symbol.fsharp"},"4":{name:"keyword.symbol.fsharp"},"5":{name:"entity.name.type.fsharp"}},end:/(>)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\^\._ ]+)/dgv},{include:"#keywords"}]}]},compiler_directives:{patterns:[{captures:{},match:/\p{space}?(#if|#elif|#elseif|#else|#endif|#light|#nowarn)/dgv,name:"keyword.control.directive.fsharp"}]},constants:{patterns:[{match:/\(\)/dgv,name:"keyword.symbol.fsharp"},{match:/\b-?[0-9][0-9_]*((\.(?!\.)([0-9][0-9_]*([eE][\+\-]??[0-9][0-9_]*)?)?)|([eE][\+\-]??[0-9][0-9_]*))/dgv,name:"constant.numeric.float.fsharp"},{match:/\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))/dgv,name:"constant.numeric.integer.nativeint.fsharp"},{match:/\b(true|false)\b/dgv,name:"constant.language.boolean.fsharp"},{match:/\b(null|void)\b/dgv,name:"constant.other.fsharp"}]},definition:{patterns:[{begin:/\b(let mutable|static let mutable|static let|let inline|let|and|member val|member inline|static member inline|static member val|static member|default|member|override|let!)(\p{space}+rec|mutable)?(\p{space}+\[<[^\n]*>\])?\p{space}*(private|internal|public)?\p{space}+(\[[^\-\=]*\]|[_\p{Alpha}]([_\p{Alpha}0-9\._]+)*|``[_\p{Alpha}]([_\p{Alpha}0-9\._\`\p{space}]+|(?<=,)\p{space})*)?/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.fsharp"},"3":{name:"support.function.attribute.fsharp"},"4":{name:"storage.modifier.fsharp"},"5":{name:"variable.fsharp"}},end:/\p{space}*((with\b)|(=|\n+=|(?<==)))/dgv,endCaptures:{"2":{name:"keyword.fsharp"},"3":{name:"keyword.symbol.fsharp"}},name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]},{begin:/\b(use|use!|and|and!)\p{space}+(\[[^\-\=]*\]|[_\p{Alpha}]([_\p{Alpha}0-9\._]+)*|``[_\p{Alpha}]([_\p{Alpha}0-9\._\`\p{space}]+|(?<=,)\p{space})*)?/dgv,beginCaptures:{"1":{name:"keyword.fsharp"}},end:/\p{space}*(=)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]},{begin:/(?<=with|and)\p{space}*\b((get|set)\p{space}*(?=\())(\[[^\-\=]*\]|[_\p{Alpha}]([_\p{Alpha}0-9\._]+)*|``[_\p{Alpha}]([_\p{Alpha}0-9\._\`\p{space}]+|(?<=,)\p{space})*)?/dgv,beginCaptures:{"4":{name:"variable.fsharp"}},end:/\p{space}*(=|\n+=|(?<==))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]},{begin:/\b(static val mutable|val mutable|val inline|val)(\p{space}+rec|mutable)?(\p{space}+\[<[^\n]*>\])?\p{space}*(private|internal|public)?\p{space}+(\[[^\-\=]*\]|[_\p{Alpha}]([_\p{Alpha}0-9\,\._]+)*|``[_\p{Alpha}]([_\p{Alpha}0-9\,\._\`\p{space}]+|(?<=,)\p{space})*)?/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.fsharp"},"3":{name:"support.function.attribute.fsharp"},"4":{name:"storage.modifier.fsharp"},"5":{name:"variable.fsharp"}},end:/\n(?=\n?$)/dgv,name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]},{begin:/\b(new)\b\p{space}+(\()/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"binding.fsharp",patterns:[{include:"#common_binding_definition"}]}]},double_tick:{patterns:[{captures:{"1":{name:"string.quoted.single.fsharp"},"2":{name:"variable.other.binding.fsharp"},"3":{name:"string.quoted.single.fsharp"}},match:/(``)([^\`]*)(``)/dgv,name:"variable.other.binding.fsharp"}]},du_declaration:{patterns:[{begin:/\b(of)\b/dgv,beginCaptures:{"1":{name:"keyword.fsharp"}},end:/(?=\n?$)|(\|)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"du_declaration.fsharp",patterns:[{include:"#comments"},{captures:{"1":{name:"variable.parameter.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\<\>\^\._]+|``[\p{Alpha}0-9' \<\>\^\._]+``)\p{space}*(:)\p{space}*([\p{Alpha}0-9'\`\<\>\^\._]+|``[\p{Alpha}0-9' \<\>\^\._]+``)/dgv},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(``([\p{Alpha}0-9'\^\._ ]+)``|[\p{Alpha}0-9'\`\^\._]+)/dgv},{include:"#anonymous_record_declaration"},{include:"#keywords"}]}]},generic_declaration:{patterns:[{begin:/(:)\p{space}*(\()\p{space}*(static member|member)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"keyword.fsharp"}},comments:"SRTP syntax support",end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#member_declaration"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(('|\^)[\p{Alpha}0-9'\._]+)/dgv},{include:"#variables"},{include:"#keywords"}]},{match:/\b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let!|return!|return|interface|with|abstract|enum|member|try|finally|and|when|or|use|use!|struct|while|mutable|assert|base|done|downcast|downto|extern|fixed|global|lazy|upcast|not)(?!')\b/dgv,name:"keyword.fsharp"},{match:/:/dgv,name:"keyword.symbol.fsharp"},{include:"#constants"},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(('|\^)[\p{Alpha}0-9'\._]+)/dgv},{begin:/(<)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(>)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(('|\^)[\p{Alpha}0-9'\._]+)/dgv},{include:"#tuple_signature"},{include:"#generic_declaration"}]},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(([\?\p{Alpha}0-9'\`\^\._ ]+))+/dgv},{include:"#tuple_signature"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},comments:"Here we need the \\w modifier in order to check that the words are allowed",match:/(?!when|and|or\b)\b([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._]+)/dgv},{captures:{"1":{name:"keyword.symbol.fsharp"}},comments:"Prevent captures of `|>` as a keyword when defining custom operator like `<|>`",match:/(\|)/dgv},{include:"#keywords"}]},keywords:{patterns:[{match:/\b(private|public|internal)\b/dgv,name:"storage.modifier"},{match:/\b(private|to|public|internal|function|class|exception|delegate|of|new|as|begin|end|inherit|let!|interface|abstract|enum|member|and|when|or|use|use!|struct|mutable|assert|base|done|downcast|downto|extern|fixed|global|lazy|upcast|not)(?!')\b/dgv,name:"keyword.fsharp"},{match:/\b(match|yield|yield!|with|if|then|else|elif|for|in|return!|return|try|finally|while|do)(?!')\b/dgv,name:"keyword.control"},{match:/(->|<-)/dgv,name:"keyword.symbol.arrow.fsharp"},{match:/[\.\?]*(&&&|\|\|\||\^\^\^|~~~|~\+|~-|<<<|>>>|\|>|:>|:\?>|:|\[|\]|;|<>|=|@|\|\||&&|&|%|\{|\}|\||_|\.\.|,|\+|-|\*|\/|\^|!|>|>=|>>|<|<=|\(|\)|<<)[\.\?]*/dgv,name:"keyword.symbol.fsharp"}]},member_declaration:{patterns:[{include:"#comments"},{include:"#common_declaration"},{begin:/(:)\p{space}*(\()\p{space}*(static member|member)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"keyword.symbol.fsharp"},"3":{name:"keyword.fsharp"}},comments:"SRTP syntax support",end:/(\))\p{space}*((?=,)|(?==))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#member_declaration"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(\^[\p{Alpha}0-9'\._]+)/dgv},{include:"#variables"},{include:"#keywords"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(\^[\p{Alpha}0-9'\._]+)/dgv},{match:/\b(and|when|or)\b/dgv,name:"keyword.fsharp"},{match:/(\(|\))/dgv,name:"keyword.symbol.fsharp"},{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"},"3":{name:"keyword.symbol.fsharp"},"4":{name:"entity.name.type.fsharp"}},match:/(\??)([\p{Alpha}0-9'\`\^\._]+|``[\p{Alpha}0-9'\`\^\:\,\._ ]+``)\p{space}*(:?)(\p{space}*([\?\p{Alpha}0-9'\`\<\>\._ ]+))?/dgv},{include:"#keywords"}]},modules:{patterns:[{begin:/\b(namespace global)|\b(namespace|module)\p{space}*(public|internal|private|rec)?\p{space}+([\p{Alpha}\|\`\`][\p{Alpha}0-9'_\. ]*)/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"keyword.fsharp"},"3":{name:"storage.modifier.fsharp"},"4":{name:"entity.name.section.fsharp"}},end:/(\p{space}?=|\p{space}|(?=\n?$))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},name:"entity.name.section.fsharp",patterns:[{captures:{"1":{name:"punctuation.separator.namespace-reference.fsharp"},"2":{name:"entity.name.section.fsharp"}},match:/(\.)([A-Z][\p{Alpha}0-9'_]*)/dgv,name:"entity.name.section.fsharp"}]},{begin:/\b(open type|open)\p{space}+([\p{Alpha}\|\`\`][\p{Alpha}0-9'_]*)(?=(\.[A-Z][\p{Alpha}0-9_]*)*)/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"entity.name.section.fsharp"}},end:/(\p{space}|(?=\n?$))/dgv,name:"namespace.open.fsharp",patterns:[{captures:{"1":{name:"punctuation.separator.namespace-reference.fsharp"},"2":{name:"entity.name.section.fsharp"}},match:/(\.)([\p{Alpha}][\p{Alpha}0-9'_]*)/dgv,name:"entity.name.section.fsharp"},{include:"#comments"}]},{begin:/^\p{space}*(module)\p{space}+([A-Z][\p{Alpha}0-9'_]*)\p{space}*(=)\p{space}*([A-Z][\p{Alpha}0-9'_]*)/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"entity.name.type.namespace.fsharp"},"3":{name:"keyword.symbol.fsharp"},"4":{name:"entity.name.section.fsharp"}},end:/(\p{space}|(?=\n?$))/dgv,name:"namespace.alias.fsharp",patterns:[{captures:{"1":{name:"punctuation.separator.namespace-reference.fsharp"},"2":{name:"entity.name.section.fsharp"}},match:/(\.)([A-Z][\p{Alpha}0-9'_]*)/dgv,name:"entity.name.section.fsharp"}]}]},record_declaration:{patterns:[{begin:/(\{)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(?<=\})/dgv,patterns:[{include:"#comments"},{begin:/(((mutable)\p{space}[\p{Alpha}]+)|[\p{Alpha}0-9'\`\<\>\^\._]*)\p{space}*((?<!:):(?!:))\p{space}*/dgv,beginCaptures:{"3":{name:"keyword.fsharp"},"4":{name:"keyword.symbol.fsharp"}},end:/(?=\n?$)|(;|\})/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#comments"},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\`\^_ ]+)/dgv},{include:"#keywords"}]},{include:"#compiler_directives"},{include:"#constants"},{include:"#strings"},{include:"#chars"},{include:"#double_tick"},{include:"#definition"},{include:"#attributes"},{include:"#anonymous_functions"},{include:"#keywords"},{include:"#cexprs"},{include:"#text"}]}]},record_signature:{patterns:[{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"}},match:/[\p{Alpha}0-9'\`\^_ ]+(=)([\p{Alpha}0-9'\`\^_ ]+)/dgv},{begin:/(\{)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\})/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"}},match:/[\p{Alpha}0-9'\`\^_ ]+(=)([\p{Alpha}0-9'\`\^_ ]+)/dgv},{include:"#record_signature"}]},{include:"#keywords"}]},records:{patterns:[{begin:/\b(type)[\p{space}]+(private|internal|public)?\p{space}*/dgv,beginCaptures:{"1":{name:"keyword.fsharp"},"2":{name:"storage.modifier.fsharp"}},end:/\p{space}*((with)|((as)\p{space}+([\p{Alpha}0-9']+))|(=)|[\n\=]|(\(\)))/dgv,endCaptures:{"2":{name:"keyword.fsharp"},"3":{name:"keyword.fsharp"},"4":{name:"keyword.fsharp"},"5":{name:"variable.parameter.fsharp"},"6":{name:"keyword.symbol.fsharp"},"7":{name:"keyword.symbol.fsharp"}},name:"record.fsharp",patterns:[{include:"#comments"},{include:"#attributes"},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/([\p{Alpha}0-9'\^\._]+|``[\p{Alpha}0-9'\`\^\:\,\._ ]+``)/dgv},{begin:/(<)/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/((?<!:)>)/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(('|\^)``[\p{Alpha}0-9\`\^\:\,\._ ]+``|('|\^)[\p{Alpha}0-9\`\^\:\._]+)/dgv},{match:/\b(interface|with|abstract|and|when|or|not|struct|equality|comparison|unmanaged|delegate|enum)\b/dgv,name:"keyword.fsharp"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"keyword.fsharp"}},match:/(static member|member|new)/dgv},{include:"#common_binding_definition"}]},{captures:{"1":{name:"entity.name.type.fsharp"}},comments:"Here we need the \\w modifier in order to check that the words isn't blacklisted",match:/([\p{L}\p{M}\p{N}\p{Pc}0-9'\`\^\._]+)/dgv},{include:"#keywords"}]},{captures:{"1":{name:"storage.modifier.fsharp"}},match:/\p{space}*(private|internal|public)/dgv},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/\p{space}*(?=(=)|[\n\=]|(\(\))|(as))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#member_declaration"}]},{include:"#keywords"}]}]},string_formatter:{patterns:[{captures:{"1":{name:"keyword.format.specifier.fsharp"}},match:/(%0?-?(\p{Nd}+)?((a|t)|(\.\p{Nd}+)?(f|F|e|E|g|G|M)|(b|c|s|d|i|x|X|o|u)|(s|b|O)|(\+?A)))/dgv,name:"entity.name.type.format.specifier.fsharp"}]},strings:{patterns:[{begin:/(?=[^\\])(@")/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.fsharp"}},end:/(")(?!")/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.fsharp"}},name:"string.quoted.literal.fsharp",patterns:[{match:/"(")/dgv,name:"constant.character.string.escape.fsharp"}]},{begin:/(?=[^\\])(""")/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.fsharp"}},end:/(""")/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.fsharp"}},name:"string.quoted.triple.fsharp",patterns:[{include:"#string_formatter"}]},{begin:/(?=[^\\])(")/dgv,beginCaptures:{"1":{name:"punctuation.definition.string.begin.fsharp"}},end:/(")/dgv,endCaptures:{"1":{name:"punctuation.definition.string.end.fsharp"}},name:"string.quoted.double.fsharp",patterns:[{match:/\\(?=\n?$)[ \t]*/dgv,name:"punctuation.separator.string.ignore-eol.fsharp"},{match:/\\(['"\\abfnrtv]|([01][0-9][0-9]|2[0-4][0-9]|25[0-5])|(x[0-9a-fA-F]{2})|(u[0-9a-fA-F]{4})|(U00(0[0-9a-fA-F]|10)[0-9a-fA-F]{4}))/dgv,name:"constant.character.string.escape.fsharp"},{match:/\\(([0-9]{1,3})|(x[^\p{space}]{0,2})|(u[^\p{space}]{0,4})|(U[^\p{space}]{0,8})|[^\p{space}])/dgv,name:"invalid.illegal.character.string.fsharp"},{include:"#string_formatter"}]}]},strp_inlined:{patterns:[{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#strp_inlined_body"}]}]},strp_inlined_body:{patterns:[{include:"#comments"},{include:"#anonymous_functions"},{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(\^[\p{Alpha}0-9'\._]+)/dgv},{match:/\b(and|when|or)\b/dgv,name:"keyword.fsharp"},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{include:"#strp_inlined_body"}]},{captures:{"1":{name:"keyword.fsharp"},"2":{name:"variable.fsharp"},"3":{name:"keyword.symbol.fsharp"}},match:/(static member|member)\p{space}*([\p{Alpha}0-9'\`\<\>\^\._]+|``[\p{Alpha}0-9' \<\>\^\._]+``)\p{space}*(:)/dgv},{include:"#compiler_directives"},{include:"#constants"},{include:"#strings"},{include:"#chars"},{include:"#double_tick"},{include:"#keywords"},{include:"#text"},{include:"#definition"},{include:"#attributes"},{include:"#keywords"},{include:"#cexprs"},{include:"#text"}]},text:{patterns:[{match:/\\/dgv,name:"text.fsharp"}]},tuple_signature:{patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(([\?\p{Alpha}0-9'\`\^\._ ]+))+/dgv},{begin:/(\()/dgv,beginCaptures:{"1":{name:"keyword.symbol.fsharp"}},end:/(\))/dgv,endCaptures:{"1":{name:"keyword.symbol.fsharp"}},patterns:[{captures:{"1":{name:"entity.name.type.fsharp"}},match:/(([\?\p{Alpha}0-9'\`\^\._ ]+))+/dgv},{include:"#tuple_signature"}]},{include:"#keywords"}]},variables:{patterns:[{match:/\(\)/dgv,name:"keyword.symbol.fsharp"},{captures:{"1":{name:"keyword.symbol.fsharp"},"2":{name:"variable.parameter.fsharp"}},match:/(\??)(``[\p{Alpha}0-9'\`\^\:\,\._ ]+``|(?!private|struct\b)\b[\p{L}\p{M}\p{N}\p{Pc}\p{Alpha}0-9'\`\<\>\^\._ ]+)/dgv}]}},scopeName:"source.fsharp",embeddedLangs:["markdown"],aliases:["f#","fs"]})
4
4
 
5
5
  export default [
6
6
  ...markdown,
@@ -1,7 +1,7 @@
1
1
  import gdshader from './gdshader.mjs'
2
2
  import gdscript from './gdscript.mjs'
3
3
 
4
- const lang = Object.freeze({displayName:"GDResource",name:"gdresource",patterns:[{include:"#embedded_shader"},{include:"#embedded_gdscript"},{include:"#comment"},{include:"#heading"},{include:"#key_value"}],repository:{comment:{captures:{"1":{name:"punctuation.definition.comment.gdresource"}},match:/(;)[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.gdresource"},data:{patterns:[{include:"#comment"},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(\{)\p{space}*/dgv,beginCaptures:{"1":{name:"punctuation.definition.table.inline.gdresource"}},end:/\p{space}*(\})(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,endCaptures:{"1":{name:"punctuation.definition.table.inline.gdresource"}},patterns:[{include:"#key_value"},{include:"#data"}]},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(\[)\p{space}*/dgv,beginCaptures:{"1":{name:"punctuation.definition.array.gdresource"}},end:/\p{space}*(\])(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,endCaptures:{"1":{name:"punctuation.definition.array.gdresource"}},patterns:[{include:"#data"}]},{begin:/"""/dgv,end:/"""/dgv,name:"string.quoted.triple.basic.block.gdresource",patterns:[{match:/\\([btnfr"\\\n\/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/dgv,name:"constant.character.escape.gdresource"},{match:/\\[^btnfr\/"\\\n]/dgv,name:"invalid.illegal.escape.gdresource"}]},{match:/"res:\/\/[^"\\]*(?:\\[^\n][^"\\]*)*"/dgv,name:"support.function.any-method.gdresource"},{match:/(?<=type=)"[^"\\]*(?:\\[^\n][^"\\]*)*"/dgv,name:"support.class.library.gdresource"},{match:/(?<=NodePath\(|parent=|name=)"[^"\\]*(?:\\[^\n][^"\\]*)*"/dgv,name:"constant.character.escape.gdresource"},{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.basic.line.gdresource",patterns:[{match:/\\([btnfr"\\\n\/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/dgv,name:"constant.character.escape.gdresource"},{match:/\\[^btnfr\/"\\\n]/dgv,name:"invalid.illegal.escape.gdresource"}]},{match:/'[^\n]*?'/dgv,name:"string.quoted.single.literal.line.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(true|false)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.language.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\+\-]?(0|([1-9](([0-9]|_[0-9])+)?))(?:(?:\.(0|([1-9](([0-9]|_[0-9])+)?)))?[eE][\+\-]?[1-9]_?[0-9]*|\.[0-9_]*))(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.float.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\+\-]?(0|([1-9](([0-9]|_[0-9])+)?)))(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.integer.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\+\-]?inf)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.inf.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\+\-]?nan)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.nan.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(0x(([0-9a-fA-F](([0-9a-fA-F]|_[0-9a-fA-F])+)?)))(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.hex.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(0o[0-7](_?[0-7])*)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.oct.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(0b[01](_?[01])*)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.bin.gdresource"},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(Vector2|Vector2i|Vector3|Vector3i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|Object|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|StringName|Quaternion|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedColorArray)(\()\p{space}?/dgv,beginCaptures:{"1":{name:"support.class.library.gdresource"}},end:/\p{space}?(\))/dgv,patterns:[{include:"#key_value"},{include:"#data"}]},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(ExtResource|SubResource)(\()\p{space}?/dgv,beginCaptures:{"1":{name:"keyword.control.gdresource"}},end:/\p{space}?(\))/dgv,patterns:[{include:"#key_value"},{include:"#data"}]}]},embedded_gdscript:{begin:/(script\/source) = "/dgv,beginCaptures:{"1":{name:"variable.other.property.gdresource"}},comment:"meta.embedded.block.gdscript",end:/"/dgv,patterns:[{include:"source.gdscript"}]},embedded_shader:{begin:/(code) = "/dgv,beginCaptures:{"1":{name:"variable.other.property.gdresource"}},end:/"/dgv,name:"meta.embedded.block.gdshader",patterns:[{include:"source.gdshader"}]},heading:{begin:/\[([a-z_]*)\p{space}?/dgv,beginCaptures:{"1":{name:"keyword.control.gdresource"}},end:/\]/dgv,patterns:[{include:"#heading_properties"},{include:"#data"}]},heading_properties:{patterns:[{match:/(\p{space}*[A-Za-z_\-][A-Za-z0-9_\-]*\p{space}*=)(?=\p{space}*(?=\n?$))/dgv,name:"invalid.illegal.noValue.gdresource"},{begin:/\p{space}*([A-Za-z_\-][^\p{space}]*|"[^\n]+"|'[^\n]+'|[0-9]+)\p{space}*(=)\p{space}*/dgv,beginCaptures:{"1":{name:"variable.other.property.gdresource"},"2":{name:"punctuation.definition.keyValue.gdresource"}},end:/((?=\n?$)|(?==)|,?|\p{space}*(?=\}))/dgv,patterns:[{include:"#data"}]}]},key_value:{patterns:[{match:/(\p{space}*[A-Za-z_\-][A-Za-z0-9_\-]*\p{space}*=)(?=\p{space}*(?=\n?$))/dgv,name:"invalid.illegal.noValue.gdresource"},{begin:/\p{space}*([A-Za-z_\-][^\p{space}]*|"[^\n]+"|'[^\n]+'|[0-9]+)\p{space}*(=)\p{space}*/dgv,beginCaptures:{"1":{name:"variable.other.property.gdresource"},"2":{name:"punctuation.definition.keyValue.gdresource"}},end:/((?=\n?$)|(?==)|,|\p{space}*(?=\}))/dgv,patterns:[{include:"#data"}]}]}},scopeName:"source.gdresource",embeddedLangs:["gdshader","gdscript"],aliases:undefined})
4
+ const lang = Object.freeze({displayName:"GDResource",name:"gdresource",patterns:[{include:"#embedded_shader"},{include:"#embedded_gdscript"},{include:"#comment"},{include:"#heading"},{include:"#key_value"}],repository:{comment:{captures:{"1":{name:"punctuation.definition.comment.gdresource"}},match:/(;)[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.gdresource"},data:{patterns:[{include:"#comment"},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(\{)\p{space}*/dgv,beginCaptures:{"1":{name:"punctuation.definition.table.inline.gdresource"}},end:/\p{space}*(\})(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,endCaptures:{"1":{name:"punctuation.definition.table.inline.gdresource"}},patterns:[{include:"#key_value"},{include:"#data"}]},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(\[)\p{space}*/dgv,beginCaptures:{"1":{name:"punctuation.definition.array.gdresource"}},end:/\p{space}*(\])(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,endCaptures:{"1":{name:"punctuation.definition.array.gdresource"}},patterns:[{include:"#data"}]},{begin:/"""/dgv,end:/"""/dgv,name:"string.quoted.triple.basic.block.gdresource",patterns:[{match:/\\([btnfr"\\\n\/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/dgv,name:"constant.character.escape.gdresource"},{match:/\\[^btnfr\/"\\\n]/dgv,name:"invalid.illegal.escape.gdresource"}]},{match:/"res:\/\/[^"\\]*(?:\\[^\n][^"\\]*)*"/dgv,name:"support.function.any-method.gdresource"},{match:/(?<=type=)"[^"\\]*(?:\\[^\n][^"\\]*)*"/dgv,name:"support.class.library.gdresource"},{match:/(?<=NodePath\(|parent=|name=)"[^"\\]*(?:\\[^\n][^"\\]*)*"/dgv,name:"constant.character.escape.gdresource"},{begin:/"/dgv,end:/"/dgv,name:"string.quoted.double.basic.line.gdresource",patterns:[{match:/\\([btnfr"\\\n\/ ]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/dgv,name:"constant.character.escape.gdresource"},{match:/\\[^btnfr\/"\\\n]/dgv,name:"invalid.illegal.escape.gdresource"}]},{match:/'[^\n]*?'/dgv,name:"string.quoted.single.literal.line.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(true|false)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.language.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\+\-]?(0|([1-9](([0-9]|_[0-9])+)?))(?:(?:\.(0|([1-9](([0-9]|_[0-9])+)?)))?[eE][\+\-]?[1-9]_?[0-9]*|\.[0-9_]*))(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.float.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\+\-]?(0|([1-9](([0-9]|_[0-9])+)?)))(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.integer.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\+\-]?inf)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.inf.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])([\+\-]?nan)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.nan.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(0x(([0-9a-fA-F](([0-9a-fA-F]|_[0-9a-fA-F])+)?)))(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.hex.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(0o[0-7](_?[0-7])*)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.oct.gdresource"},{match:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(0b[01](_?[01])*)(?![\p{L}\p{M}\p{N}\p{Pc}])/dgv,name:"constant.numeric.bin.gdresource"},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(Vector2|Vector2i|Vector3|Vector3i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|Object|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|StringName|Quaternion|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedColorArray)(\()\p{space}?/dgv,beginCaptures:{"1":{name:"support.class.library.gdresource"}},end:/\p{space}?(\))/dgv,patterns:[{include:"#key_value"},{include:"#data"}]},{begin:/(?<![\p{L}\p{M}\p{N}\p{Pc}])(ExtResource|SubResource)(\()\p{space}?/dgv,beginCaptures:{"1":{name:"keyword.control.gdresource"}},end:/\p{space}?(\))/dgv,patterns:[{include:"#key_value"},{include:"#data"}]}]},embedded_gdscript:{begin:/(script\/source) = "/dgv,beginCaptures:{"1":{name:"variable.other.property.gdresource"}},end:/"/dgv,patterns:[{include:"source.gdscript"}]},embedded_shader:{begin:/(code) = "/dgv,beginCaptures:{"1":{name:"variable.other.property.gdresource"}},end:/"/dgv,name:"meta.embedded.block.gdshader",patterns:[{include:"source.gdshader"}]},heading:{begin:/\[([a-z_]*)\p{space}?/dgv,beginCaptures:{"1":{name:"keyword.control.gdresource"}},end:/\]/dgv,patterns:[{include:"#heading_properties"},{include:"#data"}]},heading_properties:{patterns:[{match:/(\p{space}*[A-Za-z_\-][A-Za-z0-9_\-]*\p{space}*=)(?=\p{space}*(?=\n?$))/dgv,name:"invalid.illegal.noValue.gdresource"},{begin:/\p{space}*([A-Za-z_\-][^\p{space}]*|"[^\n]+"|'[^\n]+'|[0-9]+)\p{space}*(=)\p{space}*/dgv,beginCaptures:{"1":{name:"variable.other.property.gdresource"},"2":{name:"punctuation.definition.keyValue.gdresource"}},end:/((?=\n?$)|(?==)|,?|\p{space}*(?=\}))/dgv,patterns:[{include:"#data"}]}]},key_value:{patterns:[{match:/(\p{space}*[A-Za-z_\-][A-Za-z0-9_\-]*\p{space}*=)(?=\p{space}*(?=\n?$))/dgv,name:"invalid.illegal.noValue.gdresource"},{begin:/\p{space}*([A-Za-z_\-][^\p{space}]*|"[^\n]+"|'[^\n]+'|[0-9]+)\p{space}*(=)\p{space}*/dgv,beginCaptures:{"1":{name:"variable.other.property.gdresource"},"2":{name:"punctuation.definition.keyValue.gdresource"}},end:/((?=\n?$)|(?==)|,|\p{space}*(?=\}))/dgv,patterns:[{include:"#data"}]}]}},scopeName:"source.gdresource",embeddedLangs:["gdshader","gdscript"],aliases:undefined})
5
5
 
6
6
  export default [
7
7
  ...gdshader,
package/dist/gdscript.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { EmulatedRegExp } from 'oniguruma-to-es'
2
2
 
3
- const lang = Object.freeze({displayName:"GDScript",fileTypes:["gd"],name:"gdscript",patterns:[{include:"#statement"},{include:"#expression"}],repository:{annotated_parameter:{begin:/\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:)\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)?/dgv,beginCaptures:{"1":{name:"variable.parameter.function.language.gdscript"},"2":{name:"punctuation.separator.annotation.gdscript"},"3":{name:"entity.name.type.class.gdscript"}},end:/(,)|(?=\))/dgv,endCaptures:{"1":{name:"punctuation.separator.parameters.gdscript"}},patterns:[{include:"#base_expression"},{match:/=(?!=)/dgv,name:"keyword.operator.assignment.gdscript"}]},annotations:{captures:{"1":{name:"entity.name.function.decorator.gdscript"},"2":{name:"entity.name.function.decorator.gdscript"}},match:/(@)(export|export_group|export_color_no_alpha|export_custom|export_dir|export_enum|export_exp_easing|export_file|export_flags|export_flags_2d_navigation|export_flags_2d_physics|export_flags_2d_render|export_flags_3d_navigation|export_flags_3d_physics|export_flags_3d_render|export_global_dir|export_global_file|export_multiline|export_node_path|export_placeholder|export_range|export_storage|icon|onready|rpc|tool|warning_ignore|static_unload)\b/dgv},any_method:{match:/\b([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b(?=\p{space}*[\(])/dgv,name:"entity.name.function.other.gdscript"},any_property:{captures:{"1":{name:"punctuation.accessor.gdscript"},"2":{name:"constant.language.gdscript"},"3":{name:"variable.other.property.gdscript"}},match:/\b(\.)\p{space}*(?<![\@\$\#\%])(?:([A-Z_][A-Z_0-9]*)|([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))\b(?![\(])/dgv},any_variable:{match:/\b(?<![\@\$\#\%])([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b(?![\(])/dgv,name:"variable.other.gdscript"},arithmetic_operator:{match:/->|\+=|-=|\*=|\^=|\/=|%=|&=|~=|\|=|\*\*|\*|\/|%|\+|-/dgv,name:"keyword.operator.arithmetic.gdscript"},assignment_operator:{match:/=/dgv,name:"keyword.operator.assignment.gdscript"},base_expression:{patterns:[{include:"#builtin_get_node_shorthand"},{include:"#nodepath_object"},{include:"#nodepath_function"},{include:"#strings"},{include:"#builtin_classes"},{include:"#const_vars"},{include:"#keywords"},{include:"#operators"},{include:"#lambda_declaration"},{include:"#class_declaration"},{include:"#variable_declaration"},{include:"#signal_declaration_bare"},{include:"#signal_declaration"},{include:"#function_declaration"},{include:"#statement_keyword"},{include:"#assignment_operator"},{include:"#in_keyword"},{include:"#control_flow"},{include:"#match_keyword"},{include:"#curly_braces"},{include:"#square_braces"},{include:"#round_braces"},{include:"#function_call"},{include:"#comment"},{include:"#self"},{include:"#func"},{include:"#letter"},{include:"#numbers"},{include:"#pascal_case_class"},{include:"#line_continuation"}]},bitwise_operator:{match:/&|\||<<=|>>=|<<|>>|\^|~/dgv,name:"keyword.operator.bitwise.gdscript"},boolean_operator:{match:/(&&|\|\|)/dgv,name:"keyword.operator.boolean.gdscript"},builtin_classes:{match:/(?<![^\.]\.|:)\b(Vector2|Vector2i|Vector3|Vector3i|Vector4|Vector4i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|Signal|Callable|StringName|Quaternion|Projection|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedVector4Array|PackedColorArray|super)\b/dgv,name:"entity.name.type.class.builtin.gdscript"},builtin_get_node_shorthand:{patterns:[{include:"#builtin_get_node_shorthand_quoted"},{include:"#builtin_get_node_shorthand_bare"},{include:"#builtin_get_node_shorthand_bare_multi"}]},builtin_get_node_shorthand_bare:{captures:{"1":{name:"keyword.control.flow.gdscript"},"2":{name:"constant.character.escape.gdscript"},"3":{name:"constant.character.escape.gdscript"},"4":{name:"constant.character.escape.gdscript"}},match:/(?<!\/\p{space}*)(\$\p{space}*|%|\$%\p{space}*)(\/\p{space}*)?([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b(?!\p{space}*\/)/dgv,name:"meta.literal.nodepath.bare.gdscript"},builtin_get_node_shorthand_bare_multi:{begin:/(\$\p{space}*|%|\$%\p{space}*)(\/\p{space}*)?([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,beginCaptures:{"1":{name:"keyword.control.flow.gdscript"},"2":{name:"constant.character.escape.gdscript"},"3":{name:"constant.character.escape.gdscript"}},end:/(?!\p{space}*\/\p{space}*%?\p{space}*[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.literal.nodepath.bare.gdscript",patterns:[{captures:{"1":{name:"constant.character.escape.gdscript"},"2":{name:"keyword.control.flow.gdscript"},"3":{name:"constant.character.escape.gdscript"}},match:/(\/)\p{space}*(%)?\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*/dgv}]},builtin_get_node_shorthand_quoted:{begin:/(?:(\$|%)|(&|\^|@))("|')/dgv,beginCaptures:{"1":{name:"keyword.control.flow.gdscript"},"2":{name:"variable.other.enummember.gdscript"}},end:/(\3)()()/dgv,name:"string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape.gdscript",patterns:[{match:/%/dgv,name:"keyword.control.flow"}]},class_declaration:{captures:{"1":{name:"entity.name.type.class.gdscript"},"2":{name:"class.other.gdscript"}},match:/(?<=^class)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(?=:)/dgv},class_enum:{captures:{"1":{name:"entity.name.type.class.gdscript"},"2":{name:"variable.other.enummember.gdscript"}},match:/\b([A-Z][a-zA-Z_0-9]*)\.([A-Z_0-9]+)/dgv},class_is:{captures:{"1":{name:"storage.type.is.gdscript"},"2":{name:"entity.name.type.class.gdscript"}},match:/\p{space}+(is)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},class_name:{captures:{"1":{name:"entity.name.type.class.gdscript"},"2":{name:"class.other.gdscript"}},match:/(?<=class_name)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*(\.([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*))?)/dgv},class_new:{captures:{"1":{name:"entity.name.type.class.gdscript"},"2":{name:"storage.type.new.gdscript"},"3":{name:"punctuation.parenthesis.begin.gdscript"}},match:/\b([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)[^\n](new)\(/dgv},comment:{captures:{"1":{name:"punctuation.definition.comment.number-sign.gdscript"}},match:/(##|#)[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.number-sign.gdscript"},compare_operator:{match:/<=|>=|==|<|>|!=|!/dgv,name:"keyword.operator.comparison.gdscript"},const_vars:{match:/\b([A-Z_][A-Z_0-9]*)\b/dgv,name:"variable.other.constant.gdscript"},control_flow:{match:/\b(?:if|elif|else|while|break|continue|pass|return|when|yield|await)\b/dgv,name:"keyword.control.gdscript"},curly_braces:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.dict.begin.gdscript"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.dict.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},expression:{patterns:[{include:"#base_expression"},{include:"#getter_setter_godot4"},{include:"#assignment_operator"},{include:"#annotations"},{include:"#class_name"},{include:"#builtin_classes"},{include:"#class_new"},{include:"#class_is"},{include:"#class_enum"},{include:"#any_method"},{include:"#any_variable"},{include:"#any_property"}]},extends_statement:{captures:{"1":{name:"keyword.language.gdscript"},"2":{name:"entity.other.inherited-class.gdscript"}},match:/(extends)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*\.[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)?/dgv},func:{match:/\bfunc\b/dgv,name:"keyword.language.gdscript"},function_arguments:{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.arguments.begin.gdscript"}},contentName:"meta.function.parameters.gdscript",end:/(?=\))(?!\)\p{space}*\()/dgv,patterns:[{match:/(,)/dgv,name:"punctuation.separator.arguments.gdscript"},{captures:{"1":{name:"variable.parameter.function-call.gdscript"},"2":{name:"keyword.operator.assignment.gdscript"}},match:/\b([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(=)(?!=)/dgv},{match:/=(?!=)/dgv,name:"keyword.operator.assignment.gdscript"},{include:"#base_expression"},{captures:{"1":{name:"punctuation.definition.arguments.end.gdscript"},"2":{name:"punctuation.definition.arguments.begin.gdscript"}},match:/\p{space}*(\))\p{space}*(\()/dgv},{include:"#letter"},{include:"#any_variable"},{include:"#any_property"},{include:"#keywords"}]},function_call:{begin:/(?=\b[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*\b\()/dgv,comment:"Regular function call of the type \"name(args)\"",end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.arguments.end.gdscript"}},name:"meta.function-call.gdscript",patterns:[{include:"#function_name"},{include:"#function_arguments"}]},function_declaration:{begin:/\p{space}*(func)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(?=\()/dgv,beginCaptures:{"1":{name:"keyword.language.gdscript storage.type.function.gdscript"},"2":{name:"entity.name.function.gdscript"}},end:/(:)/dgv,endCaptures:{"1":{name:"punctuation.section.function.begin.gdscript"}},name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"},{include:"#base_expression"}]},function_name:{patterns:[{include:"#builtin_classes"},{match:/\b(preload)\b/dgv,name:"keyword.language.gdscript"},{comment:"Some color schemas support meta.function-call.generic scope",match:/\b([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.name.function.gdscript"}]},getter_setter_godot4:{patterns:[{captures:{"1":{name:"entity.name.function.gdscript"}},match:/\b(get):/dgv},{begin:/\p{space}+(set)\p{space}*(?=\()/dgv,beginCaptures:{"1":{name:"entity.name.function.gdscript"}},end:/(:|(?=[\#'"\n]))/dgv,name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"}]}]},in_keyword:{patterns:[{begin:/\b(for)\b/dgv,captures:{"1":{name:"keyword.control.gdscript"}},end:/:/dgv,patterns:[{match:/\bin\b/dgv,name:"keyword.control.gdscript"},{include:"#base_expression"},{include:"#any_variable"},{include:"#any_property"}]},{match:/\bin\b/dgv,name:"keyword.operator.wordlike.gdscript"}]},keywords:{match:/\b(?:class|class_name|abstract|is|onready|tool|static|export|as|void|enum|assert|breakpoint|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace)\b/dgv,name:"keyword.language.gdscript"},lambda_declaration:{begin:/(func)\p{space}?(?=\()/dgv,beginCaptures:{"1":{name:"keyword.language.gdscript storage.type.function.gdscript"},"2":{name:"entity.name.function.gdscript"}},end:/(:|(?=[\#'"\n]))/dgv,end2:"(\\s*(\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:)",endCaptures2:{"1":{name:"punctuation.separator.annotation.result.gdscript"},"2":{name:"keyword.language.void.gdscript"},"3":{name:"entity.name.type.class.gdscript markup.italic"}},name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"},{include:"#base_expression"},{include:"#any_variable"},{include:"#any_property"}]},letter:{match:/\b(?:true|false|null)\b/dgv,name:"constant.language.gdscript"},line_continuation:{patterns:[{captures:{"1":{name:"punctuation.separator.continuation.line.gdscript"},"2":{name:"invalid.illegal.line.continuation.gdscript"}},match:/(\\)\p{space}*(\P{space}[^\n]*(?=\n?$)\n?)/dgv},{begin:/(\\)\p{space}*(?=\n?$)\n?/dgv,beginCaptures:{"1":{name:"punctuation.separator.continuation.line.gdscript"}},end:/*@__PURE__*/ new EmulatedRegExp("(?=^\\p{space}*(?=\\n?$))|(?!(\\p{space}*[rR]?('''|\"\"\"|'|\"))|(^(?=\\n?$)))","dgv",{"strategy":"clip_search"}),patterns:[{include:"#base_expression"}]}]},loose_default:{begin:/(=)/dgv,beginCaptures:{"1":{name:"keyword.operator.gdscript"}},end:/(,)|(?=\))/dgv,endCaptures:{"1":{name:"punctuation.separator.parameters.gdscript"}},patterns:[{include:"#base_expression"}]},match_keyword:{captures:{"1":{name:"keyword.control.gdscript"}},match:/^\n\p{space}*(match)/dgv},nodepath_function:{begin:/(get_node_or_null|has_node|has_node_and_resource|find_node|get_node)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.gdscript"},"2":{name:"punctuation.definition.parameters.begin.gdscript"}},contentName:"meta.function.parameters.gdscript",end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.parameters.end.gdscript"}},name:"meta.function.gdscript",patterns:[{begin:/("|')/dgv,end:/\1()/dgv,name:"string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape",patterns:[{match:/%/dgv,name:"keyword.control.flow"}]},{include:"#base_expression"}]},nodepath_object:{begin:/(NodePath)\p{space}*\(/dgv,beginCaptures:{"1":{name:"support.class.library.gdscript"}},end:/\)/dgv,name:"meta.literal.nodepath.gdscript",patterns:[{begin:/("|')/dgv,end:/\1()/dgv,name:"string.quoted.gdscript constant.character.escape.gdscript",patterns:[{match:/%/dgv,name:"keyword.control.flow.gdscript"}]}]},numbers:{patterns:[{match:/0b[01_]+/dgv,name:"constant.numeric.integer.binary.gdscript"},{match:/0x[0-9A-Fa-f_]+/dgv,name:"constant.numeric.integer.hexadecimal.gdscript"},{match:/\.[0-9][0-9_]*([eE][\+\-]?[0-9_]+)?/dgv,name:"constant.numeric.float.gdscript"},{match:/([0-9][0-9_]*)?\.[0-9_]*([eE][\+\-]?[0-9_]+)?/dgv,name:"constant.numeric.float.gdscript"},{match:/[0-9][0-9_]*[eE][\+\-]?[0-9_]+/dgv,name:"constant.numeric.float.gdscript"},{match:/[\-]?[0-9][0-9_]*/dgv,name:"constant.numeric.integer.gdscript"}]},operators:{patterns:[{include:"#wordlike_operator"},{include:"#boolean_operator"},{include:"#arithmetic_operator"},{include:"#bitwise_operator"},{include:"#compare_operator"}]},parameters:{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.parameters.begin.gdscript"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.parameters.end.gdscript"}},name:"meta.function.parameters.gdscript",patterns:[{include:"#annotated_parameter"},{captures:{"1":{name:"variable.parameter.function.language.gdscript"},"2":{name:"punctuation.separator.parameters.gdscript"}},match:/([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(?:(,)|(?=[\)\#\n\=]))/dgv},{include:"#comment"},{include:"#loose_default"}]},pascal_case_class:{match:/\b([A-Z]+[a-z_0-9]*([A-Z]?[a-z_0-9]+)*[A-Z]?)\b/dgv,name:"entity.name.type.class.gdscript"},round_braces:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.parenthesis.begin.gdscript"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.parenthesis.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},self:{match:/\bself\b/dgv,name:"variable.language.gdscript"},signal_declaration:{begin:/\p{space}*(signal)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(?=\()/dgv,beginCaptures:{"1":{name:"keyword.language.gdscript storage.type.function.gdscript"},"2":{name:"entity.name.function.gdscript"}},end:/((?=[\#'"\n]))/dgv,name:"meta.signal.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"}]},signal_declaration_bare:{captures:{"1":{name:"keyword.language.gdscript storage.type.function.gdscript"},"2":{name:"entity.name.function.gdscript"}},match:/\p{space}*(signal)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)(?=[\n\p{space}])/dgv,name:"meta.signal.gdscript"},square_braces:{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.list.begin.gdscript"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.list.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},statement:{patterns:[{include:"#extends_statement"}]},statement_keyword:{patterns:[{match:/\b(?<!\.)(continue|assert|break|elif|else|if|pass|return|while)\b/dgv,name:"keyword.control.flow.gdscript"},{match:/\b(?<!\.)(class)\b/dgv,name:"storage.type.class.gdscript"},{captures:{"1":{name:"keyword.control.flow.gdscript"}},match:/^\p{space}*(case|match)(?=\p{space}*([\-\+\p{L}\p{M}\p{N}\p{Pc}\p{Nd}\(\[\{'"\:\#]|(?=\n?$)))\b/dgv}]},string_bracket_placeholders:{patterns:[{captures:{"1":{name:"constant.character.format.placeholder.other.gdscript"},"3":{name:"storage.type.format.gdscript"},"4":{name:"storage.type.format.gdscript"}},match:/(\{\{|\}\}|\{[\p{L}\p{M}\p{N}\p{Pc}]*(\.[\p{Alpha}_][\p{L}\p{M}\p{N}\p{Pc}]*|\[[^\]'"]+\])*(![rsa])?(:[\p{L}\p{M}\p{N}\p{Pc}]?[\<\>\=\^]?[\-\+ ]?#?\p{Nd}*,?(\.\p{Nd}+)?[bcdeEfFgGnosxX\%]?)?\})/dgv,name:"meta.format.brace.gdscript"},{captures:{"1":{name:"constant.character.format.placeholder.other.gdscript"},"3":{name:"storage.type.format.gdscript"},"4":{name:"storage.type.format.gdscript"}},match:/(\{[\p{L}\p{M}\p{N}\p{Pc}]*(\.[\p{Alpha}_][\p{L}\p{M}\p{N}\p{Pc}]*|\[[^\]'"]+\])*(![rsa])?(:)[^'"\{\}\n]*(?:\{[^'"\}\n]*?\}[^'"\{\}\n]*)*\})/dgv,name:"meta.format.brace.gdscript"}]},string_percent_placeholders:{captures:{"1":{name:"constant.character.format.placeholder.other.gdscript"}},match:/(%(\([\p{L}\p{M}\p{N}\p{Pc}\p{space}]*\))?[\-\+\#0 ]*(\p{Nd}+|\*)?(\.(\p{Nd}+|\*))?([hlL])?[diouxXeEfFgGcrsab\%])/dgv,name:"meta.format.percent.gdscript"},strings:{begin:/(r)?("""|'''|"|')/dgv,beginCaptures:{"1":{name:"constant.character.escape.gdscript"}},end:/\2()()/dgv,name:"string.quoted.gdscript",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.gdscript"},{include:"#string_percent_placeholders"},{include:"#string_bracket_placeholders"}]},variable_declaration:{begin:/\b(?:(var)|(const))\b/dgv,beginCaptures:{"1":{name:"keyword.language.gdscript storage.type.var.gdscript"},"2":{name:"keyword.language.gdscript storage.type.const.gdscript"}},end:/(?=\n?$)|;/dgv,name:"meta.variable.declaration.gdscript",patterns:[{captures:{"1":{name:"punctuation.separator.annotation.gdscript"},"2":{name:"keyword.language.gdscript storage.type.const.gdscript"},"3":{name:"entity.name.function.gdscript"}},match:/(:)?\p{space}*(set|get)\p{space}+=\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},{match:/:=|=(?!=)/dgv,name:"keyword.operator.assignment.gdscript"},{captures:{"1":{name:"punctuation.separator.annotation.gdscript"},"2":{name:"entity.name.type.class.gdscript"}},match:/(:)\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)?/dgv},{captures:{"1":{name:"keyword.language.gdscript storage.type.const.gdscript"},"2":{name:"entity.name.function.gdscript"},"3":{name:"entity.name.function.gdscript"}},match:/(setget)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)(?:[\,]\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*))?/dgv},{include:"#expression"},{include:"#letter"},{include:"#any_variable"},{include:"#any_property"},{include:"#keywords"}]},wordlike_operator:{match:/\b(and|or|not)\b/dgv,name:"keyword.operator.wordlike.gdscript"}},scopeName:"source.gdscript",embeddedLangs:undefined,aliases:undefined})
3
+ const lang = Object.freeze({displayName:"GDScript",fileTypes:["gd"],name:"gdscript",patterns:[{include:"#statement"},{include:"#expression"}],repository:{annotated_parameter:{begin:/\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(:)\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)?/dgv,beginCaptures:{"1":{name:"variable.parameter.function.language.gdscript"},"2":{name:"punctuation.separator.annotation.gdscript"},"3":{name:"entity.name.type.class.gdscript"}},end:/(,)|(?=\))/dgv,endCaptures:{"1":{name:"punctuation.separator.parameters.gdscript"}},patterns:[{include:"#base_expression"},{match:/=(?!=)/dgv,name:"keyword.operator.assignment.gdscript"}]},annotations:{captures:{"1":{name:"entity.name.function.decorator.gdscript"},"2":{name:"entity.name.function.decorator.gdscript"}},match:/(@)(export|export_group|export_color_no_alpha|export_custom|export_dir|export_enum|export_exp_easing|export_file|export_flags|export_flags_2d_navigation|export_flags_2d_physics|export_flags_2d_render|export_flags_3d_navigation|export_flags_3d_physics|export_flags_3d_render|export_global_dir|export_global_file|export_multiline|export_node_path|export_placeholder|export_range|export_storage|icon|onready|rpc|tool|warning_ignore|static_unload)\b/dgv},any_method:{match:/\b([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b(?=\p{space}*[\(])/dgv,name:"entity.name.function.other.gdscript"},any_property:{captures:{"1":{name:"punctuation.accessor.gdscript"},"2":{name:"constant.language.gdscript"},"3":{name:"variable.other.property.gdscript"}},match:/\b(\.)\p{space}*(?<![\@\$\#\%])(?:([A-Z_][A-Z_0-9]*)|([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*))\b(?![\(])/dgv},any_variable:{match:/\b(?<![\@\$\#\%])([A-Za-z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b(?![\(])/dgv,name:"variable.other.gdscript"},arithmetic_operator:{match:/->|\+=|-=|\*=|\^=|\/=|%=|&=|~=|\|=|\*\*|\*|\/|%|\+|-/dgv,name:"keyword.operator.arithmetic.gdscript"},assignment_operator:{match:/=/dgv,name:"keyword.operator.assignment.gdscript"},base_expression:{patterns:[{include:"#builtin_get_node_shorthand"},{include:"#nodepath_object"},{include:"#nodepath_function"},{include:"#strings"},{include:"#builtin_classes"},{include:"#const_vars"},{include:"#keywords"},{include:"#operators"},{include:"#lambda_declaration"},{include:"#class_declaration"},{include:"#variable_declaration"},{include:"#signal_declaration_bare"},{include:"#signal_declaration"},{include:"#function_declaration"},{include:"#statement_keyword"},{include:"#assignment_operator"},{include:"#in_keyword"},{include:"#control_flow"},{include:"#match_keyword"},{include:"#curly_braces"},{include:"#square_braces"},{include:"#round_braces"},{include:"#function_call"},{include:"#comment"},{include:"#self"},{include:"#func"},{include:"#letter"},{include:"#numbers"},{include:"#pascal_case_class"},{include:"#line_continuation"}]},bitwise_operator:{match:/&|\||<<=|>>=|<<|>>|\^|~/dgv,name:"keyword.operator.bitwise.gdscript"},boolean_operator:{match:/(&&|\|\|)/dgv,name:"keyword.operator.boolean.gdscript"},builtin_classes:{match:/(?<![^\.]\.|:)\b(Vector2|Vector2i|Vector3|Vector3i|Vector4|Vector4i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|Signal|Callable|StringName|Quaternion|Projection|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedVector4Array|PackedColorArray|super)\b/dgv,name:"entity.name.type.class.builtin.gdscript"},builtin_get_node_shorthand:{patterns:[{include:"#builtin_get_node_shorthand_quoted"},{include:"#builtin_get_node_shorthand_bare"},{include:"#builtin_get_node_shorthand_bare_multi"}]},builtin_get_node_shorthand_bare:{captures:{"1":{name:"keyword.control.flow.gdscript"},"2":{name:"constant.character.escape.gdscript"},"3":{name:"constant.character.escape.gdscript"},"4":{name:"constant.character.escape.gdscript"}},match:/(?<!\/\p{space}*)(\$\p{space}*|%|\$%\p{space}*)(\/\p{space}*)?([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b(?!\p{space}*\/)/dgv,name:"meta.literal.nodepath.bare.gdscript"},builtin_get_node_shorthand_bare_multi:{begin:/(\$\p{space}*|%|\$%\p{space}*)(\/\p{space}*)?([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,beginCaptures:{"1":{name:"keyword.control.flow.gdscript"},"2":{name:"constant.character.escape.gdscript"},"3":{name:"constant.character.escape.gdscript"}},end:/(?!\p{space}*\/\p{space}*%?\p{space}*[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv,name:"meta.literal.nodepath.bare.gdscript",patterns:[{captures:{"1":{name:"constant.character.escape.gdscript"},"2":{name:"keyword.control.flow.gdscript"},"3":{name:"constant.character.escape.gdscript"}},match:/(\/)\p{space}*(%)?\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*/dgv}]},builtin_get_node_shorthand_quoted:{begin:/(?:(\$|%)|(&|\^|@))("|')/dgv,beginCaptures:{"1":{name:"keyword.control.flow.gdscript"},"2":{name:"variable.other.enummember.gdscript"}},end:/(\3)()()/dgv,name:"string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape.gdscript",patterns:[{match:/%/dgv,name:"keyword.control.flow"}]},class_declaration:{captures:{"1":{name:"entity.name.type.class.gdscript"},"2":{name:"class.other.gdscript"}},match:/(?<=^class)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(?=:)/dgv},class_enum:{captures:{"1":{name:"entity.name.type.class.gdscript"},"2":{name:"variable.other.enummember.gdscript"}},match:/\b([A-Z][a-zA-Z_0-9]*)\.([A-Z_0-9]+)/dgv},class_is:{captures:{"1":{name:"storage.type.is.gdscript"},"2":{name:"entity.name.type.class.gdscript"}},match:/\p{space}+(is)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},class_name:{captures:{"1":{name:"entity.name.type.class.gdscript"},"2":{name:"class.other.gdscript"}},match:/(?<=class_name)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*(\.([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*))?)/dgv},class_new:{captures:{"1":{name:"entity.name.type.class.gdscript"},"2":{name:"storage.type.new.gdscript"},"3":{name:"punctuation.parenthesis.begin.gdscript"}},match:/\b([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)[^\n](new)\(/dgv},comment:{captures:{"1":{name:"punctuation.definition.comment.number-sign.gdscript"}},match:/(##|#)[^\n]*(?=\n?$)\n?/dgv,name:"comment.line.number-sign.gdscript"},compare_operator:{match:/<=|>=|==|<|>|!=|!/dgv,name:"keyword.operator.comparison.gdscript"},const_vars:{match:/\b([A-Z_][A-Z_0-9]*)\b/dgv,name:"variable.other.constant.gdscript"},control_flow:{match:/\b(?:if|elif|else|while|break|continue|pass|return|when|yield|await)\b/dgv,name:"keyword.control.gdscript"},curly_braces:{begin:/\{/dgv,beginCaptures:{"0":{name:"punctuation.definition.dict.begin.gdscript"}},end:/\}/dgv,endCaptures:{"0":{name:"punctuation.definition.dict.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},expression:{patterns:[{include:"#base_expression"},{include:"#getter_setter_godot4"},{include:"#assignment_operator"},{include:"#annotations"},{include:"#class_name"},{include:"#builtin_classes"},{include:"#class_new"},{include:"#class_is"},{include:"#class_enum"},{include:"#any_method"},{include:"#any_variable"},{include:"#any_property"}]},extends_statement:{captures:{"1":{name:"keyword.language.gdscript"},"2":{name:"entity.other.inherited-class.gdscript"}},match:/(extends)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*\.[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)?/dgv},func:{match:/\bfunc\b/dgv,name:"keyword.language.gdscript"},function_arguments:{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.arguments.begin.gdscript"}},contentName:"meta.function.parameters.gdscript",end:/(?=\))(?!\)\p{space}*\()/dgv,patterns:[{match:/(,)/dgv,name:"punctuation.separator.arguments.gdscript"},{captures:{"1":{name:"variable.parameter.function-call.gdscript"},"2":{name:"keyword.operator.assignment.gdscript"}},match:/\b([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(=)(?!=)/dgv},{match:/=(?!=)/dgv,name:"keyword.operator.assignment.gdscript"},{include:"#base_expression"},{captures:{"1":{name:"punctuation.definition.arguments.end.gdscript"},"2":{name:"punctuation.definition.arguments.begin.gdscript"}},match:/\p{space}*(\))\p{space}*(\()/dgv},{include:"#letter"},{include:"#any_variable"},{include:"#any_property"},{include:"#keywords"}]},function_call:{begin:/(?=\b[a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*\b\()/dgv,end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.arguments.end.gdscript"}},name:"meta.function-call.gdscript",patterns:[{include:"#function_name"},{include:"#function_arguments"}]},function_declaration:{begin:/\p{space}*(func)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(?=\()/dgv,beginCaptures:{"1":{name:"keyword.language.gdscript storage.type.function.gdscript"},"2":{name:"entity.name.function.gdscript"}},end:/(:)/dgv,endCaptures:{"1":{name:"punctuation.section.function.begin.gdscript"}},name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"},{include:"#base_expression"}]},function_name:{patterns:[{include:"#builtin_classes"},{match:/\b(preload)\b/dgv,name:"keyword.language.gdscript"},{match:/\b([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\b/dgv,name:"entity.name.function.gdscript"}]},getter_setter_godot4:{patterns:[{captures:{"1":{name:"entity.name.function.gdscript"}},match:/\b(get):/dgv},{begin:/\p{space}+(set)\p{space}*(?=\()/dgv,beginCaptures:{"1":{name:"entity.name.function.gdscript"}},end:/(:|(?=[\#'"\n]))/dgv,name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"}]}]},in_keyword:{patterns:[{begin:/\b(for)\b/dgv,captures:{"1":{name:"keyword.control.gdscript"}},end:/:/dgv,patterns:[{match:/\bin\b/dgv,name:"keyword.control.gdscript"},{include:"#base_expression"},{include:"#any_variable"},{include:"#any_property"}]},{match:/\bin\b/dgv,name:"keyword.operator.wordlike.gdscript"}]},keywords:{match:/\b(?:class|class_name|abstract|is|onready|tool|static|export|as|void|enum|assert|breakpoint|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace)\b/dgv,name:"keyword.language.gdscript"},lambda_declaration:{begin:/(func)\p{space}?(?=\()/dgv,beginCaptures:{"1":{name:"keyword.language.gdscript storage.type.function.gdscript"},"2":{name:"entity.name.function.gdscript"}},end:/(:|(?=[\#'"\n]))/dgv,end2:"(\\s*(\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:)",endCaptures2:{"1":{name:"punctuation.separator.annotation.result.gdscript"},"2":{name:"keyword.language.void.gdscript"},"3":{name:"entity.name.type.class.gdscript markup.italic"}},name:"meta.function.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"},{include:"#base_expression"},{include:"#any_variable"},{include:"#any_property"}]},letter:{match:/\b(?:true|false|null)\b/dgv,name:"constant.language.gdscript"},line_continuation:{patterns:[{captures:{"1":{name:"punctuation.separator.continuation.line.gdscript"},"2":{name:"invalid.illegal.line.continuation.gdscript"}},match:/(\\)\p{space}*(\P{space}[^\n]*(?=\n?$)\n?)/dgv},{begin:/(\\)\p{space}*(?=\n?$)\n?/dgv,beginCaptures:{"1":{name:"punctuation.separator.continuation.line.gdscript"}},end:/*@__PURE__*/ new EmulatedRegExp("(?=^\\p{space}*(?=\\n?$))|(?!(\\p{space}*[rR]?('''|\"\"\"|'|\"))|(^(?=\\n?$)))","dgv",{"strategy":"clip_search"}),patterns:[{include:"#base_expression"}]}]},loose_default:{begin:/(=)/dgv,beginCaptures:{"1":{name:"keyword.operator.gdscript"}},end:/(,)|(?=\))/dgv,endCaptures:{"1":{name:"punctuation.separator.parameters.gdscript"}},patterns:[{include:"#base_expression"}]},match_keyword:{captures:{"1":{name:"keyword.control.gdscript"}},match:/^\n\p{space}*(match)/dgv},nodepath_function:{begin:/(get_node_or_null|has_node|has_node_and_resource|find_node|get_node)\p{space}*(\()/dgv,beginCaptures:{"1":{name:"entity.name.function.gdscript"},"2":{name:"punctuation.definition.parameters.begin.gdscript"}},contentName:"meta.function.parameters.gdscript",end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.parameters.end.gdscript"}},name:"meta.function.gdscript",patterns:[{begin:/("|')/dgv,end:/\1()/dgv,name:"string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape",patterns:[{match:/%/dgv,name:"keyword.control.flow"}]},{include:"#base_expression"}]},nodepath_object:{begin:/(NodePath)\p{space}*\(/dgv,beginCaptures:{"1":{name:"support.class.library.gdscript"}},end:/\)/dgv,name:"meta.literal.nodepath.gdscript",patterns:[{begin:/("|')/dgv,end:/\1()/dgv,name:"string.quoted.gdscript constant.character.escape.gdscript",patterns:[{match:/%/dgv,name:"keyword.control.flow.gdscript"}]}]},numbers:{patterns:[{match:/0b[01_]+/dgv,name:"constant.numeric.integer.binary.gdscript"},{match:/0x[0-9A-Fa-f_]+/dgv,name:"constant.numeric.integer.hexadecimal.gdscript"},{match:/\.[0-9][0-9_]*([eE][\+\-]?[0-9_]+)?/dgv,name:"constant.numeric.float.gdscript"},{match:/([0-9][0-9_]*)?\.[0-9_]*([eE][\+\-]?[0-9_]+)?/dgv,name:"constant.numeric.float.gdscript"},{match:/[0-9][0-9_]*[eE][\+\-]?[0-9_]+/dgv,name:"constant.numeric.float.gdscript"},{match:/[\-]?[0-9][0-9_]*/dgv,name:"constant.numeric.integer.gdscript"}]},operators:{patterns:[{include:"#wordlike_operator"},{include:"#boolean_operator"},{include:"#arithmetic_operator"},{include:"#bitwise_operator"},{include:"#compare_operator"}]},parameters:{begin:/(\()/dgv,beginCaptures:{"1":{name:"punctuation.definition.parameters.begin.gdscript"}},end:/(\))/dgv,endCaptures:{"1":{name:"punctuation.definition.parameters.end.gdscript"}},name:"meta.function.parameters.gdscript",patterns:[{include:"#annotated_parameter"},{captures:{"1":{name:"variable.parameter.function.language.gdscript"},"2":{name:"punctuation.separator.parameters.gdscript"}},match:/([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(?:(,)|(?=[\)\#\n\=]))/dgv},{include:"#comment"},{include:"#loose_default"}]},pascal_case_class:{match:/\b([A-Z]+[a-z_0-9]*([A-Z]?[a-z_0-9]+)*[A-Z]?)\b/dgv,name:"entity.name.type.class.gdscript"},round_braces:{begin:/\(/dgv,beginCaptures:{"0":{name:"punctuation.parenthesis.begin.gdscript"}},end:/\)/dgv,endCaptures:{"0":{name:"punctuation.parenthesis.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},self:{match:/\bself\b/dgv,name:"variable.language.gdscript"},signal_declaration:{begin:/\p{space}*(signal)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)\p{space}*(?=\()/dgv,beginCaptures:{"1":{name:"keyword.language.gdscript storage.type.function.gdscript"},"2":{name:"entity.name.function.gdscript"}},end:/((?=[\#'"\n]))/dgv,name:"meta.signal.gdscript",patterns:[{include:"#parameters"},{include:"#line_continuation"}]},signal_declaration_bare:{captures:{"1":{name:"keyword.language.gdscript storage.type.function.gdscript"},"2":{name:"entity.name.function.gdscript"}},match:/\p{space}*(signal)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)(?=[\n\p{space}])/dgv,name:"meta.signal.gdscript"},square_braces:{begin:/\[/dgv,beginCaptures:{"0":{name:"punctuation.definition.list.begin.gdscript"}},end:/\]/dgv,endCaptures:{"0":{name:"punctuation.definition.list.end.gdscript"}},patterns:[{include:"#base_expression"},{include:"#any_variable"}]},statement:{patterns:[{include:"#extends_statement"}]},statement_keyword:{patterns:[{match:/\b(?<!\.)(continue|assert|break|elif|else|if|pass|return|while)\b/dgv,name:"keyword.control.flow.gdscript"},{match:/\b(?<!\.)(class)\b/dgv,name:"storage.type.class.gdscript"},{captures:{"1":{name:"keyword.control.flow.gdscript"}},match:/^\p{space}*(case|match)(?=\p{space}*([\-\+\p{L}\p{M}\p{N}\p{Pc}\p{Nd}\(\[\{'"\:\#]|(?=\n?$)))\b/dgv}]},string_bracket_placeholders:{patterns:[{captures:{"1":{name:"constant.character.format.placeholder.other.gdscript"},"3":{name:"storage.type.format.gdscript"},"4":{name:"storage.type.format.gdscript"}},match:/(\{\{|\}\}|\{[\p{L}\p{M}\p{N}\p{Pc}]*(\.[\p{Alpha}_][\p{L}\p{M}\p{N}\p{Pc}]*|\[[^\]'"]+\])*(![rsa])?(:[\p{L}\p{M}\p{N}\p{Pc}]?[\<\>\=\^]?[\-\+ ]?#?\p{Nd}*,?(\.\p{Nd}+)?[bcdeEfFgGnosxX\%]?)?\})/dgv,name:"meta.format.brace.gdscript"},{captures:{"1":{name:"constant.character.format.placeholder.other.gdscript"},"3":{name:"storage.type.format.gdscript"},"4":{name:"storage.type.format.gdscript"}},match:/(\{[\p{L}\p{M}\p{N}\p{Pc}]*(\.[\p{Alpha}_][\p{L}\p{M}\p{N}\p{Pc}]*|\[[^\]'"]+\])*(![rsa])?(:)[^'"\{\}\n]*(?:\{[^'"\}\n]*?\}[^'"\{\}\n]*)*\})/dgv,name:"meta.format.brace.gdscript"}]},string_percent_placeholders:{captures:{"1":{name:"constant.character.format.placeholder.other.gdscript"}},match:/(%(\([\p{L}\p{M}\p{N}\p{Pc}\p{space}]*\))?[\-\+\#0 ]*(\p{Nd}+|\*)?(\.(\p{Nd}+|\*))?([hlL])?[diouxXeEfFgGcrsab\%])/dgv,name:"meta.format.percent.gdscript"},strings:{begin:/(r)?("""|'''|"|')/dgv,beginCaptures:{"1":{name:"constant.character.escape.gdscript"}},end:/\2()()/dgv,name:"string.quoted.gdscript",patterns:[{match:/\\[^\n]/dgv,name:"constant.character.escape.gdscript"},{include:"#string_percent_placeholders"},{include:"#string_bracket_placeholders"}]},variable_declaration:{begin:/\b(?:(var)|(const))\b/dgv,beginCaptures:{"1":{name:"keyword.language.gdscript storage.type.var.gdscript"},"2":{name:"keyword.language.gdscript storage.type.const.gdscript"}},end:/(?=\n?$)|;/dgv,name:"meta.variable.declaration.gdscript",patterns:[{captures:{"1":{name:"punctuation.separator.annotation.gdscript"},"2":{name:"keyword.language.gdscript storage.type.const.gdscript"},"3":{name:"entity.name.function.gdscript"}},match:/(:)?\p{space}*(set|get)\p{space}+=\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)/dgv},{match:/:=|=(?!=)/dgv,name:"keyword.operator.assignment.gdscript"},{captures:{"1":{name:"punctuation.separator.annotation.gdscript"},"2":{name:"entity.name.type.class.gdscript"}},match:/(:)\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)?/dgv},{captures:{"1":{name:"keyword.language.gdscript storage.type.const.gdscript"},"2":{name:"entity.name.function.gdscript"},"3":{name:"entity.name.function.gdscript"}},match:/(setget)\p{space}+([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*)(?:[\,]\p{space}*([a-zA-Z_][\p{L}\p{M}\p{N}\p{Pc}]*))?/dgv},{include:"#expression"},{include:"#letter"},{include:"#any_variable"},{include:"#any_property"},{include:"#keywords"}]},wordlike_operator:{match:/\b(and|or|not)\b/dgv,name:"keyword.operator.wordlike.gdscript"}},scopeName:"source.gdscript",embeddedLangs:undefined,aliases:undefined})
4
4
 
5
5
  export default [
6
6
  lang
@@ -1,6 +1,6 @@
1
1
  import diff from './diff.mjs'
2
2
 
3
- const lang = Object.freeze({displayName:"Git Commit Message",name:"git-commit",patterns:[{begin:/(?=^diff --git)/dgv,comment:"diff presented at the end of the commit message when using commit -v.",contentName:"source.diff",end:/$/dgv,name:"meta.embedded.diff.git-commit",patterns:[{include:"source.diff"}]},{begin:/^(?!#)/dgv,comment:"User supplied message",end:/^(?=#)/dgv,name:"meta.scope.message.git-commit",patterns:[{captures:{"1":{name:"invalid.deprecated.line-too-long.git-commit"},"2":{name:"invalid.illegal.line-too-long.git-commit"}},comment:"Mark > 50 lines as deprecated, > 72 as illegal",match:/[^\n]{0,50}([^\n]{0,22}([^\n]*))(?=\n?$)/dgvy,name:"meta.scope.subject.git-commit"}]},{begin:/^(?=#)/dgv,comment:"Git supplied metadata in a number of lines starting with #",contentName:"comment.line.number-sign.git-commit",end:/^(?!#)/dgv,name:"meta.scope.metadata.git-commit",patterns:[{captures:{"1":{name:"markup.changed.git-commit"}},match:/^#\t((modified|renamed):[^\n]*)(?=\n?$)/dgv},{captures:{"1":{name:"markup.inserted.git-commit"}},match:/^#\t(new file:[^\n]*)(?=\n?$)/dgv},{captures:{"1":{name:"markup.deleted.git-commit"}},match:/^#\t(deleted[^\n]*)(?=\n?$)/dgv},{captures:{"1":{name:"keyword.other.file-type.git-commit"},"2":{name:"string.unquoted.filename.git-commit"}},comment:"Fallback for non-English git commit template",match:/^#\t([^\:]+): *([^\n]*)(?=\n?$)/dgv}]}],scopeName:"text.git-commit",embeddedLangs:["diff"],aliases:undefined})
3
+ const lang = Object.freeze({displayName:"Git Commit Message",name:"git-commit",patterns:[{begin:/(?=^diff --git)/dgv,contentName:"source.diff",end:/$/dgv,name:"meta.embedded.diff.git-commit",patterns:[{include:"source.diff"}]},{begin:/^(?!#)/dgv,end:/^(?=#)/dgv,name:"meta.scope.message.git-commit",patterns:[{captures:{"1":{name:"invalid.deprecated.line-too-long.git-commit"},"2":{name:"invalid.illegal.line-too-long.git-commit"}},match:/[^\n]{0,50}([^\n]{0,22}([^\n]*))(?=\n?$)/dgvy,name:"meta.scope.subject.git-commit"}]},{begin:/^(?=#)/dgv,contentName:"comment.line.number-sign.git-commit",end:/^(?!#)/dgv,name:"meta.scope.metadata.git-commit",patterns:[{captures:{"1":{name:"markup.changed.git-commit"}},match:/^#\t((modified|renamed):[^\n]*)(?=\n?$)/dgv},{captures:{"1":{name:"markup.inserted.git-commit"}},match:/^#\t(new file:[^\n]*)(?=\n?$)/dgv},{captures:{"1":{name:"markup.deleted.git-commit"}},match:/^#\t(deleted[^\n]*)(?=\n?$)/dgv},{captures:{"1":{name:"keyword.other.file-type.git-commit"},"2":{name:"string.unquoted.filename.git-commit"}},match:/^#\t([^\:]+): *([^\n]*)(?=\n?$)/dgv}]}],scopeName:"text.git-commit",embeddedLangs:["diff"],aliases:undefined})
4
4
 
5
5
  export default [
6
6
  ...diff,