github-linguist 8.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/grammars/go.mod.json +1 -1
- data/grammars/liquid.injection.json +1 -1
- data/grammars/markdown.vue.codeblock.json +1 -0
- data/grammars/mdx.vue.codeblock.json +1 -0
- data/grammars/source.QB64.json +1 -0
- data/grammars/source.abap.json +1 -1
- data/grammars/source.abl.json +1 -1
- data/grammars/source.angelscript.json +1 -1
- data/grammars/source.answersetprogramming.json +1 -0
- data/grammars/source.apacheconf.json +1 -0
- data/grammars/source.assembly.json +1 -1
- data/grammars/source.ats.json +1 -1
- data/grammars/source.basic.json +1 -1
- data/grammars/source.bb.json +1 -1
- data/grammars/source.brs.json +1 -1
- data/grammars/source.bsl.json +1 -1
- data/grammars/source.bst.json +1 -0
- data/grammars/source.c.linker.json +1 -0
- data/grammars/source.cairo0.json +1 -1
- data/grammars/source.cmake.json +1 -1
- data/grammars/source.cmakecache.json +1 -0
- data/grammars/source.cobol.json +1 -1
- data/grammars/source.cs.json +1 -1
- data/grammars/source.curry.json +1 -1
- data/grammars/source.dart.json +1 -1
- data/grammars/source.dds.dspf.json +1 -1
- data/grammars/source.erlang.json +1 -1
- data/grammars/source.fsharp.json +1 -1
- data/grammars/source.gdscript.json +1 -1
- data/grammars/source.git-revlist.json +1 -1
- data/grammars/source.gleam.json +1 -1
- data/grammars/source.graphql.json +1 -1
- data/grammars/source.hack.json +1 -1
- data/grammars/source.hcl.json +1 -1
- data/grammars/source.hcl.terraform.json +1 -1
- data/grammars/source.ice.json +1 -1
- data/grammars/source.ispc.json +1 -0
- data/grammars/source.jai.json +1 -0
- data/grammars/source.json.comments.json +1 -0
- data/grammars/source.julia.json +1 -1
- data/grammars/source.just.json +1 -1
- data/grammars/source.kdl.json +1 -0
- data/grammars/source.lean.markdown.json +1 -1
- data/grammars/source.lean4.markdown.json +1 -1
- data/grammars/source.luau.json +1 -1
- data/grammars/source.matlab.json +1 -1
- data/grammars/source.mdx.astro.json +1 -0
- data/grammars/source.mdx.json +1 -1
- data/grammars/source.mo.json +1 -1
- data/grammars/source.moonbit.json +1 -0
- data/grammars/source.msg.json +1 -0
- data/grammars/source.mzn.json +1 -0
- data/grammars/source.ned.json +1 -0
- data/grammars/source.nr.json +1 -1
- data/grammars/source.nushell.json +1 -1
- data/grammars/source.odin.json +1 -1
- data/grammars/source.openesql.json +1 -0
- data/grammars/source.overpassql.json +1 -0
- data/grammars/source.p4.json +1 -1
- data/grammars/source.polar.json +1 -1
- data/grammars/source.powerbuilder.json +1 -1
- data/grammars/source.prisma.json +1 -1
- data/grammars/source.purescript.json +1 -1
- data/grammars/source.ql.json +1 -1
- data/grammars/source.qsharp.json +1 -1
- data/grammars/source.rascal.json +1 -1
- data/grammars/source.rescript.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.scala.json +1 -1
- data/grammars/source.scm.json +1 -0
- data/grammars/source.sdbl.json +1 -1
- data/grammars/source.slang.json +1 -0
- data/grammars/source.slice.json +1 -1
- data/grammars/source.sourcepawn.json +1 -1
- data/grammars/source.stan.json +1 -1
- data/grammars/source.swift.json +1 -1
- data/grammars/source.tact.json +1 -0
- data/grammars/source.talon.json +1 -1
- data/grammars/source.templ.json +1 -1
- data/grammars/source.textgrid.json +1 -1
- data/grammars/source.toc.json +1 -1
- data/grammars/source.ts.json +1 -1
- data/grammars/source.ts.prismaClientRawSQL.json +1 -1
- data/grammars/source.tsp.json +1 -0
- data/grammars/source.tsx.json +1 -1
- data/grammars/source.typst.json +1 -1
- data/grammars/source.vba.json +1 -1
- data/grammars/source.vue.json +1 -0
- data/grammars/source.wdl.json +1 -1
- data/grammars/source.xmake.json +1 -0
- data/grammars/text.adblock.json +1 -1
- data/grammars/text.html.liquid.json +1 -1
- data/grammars/text.html.markdown.d2.json +1 -1
- data/grammars/text.md.json +1 -1
- data/grammars/text.rtf.json +1 -1
- data/grammars/version +1 -1
- data/grammars/vue.directives.json +1 -0
- data/grammars/vue.interpolations.json +1 -0
- data/grammars/vue.sfc.style.variable.injection.json +1 -0
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +32 -1
- data/lib/linguist/generic.yml +1 -0
- data/lib/linguist/heuristics.yml +109 -25
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +232 -10
- data/lib/linguist/lazy_blob.rb +15 -7
- data/lib/linguist/repository.rb +18 -13
- data/lib/linguist/samples.json +1 -1
- data/lib/linguist/shebang.rb +1 -1
- data/lib/linguist/source/diff.rb +72 -0
- data/lib/linguist/source/repository.rb +64 -0
- data/lib/linguist/source/rugged.rb +95 -0
- metadata +34 -9
- data/grammars/source.apache-config.json +0 -1
- data/grammars/source.apache-config.mod_perl.json +0 -1
- data/grammars/source.cache.cmake.json +0 -1
- data/grammars/text.html.erlang.yaws.json +0 -1
- data/grammars/text.html.vue.json +0 -1
- data/grammars/text.mdx.astro.codeblock.json +0 -1
data/grammars/source.mo.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"Motoko","scopeName":"source.mo","patterns":[{"include":"#shebang-line"},{"include":"#comment"},{"include":"#attribute"},{"include":"#literal"},{"include":"#operator"},{"include":"#declaration"},{"include":"#storage-type"},{"include":"#keyword"},{"include":"#type"},{"include":"#boolean"}],"repository":{"access-level-modifier":{"name":"keyword.other.access-level-modifier.motoko","match":"\\b(public|system|private)\\b"},"arithmetic-operator":{"name":"keyword.operator.arithmetic.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+|\\-|\\*|\\/)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"array-type":{"name":"meta.array.motoko","begin":"\\b(Array)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.array.motoko"},"2":{"name":"punctuation.array.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.array.end.motoko"}}},"assignment-operator":{"name":"keyword.operator.assignment.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+|\\-|\\*|\\/|%|\u003c\u003c\u003e?|\u003c?\u003e\u003e|\u0026|\\^|\\||\u0026\u0026|\\|\\|)?=(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"async-await-keyword":{"name":"keyword.async-await.motoko","match":"\\b(async|await)\\b"},"attribute":{"name":"meta.attribute.motoko","patterns":[{"contentName":"meta.attribute.arguments.motoko","begin":"((@)(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B))(\\()","end":"\\)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"storage.modifier.attribute.motoko"},"2":{"name":"punctuation.definition.attribute.motoko"},"3":{"name":"punctuation.definition.attribute-arguments.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.attribute-arguments.end.motoko"}}},{"match":"((@)(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B))","captures":{"1":{"name":"storage.modifier.attribute.motoko"},"2":{"name":"punctuation.definition.attribute.motoko"}}}]},"bitwise-operator":{"name":"keyword.operator.bitwise.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\u0026|\\||\\^|\u003c\u003c\u003e?|\u003c?\u003e\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"block-comment":{"name":"comment.block.motoko","begin":"/\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.end.motoko"}}},"boolean":{"name":"keyword.constant.boolean.motoko","match":"\\b(true|false)\\b"},"branch-statement-keyword":{"name":"keyword.control.branch.motoko","patterns":[{"include":"#if-statement-keyword"},{"include":"#switch-statement-keyword"}]},"char-literal":{"name":"meta.literal.char.motoko","begin":"'","end":"'","patterns":[{"name":"constant.character.escape.motoko","match":"\\\\([0tnr\\\"\\'\\\\]|x[[:xdigit:]]{2}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})"},{"name":"invalid.illegal.motoko","match":"(\\'|\\\\)"},{"name":"string.quoted.single.motoko","match":"(.)"}],"beginCaptures":{"0":{"name":"string.quoted.double.motoko"}},"endCaptures":{"0":{"name":"string.quoted.single.motoko"}}},"code-block":{"begin":"(\\{)","end":"(\\})","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.code-block.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.code-block.end.motoko"}}},"comment":{"patterns":[{"include":"#documentation-comment"},{"include":"#block-comment"},{"include":"#in-line-comment"}]},"comparative-operator":{"name":"keyword.operator.comparative.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])((=|!)==?|(\u003c|\u003e)=?|~=)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"control-transfer-statement-keyword":{"name":"keyword.control.transfer.motoko","match":"\\b(continue|break|return)\\b"},"custom-operator":{"patterns":[{"name":"keyword.operator.custom.prefix.unary.motoko","match":"(?\u003c=[\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?![\\s)\\]},;:])"},{"name":"keyword.operator.custom.postfix.unary.motoko","match":"(?\u003c![\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?![\\s)\\]},;:\\.])"},{"name":"keyword.operator.custom.binary.motoko","match":"(?\u003c=[\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?=[\\s)\\]},;:])"}]},"declaration":{"name":"meta.declaration.motoko","patterns":[{"include":"#import-declaration"}]},"declaration-modifier":{"name":"keyword.other.declaration-modifier.motoko","match":"\\b(class|object|type|shared)\\b"},"dictionary-type":{"name":"meta.dictionary.motoko","begin":"\\b(Dictionary)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.dictionary.motoko"},"2":{"name":"punctuation.dictionary.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.dictionary.end.motoko"}}},"documentation-comment":{"name":"comment.block.documentation.motoko","begin":"/\\*\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.documentation.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.documentation.end.motoko"}}},"floating-point-literal":{"name":"constant.numeric.floating-point.motoko","patterns":[{"match":"\\b([0-9][0-9_]*)(\\.([0-9][0-9_]*))?([eE][+\\-]?([0-9][0-9_]*))?\\b"},{"match":"\\b(0x[[:xdigit:]][[[:xdigit:]]_]*)(\\.(0x[[:xdigit:]][[[:xdigit:]]_]*))?([pP][+\\-]?(0x[[:xdigit:]][[[:xdigit:]]_]*))\\b"}]},"function-body":{"name":"meta.function-body.motoko","patterns":[{"include":"#code-block"}]},"function-declaration":{"name":"meta.function-declaration.motoko","begin":"\\b(func)\\s+(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+)\\s*(?=\\(|\u003c)","end":"(?\u003c=\\})","patterns":[{"include":"#generic-parameter-clause"},{"include":"#parameter-clause"},{"include":"#function-result"},{"include":"#function-body"}],"beginCaptures":{"1":{"name":"storage.type.function.motoko"},"2":{"name":"entity.type.function.motoko"}}},"function-result":{"name":"meta.function-result.motoko","begin":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\-\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\s*","end":"\\s*(?=\\{)","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.operator.function-result.motoko"}}},"generic-parameter-clause":{"name":"meta.generic-parameter-clause.motoko","begin":"(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.generic-parameter-clause.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.generic-parameter-clause.end.motoko"}}},"identifier":{"name":"meta.identifier.motoko","match":"(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B)"},"if-statement-keyword":{"name":"keyword.control.if.motoko","match":"\\b(if|else)\\b"},"import-declaration":{"name":"meta.import.motoko","match":"\\b(import)\\s+(?:(class|var|func)\\s+)?((?:\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+)(?:\\.(?:\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+))*)","captures":{"1":{"name":"keyword.other.import.motoko"},"2":{"name":"storage.modifier.motoko"},"3":{"name":"support.type.module.import.motoko"}}},"in-line-comment":{"name":"comment.line.double-slash.motoko","match":"(//).*","captures":{"1":{"name":"punctuation.definition.comment.line.double-slash.motoko"}}},"increment-decrement-operator":{"name":"keyword.operator.increment-or-decrement.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+\\+|\\-\\-)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"integer-literal":{"name":"constant.numeric.integer.motoko","patterns":[{"name":"constant.numeric.integer.binary.motoko","match":"(\\B\\-|\\b)(0b[01][01_]*)\\b"},{"name":"constant.numeric.integer.octal.motoko","match":"(\\B\\-|\\b)(0o[0-7][0-7_]*)\\b"},{"name":"constant.numeric.integer.decimal.motoko","match":"(\\B\\-|\\b)([0-9][0-9_]*)\\b"},{"name":"constant.numeric.integer.hexadecimal.motoko","match":"(\\B\\-|\\b)(0x[[:xdigit:]][[[:xdigit:]]_]*)\\b"}]},"keyword":{"patterns":[{"include":"#branch-statement-keyword"},{"include":"#control-transfer-statement-keyword"},{"include":"#loop-statement-keyword"},{"include":"#catch-statement-keyword"},{"include":"#async-await-keyword"},{"include":"#operator-declaration-modifier"},{"include":"#declaration-modifier"},{"include":"#access-level-modifier"},{"name":"keyword.declaration.motoko","match":"\\b(actor|and|class|func|import|let|module|not|or)\\b"},{"name":"keyword.statement.motoko","match":"\\b(assert|break|case|continue|debug|debug_show|else|if|ignore|in|for|label|null|return|switch|while|loop|try|throw|catch|finally|do|to_candid|from_candid|with)\\b"},{"name":"keyword.other.motoko","match":"\\b(flexible|query|stable|composite)\\b"}]},"literal":{"patterns":[{"include":"#integer-literal"},{"include":"#floating-point-literal"},{"include":"#nil-literal"},{"include":"#string-literal"},{"include":"#char-literal"}]},"logical-operator":{"name":"keyword.operator.logical.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(!|\u0026\u0026|\\|\\|)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"loop-statement-keyword":{"name":"keyword.control.loop.motoko","match":"\\b(while|repeat|for|in|loop)\\b"},"null-literal":{"name":"constant.null.motoko","match":"\\bnull\\b"},"operator":{"patterns":[{"include":"#comparative-operator"},{"include":"#assignment-operator"},{"include":"#logical-operator"},{"include":"#remainder-operator"},{"include":"#increment-decrement-operator"},{"include":"#overflow-operator"},{"include":"#range-operator"},{"include":"#bitwise-operator"},{"include":"#arithmetic-operator"},{"include":"#ternary-operator"},{"include":"#type-casting-operator"},{"include":"#custom-operator"}]},"optional-type":{"name":"meta.optional.motoko","match":"\\b(Optional)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.optional.motoko"},"2":{"name":"punctuation.optional.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.optional.end.motoko"}}},"overflow-operator":{"name":"keyword.operator.overflow.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\\u0026(\\+|\\-|\\*|\\/|%)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"parameter-clause":{"name":"meta.parameter-clause.motoko","begin":"(\\()","end":"(\\))","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.function-arguments.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.function-arguments.end.motoko"}}},"primitive-type":{"name":"support.type.motoko","match":"\\b(Blob|Bool|Char|Float|(Int|Nat)(8|16|32|64)?|Principal|Text|Error)\\b"},"protocol-composition-type":{"name":"meta.protocol.motoko","match":"\\b(protocol)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.protocol.motoko"},"2":{"name":"punctuation.protocol.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.protocol.end.motoko"}}},"range-operator":{"name":"keyword.operator.range.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\.\\.(?:\\.)?(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"remainder-operator":{"name":"keyword.operator.remainder.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\%(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"resolved-type":{"name":"support.type.motoko","match":"\\b[A-Z].*?\\b"},"shebang-line":{"name":"comment.line.shebang.motoko","match":"^(#!).*$","captures":{"1":{"name":"punctuation.definition.comment.line.shebang.motoko"}}},"storage-type":{"name":"storage.type.motoko","match":"\\b(var|func|let|class|module|actor)\\b"},"string-literal":{"name":"meta.literal.string.motoko","begin":"\\\"","end":"\\\"","patterns":[{"name":"constant.character.escape.motoko","match":"\\\\([0tnr\\\"\\'\\\\]|x[[:xdigit:]]{2}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})"},{"name":"invalid.illegal.motoko","match":"(\\\"|\\\\)"},{"name":"string.quoted.double.motoko","match":"(.)"}],"beginCaptures":{"0":{"name":"string.quoted.double.motoko"}},"endCaptures":{"0":{"name":"string.quoted.double.motoko"}}},"switch-statement-keyword":{"name":"keyword.control.switch.motoko","match":"\\b(switch|case)\\b"},"type":{"patterns":[{"include":"#primitive-type"},{"include":"#resolved-type"},{"include":"#optional-type"},{"include":"#protocol-composition-type"}]}}}
|
1
|
+
{"name":"Motoko","scopeName":"source.mo","patterns":[{"include":"#shebang-line"},{"include":"#comment"},{"include":"#attribute"},{"include":"#literal"},{"include":"#operator"},{"include":"#declaration"},{"include":"#storage-type"},{"include":"#keyword"},{"include":"#type"},{"include":"#boolean"}],"repository":{"access-level-modifier":{"name":"keyword.other.access-level-modifier.motoko","match":"\\b(public|system|private)\\b"},"arithmetic-operator":{"name":"keyword.operator.arithmetic.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+|\\-|\\*|\\/)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"array-type":{"name":"meta.array.motoko","begin":"\\b(Array)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.array.motoko"},"2":{"name":"punctuation.array.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.array.end.motoko"}}},"assignment-operator":{"name":"keyword.operator.assignment.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+|\\-|\\*|\\/|%|\u003c\u003c\u003e?|\u003c?\u003e\u003e|\u0026|\\^|\\||\u0026\u0026|\\|\\|)?=(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"async-await-keyword":{"name":"keyword.async-await.motoko","match":"\\b(async|await)\\b"},"attribute":{"name":"meta.attribute.motoko","patterns":[{"contentName":"meta.attribute.arguments.motoko","begin":"((@)(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B))(\\()","end":"\\)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"storage.modifier.attribute.motoko"},"2":{"name":"punctuation.definition.attribute.motoko"},"3":{"name":"punctuation.definition.attribute-arguments.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.attribute-arguments.end.motoko"}}},{"match":"((@)(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B))","captures":{"1":{"name":"storage.modifier.attribute.motoko"},"2":{"name":"punctuation.definition.attribute.motoko"}}}]},"bitwise-operator":{"name":"keyword.operator.bitwise.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\u0026|\\||\\^|\u003c\u003c\u003e?|\u003c?\u003e\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"block-comment":{"name":"comment.block.motoko","begin":"/\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.end.motoko"}}},"boolean":{"name":"keyword.constant.boolean.motoko","match":"\\b(true|false)\\b"},"branch-statement-keyword":{"name":"keyword.control.branch.motoko","patterns":[{"include":"#if-statement-keyword"},{"include":"#switch-statement-keyword"}]},"char-literal":{"name":"meta.literal.char.motoko","begin":"'","end":"'","patterns":[{"name":"constant.character.escape.motoko","match":"\\\\([0tnr\\\"\\'\\\\]|x[[:xdigit:]]{2}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})"},{"name":"invalid.illegal.motoko","match":"(\\'|\\\\)"},{"name":"string.quoted.single.motoko","match":"(.)"}],"beginCaptures":{"0":{"name":"string.quoted.double.motoko"}},"endCaptures":{"0":{"name":"string.quoted.single.motoko"}}},"code-block":{"begin":"(\\{)","end":"(\\})","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.code-block.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.code-block.end.motoko"}}},"comment":{"patterns":[{"include":"#documentation-comment"},{"include":"#block-comment"},{"include":"#in-line-comment"}]},"comparative-operator":{"name":"keyword.operator.comparative.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])((=|!)==?|(\u003c|\u003e)=?|~=)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"control-transfer-statement-keyword":{"name":"keyword.control.transfer.motoko","match":"\\b(continue|break|return)\\b"},"custom-operator":{"patterns":[{"name":"keyword.operator.custom.prefix.unary.motoko","match":"(?\u003c=[\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?![\\s)\\]},;:])"},{"name":"keyword.operator.custom.postfix.unary.motoko","match":"(?\u003c![\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?![\\s)\\]},;:\\.])"},{"name":"keyword.operator.custom.binary.motoko","match":"(?\u003c=[\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?=[\\s)\\]},;:])"}]},"declaration":{"name":"meta.declaration.motoko","patterns":[{"include":"#import-declaration"}]},"declaration-modifier":{"name":"keyword.other.declaration-modifier.motoko","match":"\\b(class|object|type|shared)\\b"},"dictionary-type":{"name":"meta.dictionary.motoko","begin":"\\b(Dictionary)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.dictionary.motoko"},"2":{"name":"punctuation.dictionary.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.dictionary.end.motoko"}}},"documentation-comment":{"name":"comment.block.documentation.motoko","begin":"/\\*\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.documentation.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.documentation.end.motoko"}}},"floating-point-literal":{"name":"constant.numeric.floating-point.motoko","patterns":[{"match":"\\b([0-9][0-9_]*)(\\.([0-9][0-9_]*))?([eE][+\\-]?([0-9][0-9_]*))?\\b"},{"match":"\\b(0x[[:xdigit:]][[[:xdigit:]]_]*)(\\.(0x[[:xdigit:]][[[:xdigit:]]_]*))?([pP][+\\-]?(0x[[:xdigit:]][[[:xdigit:]]_]*))\\b"}]},"function-body":{"name":"meta.function-body.motoko","patterns":[{"include":"#code-block"}]},"function-declaration":{"name":"meta.function-declaration.motoko","begin":"\\b(func)\\s+(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+)\\s*(?=\\(|\u003c)","end":"(?\u003c=\\})","patterns":[{"include":"#generic-parameter-clause"},{"include":"#parameter-clause"},{"include":"#function-result"},{"include":"#function-body"}],"beginCaptures":{"1":{"name":"storage.type.function.motoko"},"2":{"name":"entity.type.function.motoko"}}},"function-result":{"name":"meta.function-result.motoko","begin":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\-\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\s*","end":"\\s*(?=\\{)","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.operator.function-result.motoko"}}},"generic-parameter-clause":{"name":"meta.generic-parameter-clause.motoko","begin":"(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.generic-parameter-clause.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.generic-parameter-clause.end.motoko"}}},"identifier":{"name":"meta.identifier.motoko","match":"(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B)"},"if-statement-keyword":{"name":"keyword.control.if.motoko","match":"\\b(if|else)\\b"},"import-declaration":{"name":"meta.import.motoko","match":"\\b(import)\\s+(?:(class|var|func)\\s+)?((?:\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+)(?:\\.(?:\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+))*)","captures":{"1":{"name":"keyword.other.import.motoko"},"2":{"name":"storage.modifier.motoko"},"3":{"name":"support.type.module.import.motoko"}}},"in-line-comment":{"name":"comment.line.double-slash.motoko","match":"(//).*","captures":{"1":{"name":"punctuation.definition.comment.line.double-slash.motoko"}}},"increment-decrement-operator":{"name":"keyword.operator.increment-or-decrement.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+\\+|\\-\\-)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"integer-literal":{"name":"constant.numeric.integer.motoko","patterns":[{"name":"constant.numeric.integer.binary.motoko","match":"(\\B\\-|\\b)(0b[01][01_]*)\\b"},{"name":"constant.numeric.integer.octal.motoko","match":"(\\B\\-|\\b)(0o[0-7][0-7_]*)\\b"},{"name":"constant.numeric.integer.decimal.motoko","match":"(\\B\\-|\\b)([0-9][0-9_]*)\\b"},{"name":"constant.numeric.integer.hexadecimal.motoko","match":"(\\B\\-|\\b)(0x[[:xdigit:]][[[:xdigit:]]_]*)\\b"}]},"keyword":{"patterns":[{"include":"#branch-statement-keyword"},{"include":"#control-transfer-statement-keyword"},{"include":"#loop-statement-keyword"},{"include":"#catch-statement-keyword"},{"include":"#async-await-keyword"},{"include":"#operator-declaration-modifier"},{"include":"#declaration-modifier"},{"include":"#access-level-modifier"},{"name":"keyword.declaration.motoko","match":"\\b(actor|and|class|func|import|let|module|not|or)\\b"},{"name":"keyword.statement.motoko","match":"\\b(assert|break|case|continue|debug|debug_show|else|if|ignore|in|for|label|null|return|switch|while|loop|try|throw|catch|finally|do|to_candid|from_candid|with)\\b"},{"name":"keyword.other.motoko","match":"\\b(query|composite|stable|flexible|persistent|transient)\\b"}]},"literal":{"patterns":[{"include":"#integer-literal"},{"include":"#floating-point-literal"},{"include":"#nil-literal"},{"include":"#string-literal"},{"include":"#char-literal"}]},"logical-operator":{"name":"keyword.operator.logical.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(!|\u0026\u0026|\\|\\|)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"loop-statement-keyword":{"name":"keyword.control.loop.motoko","match":"\\b(while|for|in|loop)\\b"},"null-literal":{"name":"constant.null.motoko","match":"\\bnull\\b"},"operator":{"patterns":[{"include":"#comparative-operator"},{"include":"#assignment-operator"},{"include":"#logical-operator"},{"include":"#remainder-operator"},{"include":"#increment-decrement-operator"},{"include":"#overflow-operator"},{"include":"#range-operator"},{"include":"#bitwise-operator"},{"include":"#arithmetic-operator"},{"include":"#ternary-operator"},{"include":"#type-casting-operator"},{"include":"#custom-operator"}]},"optional-type":{"name":"meta.optional.motoko","match":"\\b(Optional)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.optional.motoko"},"2":{"name":"punctuation.optional.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.optional.end.motoko"}}},"overflow-operator":{"name":"keyword.operator.overflow.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\\u0026(\\+|\\-|\\*|\\/|%)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"parameter-clause":{"name":"meta.parameter-clause.motoko","begin":"(\\()","end":"(\\))","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.function-arguments.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.function-arguments.end.motoko"}}},"primitive-type":{"name":"support.type.motoko","match":"\\b(Blob|Bool|Char|Float|(Int|Nat)(8|16|32|64)?|Principal|Text|Error)\\b"},"protocol-composition-type":{"name":"meta.protocol.motoko","match":"\\b(protocol)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.protocol.motoko"},"2":{"name":"punctuation.protocol.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.protocol.end.motoko"}}},"range-operator":{"name":"keyword.operator.range.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\.\\.(?:\\.)?(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"remainder-operator":{"name":"keyword.operator.remainder.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\%(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"resolved-type":{"name":"support.type.motoko","match":"\\b[A-Z].*?\\b"},"shebang-line":{"name":"comment.line.shebang.motoko","match":"^(#!).*$","captures":{"1":{"name":"punctuation.definition.comment.line.shebang.motoko"}}},"storage-type":{"name":"storage.type.motoko","match":"\\b(var|func|let|class|module|actor)\\b"},"string-literal":{"name":"meta.literal.string.motoko","begin":"\\\"","end":"\\\"","patterns":[{"name":"constant.character.escape.motoko","match":"\\\\([0tnr\\\"\\'\\\\]|x[[:xdigit:]]{2}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})"},{"name":"invalid.illegal.motoko","match":"(\\\"|\\\\)"},{"name":"string.quoted.double.motoko","match":"(.)"}],"beginCaptures":{"0":{"name":"string.quoted.double.motoko"}},"endCaptures":{"0":{"name":"string.quoted.double.motoko"}}},"switch-statement-keyword":{"name":"keyword.control.switch.motoko","match":"\\b(switch|case)\\b"},"type":{"patterns":[{"include":"#primitive-type"},{"include":"#resolved-type"},{"include":"#optional-type"},{"include":"#protocol-composition-type"}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"moonbit","scopeName":"source.moonbit","patterns":[{"include":"#strings"},{"include":"#comments"},{"include":"#constants"},{"include":"#keywords"},{"include":"#functions"},{"include":"#support"},{"include":"#attribute"},{"include":"#types"},{"include":"#modules"},{"include":"#variables"}],"repository":{"attribute":{"patterns":[{"match":"(#[a-z][A-Za-z0-9_. ]*)(.*)","captures":{"1":{"name":"keyword.control.directive"},"2":{"patterns":[{"include":"#strings"},{"name":"entity.name.tag","match":"[a-zA-Z0-9_. ]+"},{"name":"keyword.operator.attribute.moonbit","match":"="}]}}}]},"comments":{"patterns":[{"name":"comment.line","match":"//[^/].*"},{"name":"comment.block.documentation.moonbit","begin":"///","while":"///","patterns":[{"name":"meta.embedded.line.moonbit","begin":"\\s*```","end":"\\s*```","patterns":[{"include":"$self"}],"beginCaptures":{"0":{"name":"markup.fenced_code.block.markdown"}},"endCaptures":{"0":{"name":"markup.fenced_code.block.markdown"}}},{"name":"comment.block.documentation.moonbit","match":".*"}]}]},"constants":{"patterns":[{"name":"constant.numeric.moonbit","match":"\\b\\d(\\d|_)*(?!\\.)(U)?(L)?\\b"},{"name":"constant.numeric.moonbit","match":"(?\u003c=\\.)\\d((?=\\.)|\\b)"},{"name":"constant.numeric.moonbit","match":"\\b\\d+(\\.)\\d+\\b"},{"name":"constant.numeric.moonbit","match":"\\b\\d[\\d_]*(\\.)[\\d_]+[Ee][+-]?\\d[\\d_]+\\b"},{"name":"constant.numeric.moonbit","match":"\\b0[XxOoBb][\\dAaBbCcDdEeFf_]+(U)?(L)?(?!\\.)\\b"},{"name":"constant.numeric.moonbit","match":"\\b0[Xx][\\dAaBbCcDdEeFf_]+(\\.)[\\dAaBbCcDdEeFf_]+[Pp][+-]?[\\dAaBbCcDdEeFf_]+\\b"},{"name":"constant.language.moonbit","match":"\\b(true|false|\\(\\))\\b"}]},"escape":{"patterns":[{"name":"constant.character.escape.moonbit","match":"\\\\[0\\\\tnrb\"']"},{"name":"constant.character.escape.moonbit","match":"\\\\x[0-9a-fA-F]{2}"},{"name":"constant.character.escape.moonbit","match":"\\\\o[0-3][0-7]{2}"},{"name":"constant.character.escape.unicode.moonbit","match":"\\\\u[0-9a-fA-F]{4}"},{"name":"constant.character.escape.unicode.moonbit","match":"\\\\u{[0-9a-fA-F]*}"}]},"functions":{"patterns":[{"match":"\\b(fn)\\b\\s*(?:([A-Z][A-Za-z0-9_]*)::)?([a-z0-9_][A-Za-z0-9_]*)?\\b","captures":{"1":{"name":"keyword.moonbit"},"2":{"name":"entity.name.type.moonbit"},"3":{"name":"entity.name.function.moonbit"}}},{"name":"meta.function.call.moonbit","begin":"(?!\\bfn\\s+)(?:\\.|::)?([a-z0-9_][A-Za-z0-9_]*(\\!|\\?|\\!\\!)?)\\s*(\\()","end":"\\)","patterns":[{"include":"#comments"},{"include":"#constants"},{"include":"#functions"},{"include":"#support"},{"include":"#types"},{"include":"#keywords"},{"include":"#modules"},{"include":"#strings"},{"include":"#variables"}],"beginCaptures":{"1":{"name":"entity.name.function.moonbit"},"2":{"name":"punctuation.brackets.round.moonbit"}},"endCaptures":{"0":{"name":"punctuation.brackets.round.moonbit"}}}]},"interpolation":{"patterns":[{"name":"meta.embedded.line.moonbit","contentName":"source.moonbit","begin":"\\\\{","end":"}","patterns":[{"include":"$self"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.moonbit"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.moonbit"}}}]},"keywords":{"patterns":[{"name":"keyword.control.moonbit","match":"\\b(guard|if|while|break|continue|return|try|catch|except|raise|match|else|as|in|is|loop|for|async)\\b"},{"name":"keyword.moonbit","match":"\\b(type!|(type|typealias|let|const|enum|struct|import|trait|traitalias|derive|test|impl|with)\\b)"},{"name":"variable.language.moonbit","match":"\\b(self)\\b"},{"name":"storage.modifier.moonbit","match":"\\b(mut|pub|priv|readonly|extern)\\b"},{"name":"storage.type.function.arrow.moonbit","match":"-\u003e"},{"name":"storage.type.function.arrow.moonbit","match":"=\u003e"},{"name":"keyword.operator.assignment.moonbit","match":"="},{"name":"keyword.operator.other.moonbit","match":"\\|\u003e"},{"name":"keyword.operator.comparison.moonbit","match":"(===|==|!=|\u003e=|\u003c=|(?\u003c!-)(?\u003c!\\|)\u003e(?!\u003e)|\u003c(?!\u003c))"},{"name":"keyword.operator.logical.moonbit","match":"(\\bnot\\b|\u0026\u0026|\\|\\|)"},{"name":"keyword.operator.bitwise.moonbit","match":"(\\|(?!\\|)(?!\u003e)|\u0026(?!\u0026)|\\^|\u003c\u003c|\u003e\u003e)"},{"name":"keyword.operator.math.moonbit","match":"(\\+|-(?!\u003e)|\\*|%|/)"}]},"modules":{"patterns":[{"name":"entity.name.namespace.moonbit","match":"@[A-Za-z][A-Za-z0-9_/]*"}]},"strings":{"patterns":[{"name":"string.line","match":"(#\\|).*","captures":{"1":{"name":"keyword.operator.other.moonbit"}}},{"name":"string.line","match":"(\\$\\|)(.*)","captures":{"1":{"name":"keyword.operator.other.moonbit"},"2":{"patterns":[{"include":"#escape"},{"include":"#interpolation"}]}}},{"name":"string.quoted.single.moonbit","begin":"'","end":"'","patterns":[{"include":"#escape"}]},{"name":"string.quoted.double.moonbit","begin":"\"","end":"\"","patterns":[{"include":"#escape"},{"include":"#interpolation"}]}]},"support":{"patterns":[{"name":"support.class.moonbit","match":"\\b(Eq|Compare|Hash|Show|Default|ToJson|FromJson)\\b"}]},"types":{"patterns":[{"name":"entity.name.type.moonbit","match":"\\b(?\u003c!@)[A-Z][A-Za-z0-9_]*((\\?)+|\\b)"}]},"variables":{"patterns":[{"name":"variable.other.moonbit","match":"\\b(?\u003c!\\.|::)[a-z_][a-zA-Z0-9_]*\\b"}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"MSG","scopeName":"source.msg","patterns":[{"include":"#keyword"},{"include":"#comment"},{"include":"#property"},{"include":"#types"}],"repository":{"comment":{"patterns":[{"name":"comment.line.double-slash.msg","match":"//.*$"}]},"keyword":{"patterns":[{"name":"keyword.other.msg","match":"\\b(?:cplusplus|namespace|struct|message|packet|class|enum|extends|import)\\b"}]},"property":{"patterns":[{"name":"entity.name.tag.msg","match":"@[a-zA-Z]+"}]},"string":{"patterns":[{"name":"string.quoted.msg","match":"\"[^\"]*\""}]},"types":{"patterns":[{"name":"storage.type.common","match":"\\b(?:abstract|bool|char|short|int|long|float|double|unsigned|string|simtime_t|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int16|int32|int64|uint8|uint16|uint32|uint64)\\b"}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"mzn","scopeName":"source.mzn","patterns":[{"include":"#main"}],"repository":{"main":{"patterns":[{"include":"#multi_line_comment"},{"name":"comment.mzn","match":"(%.*)"},{"contentName":"text.mzn","begin":"(@)","end":"(@)","beginCaptures":{"1":{"name":"text.mzn"}},"endCaptures":{"1":{"name":"text.mzn"}}},{"include":"#numeric"},{"include":"#string"},{"name":"constant.language.mzn","match":"(\\b(?:true|false)\\b)"},{"name":"keyword.operator.mzn","match":"(\\bnot\\b|\u003c-\u003e|-\u003e|\u003c-|\\\\/|\\bxor\\b|/\\\\)"},{"name":"keyword.operator.mzn","match":"(\u003c|\u003e|\u003c=|\u003e=|==|=|!=)"},{"name":"keyword.operator.mzn","match":"(\\+|-|\\*|/|\\bdiv\\b|\\bmod\\b)"},{"name":"keyword.operator.mzn","match":"(\\b(?:in|subset|superset|union|diff|symdiff|intersect|\\.\\.)\\b)"},{"name":"punctuation.mzn","match":"(;)"},{"name":"punctuation.mzn","match":"(:)"},{"name":"punctuation.mzn","match":"(,)"},{"begin":"(\\{)","end":"(\\})","patterns":[{"include":"#main__2"}],"beginCaptures":{"1":{"name":"punctuation.mzn"}},"endCaptures":{"1":{"name":"punctuation.mzn"}}},{"begin":"(\\[)","end":"(\\])","patterns":[{"include":"#main__3"}],"beginCaptures":{"1":{"name":"punctuation.mzn"}},"endCaptures":{"1":{"name":"punctuation.mzn"}}},{"begin":"(\\()","end":"(\\))","patterns":[{"include":"#main__4"}],"beginCaptures":{"1":{"name":"punctuation.mzn"}},"endCaptures":{"1":{"name":"punctuation.mzn"}}},{"name":"invalid.illegal.mzn","match":"(\\}|\\]|\\))"},{"name":"invalid.illegal.mzn","match":"(\\|)"},{"name":"keyword.control.mzn","match":"(\\b(?:annotation|constraint|function|include|op|output|minimize|maximize|predicate|satisfy|solve|test|type)\\b)"},{"name":"storage.type.mzn","match":"(\\b(?:ann|array|bool|enum|float|int|list|of|par|set|string|tuple|var|record|any|opt)\\b)"},{"name":"keyword.control.mzn","match":"(\\b(?:for|forall|exists|if|then|elseif|else|endif|where|let|in)\\b)"},{"name":"invalid.illegal.mzn","match":"(\\b(?:case|op)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:abort|abs|acosh|array_intersect|array_union|array1d|array2d|array3d|array4d|array5d|array6d|asin|assert|atan|bool2int|card|ceil|concat|cos|cosh|dom|dom_array|dom_size|fix|exp|floor|index_set|index_set_1of2|index_set_2of2|index_set_1of3|index_set_2of3|index_set_3of3|int2float|is_fixed|join|lb|lb_array|length|ln|log|log2|log10|min|max|pow|product|round|set2array|show|show_int|show_float|sin|sinh|sqrt|sum|tan|tanh|trace|ub|ub_array)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:circuit|disjoint|maximum|maximum_arg|member|minimum|minimum_arg|network_flow|network_flow_cost|partition_set|range|roots|sliding_sum|subcircuit|sum_pred)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:alldifferent|all_different|all_disjoint|all_equal|alldifferent_except_0|nvalue|symmetric_all_different)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:lex2|lex_greater|lex_greatereq|lex_less|lex_lesseq|strict_lex2|value_precede|value_precede_chain)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:arg_sort|decreasing|increasing|sort)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:int_set_channel|inverse|inverse_set|link_set_to_booleans)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:among|at_least|at_most|at_most1|count|count_eq|count_geq|count_gt|count_leq|count_lt|count_neq|distribute|exactly|global_cardinality|global_cardinality_closed|global_cardinality_low_up|global_cardinality_low_up_closed)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:bin_packing|bin_packing_capa|bin_packing_load|diffn|diffn_k|diffn_nonstrict|diffn_nonstrict_k|geost|geost_bb|geost_smallest_bb|knapsack)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:alternative|cumulative|disjunctive|disjunctive_strict|span)\\b)"},{"name":"support.function.mzn","match":"(\\b(?:regular|regular_nfa|table)\\b)"},{"begin":"(\\b[A-Za-z][A-Za-z0-9_]*|'[^\\x{0027}]*')(\\()","end":"(\\))","patterns":[{"include":"#main__5"}],"beginCaptures":{"1":{"name":"entity.name.function.mzn"},"2":{"name":"punctuation.mzn"}},"endCaptures":{"1":{"name":"punctuation.mzn"}}},{"name":"variable.mzn","match":"(\\b[A-Za-z][A-Za-z0-9_]*|'[^\\x{0027}]*')"}]},"main__1":{},"main__2":{"patterns":[{"name":"punctuation.mzn","match":"(\\|)"},{"include":"#main"}]},"main__3":{"patterns":[{"name":"punctuation.mzn","match":"(\\|)"},{"include":"#main"}]},"main__4":{"patterns":[{"include":"#main"}]},"main__5":{"patterns":[{"include":"#main"}]},"multi_line_comment":{"patterns":[{"contentName":"comment.mzn","begin":"(/\\*)","end":"(\\*/)","beginCaptures":{"1":{"name":"comment.mzn"}},"endCaptures":{"1":{"name":"comment.mzn"}}}]},"multi_line_comment__1":{},"numeric":{"patterns":[{"name":"constant.numeric.mzn","match":"(\\b0o[0-7]+)"},{"name":"constant.numeric.mzn","match":"(\\b0x[0-9A-Fa-f]+)"},{"name":"constant.numeric.mzn","match":"(\\b0x[0-9A-Fa-f]+)"},{"name":"constant.numeric.mzn","match":"(\\b\\d+(?:(?:.\\d+)?[Ee][-\\x{002b}]?\\d+|.\\d+))"},{"name":"constant.numeric.mzn","match":"(\\b\\d+)"}]},"string":{"patterns":[{"begin":"(\\\")","end":"(\\\")","patterns":[{"include":"#string__1"}],"beginCaptures":{"1":{"name":"string.mzn"}},"endCaptures":{"1":{"name":"string.mzn"}}}]},"string__1":{"patterns":[{"begin":"(\\\\\\()","end":"(\\))","patterns":[{"include":"#string__2"}],"beginCaptures":{"1":{"name":"punctuation.mzn"}},"endCaptures":{"1":{"name":"punctuation.mzn"}}},{"name":"constant.character.escape.mzn","match":"(\\\\[\\x{0022}\\x{0027}\\x{005c}nrvt])"},{"name":"string.mzn","match":"([^\\\"\\x{005c}]+)"}]},"string__2":{"patterns":[{"include":"#main"}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"NED","scopeName":"source.ned","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#type"},{"include":"#string"},{"include":"#expr"},{"include":"#non_expr"}],"repository":{"comment":{"patterns":[{"name":"comment.line.double-slash.ned","match":"//.*$"}]},"expr":{"patterns":[{"name":"keyword.other.ned","match":"\\b(?:sizeof|const|default|ask|this|index|typename)\\b"}]},"non_expr":{"patterns":[{"name":"keyword.other.ned","match":"\\b(?:channel|channelinterface|simple|module|network|moduleinterface|parameters|gates|types|submodules|connections|allowunconnected|extends|for|if|import|like|package|property)\\b"}]},"property":{"patterns":[{"name":"entity.name.tag.ned","match":"@[a-zA-Z]+"}]},"string":{"patterns":[{"name":"string.quoted.msg","match":"\"[^\"]*\""}]},"type":{"patterns":[{"name":"storage.type.common.ned","match":"\\b(?:inout|input|output|bool|double|int|string|object|xml|--\u003e|\u003c--|\u003c--\u003e|\\.\\.|volatile|false|true|undefined|nan|inf|null|nullptr)\\b"}]}}}
|
data/grammars/source.nr.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"The Noir Programming Language","scopeName":"source.nr","patterns":[{"include":"#code"}],"repository":{"--struct-content":{"patterns":[{"
|
1
|
+
{"name":"The Noir Programming Language","scopeName":"source.nr","patterns":[{"include":"#code"}],"repository":{"--struct-content":{"patterns":[{"match":"(pub|pub\\(crate\\))?\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*:\\s*([a-zA-Z_][a-zA-Z0-9_]*)","patterns":[{"include":"#comments"}],"captures":{"1":{"name":"keyword.nr"},"2":{"name":"support.type.property-name.nr"},"3":{"name":"support.type.nr"}}},{"begin":"\u003c","end":"\u003e","patterns":[{"include":"#--struct-types"}]},{"include":"#comments"}]},"--struct-types":{"patterns":[{"name":"support.type.nr","match":"[a-zA-Z_][a-zA-Z0-9_]*"},{"begin":"\u003c","end":"\u003e","patterns":[{"include":"#--struct-types"}]},{"include":"#comments"}]},"attribute":{"begin":"#\\[","end":"\\]","patterns":[{"begin":"[a-zA-Z_][a-zA-Z0-9_]\\s*\\(","end":"\\)"},{"match":"[a-zA-Z_][a-zA-Z0-9_]"}]},"code":{"patterns":[{"include":"#comments"},{"include":"#strings"},{"include":"#numeric"},{"include":"#syntax"},{"include":"#attribute"},{"include":"#keywords"},{"include":"#input"}]},"comments":{"patterns":[{"name":"comment.block.nr","begin":"\\/\\*","end":"\\*\\/","patterns":[{"include":"#comments"}]},{"name":"comment.line.double-slash.nr","match":"\\/\\/.*\n"}]},"input":{"patterns":[{"name":"support.type.nr","match":"\\b((u|i)\\d+|str|bool|field|Field)\\b"},{"name":"support.type.nr","match":"\\b(_*[A-Z][a-zA-Z0-9_]*|[a-zA-Z_][a-zA-Z0-9_]*::)\\b"},{"begin":"\\b([a-z_][a-zA-Z0-9_]*)\\s*(::\u003c(.*)\u003e\\s*)?\\(","end":"\\)","patterns":[{"include":"#code"}],"beginCaptures":{"1":{"name":"support.function.nr"},"2":{"patterns":[{"include":"#code"}]}}},{"name":"variable.nr","match":"\\b[a-z_][a-zA-Z0-9_]*\\b"}]},"interpolated-string-escapes":{"name":"constant.character.escape.nr","match":"\\\\.|{{|}}"},"interpolations":{"name":"variable.other.nr","match":"({)[^\"{}]*(})","captures":{"1":{"name":"constant.character.nr"},"2":{"name":"constant.character.nr"}}},"keywords":{"patterns":[{"name":"keyword.control.nr","match":"\\b(fn|impl|trait|type|mod|use|struct|if|else|for|loop|enum|match)\\b"},{"name":"keyword.nr","match":"\\b(global|comptime|quote|unsafe|unconstrained|pub|crate|\u0026mut|mut|self|in|as|let)\\b"}]},"numeric":{"patterns":[{"name":"token.error-token.nr","match":"(\\-)?\\d+\\.\\d+(\\.|[a-zA-Z])"},{"name":"constant.numeric.nr","match":"(\\-)?0x[0-9a-fA-F]+"},{"name":"constant.numeric.nr","match":"(\\-)?\\d+(\\.\\d+)?"},{"name":"constant.language.nr","match":"\\b(true|false)\\b"}]},"string-escapes":{"name":"constant.character.escape.nr","match":"\\\\."},"strings":{"patterns":[{"name":"string.quoted.double.nr","begin":"\"","end":"\"","patterns":[{"include":"#string-escapes"}]},{"name":"string.quoted.double.nr","begin":"r(#*)\"","end":"\"(\\1)","beginCaptures":{"1":{"name":"string.quoted.byte.raw.nr"}},"endCaptures":{"1":{"name":"string.quoted.byte.raw.nr"}}},{"name":"string.interpolated.nr","begin":"f\"","end":"\"","patterns":[{"include":"#interpolated-string-escapes"},{"include":"#interpolations"}]}]},"syntax":{"patterns":[{"begin":"\\b(mod|use)\\s+([a-zA-Z_][a-zA-Z0-9_]*(::[a-zA-Z_][a-zA-Z0-9_]*)*::)\\{","end":"\\}","patterns":[{"include":"#code"}],"beginCaptures":{"1":{"name":"keyword.control.nr"},"2":{"name":"support.type.nr"}}},{"match":"\\b(mod|use)\\s+([a-zA-Z_][a-zA-Z0-9_]*(::[a-zA-Z_][a-zA-Z0-9_]*)*)","captures":{"1":{"name":"keyword.control.nr"},"2":{"name":"support.type.nr"}}},{"match":"\\b(fn)\\s+([a-zA-Z_][a-zA-Z0-9_]*)","captures":{"1":{"name":"keyword.control.nr"},"2":{"name":"support.function.nr"}}},{"match":"\\b(let)\\s+(mut\\s+)?([a-zA-Z_][a-zA-Z0-9_]*)","captures":{"1":{"name":"keyword.nr"},"2":{"name":"keyword.nr"},"3":{"name":"variable.nr"}}},{"match":"\\b(for)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s+(in)\\b","captures":{"1":{"name":"keyword.control.nr"},"2":{"name":"variable.nr"},"3":{"name":"keyword.nr"}}},{"begin":"\\b(struct)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\{","end":"\\}","patterns":[{"include":"#--struct-content"}],"beginCaptures":{"1":{"name":"keyword.control.nr"},"2":{"name":"support.type.nr"}}},{"begin":"\\b(struct)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(","end":"\\)","patterns":[{"include":"#--struct-content"}],"beginCaptures":{"1":{"name":"keyword.control.nr"},"2":{"name":"support.type.nr"}}},{"match":"\\b(struct)\\s+([a-zA-Z_][a-zA-Z0-9_]*)","captures":{"1":{"name":"keyword.control.nr"},"2":{"name":"support.type.nr"}}},{"match":"(\\-\u003e)\\s*([a-zA-Z_][a-zA-Z0-9_]*)","captures":{"1":{"name":"keyword.control.nr"},"2":{"name":"support.type.nr"}}}]}}}
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"nushell","scopeName":"source.nushell","patterns":[{"include":"#define-variable"},{"include":"#define-alias"},{"include":"#function"},{"include":"#extern"},{"include":"#module"},{"include":"#use-module"},{"include":"#expression"},{"include":"#comment"}],"repository":{"binary":{"name":"constant.binary.nushell","begin":"\\b(0x)(\\[)","end":"\\]","patterns":[{"name":"constant.numeric.nushell","match":"[0-9a-fA-F]{2}"}],"beginCaptures":{"1":{"name":"constant.numeric.nushell"},"2":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}}},"braced-expression":{"name":"meta.expression.braced.nushell","begin":"\\{","end":"\\}","patterns":[{"name":"meta.closure.parameters.nushell","begin":"(?\u003c=\\{)\\s*\\|","end":"\\|","patterns":[{"include":"#function-parameter"}]},{"match":"(\\w+)\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"(\\$\"((?:[^\"\\\\]|\\\\.)*)\")\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"(\"(?:[^\"\\\\]|\\\\.)*\")\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"(\\$'([^']*)')\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"('[^']*')\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"include":"#spread"},{"include":"source.nushell"}],"beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.nushell"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.nushell"}}},"command":{"name":"meta.command.nushell","begin":"(?\u003c!\\w)(?:(\\^)|(?![0-9]|\\$))([\\w.!]+(?:(?: (?!-)[\\w\\-.!]+(?:(?= |\\))|$)|[\\w\\-.!]+))*|(?\u003c=\\^)\\$?(?:\"[^\"]+\"|'[^']+'))","end":"(?=\\||\\)|\\}|;)|$","patterns":[{"include":"#parameters"},{"include":"#spread"},{"include":"#value"}],"beginCaptures":{"1":{"name":"keyword.operator.nushell"},"2":{"patterns":[{"include":"#control-keywords"},{"match":"(?:ansi|char) \\w+","captures":{"0":{"name":"keyword.other.builtin.nushell"}}},{"match":"(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st)|b(?:g|its(?: (?:and|not|or|ro(?:l|r)|sh(?:l|r)|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|starts-with))?)|c(?:al|d|har|l(?:ear|ipboard (?:copy|paste))|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|nu|reset))?|st|tinue))|p|ustom-value (?:generate(?:2)?|update(?:-arg)?))|d(?:ate(?: (?:format|humanize|list-timezone|now|to-(?:record|t(?:able|imezone))))?|e(?:bug(?: info)?|code(?: (?:base64|hex))?|f(?:ault)?|scribe|tect columns)|fr(?: (?:a(?:gg(?:-groups)?|ll-(?:false|true)|ppend|rg-(?:m(?:ax|in)|sort|true|unique|where)|s(?:-date(?:time)?)?)|c(?:a(?:che|st)|o(?:l(?:lect|umns)?|n(?:cat(?:-str|enate)|tains)|unt(?:-null)?)|umulative)|d(?:atepart|rop(?:-(?:duplicates|nulls))?|types|ummies)|exp(?:lode|r-not)|f(?:etch|i(?:l(?:l-n(?:an|ull)|ter(?:-with)?)|rst)|latten)|g(?:et(?:-(?:day|hour|m(?:inute|onth)|nanosecond|ordinal|second|week(?:day)?|year))?|roup-by)|i(?:mplode|nto-(?:df|lazy|nu)|s-(?:duplicated|in|n(?:ot-null|ull)|unique))|join|l(?:ast|it|owercase|s)|m(?:ax|e(?:an|dian|lt)|in)|n(?:-unique|ot)|o(?:pen|therwise)|qu(?:antile|ery)|r(?:e(?:name|place(?:-all)?|verse)|olling)|s(?:ample|chema|e(?:lect|t(?:-with-idx)?)|h(?:ape|ift)|lice|ort-by|t(?:d|r(?:-(?:lengths|slice)|ftime))|um(?:mary)?)|t(?:ake|o-(?:a(?:rrow|vro)|csv|jsonl|parquet))|u(?:nique|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column)))?|o|rop(?: (?:column|nth))?|u)|e(?:ach(?: while)?|cho|moji|n(?:code(?: (?:base64|hex))?|umerate)|rror make|very|x(?:ec|it|p(?:l(?:ain|ore)|ort(?: (?:alias|const|def|extern|module|use)|-env)?)|tern))|f(?:i(?:l(?:e|l|ter)|nd|rst)|latten|mt|or(?:mat(?: (?:d(?:ate|uration)|filesize|pattern))?)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|nuon|ods|p(?:arquet|ng)|ssv|t(?:oml|sv)|url|vcf|x(?:lsx|ml)|y(?:aml|ml)))?)|g(?:e(?:nerate|t)|lob|r(?:id|oup(?:-by)?)|stat)|h(?:ash(?: (?:md5|sha256))?|e(?:aders|lp(?: (?:aliases|commands|e(?:scapes|xterns)|modules|operators))?)|i(?:de(?:-env)?|ghlight|st(?:o(?:gram|ry(?: session)?))?)|ttp(?: (?:delete|get|head|options|p(?:atch|ost|ut)))?)|i(?:f|gnore|n(?:c|put(?: list(?:en)?)?|s(?:ert|pect)|t(?:erleave|o(?: (?:b(?:i(?:nary|ts)|ool)|cell-path|d(?:atetime|uration)|f(?:ilesize|loat)|glob|int|record|s(?:qlite|tring)|value))?))|s-(?:admin|empty|not-empty|terminal)|tems)|j(?:oin|son path|walk)|k(?:eybindings(?: (?:default|list(?:en)?))?|ill)|l(?:a(?:st|zy make)|e(?:ngth|t(?:-env)?)|ines|o(?:ad-env|op)|s)|m(?:at(?:ch|h(?: (?:a(?:bs|rc(?:cos(?:h)?|sin(?:h)?|tan(?:h)?)|vg)|c(?:eil|os(?:h)?)|exp|floor|l(?:n|og)|m(?:ax|edian|in|ode)|product|round|s(?:in(?:h)?|qrt|tddev|um)|tan(?:h)?|variance))?)|e(?:rge|tadata)|k(?:dir|temp)|o(?:dule|ve)|ut|v)|nu-(?:check|example-(?:1|2|3|config)|highlight)|o(?:pen|verlay(?: (?:hide|list|new|use))?)|p(?:a(?:nic|r(?:-each|se)|th(?: (?:basename|dirname|ex(?:ists|pand)|join|parse|relative-to|split|type))?)|eriodic-table|lot|net|ort(?: (?:list|scan))?|r(?:epend|int)|s)|query(?: (?:db|git|json|web|xml))?|r(?:an(?:dom(?: (?:bool|chars|dice|float|int|uuid))?|ge)|e(?:duce|g(?:ex|ist(?:er|ry query))|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-external)|s(?:ave|c(?:hema|ope(?: (?:aliases|commands|e(?:ngine-stats|xterns)|modules|variables))?)|e(?:lect|q(?: (?:char|date))?)|huffle|kip(?: (?:until|while))?|leep|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:hars|olumn)|list|row|words)|-by)?|t(?:art|or(?: (?:create|delete|export|i(?:mport|nsert)|open|reset|update))?|r(?: (?:c(?:a(?:mel-case|pitalize)|ontains)|d(?:istance|owncase)|e(?:nds-with|scape-glob|xpand)|index-of|join|kebab-case|length|pascal-case|re(?:place|verse)|s(?:creaming-snake-case|imilarity|nake-case|ta(?:rts-with|ts)|ubstring)|t(?:itle-case|rim)|upcase)|eam_example(?: (?:collect-external|s(?:eq|um)))?)?)|ys)|t(?:a(?:ble|ke(?: (?:until|while))?)|e(?:e|rm size)|imeit|o(?: (?:csv|html|json|md|nuon|png|qr|t(?:ext|oml|sv)|xml|yaml)|uch)?|r(?:anspose|y)|utor)|u(?:limit|ni(?:q(?:-by)?|ts)|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|decode|encode|join|parse))?|se)|v(?:alues|ersion|iew(?: (?:files|s(?:ource|pan)))?)|w(?:atch|h(?:ere|i(?:ch|le)|oami)|i(?:ndow|th-env)|rap)|xyplot|zip)(?![\\w-])( (.*))?","captures":{"1":{"name":"keyword.other.builtin.nushell"},"2":{"patterns":[{"include":"#value"}]}}},{"name":"entity.name.type.external.nushell","match":"(?\u003c=\\^)(?:\\$(\"[^\"]+\"|'[^']+')|\"[^\"]+\"|'[^']+')","captures":{"1":{"patterns":[{"include":"#paren-expression"}]}}},{"match":"([\\w.]+(?:-[\\w.!]+)*)(?: (.*))?","captures":{"1":{"name":"entity.name.type.external.nushell"},"2":{"patterns":[{"include":"#value"}]}}},{"include":"#value"}]}}},"comment":{"name":"comment.nushell","match":"(#.*)$"},"constant-keywords":{"name":"constant.language.nushell","match":"\\b(?:true|false|null)\\b"},"constant-value":{"patterns":[{"include":"#constant-keywords"},{"include":"#datetime"},{"include":"#numbers"},{"include":"#numbers-hexa"},{"include":"#binary"}]},"control-keywords":{"name":"keyword.control.nushell","match":"(?\u003c![0-9a-zA-Z_\\-.\\/:\\\\])(?:break|continue|else(?: if)?|for|if|loop|mut|return|try|while)(?![0-9a-zA-Z_\\-.\\/:\\\\])"},"datetime":{"name":"constant.numeric.nushell","match":"\\b\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:\\+\\d{2}:?\\d{2}|Z)?)?\\b"},"define-alias":{"match":"((?:export )?alias)\\s+([\\w\\-!]+)\\s*(=)","captures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.type.nushell"},"3":{"patterns":[{"include":"#operators"}]}}},"define-variable":{"match":"(let|mut|(?:export\\s+)?const)\\s+(\\w+)\\s+(=)","captures":{"1":{"name":"keyword.other.nushell"},"2":{"name":"variable.other.nushell"},"3":{"patterns":[{"include":"#operators"}]}}},"expression":{"patterns":[{"include":"#pre-command"},{"include":"#for-loop"},{"include":"#operators"},{"name":"keyword.control.nushell","match":"\\|"},{"include":"#control-keywords"},{"include":"#constant-value"},{"include":"#command"},{"include":"#value"}]},"extern":{"begin":"((?:export\\s+)?extern)\\s+([\\w\\-]+|\"[\\w\\- ]+\")","end":"(?\u003c=\\])","patterns":[{"include":"#function-parameters"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.type.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.function.end.nushell"}}},"for-loop":{"name":"meta.for-loop.nushell","begin":"(for)\\s+(\\$?\\w+)\\s+(in)\\s+(.+)\\s*(\\{)","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"1":{"name":"keyword.other.nushell"},"2":{"name":"variable.other.nushell"},"3":{"name":"keyword.other.nushell"},"4":{"patterns":[{"include":"#value"}]},"5":{"name":"punctuation.section.block.begin.bracket.curly.nushell"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.nushell"}}},"function":{"begin":"((?:export\\s+)?def(?:\\s+--\\w+)*)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|`[\\w\\- ]+`)(\\s+--\\w+)*","end":"(?\u003c=\\})","patterns":[{"include":"#function-parameters"},{"include":"#function-body"},{"include":"#function-inout"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.type.nushell"},"3":{"name":"entity.name.function.nushell"}}},"function-body":{"name":"meta.function.body.nushell","begin":"\\{","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"0":{"name":"punctuation.definition.function.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.function.end.nushell"}}},"function-inout":{"patterns":[{"include":"#types"},{"name":"keyword.operator.nushell","match":"-\u003e"},{"include":"#function-multiple-inout"}]},"function-multiple-inout":{"end":"\\]","patterns":[{"include":"#types"},{"match":"\\s*(,)\\s*","captures":{"1":{"name":"punctuation.separator.nushell"}}},{"match":"\\s+(-\u003e)\\s+","captures":{"1":{"name":"keyword.operator.nushell"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.in-out.nushell"},"2":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"function-parameter":{"patterns":[{"name":"variable.parameter.nushell","match":"(-{0,2}|\\.{3})[\\w-]+(?:\\((-[\\w?])\\))?","captures":{"1":{"name":"keyword.control.nushell"}}},{"begin":"\\??:\\s*","end":"(?=(?:\\s+(?:-{0,2}|\\.{3})[\\w-]+)|(?:\\s*(?:,|\\]|\\||@|=|#|$)))","patterns":[{"include":"#types"}]},{"begin":"@(?=\"|')","end":"(?\u003c=\"|')","patterns":[{"include":"#string"}]},{"name":"default.value.nushell","begin":"=\\s*","end":"(?=(?:\\s+-{0,2}[\\w-]+)|(?:\\s*(?:,|\\]|\\||#|$)))","patterns":[{"include":"#value"}]}]},"function-parameters":{"name":"meta.function.parameters.nushell","begin":"\\[","end":"\\]","patterns":[{"include":"#function-parameter"},{"include":"#comment"}],"beginCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"internal-variables":{"name":"variable.language.nushell","match":"\\$(?:nu|env)\\b"},"keyword":{"name":"keyword.other.nushell","match":"(?:def(?:-env)?)"},"module":{"name":"meta.module.nushell","begin":"((?:export\\s+)?module)\\s+([\\w\\-]+)\\s*\\{","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.namespace.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.module.end.nushell"}}},"numbers":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])[-+]?(?:\\d+|\\d{1,3}(?:_\\d{3})*)(?:\\.\\d*)?(?i:ns|us|ms|sec|min|hr|day|wk|b|kb|mb|gb|tb|pt|eb|zb|kib|mib|gib|tib|pit|eib|zib)?(?:(?![\\w.])|(?=\\.\\.))"},"numbers-hexa":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])0x[0-9a-fA-F]+(?![\\w.])"},"operators":{"patterns":[{"include":"#operators-word"},{"include":"#operators-symbols"},{"include":"#ranges"}]},"operators-symbols":{"name":"keyword.control.nushell","match":"(?\u003c= )(?:(?:\\+|\\-|\\*|\\/)=?|\\/\\/|\\*\\*|!=|[\u003c\u003e=]=?|[!=]~|\\+\\+=?)(?= |$)"},"operators-word":{"name":"keyword.control.nushell","match":"(?\u003c= |\\()(?:mod|in|not-in|not|and|or|xor|bit-or|bit-and|bit-xor|bit-shl|bit-shr|starts-with|ends-with)(?= |\\)|$)"},"parameters":{"name":"variable.parameter.nushell","match":"(?\u003c=\\s)(-{1,2})[\\w-]+","captures":{"1":{"name":"keyword.control.nushell"}}},"paren-expression":{"name":"meta.expression.parenthesis.nushell","begin":"\\(","end":"\\)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"meta.brace.round.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.round.end.nushell"}}},"pre-command":{"begin":"(\\w+)(=)","end":"(?=\\s+)","patterns":[{"include":"#value"}],"beginCaptures":{"1":{"name":"variable.other.nushell"},"2":{"patterns":[{"include":"#operators"}]}}},"ranges":{"name":"keyword.control.nushell","match":"\\.\\.\u003c?"},"spread":{"name":"keyword.control.nushell","match":"\\.\\.\\.(?=[^\\s\\]}])"},"string":{"patterns":[{"include":"#string-single-quote"},{"include":"#string-backtick"},{"include":"#string-double-quote"},{"include":"#string-interpolated-double"},{"include":"#string-interpolated-single"},{"include":"#string-bare"}]},"string-backtick":{"name":"string.quoted.single.nushell","begin":"`","end":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-bare":{"name":"string.bare.nushell","match":"[^$\\[{(\"',|#\\s|][^\\[\\]{}()\"'\\s#,|]*"},"string-double-quote":{"name":"string.quoted.double.nushell","begin":"\"","end":"\"","patterns":[{"match":"\\w+"},{"include":"#string-escape"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-escape":{"name":"constant.character.escape.nushell","match":"\\\\(?:[bfrnt\\\\'\"/]|u[0-9a-fA-F]{4})"},"string-interpolated-double":{"name":"string.interpolated.double.nushell","begin":"\\$\"","end":"\"","patterns":[{"name":"constant.character.escape.nushell","match":"\\\\[()]"},{"include":"#string-escape"},{"include":"#paren-expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-interpolated-single":{"name":"string.interpolated.single.nushell","begin":"\\$'","end":"'","patterns":[{"include":"#paren-expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-single-quote":{"name":"string.quoted.single.nushell","begin":"'","end":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"table":{"name":"meta.table.nushell","begin":"\\[","end":"\\]","patterns":[{"include":"#spread"},{"include":"#value"},{"name":"punctuation.separator.nushell","match":","}],"beginCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"types":{"patterns":[{"name":"meta.list.nushell","begin":"\\b(list)\\s*\u003c","end":"\u003e","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.nushell"}}},{"name":"meta.record.nushell","begin":"\\b(record)\\s*\u003c","end":"\u003e","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+')\\s*:\\s*","captures":{"1":{"name":"variable.parameter.nushell"}}},{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.nushell"}}},{"name":"entity.name.type.nushell","match":"\\b(\\w+)\\b"}]},"use-module":{"patterns":[{"match":"^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*))?\\s*;?$","captures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.namespace.nushell"},"3":{"name":"keyword.other.nushell"}}},{"begin":"^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')\\s*\\[","end":"(\\])\\s*;?\\s*$","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?","captures":{"1":{"name":"keyword.other.nushell"}}},{"include":"#comment"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.namespace.nushell"}},"endCaptures":{"1":{"name":"meta.brace.square.end.nushell"}}},{"match":"(?\u003cpath\u003e(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\u003cpath\u003e\"|'\\g\u003cpath\u003e\\'|(?![\"'])\\g\u003cpath\u003e)(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+'|\\*))?\\s*;?$","captures":{"2":{"name":"entity.name.function.nushell"},"3":{"name":"string.bare.nushell","patterns":[{"match":"([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')","captures":{"1":{"name":"entity.name.namespace.nushell"}}}]},"4":{"name":"keyword.other.nushell"}}},{"begin":"(?\u003cpath\u003e(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\u003cpath\u003e\"|'\\g\u003cpath\u003e\\'|(?![\"'])\\g\u003cpath\u003e)\\s+\\[","end":"(\\])\\s*;?\\s*$","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?","captures":{"0":{"name":"keyword.other.nushell"}}},{"include":"#comment"}],"beginCaptures":{"2":{"name":"entity.name.function.nushell"},"3":{"name":"string.bare.nushell","patterns":[{"match":"([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')","captures":{"1":{"name":"entity.name.namespace.nushell"}}}]}},"endCaptures":{"1":{"name":"meta.brace.square.end.nushell"}}},{"match":"^\\s*(?:export )?use\\b","captures":{"0":{"name":"entity.name.function.nushell"}}}]},"value":{"patterns":[{"include":"#variables"},{"include":"#variable-fields"},{"include":"#control-keywords"},{"include":"#constant-value"},{"include":"#table"},{"include":"#operators"},{"include":"#paren-expression"},{"include":"#braced-expression"},{"include":"#string"},{"include":"#comment"}]},"variable-fields":{"name":"variable.other.nushell","match":"(?\u003c=\\)|\\}|\\])(?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))+"},"variables":{"match":"(\\$[a-zA-Z0-9_]+)((?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))*)","captures":{"1":{"patterns":[{"include":"#internal-variables"},{"name":"variable.other.nushell","match":"\\$.+"}]},"2":{"name":"variable.other.nushell"}}}}}
|
1
|
+
{"name":"nushell","scopeName":"source.nushell","patterns":[{"include":"#define-variable"},{"include":"#define-alias"},{"include":"#function"},{"include":"#extern"},{"include":"#module"},{"include":"#use-module"},{"include":"#expression"},{"include":"#comment"}],"repository":{"binary":{"name":"constant.binary.nushell","begin":"\\b(0x)(\\[)","end":"\\]","patterns":[{"name":"constant.numeric.nushell","match":"[0-9a-fA-F]{2}"}],"beginCaptures":{"1":{"name":"constant.numeric.nushell"},"2":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}}},"braced-expression":{"name":"meta.expression.braced.nushell","begin":"\\{","end":"\\}","patterns":[{"name":"meta.closure.parameters.nushell","begin":"(?\u003c=\\{)\\s*\\|","end":"\\|","patterns":[{"include":"#function-parameter"}]},{"match":"(\\w+)\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"(\\$\"((?:[^\"\\\\]|\\\\.)*)\")\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"(\"(?:[^\"\\\\]|\\\\.)*\")\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"(\\$'([^']*)')\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"variable.other.nushell","patterns":[{"include":"#paren-expression"}]},"3":{"name":"keyword.control.nushell"}}},{"name":"meta.record-entry.nushell","match":"('[^']*')\\s*(:)\\s*","captures":{"1":{"name":"variable.other.nushell"},"2":{"name":"keyword.control.nushell"}}},{"include":"#spread"},{"include":"source.nushell"}],"beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.nushell"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.nushell"}}},"command":{"name":"meta.command.nushell","begin":"(?\u003c!\\w)(?:(\\^)|(?![0-9]|\\$))([\\w.!]+(?:(?: (?!-)[\\w\\-.!]+(?:(?= |\\))|$)|[\\w\\-.!]+))*|(?\u003c=\\^)\\$?(?:\"[^\"]+\"|'[^']+'))","end":"(?=\\||\\)|\\}|;)|$","patterns":[{"include":"#parameters"},{"include":"#spread"},{"include":"#value"}],"beginCaptures":{"1":{"name":"keyword.operator.nushell"},"2":{"patterns":[{"include":"#control-keywords"},{"match":"(?:ansi|char) \\w+","captures":{"0":{"name":"keyword.other.builtin.nushell"}}},{"match":"(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st)|b(?:g|its(?: (?:and|not|or|ro(?:l|r)|sh(?:l|r)|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|starts-with))?)|c(?:al|d|h(?:ar|unks)|lear|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|nu|reset))?|st|tinue))|p)|d(?:ate(?: (?:format|humanize|list-timezone|now|to-(?:record|t(?:able|imezone))))?|e(?:bug(?: (?:info|profile))?|code(?: (?:base(?:32(?:hex)?|64)|hex|new-base64))?|f(?:ault)?|scribe|tect columns)|o|rop(?: (?:column|nth))?|t(?: (?:add|diff|format|now|part|to|utcnow))?|u)|e(?:ach(?: while)?|cho|moji|n(?:code(?: (?:base(?:32(?:hex)?|64)|hex|new-base64))?|umerate)|rror make|very|x(?:ec|it|p(?:l(?:ain|ore)|ort(?: (?:alias|const|def|extern|module|use)|-env)?)|tern))|f(?:i(?:l(?:e|l|ter)|nd|rst)|latten|mt|or(?:mat(?: (?:d(?:ate|uration)|filesize|pattern))?)?|rom(?: (?:csv|eml|i(?:cs|ni)|json|msgpack(?:z)?|nuon|ods|p(?:arquet|list)|ssv|t(?:oml|sv)|url|vcf|x(?:lsx|ml)|y(?:aml|ml)))?)|g(?:e(?:nerate|t)|lob|r(?:id|oup(?:-by)?)|stat)|h(?:ash(?: (?:md5|sha256))?|e(?:aders|lp(?: (?:aliases|commands|e(?:scapes|xterns)|modules|operators))?)|i(?:de(?:-env)?|sto(?:gram|ry(?: session)?))|ttp(?: (?:delete|get|head|options|p(?:atch|ost|ut)))?)|i(?:f|gnore|n(?:c|put(?: list(?:en)?)?|s(?:ert|pect)|t(?:erleave|o(?: (?:b(?:i(?:nary|ts)|ool)|cell-path|d(?:atetime|uration)|f(?:ilesize|loat)|glob|int|record|s(?:qlite|tring)|value))?))|s-(?:admin|empty|not-empty|terminal)|tems)|j(?:oin|son path|walk)|k(?:eybindings(?: (?:default|list(?:en)?))?|ill)|l(?:ast|e(?:ngth|t(?:-env)?)|ines|o(?:ad-env|op)|s)|m(?:at(?:ch|h(?: (?:a(?:bs|rc(?:cos(?:h)?|sin(?:h)?|tan(?:h)?)|vg)|c(?:eil|os(?:h)?)|exp|floor|l(?:n|og)|m(?:ax|edian|in|ode)|product|round|s(?:in(?:h)?|qrt|tddev|um)|tan(?:h)?|variance))?)|d|e(?:rge|tadata(?: (?:access|set))?)|k(?:dir|temp)|o(?:dule|ve)|ut|v)|nu-(?:check|highlight)|o(?:pen|verlay(?: (?:hide|list|new|use))?)|p(?:a(?:nic|r(?:-each|se)|th(?: (?:basename|dirname|ex(?:ists|pand)|join|parse|relative-to|split|type))?)|lugin(?: (?:add|list|rm|stop|use))?|net|o(?:lars(?: (?:a(?:gg(?:-groups)?|ll-(?:false|true)|ppend|rg-(?:m(?:ax|in)|sort|true|unique|where)|s(?:-date(?:time)?)?)|c(?:a(?:che|st)|o(?:l(?:lect|umns)?|n(?:cat(?:-str)?|tains)|unt(?:-null)?)|umulative)|d(?:atepart|ecimal|rop(?:-(?:duplicates|nulls))?|ummies)|exp(?:lode|r-not)|f(?:etch|i(?:l(?:l-n(?:an|ull)|ter(?:-with)?)|rst)|latten)|g(?:et(?:-(?:day|hour|m(?:inute|onth)|nanosecond|ordinal|second|week(?:day)?|year))?|roup-by)|i(?:mplode|nt(?:eger|o-(?:df|lazy|nu))|s-(?:duplicated|in|n(?:ot-null|ull)|unique))|join|l(?:ast|it|owercase)|m(?:ax|e(?:an|dian)|in)|n(?:-unique|ot)|o(?:pen|therwise)|p(?:ivot|rofile)|qu(?:antile|ery)|r(?:e(?:name|place(?:-all)?|verse)|olling)|s(?:a(?:mple|ve)|chema|e(?:lect|t(?:-with-idx)?)|h(?:ape|ift)|lice|ort-by|t(?:d|ore-(?:get|ls|rm)|r(?:-(?:join|lengths|slice)|ftime))|um(?:mary)?)|take|u(?:n(?:ique|pivot)|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column)))?|rt)|r(?:epend|int)|s)|query(?: (?:db|git|json|web(?:page-info)?|xml))?|r(?:an(?:dom(?: (?:b(?:inary|ool)|chars|dice|float|int|uuid))?|ge)|e(?:duce|g(?:ex|istry query)|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-external)|s(?:ave|c(?:hema|ope(?: (?:aliases|commands|e(?:ngine-stats|xterns)|modules|variables))?)|e(?:lect|q(?: (?:char|date))?)|huffle|kip(?: (?:until|while))?|leep|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:ell-path|hars|olumn)|list|row|words)|-by)?|t(?:art|or(?: (?:create|delete|export|i(?:mport|nsert)|open|reset|update))?|r(?: (?:c(?:a(?:mel-case|pitalize)|ontains)|d(?:istance|owncase)|e(?:nds-with|xpand)|index-of|join|kebab-case|length|pascal-case|re(?:place|verse)|s(?:creaming-snake-case|imilarity|nake-case|ta(?:rts-with|ts)|ubstring)|t(?:itle-case|rim)|upcase)|ess_internals)?)|ys(?: (?:cpu|disks|host|mem|net|temp|users))?)|t(?:a(?:ble|ke(?: (?:until|while))?)|e(?:e|rm size)|imeit|o(?: (?:csv|html|json|m(?:d|sgpack(?:z)?)|nuon|p(?:arquet|list)|t(?:ext|oml|sv)|xml|yaml)|uch)?|r(?:anspose|y)|utor)|u(?:limit|n(?:ame|iq(?:-by)?)|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|decode|encode|join|parse))?|se)|v(?:alues|ersion|iew(?: (?:files|ir|s(?:ource|pan)))?)|w(?:atch|h(?:ere|i(?:ch|le)|oami)|i(?:ndow|th-env)|rap)|zip)(?![\\w-])( (.*))?","captures":{"1":{"name":"keyword.other.builtin.nushell"},"2":{"patterns":[{"include":"#value"}]}}},{"name":"entity.name.type.external.nushell","match":"(?\u003c=\\^)(?:\\$(\"[^\"]+\"|'[^']+')|\"[^\"]+\"|'[^']+')","captures":{"1":{"patterns":[{"include":"#paren-expression"}]}}},{"match":"([\\w.]+(?:-[\\w.!]+)*)(?: (.*))?","captures":{"1":{"name":"entity.name.type.external.nushell"},"2":{"patterns":[{"include":"#value"}]}}},{"include":"#value"}]}}},"comment":{"name":"comment.nushell","match":"(#.*)$"},"constant-keywords":{"name":"constant.language.nushell","match":"\\b(?:true|false|null)\\b"},"constant-value":{"patterns":[{"include":"#constant-keywords"},{"include":"#datetime"},{"include":"#numbers"},{"include":"#numbers-hexa"},{"include":"#binary"}]},"control-keywords":{"name":"keyword.control.nushell","match":"(?\u003c![0-9a-zA-Z_\\-.\\/:\\\\])(?:break|continue|else(?: if)?|for|if|loop|mut|return|try|while)(?![0-9a-zA-Z_\\-.\\/:\\\\])"},"datetime":{"name":"constant.numeric.nushell","match":"\\b\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:\\+\\d{2}:?\\d{2}|Z)?)?\\b"},"define-alias":{"match":"((?:export )?alias)\\s+([\\w\\-!]+)\\s*(=)","captures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.type.nushell"},"3":{"patterns":[{"include":"#operators"}]}}},"define-variable":{"match":"(let|mut|(?:export\\s+)?const)\\s+(\\w+)\\s+(=)","captures":{"1":{"name":"keyword.other.nushell"},"2":{"name":"variable.other.nushell"},"3":{"patterns":[{"include":"#operators"}]}}},"expression":{"patterns":[{"include":"#pre-command"},{"include":"#for-loop"},{"include":"#operators"},{"name":"keyword.control.nushell","match":"\\|"},{"include":"#control-keywords"},{"include":"#constant-value"},{"include":"#command"},{"include":"#value"}]},"extern":{"begin":"((?:export\\s+)?extern)\\s+([\\w\\-]+|\"[\\w\\- ]+\")","end":"(?\u003c=\\])","patterns":[{"include":"#function-parameters"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.type.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.function.end.nushell"}}},"for-loop":{"name":"meta.for-loop.nushell","begin":"(for)\\s+(\\$?\\w+)\\s+(in)\\s+(.+)\\s*(\\{)","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"1":{"name":"keyword.other.nushell"},"2":{"name":"variable.other.nushell"},"3":{"name":"keyword.other.nushell"},"4":{"patterns":[{"include":"#value"}]},"5":{"name":"punctuation.section.block.begin.bracket.curly.nushell"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.nushell"}}},"function":{"begin":"((?:export\\s+)?def(?:\\s+--\\w+)*)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|`[\\w\\- ]+`)(\\s+--\\w+)*","end":"(?\u003c=\\})","patterns":[{"include":"#function-parameters"},{"include":"#function-body"},{"include":"#function-inout"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.type.nushell"},"3":{"name":"entity.name.function.nushell"}}},"function-body":{"name":"meta.function.body.nushell","begin":"\\{","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"0":{"name":"punctuation.definition.function.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.function.end.nushell"}}},"function-inout":{"patterns":[{"include":"#types"},{"name":"keyword.operator.nushell","match":"-\u003e"},{"include":"#function-multiple-inout"}]},"function-multiple-inout":{"end":"\\]","patterns":[{"include":"#types"},{"match":"\\s*(,)\\s*","captures":{"1":{"name":"punctuation.separator.nushell"}}},{"match":"\\s+(-\u003e)\\s+","captures":{"1":{"name":"keyword.operator.nushell"}}}],"beginCaptures":{"1":{"name":"punctuation.definition.in-out.nushell"},"2":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"function-parameter":{"patterns":[{"name":"variable.parameter.nushell","match":"(-{0,2}|\\.{3})[\\w-]+(?:\\((-[\\w?])\\))?","captures":{"1":{"name":"keyword.control.nushell"}}},{"begin":"\\??:\\s*","end":"(?=(?:\\s+(?:-{0,2}|\\.{3})[\\w-]+)|(?:\\s*(?:,|\\]|\\||@|=|#|$)))","patterns":[{"include":"#types"}]},{"begin":"@(?=\"|')","end":"(?\u003c=\"|')","patterns":[{"include":"#string"}]},{"name":"default.value.nushell","begin":"=\\s*","end":"(?=(?:\\s+-{0,2}[\\w-]+)|(?:\\s*(?:,|\\]|\\||#|$)))","patterns":[{"include":"#value"}]}]},"function-parameters":{"name":"meta.function.parameters.nushell","begin":"\\[","end":"\\]","patterns":[{"include":"#function-parameter"},{"include":"#comment"}],"beginCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"internal-variables":{"name":"variable.language.nushell","match":"\\$(?:nu|env)\\b"},"keyword":{"name":"keyword.other.nushell","match":"(?:def(?:-env)?)"},"module":{"name":"meta.module.nushell","begin":"((?:export\\s+)?module)\\s+([\\w\\-]+)\\s*\\{","end":"\\}","patterns":[{"include":"source.nushell"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.namespace.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.module.end.nushell"}}},"numbers":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])[-+]?(?:\\d+|\\d{1,3}(?:_\\d{3})*)(?:\\.\\d*)?(?i:ns|us|ms|sec|min|hr|day|wk|b|kb|mb|gb|tb|pt|eb|zb|kib|mib|gib|tib|pit|eib|zib)?(?:(?![\\w.])|(?=\\.\\.))"},"numbers-hexa":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])0x[0-9a-fA-F]+(?![\\w.])"},"operators":{"patterns":[{"include":"#operators-word"},{"include":"#operators-symbols"},{"include":"#ranges"}]},"operators-symbols":{"name":"keyword.control.nushell","match":"(?\u003c= )(?:(?:\\+|\\-|\\*|\\/)=?|\\/\\/|\\*\\*|!=|[\u003c\u003e=]=?|[!=]~|\\+\\+=?)(?= |$)"},"operators-word":{"name":"keyword.control.nushell","match":"(?\u003c= |\\()(?:mod|in|not-in|not|and|or|xor|bit-or|bit-and|bit-xor|bit-shl|bit-shr|starts-with|ends-with)(?= |\\)|$)"},"parameters":{"name":"variable.parameter.nushell","match":"(?\u003c=\\s)(-{1,2})[\\w-]+","captures":{"1":{"name":"keyword.control.nushell"}}},"paren-expression":{"name":"meta.expression.parenthesis.nushell","begin":"\\(","end":"\\)","patterns":[{"include":"#expression"}],"beginCaptures":{"0":{"name":"meta.brace.round.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.round.end.nushell"}}},"pre-command":{"begin":"(\\w+)(=)","end":"(?=\\s+)","patterns":[{"include":"#value"}],"beginCaptures":{"1":{"name":"variable.other.nushell"},"2":{"patterns":[{"include":"#operators"}]}}},"ranges":{"name":"keyword.control.nushell","match":"\\.\\.\u003c?"},"spread":{"name":"keyword.control.nushell","match":"\\.\\.\\.(?=[^\\s\\]}])"},"string":{"patterns":[{"include":"#string-single-quote"},{"include":"#string-backtick"},{"include":"#string-double-quote"},{"include":"#string-interpolated-double"},{"include":"#string-interpolated-single"},{"include":"#string-bare"}]},"string-backtick":{"name":"string.quoted.single.nushell","begin":"`","end":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-bare":{"name":"string.bare.nushell","match":"[^$\\[{(\"',|#\\s|][^\\[\\]{}()\"'\\s#,|]*"},"string-double-quote":{"name":"string.quoted.double.nushell","begin":"\"","end":"\"","patterns":[{"match":"\\w+"},{"include":"#string-escape"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-escape":{"name":"constant.character.escape.nushell","match":"\\\\(?:[bfrnt\\\\'\"/]|u[0-9a-fA-F]{4})"},"string-interpolated-double":{"name":"string.interpolated.double.nushell","begin":"\\$\"","end":"\"","patterns":[{"name":"constant.character.escape.nushell","match":"\\\\[()]"},{"include":"#string-escape"},{"include":"#paren-expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-interpolated-single":{"name":"string.interpolated.single.nushell","begin":"\\$'","end":"'","patterns":[{"include":"#paren-expression"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"string-single-quote":{"name":"string.quoted.single.nushell","begin":"'","end":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.nushell"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.nushell"}}},"table":{"name":"meta.table.nushell","begin":"\\[","end":"\\]","patterns":[{"include":"#spread"},{"include":"#value"},{"name":"punctuation.separator.nushell","match":","}],"beginCaptures":{"0":{"name":"meta.brace.square.begin.nushell"}},"endCaptures":{"0":{"name":"meta.brace.square.end.nushell"}}},"types":{"patterns":[{"name":"meta.list.nushell","begin":"\\b(list)\\s*\u003c","end":"\u003e","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.nushell"}}},{"name":"meta.record.nushell","begin":"\\b(record)\\s*\u003c","end":"\u003e","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+')\\s*:\\s*","captures":{"1":{"name":"variable.parameter.nushell"}}},{"include":"#types"}],"beginCaptures":{"1":{"name":"entity.name.type.nushell"}}},{"name":"entity.name.type.nushell","match":"\\b(\\w+)\\b"}]},"use-module":{"patterns":[{"match":"^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*))?\\s*;?$","captures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.namespace.nushell"},"3":{"name":"keyword.other.nushell"}}},{"begin":"^\\s*((?:export )?use)\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+')\\s*\\[","end":"(\\])\\s*;?\\s*$","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?","captures":{"1":{"name":"keyword.other.nushell"}}},{"include":"#comment"}],"beginCaptures":{"1":{"name":"entity.name.function.nushell"},"2":{"name":"entity.name.namespace.nushell"}},"endCaptures":{"1":{"name":"meta.brace.square.end.nushell"}}},{"match":"(?\u003cpath\u003e(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\u003cpath\u003e\"|'\\g\u003cpath\u003e\\'|(?![\"'])\\g\u003cpath\u003e)(?:\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[^']+'|\\*))?\\s*;?$","captures":{"2":{"name":"entity.name.function.nushell"},"3":{"name":"string.bare.nushell","patterns":[{"match":"([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')","captures":{"1":{"name":"entity.name.namespace.nushell"}}}]},"4":{"name":"keyword.other.nushell"}}},{"begin":"(?\u003cpath\u003e(?:/|\\\\|~[\\/\\\\]|\\.\\.?[\\/\\\\])?(?:[^\\/\\\\]+[\\/\\\\])*[\\w\\- ]+(?:\\.nu)?){0}^\\s*((?:export )?use)\\s+(\"\\g\u003cpath\u003e\"|'\\g\u003cpath\u003e\\'|(?![\"'])\\g\u003cpath\u003e)\\s+\\[","end":"(\\])\\s*;?\\s*$","patterns":[{"match":"([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|\\*),?","captures":{"0":{"name":"keyword.other.nushell"}}},{"include":"#comment"}],"beginCaptures":{"2":{"name":"entity.name.function.nushell"},"3":{"name":"string.bare.nushell","patterns":[{"match":"([\\w\\- ]+)(?:\\.nu)?(?=$|\"|')","captures":{"1":{"name":"entity.name.namespace.nushell"}}}]}},"endCaptures":{"1":{"name":"meta.brace.square.end.nushell"}}},{"match":"^\\s*(?:export )?use\\b","captures":{"0":{"name":"entity.name.function.nushell"}}}]},"value":{"patterns":[{"include":"#variables"},{"include":"#variable-fields"},{"include":"#control-keywords"},{"include":"#constant-value"},{"include":"#table"},{"include":"#operators"},{"include":"#paren-expression"},{"include":"#braced-expression"},{"include":"#string"},{"include":"#comment"}]},"variable-fields":{"name":"variable.other.nushell","match":"(?\u003c=\\)|\\}|\\])(?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))+"},"variables":{"match":"(\\$[a-zA-Z0-9_]+)((?:\\.(?:[\\w-]+|\"[\\w\\- ]+\"))*)","captures":{"1":{"patterns":[{"include":"#internal-variables"},{"name":"variable.other.nushell","match":"\\$.+"}]},"2":{"name":"variable.other.nushell"}}}}}
|
data/grammars/source.odin.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"Odin","scopeName":"source.odin","patterns":[{"include":"#comments"},{"include":"#types"},{"include":"#keywords"},{"include":"#functions_and_declarations"},{"include":"#strings"},{"include":"#string_escaped_char"}],"repository":{"block_comment":{"name":"comment.block.odin","begin":"/\\*","end":"\\*/","captures":{"0":{"name":"punctuation.definition.comment.odin"}}},"comments":{"patterns":[{"include":"#block_comment"},{"name":"invalid.illegal.stray-comment-end.odin","match":"\\*/.*\\n"},{"include":"#line_comment"}]},"functions_and_declarations":{"patterns":[{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(proc)","captures":{"1":{"name":"meta.function.odin entity.name.function.odin"},"2":{"name":"storage.type.odin"}}},{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*([#]force_inline|[#]force_no_inline)\\s+(proc)","captures":{"1":{"name":"meta.function.odin entity.name.function.odin"},"2":{"name":"keyword.control.odin"},"3":{"name":"storage.type.odin"}}},{"match":"(proc)\\s*[\\(]","captures":{"1":{"name":"storage.type.odin"}}},{"match":"(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[!]?\\s*[\\(]","captures":{"1":{"name":"support.function.odin"}}},{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(struct|union|enum|bit_field|bit_set)","captures":{"1":{"name":"meta.type.odin entity.name.type.odin"},"2":{"name":"storage.type.odin"}}},{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*([#]\\s*type)","captures":{"1":{"name":"meta.type.odin entity.name.type.odin"},"2":{"name":"keyword.tag.odin"}}},{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*","captures":{"1":{"name":"meta.constant.odin entity.name.type.odin"}}}]},"keywords":{"patterns":[{"name":"keyword.control.odin","match":"\\b(import|foreign|package)\\b"},{"name":"keyword.control.odin","match":"\\b(if|else|when|for|in|not_in|defer|switch|return|const|do|where)\\b"},{"name":"keyword.control.odin","match":"\\b(fallthrough|break|continue|case)\\b"},{"name":"keyword.control.odin","match":"\\b(using)\\b"},{"name":"keyword.control.odin","match":"\\b(asm|or_return|or_else|or_break|or_continue)\\b"},{"name":"keyword.operator.odin","match":"\\b(distinct)\\b"},{"name":"keyword.operator.odin","match":"\\b(context)\\b"},{"name":"constant.language.odin","match":"\\b(nil|true|false)\\b"},{"name":"constant.numeric.odin","match":"\\b(\\d(\\d|_)*(.\\d(\\d|_)*)?)((e|E)(\\+|-)?\\d+)?[ijk]?\\b"},{"name":"constant.numeric.odin","match":"\\b((0b(0|1|_)+)|(0o(\\d|_)+)|(0d(\\d|_)+)|(0[xXh]([[:xdigit:]]|_)+))[ijk]?\\b"},{"name":"constant.numeric.odin","match":"---"},{"name":"storage.type.odin","match":"\\b(struct|enum|union|map|bit_set|bit_field|dynamic)\\b"},{"name":"keyword.function.odin","match":"\\b(cast|transmute|auto_cast)\\b"},{"name":"keyword.tag.odin","match":"([#]\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"},{"name":"keyword.tag.odin","match":"(\\x40\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"},{"name":"keyword.tag.odin","match":"(\\x40\\s*[(]\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)\\s*[)]"},{"name":"keyword.operator.odin","match":"@"}]},"line_comment":{"begin":"(^[ \\t]+)?((?=//)|(?=#!))","end":"(?!\\G)","patterns":[{"name":"comment.line.double-slash.odin","begin":"//","end":"
|
1
|
+
{"name":"Odin","scopeName":"source.odin","patterns":[{"include":"#comments"},{"include":"#types"},{"include":"#keywords"},{"include":"#functions_and_declarations"},{"include":"#strings"},{"include":"#string_escaped_char"}],"repository":{"block_comment":{"name":"comment.block.odin","begin":"/\\*","end":"\\*/","captures":{"0":{"name":"punctuation.definition.comment.odin"}}},"comments":{"patterns":[{"include":"#block_comment"},{"name":"invalid.illegal.stray-comment-end.odin","match":"\\*/.*\\n"},{"include":"#line_comment"}]},"functions_and_declarations":{"patterns":[{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(proc)","captures":{"1":{"name":"meta.function.odin entity.name.function.odin"},"2":{"name":"storage.type.odin"}}},{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*([#]force_inline|[#]force_no_inline)\\s+(proc)","captures":{"1":{"name":"meta.function.odin entity.name.function.odin"},"2":{"name":"keyword.control.odin"},"3":{"name":"storage.type.odin"}}},{"match":"(proc)\\s*[\\(]","captures":{"1":{"name":"storage.type.odin"}}},{"match":"(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[!]?\\s*[\\(]","captures":{"1":{"name":"support.function.odin"}}},{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*(struct|union|enum|bit_field|bit_set)","captures":{"1":{"name":"meta.type.odin entity.name.type.odin"},"2":{"name":"storage.type.odin"}}},{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*([#]\\s*type)","captures":{"1":{"name":"meta.type.odin entity.name.type.odin"},"2":{"name":"keyword.tag.odin"}}},{"match":"\\b(\\b[[:alpha:]_]+[[:alnum:]_]*\\b)\\s*[:]\\s*[:]\\s*","captures":{"1":{"name":"meta.constant.odin entity.name.type.odin"}}}]},"keywords":{"patterns":[{"name":"keyword.control.odin","match":"\\b(import|foreign|package)\\b"},{"name":"keyword.control.odin","match":"\\b(if|else|when|for|in|not_in|defer|switch|return|const|do|where)\\b"},{"name":"keyword.control.odin","match":"\\b(fallthrough|break|continue|case)\\b"},{"name":"keyword.control.odin","match":"\\b(using)\\b"},{"name":"keyword.control.odin","match":"\\b(asm|or_return|or_else|or_break|or_continue)\\b"},{"name":"keyword.operator.odin","match":"\\b(distinct)\\b"},{"name":"keyword.operator.odin","match":"\\b(context)\\b"},{"name":"constant.language.odin","match":"\\b(nil|true|false)\\b"},{"name":"constant.numeric.odin","match":"\\b(\\d(\\d|_)*(.\\d(\\d|_)*)?)((e|E)(\\+|-)?\\d+)?[ijk]?\\b"},{"name":"constant.numeric.odin","match":"\\b((0b(0|1|_)+)|(0o(\\d|_)+)|(0d(\\d|_)+)|(0[xXh]([[:xdigit:]]|_)+))[ijk]?\\b"},{"name":"constant.numeric.odin","match":"---"},{"name":"storage.type.odin","match":"\\b(struct|enum|union|map|bit_set|bit_field|dynamic)\\b"},{"name":"keyword.function.odin","match":"\\b(cast|transmute|auto_cast)\\b"},{"name":"keyword.tag.odin","match":"([#]\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"},{"name":"keyword.tag.odin","match":"(#[+]\\s*[[:alpha:]-][[:alnum:]-]*)"},{"name":"keyword.tag.odin","match":"(\\x40\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"},{"name":"keyword.tag.odin","match":"(\\x40\\s*[(]\\s*\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)\\s*[)]"},{"name":"keyword.operator.odin","match":"@"}]},"line_comment":{"begin":"(^[ \\t]+)?((?=//)|(?=#!))","end":"(?!\\G)","patterns":[{"name":"comment.line.double-slash.odin","begin":"//","end":"(?=\\n)","patterns":[{"name":"punctuation.separator.continuation.odin","match":"(?\u003e\\\\\\s*\\n)"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.odin"}}},{"name":"comment.line.double-slash.odin","begin":"#!","end":"(?=\\n)","patterns":[{"name":"punctuation.separator.continuation.odin","match":"(?\u003e\\\\\\s*\\n)"}],"beginCaptures":{"0":{"name":"punctuation.definition.comment.odin"}}}],"beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.odin"}}},"string_escaped_char":{"patterns":[{"name":"constant.character.escape.odin","match":"\\\\(\\\\|[abefnrutv'\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|[0-7]{3})"},{"name":"invalid.illegal.unknown-escape.odin","match":"\\\\."}]},"strings":{"patterns":[{"name":"string.quoted.double.odin","begin":"\"","end":"\"","patterns":[{"include":"#string_placeholder"},{"include":"#string_escaped_char"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.odin"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.odin"}}},{"name":"string.quoted.single.odin","begin":"'","end":"'","patterns":[{"include":"#string_escaped_char"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.odin"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.odin"}}},{"name":"string.quoted.raw.odin","begin":"`","end":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.odin"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.odin"}}}]},"types":{"patterns":[{"name":"storage.type.odin","match":"\\b(struct|enum|union|bit_field|bit_set)\\b(?:(\\{)(\\}))?"},{"name":"storage.type.odin","match":"\\b(proc)\\b"},{"name":"storage.type.odin","match":"\\$\\s*(\\b([[:alpha:]_]+[[:alnum:]_]*)\\b)"},{"name":"storage.type.odin","match":"\\b(i8|i16|i32|i64|i128|int)\\b"},{"name":"storage.type.odin","match":"\\b(u8|u16|u32|u64|u128|uint|uintptr)\\b"},{"name":"storage.type.odin","match":"\\b(f16|f32|f64|f128)\\b"},{"name":"storage.type.odin","match":"\\b(f16le|f32le|f64le|f128le)\\b"},{"name":"storage.type.odin","match":"\\b(f16be|f32be|f64be|f128be)\\b"},{"name":"storage.type.odin","match":"\\b(complex32|complex64|complex128)\\b"},{"name":"storage.type.odin","match":"\\b(quaternion64|quaternion128|quaternion256)\\b"},{"name":"storage.type.odin","match":"\\b(bool|b8|b16|b32|b64)\\b"},{"name":"storage.type.odin","match":"\\b(string|cstring|rune)\\b"},{"name":"storage.type.odin","match":"\\b(rawptr)\\b"},{"name":"storage.type.odin","match":"\\b(any|typeid)\\b"},{"name":"storage.type.odin","match":"\\b(byte)\\b"},{"name":"storage.type.odin","match":"\\b(u16le|u32le|u64le|u128le|i16le|i32le|i64le|i128le)\\b"},{"name":"storage.type.odin","match":"\\b(i16be|i32be|i64be|i128be|u16be|u32be|u64be|u128be)\\b"}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"OpenESQL","scopeName":"source.openesql","patterns":[{"name":"text.variable","match":"((?\u003c!@)@)\\b(\\w+)\\b"},{"name":"text.bracketed","match":"(\\[)[^\\]]*(\\])"},{"name":"keyword.other.openesql","match":"(?\u003c![\\-\\w])(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blocksize|bmk|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|cast|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|cleanup_policy|clear|clear_port|close|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\s+or\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime|datetime2|datetimeoffset|days|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare(\\s+cursor)?|decrypt|decrypt_a|decryption|default_database|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hours|http|identity|identity_value|if|ifnull|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minutes|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|schema|schemabinding|scoped|scroll|scroll_locks|sddl|secexpr|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|session|sessions|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablock|tablockx|take|tape|target|target_index|target_partition|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|to|top|torn_page_detection|track_columns_updated|tran|transaction|transfer|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|value|values|varbinary|varchar|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|waitfor|webmethod|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|windows|with|within|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|zone)(?![0-9A-Za-z_-])\\b"},{"include":"#comments"},{"name":"meta.create.openesql","match":"(?i:^\\s*(create(?:\\s+or\\s+replace)?)\\s+(aggregate|conversion|database|domain|function|group|(unique\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)(['\"`]?)(\\w+)\\4","captures":{"1":{"name":"keyword.other.create.openesql"},"2":{"name":"keyword.other.openesql"},"5":{"name":"entity.name.function.openesql"}}},{"name":"meta.drop.openesql","match":"(?i:^\\s*(drop)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))","captures":{"1":{"name":"keyword.other.create.openesql"},"2":{"name":"keyword.other.openesql"}}},{"name":"meta.drop.openesql","match":"(?i:\\s*(drop)\\s+(table)\\s+(\\w+)(\\s+cascade)?\\b)","captures":{"1":{"name":"keyword.other.create.openesql"},"2":{"name":"keyword.other.table.openesql"},"3":{"name":"entity.name.function.openesql"},"4":{"name":"keyword.other.cascade.openesql"}}},{"name":"meta.alter.openesql","match":"(?i:^\\s*(alter)\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\s+)","captures":{"1":{"name":"keyword.other.create.openesql"},"2":{"name":"keyword.other.table.openesql"}}},{"match":"(?xi)\n\n\t\t\t\t# normal stuff, capture 1\n\t\t\t\t \\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\b\n\n\t\t\t\t# numeric suffix, capture 2 + 3i\n\t\t\t\t|\\b(bit\\svarying|character\\s(?:varying)?|tinyint|var\\schar|float|interval)\\((\\d+)\\)\n\n\t\t\t\t# optional numeric suffix, capture 4 + 5i\n\t\t\t\t|\\b(char|number|varchar\\d?)\\b(?:\\((\\d+)\\))?\n\n\t\t\t\t# special case, capture 6 + 7i + 8i\n\t\t\t\t|\\b(numeric|decimal)\\b(?:\\((\\d+),(\\d+)\\))?\n\n\t\t\t\t# special case, captures 9, 10i, 11\n\t\t\t\t|\\b(times?)\\b(?:\\((\\d+)\\))?(\\swith(?:out)?\\stime\\szone\\b)?\n\n\t\t\t\t# special case, captures 12, 13, 14i, 15\n\t\t\t\t|\\b(timestamp)(?:(s|tz))?\\b(?:\\((\\d+)\\))?(\\s(with|without)\\stime\\szone\\b)?\n\n\t\t\t","captures":{"1":{"name":"storage.type.openesql"},"10":{"name":"constant.numeric.openesql"},"11":{"name":"storage.type.openesql"},"12":{"name":"storage.type.openesql"},"13":{"name":"storage.type.openesql"},"14":{"name":"constant.numeric.openesql"},"15":{"name":"storage.type.openesql"},"2":{"name":"storage.type.openesql"},"3":{"name":"constant.numeric.openesql"},"4":{"name":"storage.type.openesql"},"5":{"name":"constant.numeric.openesql"},"6":{"name":"storage.type.openesql"},"7":{"name":"constant.numeric.openesql"},"8":{"name":"constant.numeric.openesql"},"9":{"name":"storage.type.openesql"}}},{"name":"storage.modifier.openesql","match":"(?i:\\b((?:primary|foreign)\\s+key|references|on\\sdelete(\\s+cascade)?|check|constraint)\\b)"},{"name":"constant.numeric.openesql","match":"\\b\\d+\\b"},{"name":"keyword.other.DML.openesql","match":"(?i:\\b(select(\\s+distinct)?|insert\\s+(ignore\\s+)?into|update|delete|from|set|where|group\\sby|or|like|and|union(\\s+all)?|having|order\\sby|limit|(inner|cross)\\s+join|join|straight_join|full\\s+outer\\s+join|(left|right)(\\s+outer)?\\s+join|natural(\\s+(left|right)(\\s+outer)?)?\\s+join)\\b)"},{"name":"keyword.other.DDL.create.II.openesql","match":"(?i:\\b(on|off|((is\\s+)?not\\s+)?null)\\b)"},{"name":"keyword.other.DML.II.openesql","match":"(?i:\\bvalues\\b)"},{"name":"keyword.other.extra.openesql","match":"(?i:\\b(whenever|of|for|cursor|found|insensitive|sensitive)\\b)"},{"name":"keyword.other.LUW.openesql","match":"(?i:\\b(begin(\\s+work)?|start\\s+transaction|commit(\\s+work)?|rollback(\\s+work)?)\\b)"},{"name":"keyword.other.authorization.openesql","match":"(?i:\\b(grant(\\swith\\sgrant\\soption)?|revoke)\\b)"},{"name":"keyword.other.data-integrity.openesql","match":"(?i:\\bin\\b)"},{"name":"keyword.other.object-comments.openesql","match":"(?i:^\\s*(comment\\s+on\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\s+.*?\\s+(is)\\s+)"},{"name":"keyword.other.alias.openesql","match":"(?i)\\bAS\\b"},{"name":"keyword.other.order.openesql","match":"(?i)\\b(DESC|ASC)\\b"},{"name":"keyword.operator.star.openesql","match":"\\*"},{"name":"keyword.operator.comparison.openesql","match":"[!\u003c\u003e]?=|\u003c\u003e|\u003c|\u003e"},{"name":"keyword.operator.math.openesql","match":"-|\\+|/"},{"name":"keyword.operator.concatenator.openesql","match":"\\|\\|"},{"name":"support.function.aggregate.openesql","match":"(?i)\\b(avg|checksum_agg|count|count_big|grouping|grouping_id|max|min|sum|stdev|stdevp|var|varp)\\b"},{"name":"support.function.conversion.openesql","match":"(?i)\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\b"},{"name":"support.function.cursor.openesql","match":"(?i)\\b(cursor_status)\\b"},{"name":"support.function.datetime.openesql","match":"(?i)\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|eomonth|switchoffset|todatetimeoffset|isdate)\\b"},{"name":"support.function.expression.openesql","match":"(?i)\\b(coalesce|nullif)\\b"},{"name":"support.function.globalvar.openesql","match":"(?\u003c!@)@@(?i)\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\b"},{"name":"support.function.logical.openesql","match":"(?i)\\b(choose|iif)\\b"},{"name":"support.function.mathematical.openesql","match":"(?i)\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\b"},{"name":"support.function.metadata.openesql","match":"(?i)\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\b"},{"name":"support.function.ranking.openesql","match":"(?i)\\b(rank|dense_rank|ntile|row_number)\\b"},{"name":"support.function.rowset.openesql","match":"(?i)\\b(opendatasource|openrowset|openquery|openxml)\\b"},{"name":"support.function.security.openesql","match":"(?i)\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\b"},{"name":"support.function.string.openesql","match":"(?i)\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|patindex|quotename|replace|replicate|reverse|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\b"},{"name":"support.function.system.openesql","match":"(?i)\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\b"},{"name":"support.function.textimage.openesql","match":"(?i)\\b(patindex|textptr|textvalid)\\b"},{"match":"(\\w+?)\\.(\\w+)","captures":{"1":{"name":"constant.other.database-name.openesql"},"2":{"name":"constant.other.table-name.openesql"}}},{"include":"#strings"},{"include":"#regexps"},{"name":"meta.block.openesql","match":"(\\()(\\))","captures":{"1":{"name":"punctuation.section.scope.begin.openesql"},"2":{"name":"punctuation.section.scope.end.openesql"}}}],"repository":{"comments":{"patterns":[{"begin":"(^[ \\t]+)?(?=--)","end":"(?!\\G)","patterns":[{"name":"comment.line.double-dash.openesql","begin":"--","end":"\\n","beginCaptures":{"0":{"name":"punctuation.definition.comment.openesql"}}}],"beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.openesql"}}},{"begin":"(^[ \\t]+)?(?=#)","end":"(?!\\G)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.openesql"}}},{"name":"comment.block.c","begin":"/\\*","end":"\\*/","captures":{"0":{"name":"punctuation.definition.comment.openesql"}}}]},"regexps":{"patterns":[{"name":"string.regexp.openesql","begin":"/(?=\\S.*/)","end":"/","patterns":[{"include":"#string_interpolation"},{"name":"constant.character.escape.slash.openesql","match":"\\\\/"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.openesql"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.openesql"}}},{"name":"string.regexp.modr.openesql","begin":"%r\\{","end":"\\}","patterns":[{"include":"#string_interpolation"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.openesql"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.openesql"}}}]},"string_escape":{"name":"constant.character.escape.openesql","match":"\\\\."},"string_interpolation":{"name":"string.interpolated.openesql","match":"(#\\{)([^\\}]*)(\\})","captures":{"1":{"name":"punctuation.definition.string.begin.openesql"},"3":{"name":"punctuation.definition.string.end.openesql"}}},"strings":{"patterns":[{"name":"string.quoted.single.openesql","match":"(N)?(')[^']*(')","captures":{"1":{"name":"punctuation.definition.string.begin.openesql"},"2":{"name":"punctuation.definition.string.end.openesql"}}},{"name":"string.quoted.single.openesql","begin":"'","end":"'","patterns":[{"include":"#string_escape"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.openesql"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.openesql"}}},{"name":"string.quoted.other.backtick.openesql","match":"(`)[^`\\\\]*(`)","captures":{"1":{"name":"punctuation.definition.string.begin.openesql"},"2":{"name":"punctuation.definition.string.end.openesql"}}},{"name":"string.quoted.other.backtick.openesql","begin":"`","end":"`","patterns":[{"include":"#string_escape"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.openesql"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.openesql"}}},{"name":"string.quoted.double.openesql","match":"(\")[^\"#]*(\")","captures":{"1":{"name":"punctuation.definition.string.begin.openesql"},"2":{"name":"punctuation.definition.string.end.openesql"}}},{"name":"string.quoted.double.openesql","begin":"\"","end":"\"","patterns":[{"include":"#string_interpolation"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.openesql"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.openesql"}}},{"name":"string.other.quoted.brackets.openesql","begin":"%\\{","end":"\\}","patterns":[{"include":"#string_interpolation"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.openesql"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.openesql"}}}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.overpassql","patterns":[{"include":"#TOP"}],"repository":{"TOP":{"patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#start-statement-context"}]},"assign-variable":{"name":"meta.overpassql.output-set","match":"(-\u003e)\\s*+(\\.)\\s*+([_a-zA-Z][_a-zA-Z0-9]*+)(?=\\s*+(?:;|$))","captures":{"1":{"name":"keyword.operator.assignment.overpassql"},"2":{"name":"punctuation.definition.variable.overpassql"},"3":{"name":"variable.other.overpassql"}}},"bareword":{"name":"meta.overpassql.bareword","match":"[a-zA-Z][a-zA-Z0-9]*+"},"block-comment":{"name":"comment.block.overpassql","begin":"\\/\\*","end":"\\*\\/","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.overpassql"}}},"block-construct":{"name":"meta.overpassql.statement.block","begin":"if|else|foreach|for|complete|retro|compare","end":"(?\u003c=[;)}])","patterns":[{"include":"#whitespace"},{"include":"#comment"},{"include":"#parens-evaluator"},{"include":"#block-group"}],"beginCaptures":{"0":{"name":"keyword.control.overpassql"}}},"block-group":{"name":"meta.block.overpassql","begin":"\\{","end":"\\}","patterns":[{"include":"#whitespace"},{"include":"#comment"},{"include":"#start-statement-context"}],"beginCaptures":{"0":{"name":"punctuation.section.block.begin.overpassql punctuation.section.braces.begin"}},"endCaptures":{"0":{"name":"punctuation.section.block.end.overpassql punctuation.section.end.begin"}}},"builtin-evaluator-function-name":{"name":"meta.overpassql.evaluator.function-name","match":"(\\.)?+(id|type|is_tag|keys|version|timestamp|changeset|uid|user|count_tags|count_members|count_distinct_members|count_by_role|count_distinct_by_role|per_member|per_vertex|pos|mtype|ref|role|angle|is_closed|geom|length|lat|lon|lstr|poly|u|set|min|max|sum|count|gcat|number|is_number|suffix|abs|date|is_date|center|tracehull|lrs_in|lrs_isect|lrs_union|lrs_min|lrs_max)(?=\\()","captures":{"1":{"name":"punctuation.accessor.overpassql"},"2":{"name":"support.function.overpassql"}}},"comments":{"patterns":[{"include":"#block-comment"},{"include":"#line-comment"}]},"evaluator":{"patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#extended-overpass-turbo-queries"},{"include":"#evaluator-operator"},{"include":"#string-literal"},{"include":"#number-literal"},{"include":"#evaluator-variable"},{"include":"#evaluator-tag-value"},{"include":"#evaluator-field-access"},{"include":"#builtin-evaluator-function-name"},{"include":"#evaluator-function-name"},{"include":"#evaluator-function-params"}]},"evaluator-field-access":{"name":"meta.overpassql.evaluator.field-access","match":"(\\.)([a-zA-Z][a-zA-Z0-9]*+)(?!\\()","captures":{"1":{"name":"punctuation.accessor.overpassql"},"2":{"name":"variable.other.member.overpassql"}}},"evaluator-function-name":{"name":"meta.overpassql.evaluator.function-name","match":"(\\.)?+([a-zA-Z][a-zA-Z0-9]*+)(?=\\()","captures":{"1":{"name":"punctuation.accessor.overpassql"},"2":{"name":"variable.function.overpassql"}}},"evaluator-function-params":{"name":"meta.group.overpassql meta.parens.overpassql meta.overpassql.function.params","begin":"\\(","end":"\\)","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#parameter-separator"},{"include":"#evaluator"}],"beginCaptures":{"0":{"name":"punctuation.section.group.begin.overpassql punctuation.section.parens.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.section.group.end.overpassql punctuation.section.parens.end.overpassql"}}},"evaluator-operator":{"match":"(::)|(!|\\|\\||\u0026\u0026|==|!=|\u003c=|\u003e=|\u003c|\u003e)|(\\+|-|\\*|/)|(\\?|:)","captures":{"1":{"name":"keyword.other.overpassql"},"2":{"name":"keyword.operator.logical.overpassql"},"3":{"name":"keyword.operator.arithmetic.overpassql"},"4":{"name":"keyword.operator.other.overpassql"}}},"evaluator-tag-value":{"name":"meta.overpassql.evaluator.tag-value","begin":"\\[","end":"\\]","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#string-literal"},{"include":"#bareword"},{"include":"#evaluator"}],"beginCaptures":{"0":{"name":"punctuation.section.brackets.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.section.brackets.end.overpassql"}}},"evaluator-variable":{"name":"variable.other.overpassql","match":"([a-zA-Z][a-zA-Z0-9]*+)(?=\\.)"},"expression":{"patterns":[{"include":"#extended-overpass-turbo-queries"},{"include":"#pair-expression"},{"include":"#number-literal"},{"include":"#string-literal"},{"include":"#setting-special-fields"},{"include":"#tag-expression"},{"include":"#query-type"},{"include":"#parens-expression"}]},"extended-overpass-turbo-queries":{"name":"meta.overpassql.turbo.query","begin":"{{","end":"}}","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#number-literal"},{"include":"#string-literal"},{"include":"#overpass-turbo-query-name"},{"include":"#overpass-turbo-query-separator"},{"include":"#overpass-turbo-query-definition"},{"include":"#overpass-turbo-custom-query-name"}],"beginCaptures":{"0":{"name":"keyword.other.overpassql.turbo.begin"}},"endCaptures":{"0":{"name":"keyword.other.overpassql.turbo.end"}}},"fallback":{"name":"meta.overpassql.unknown","begin":"(?=.)","end":"(?\u003c=[;\\{|\\}])","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#number-literal"},{"include":"#string-literal"},{"include":"#query-type"},{"include":"#assign-variable"},{"include":"#input-set"}]},"function-call":{"name":"meta.function-call.overpassql","begin":"(is_in|timeline)(\\()","end":"\\)","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#expression"},{"include":"#parameter-separator"}],"beginCaptures":{"1":{"name":"support.function.overpassql"},"2":{"name":"punctuation.section.group.begin.overpassql punctuation.section.parens.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.section.group.end.overpassql punctuation.section.parens.end.overpassql"}}},"function-call-names":{"name":"support.function.overpassql","match":"is_in|timeline"},"function-call-statement-function-name":{"name":"meta.overpassql.statement.function-call","begin":"(?=(?:\\.\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+[a-zA-Z][a-zA-Z0-9]*+\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+)?+(?:is_in|timeline))","end":";","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#input-set"},{"include":"#function-call"},{"include":"#assign-variable"}],"endCaptures":{"0":{"name":"punctuation.terminator.statement.overpassql"}}},"function-word-statement-word-function-name":{"name":"meta.overpassql.statement.word-function","begin":"(?=(?:\\.\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+[a-zA-Z][a-zA-Z0-9]*+\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+)?+(?:local|convert|make))","end":";","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#input-set"},{"include":"#word-function-names"},{"include":"#word-function-param"},{"include":"#assign-variable"}],"endCaptures":{"0":{"name":"punctuation.terminator.statement.overpassql"}}},"generic-function-call":{"name":"meta.function-call.overpassql.generic","begin":"(\\w++)(\\()","end":"\\)","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#expression"},{"include":"#parameter-separator"}],"beginCaptures":{"1":{"name":"variable.function.overpassql"},"2":{"name":"punctuation.section.group.begin.overpassql punctuation.section.parens.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.section.group.end.overpassql punctuation.section.parens.end.overpassql"}}},"generic-function-statement-generic-name":{"name":"meta.overpassql.statement.generic-function","begin":"(?=(?:\\.\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+[a-zA-Z][a-zA-Z0-9]*+\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+)?+\\w)","end":";","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#input-set"},{"include":"#generic-function-call"},{"include":"#assign-variable"}],"endCaptures":{"0":{"name":"punctuation.terminator.statement.overpassql"}}},"input-set":{"match":"(\\.)\\s*+([_a-zA-Z][_a-zA-Z0-9]*+)","captures":{"1":{"name":"punctuation.definition.variable.overpassql"},"2":{"name":"variable.other.overpassql"}}},"item-statement-dot-semicolon":{"name":"meta.overpassql.statement.item","begin":"(?=\\.\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+[a-zA-Z][a-zA-Z0-9]*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+;)","end":";","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#input-set"}],"endCaptures":{"0":{"name":"punctuation.terminator.statement.overpassql"}}},"line-comment":{"name":"comment.double-slash.overpassql","match":"(//).*+$","captures":{"1":{"name":"punctuation.definition.comment.begin.overpassql"}}},"number-literal":{"match":"(?\u003c!\\w)(-)?+((?:[1-9][0-9]*+|0)(?:\\.[0-9]++)?+)(?!\\w)","captures":{"1":{"name":"keyword.operator.arithmetic.overpassql"},"2":{"name":"constant.numeric.overpassql"}}},"operator-names":{"name":"keyword.operator.other.overpassql","match":"\u003c\u003c|\u003e\u003e|\u003c|\u003e"},"operator-statement-operator-symbol":{"name":"meta.overpassql.statement.operator","begin":"(?=(?:\\.\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+[a-zA-Z][a-zA-Z0-9]*+\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+)?+(?:\u003c\u003c|\u003e\u003e|\u003c|\u003e))","end":";","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#input-set"},{"include":"#operator-names"},{"include":"#assign-variable"}],"endCaptures":{"0":{"name":"punctuation.terminator.statement.overpassql"}}},"out-keyword":{"name":"keyword.other.overpassql","match":"out\\b"},"out-parameter":{"patterns":[{"include":"#out-parameter-keyword"},{"include":"#positive-integer"},{"include":"#parens-expression"}]},"out-parameter-keyword":{"match":"count|ids|skel|body|tags|meta|noids|geom|center|bb|asc|qt","captures":{"0":{"name":"support.constant.overpassql.out"}}},"out-statement-keyword":{"name":"meta.overpassql.statement.out","begin":"(?=(?:\\.\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+[a-zA-Z][a-zA-Z0-9]*+\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+)?+out)","end":";","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#input-set"},{"include":"#out-keyword"},{"include":"#out-parameter"}],"endCaptures":{"0":{"name":"punctuation.terminator.statement.overpassql"}}},"overpass-turbo-custom-query-name":{"name":"variable.other.overpassql.turbo","match":"\\b[a-zA-Z][a-zA-Z0-9]*+(?=\\w*[:}=])"},"overpass-turbo-query-definition":{"name":"keyword.operator.assignment.overpassql.turbo","match":"="},"overpass-turbo-query-name":{"name":"support.constant.overpassql.turbo","match":"\\b(bbox|center|date|geocodeId|geocodeArea|geocodeBbox|geocodeCoords|style|data)\\b"},"overpass-turbo-query-separator":{"name":"punctuation.separator.delimiter.colon.overpassql.turbo","match":":"},"pair-expression":{"name":"meta.overpassql.pair","begin":"([a-zA-Z][a-zA-Z0-9]*+)(\\()","end":"\\)","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#parameter-separator"},{"include":"#expression"},{"include":"#skip-term"}],"beginCaptures":{"1":{"name":"entity.other.overpassql"},"2":{"name":"punctuation.section.group.begin.overpassql punctuation.section.parens.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.section.group.end.overpassql punctuation.section.parens.end.overpassql"}}},"parameter-separator":{"name":"punctuation.separator.delimiter.comma.overpassql","match":","},"parens-evaluator":{"name":"meta.overpassql.evaluator-group","begin":"\\(","end":"\\)","patterns":[{"include":"#whitespace"},{"include":"#comment"},{"include":"#evaluator"}],"beginCaptures":{"0":{"name":"punctuation.section.group.begin.overpassql punctuation.section.parens.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.section.group.end.overpassql punctuation.section.parens.end.overpassql"}}},"parens-expression":{"begin":"\\(","end":"\\)","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#expression"},{"include":"#parameter-separator"}],"beginCaptures":{"0":{"name":"punctuation.section.group.begin.overpassql punctuation.section.parens.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.section.group.end.overpassql punctuation.section.parens.end.overpassql"}}},"positive-integer":{"match":"(?\u003c!\\w)([1-9][0-9]*+|0)(?!\\w)","captures":{"0":{"name":"constant.numeric.overpassql"}}},"q-string":{"name":"string.quoted.single.overpassql meta.string.overpassql","begin":"'","end":"'","patterns":[{"include":"#string-escape"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.overpassql"}}},"qq-string":{"name":"string.quoted.double.overpassql meta.string.overpassql","begin":"\"","end":"\"","patterns":[{"include":"#string-escape"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.overpassql"}}},"query-filter":{"patterns":[{"include":"#query-filter-haskv"},{"include":"#query-filter-intersect"},{"include":"#query-filter-paren"}]},"query-filter-haskv":{"name":"meta.overpassql.query.filter.kv","begin":"\\[","end":"\\]","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#query-filter-haskv-operators"},{"include":"#query-filter-haskv-insensitive"},{"include":"#string-literal"},{"include":"#bareword"}],"beginCaptures":{"0":{"name":"punctuation.definition.brackets.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.definition.brackets.end.overpassql"}}},"query-filter-haskv-insensitive":{"name":"keyword.operator.logical.overpassql","match":"(,)\\s*+(i)\\s*+(?=\\])","captures":{"1":{"name":"punctuation.separator.delimiter.comma.overpassql"},"2":{"name":"support.constant.overpassql.i"}}},"query-filter-haskv-operators":{"name":"keyword.operator.logical.overpassql","match":"=|!=|~|!~|!"},"query-filter-intersect":{"name":"meta.overpassql.query.filter.intersect","match":"(\\.)\\s*+([_a-zA-Z][_a-zA-Z0-9]*+)","captures":{"1":{"name":"keyword.operator.arithmetic.overpassql.intersect"},"2":{"name":"variable.other.overpassql"}}},"query-filter-keywords":{"name":"keyword.other.overpassql meta.overpassql.query.filter.parens.keyword","match":"\\b(n|w|r|bn|bw|br|id|around|poly|newer|changed|user|uid|area|pivot|if)\\b"},"query-filter-paren":{"name":"meta.group.overpassql meta.parens.overpassql meta.overpassql.query.filter.parens","begin":"\\(","end":"\\)","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#query-filter-keywords"},{"include":"#evaluator"},{"include":"#query-filter-separator"},{"include":"#parameter-separator"},{"include":"#expression"}],"beginCaptures":{"0":{"name":"punctuation.section.group.begin.overpassql punctuation.section.parens.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.section.group.end.overpassql punctuation.section.parens.end.overpassql"}}},"query-filter-separator":{"name":"punctuation.separator.delimiter.colon.overpassql","match":":"},"query-statement-query-type":{"name":"meta.overpassql.statement.query","begin":"(?=(?:node|way|relation|rel|derived|area|nwr)\\b)","end":";","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#query-type"},{"include":"#query-filter"},{"include":"#assign-variable"}],"endCaptures":{"0":{"name":"punctuation.terminator.statement.overpassql"}}},"query-type":{"name":"keyword.other.query.overpassql","match":"\\b(node|way|relation|rel|derived|area|nwr)\\b"},"set-difference-operator":{"name":"keyword.operator.logical.overpassql","match":"-"},"setting-bracket-colon":{"name":"meta.overpassql.setting","begin":"(\\[)(?=\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+\\w++\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+:)","end":"\\]","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#setting-name"},{"include":"#setting-param"},{"include":"#setting-separator"},{"include":"#parameter-separator"}],"beginCaptures":{"0":{"name":"punctuation.definition.brackets.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.definition.brackets.end.overpassql"}}},"setting-name":{"name":"keyword.other.setting","match":"\\b(timeout|maxsize|out|bbox|date|diff|adiff)\\b"},"setting-param":{"patterns":[{"include":"#setting-special-fields"},{"include":"#parameter-separator"},{"include":"#expression"}]},"setting-separator":{"name":"punctuation.separator.delimiter.colon.overpassql","match":":"},"setting-special-fields":{"name":"meta.overpassql.setting.special-field","match":"(::)(id|type|otype|lat|lon|version|timestamp|changeset|uid|user)\\b|(::)(count)(?:(:)(nodes|ways|relations|areas))?+\\b","captures":{"1":{"name":"punctuation.accessor.overpassql"},"2":{"name":"support.constant.overpassql"},"3":{"name":"punctuation.accessor.overpassql"},"4":{"name":"support.constant.overpassql"},"5":{"name":"punctuation.accessor.overpassql"},"6":{"name":"support.constant.overpassql"}}},"settings-statement-bracket-colon":{"name":"meta.overpassql.statement.settings-declaration","begin":"(?=\\[\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+\\w++\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+:)","end":";","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#setting-bracket-colon"}],"endCaptures":{"0":{"name":"punctuation.terminator.statement.overpassql"}}},"skip-term":{"name":"meta.overpassql.term","match":"[a-zA-Z][a-zA-Z0-9]*+"},"start-statement-context":{"name":"meta.context.overpassql.statement","begin":"(?=.)","end":"(?\u003c=;)","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#extended-overpass-turbo-queries"},{"include":"#settings-statement-bracket-colon"},{"include":"#query-statement-query-type"},{"include":"#out-statement-keyword"},{"include":"#item-statement-dot-semicolon"},{"include":"#operator-statement-operator-symbol"},{"include":"#function-call-statement-function-name"},{"include":"#function-word-statement-word-function-name"},{"include":"#statement-grouping"},{"include":"#block-construct"},{"include":"#generic-function-statement-generic-name"},{"include":"#block-group"},{"include":"#fallback"}]},"statement-grouping":{"name":"meta.overpassql.group","begin":"\\(","end":"\\)","patterns":[{"include":"#whitespace"},{"include":"#comment"},{"include":"#set-difference-operator"},{"include":"#start-statement-context"}],"beginCaptures":{"0":{"name":"punctuation.section.group.begin.overpassql punctuation.section.parens.begin.overpassql"}},"endCaptures":{"0":{"name":"punctuation.section.group.end.overpassql punctuation.section.parens.end.overpassql"}}},"string-escape":{"name":"constant.character.escape.overpassql","match":"\\\\[nt\"'\\\\]|\\\\u[0-9a-fA-F]{4}"},"string-literal":{"patterns":[{"include":"#qq-string"},{"include":"#q-string"}]},"tag-correspondance":{"name":"keyword.operator.assignment.overpassql","match":"="},"tag-expression":{"name":"meta.overpassql.tag-access","begin":"(::)(?=\\s*+(?:/\\*(?:[^*]|\\*[^/])*+\\*/\\s*+)*+[\"'a-zA-Z])","end":"(?=[,)])","patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#string-literal"},{"include":"#bareword"}],"beginCaptures":{"0":{"name":"punctuation.accessor.overpassql"}}},"tag-keywords":{"name":"meta.overpassql.tag-match.keyword","match":"(::)(id)?+","captures":{"1":{"name":"keyword.other.overpassql.key"},"2":{"name":"keyword.other.overpassql.id"}}},"tag-match":{"patterns":[{"include":"#whitespace"},{"include":"#comments"},{"include":"#tag-operators"},{"include":"#tag-correspondance"},{"include":"#tag-keywords"},{"include":"#evaluator"},{"include":"#string-literal"},{"include":"#bareword"}]},"tag-operators":{"name":"keyword.operator.overpassql","match":"!"},"whitespace":{"name":"meta.overpassql.whitespace","match":"[ \\t]++"},"word-function-names":{"name":"support.function.overpassql","match":"local|convert|make"},"word-function-param":{"patterns":[{"include":"#query-type"},{"include":"#tag-match"},{"include":"#parameter-separator"}]}}}
|
data/grammars/source.p4.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"P4
|
1
|
+
{"name":"P4","scopeName":"source.p4","patterns":[{"name":"comment.block.p4","begin":"/\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.begin.p4"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.end.p4"}}},{"name":"string.quoted.double.p4","begin":"\"","end":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.p4"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.p4"}}},{"name":"comment.line.p4","begin":"//","end":"\\n","beginCaptures":{"0":{"name":"comment.p4"}}},{"name":"storage.type.object.p4","match":"\\b(header_type|header|metadata|field_list|field_list_calculation|parser|parser_exception|parser_value_set|counter|meter|register|action|action_profile|table|control|extern)\\b"},{"name":"storage.data.type.p4","match":"\\b(bool|bit|varbit|int)\\b"},{"name":"variable.language.p4","match":"\\b(hit|miss|latest|return|default)\\b"},{"name":"keyword.control.p4","match":"\\b(if|else if|else|return|hit|miss|true|false)\\b"},{"name":"keyword.operator.p4","match":"\\b(and|or)\\b"},{"name":"entity.name.type.p4","match":"\\b(exact|ternary|lpm|range|valid|mask)\\b"},{"name":"storage.type.p4","match":"\\b(reads|actions|min_size|max_size|size|support_timeout|action_profile)\\b"},{"name":"storage.type.p4","match":"\\b(bytes|packets)\\b"},{"name":"entity.name.type.p4","match":"\\b(width|layout|attributes|type|static|result|direct|instance_count|min_width|saturating)\\b"},{"name":"entity.name.type.p4","match":"\\b(length|fields|max_length)\\b"},{"name":"meta.preprocessor.include.p4","match":"\\#include"},{"name":"meta.preprocessor.define.p4","match":"\\#define"},{"name":"support.function.primitive.p4","match":"\\b(apply|valid|select|current|extract|add_header|copy_header|remove_header|modify_field|add_to_field|add|set_field_to_hash_index|truncate|drop|no_op|push|pop|count|meter|generate_digest|resubmit|recirculate|clone_ingress_pkt_to_ingress|clone_egress_pkt_to_ingress|clone_ingress_pkt_to_egress|clone_egress_pkt_to_egress|register_write|register_read)\\b"},{"name":"support.any-method.p4","match":"[a-zA-Z_][0-9a-zA-Z_]*"},{"name":"constant.numeric.p4","match":"[\\+|-]?[0-9]+'[0-9]+"},{"name":"constant.numeric.p4","match":"0(x|X)[0-9a-fA-F]+"},{"name":"constant.numeric.p4","match":"0(b|B)[01]+"},{"name":"constant.numeric.p4","match":"[0-9]+"},{"name":"constant.language.p4","match":"\\b(true|false)\\b"}]}
|
data/grammars/source.polar.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"polar","scopeName":"source.polar","patterns":[{"include":"#comment"},{"include":"#rule"},{"include":"#rule-type"},{"include":"#inline-query"},{"include":"#resource-block"},{"include":"#test-block"}],"repository":{"boolean":{"name":"constant.language.boolean","match":"\\b(true|false)\\b"},"comment":{"name":"comment.line.number-sign","match":"#.*"},"inline-query":{"name":"meta.inline-query","begin":"\\?=","end":";","patterns":[{"include":"#term"}],"beginCaptures":{"0":{"name":"keyword.control"}}},"keyword":{"patterns":[{"name":"constant.character","match":"\\b(cut|or|debug|print|in|forall|if|and|of|not|matches|type|on|global)\\b"}]},"number":{"patterns":[{"name":"constant.numeric.float","match":"\\b[+-]?\\d+(?:(\\.)\\d+(?:e[+-]?\\d+)?|(?:e[+-]?\\d+))\\b"},{"name":"constant.numeric.integer","match":"\\b(\\+|\\-)[\\d]+\\b"},{"name":"constant.numeric.natural","match":"\\b[\\d]+\\b"}]},"object-literal":{"name":"constant.other.object-literal","begin":"([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)\\s*\\{","end":"\\}","patterns":[{"include":"#string"},{"include":"#number"},{"include":"#boolean"}],"beginCaptures":{"1":{"name":"entity.name.type.resource"}}},"operator":{"match":"(\\+|-|\\*|\\/|\u003c|\u003e|=|!)","captures":{"1":{"name":"keyword.control"}}},"resource-block":{"name":"meta.resource-block","begin":"(?\u003cresourceType\u003e[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*){0}((?:(resource|actor)\\s+(\\g\u003cresourceType\u003e)(?:\\s+(extends)\\s+(\\g\u003cresourceType\u003e(?:\\s*,\\s*\\g\u003cresourceType\u003e)*)\\s*,?\\s*)?)|(global))\\s*{","end":"\\}","patterns":[{"name":"punctuation.separator.sequence.declarations","match":";"},{"name":"meta.relation-declaration","begin":"\\{","end":"\\}","patterns":[{"include":"#specializer"},{"include":"#comment"},{"name":"punctuation.separator.sequence.dict","match":","}]},{"include":"#term"}],"beginCaptures":{"3":{"name":"keyword.control"},"4":{"name":"entity.name.type"},"5":{"name":"keyword.control"},"6":{"patterns":[{"name":"entity.name.type","match":"([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)"}]},"7":{"name":"keyword.control"}}},"rule":{"name":"meta.rule","patterns":[{"include":"#rule-functor"},{"begin":"\\bif\\b","end":";","patterns":[{"include":"#term"}],"beginCaptures":{"0":{"name":"keyword.control.if"}}},{"match":";"}]},"rule-functor":{"begin":"([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)\\s*\\(","end":"\\)","patterns":[{"include":"#specializer"},{"name":"punctuation.separator.sequence.list","match":","},{"include":"#term"}],"beginCaptures":{"1":{"name":"support.function.rule"}}},"rule-type":{"name":"meta.rule-type","begin":"\\btype\\b","end":";","patterns":[{"include":"#rule-functor"}],"beginCaptures":{"0":{"name":"keyword.other.type-decl"}}},"specializer":{"match":"[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*\\s*:\\s*([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)","captures":{"1":{"name":"entity.name.type.resource"}}},"string":{"name":"string.quoted.double","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape","match":"\\\\."}]},"term":{"patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#number"},{"include":"#keyword"},{"include":"#operator"},{"include":"#boolean"},{"include":"#object-literal"},{"name":"meta.bracket.list","begin":"\\[","end":"\\]","patterns":[{"include":"#term"},{"name":"punctuation.separator.sequence.list","match":","}]},{"name":"meta.bracket.dict","begin":"\\{","end":"\\}","patterns":[{"include":"#term"},{"name":"punctuation.separator.sequence.dict","match":","}]},{"name":"meta.parens","begin":"\\(","end":"\\)","patterns":[{"include":"#term"}]}]},"test-block":{"name":"meta.test-block","begin":"(test)\\s+(\"[^\"]*\")\\s*\\{","end":"\\}","patterns":[{"name":"meta.test-setup","begin":"(setup)\\s*\\{","end":"\\}","patterns":[{"include":"#rule"},{"include":"#comment"}],"beginCaptures":{"1":{"name":"keyword.control"}}},{"include":"#rule"},{"name":"keyword.other","match":"\\b(assert|assert_not)\\b"},{"include":"#comment"}],"beginCaptures":{"1":{"name":"keyword.control"},"2":{"name":"string.quoted.double"}}}}}
|
1
|
+
{"name":"polar","scopeName":"source.polar","patterns":[{"include":"#comment"},{"include":"#rule"},{"include":"#rule-type"},{"include":"#inline-query"},{"include":"#resource-block"},{"include":"#test-block"},{"include":"#fixture"}],"repository":{"boolean":{"name":"constant.language.boolean","match":"\\b(true|false)\\b"},"comment":{"name":"comment.line.number-sign","match":"#.*"},"fixture":{"patterns":[{"name":"keyword.control","match":"\\bfixture\\b"},{"begin":"\\btest\\b","end":"\\bfixture\\b","beginCaptures":{"0":{"name":"keyword.control"}},"endCaptures":{"0":{"name":"keyword.control"}}}]},"inline-query":{"name":"meta.inline-query","begin":"\\?=","end":";","patterns":[{"include":"#term"}],"beginCaptures":{"0":{"name":"keyword.control"}}},"keyword":{"patterns":[{"name":"constant.character","match":"\\b(cut|or|debug|print|in|forall|if|and|of|not|matches|type|on|global)\\b"}]},"number":{"patterns":[{"name":"constant.numeric.float","match":"\\b[+-]?\\d+(?:(\\.)\\d+(?:e[+-]?\\d+)?|(?:e[+-]?\\d+))\\b"},{"name":"constant.numeric.integer","match":"\\b(\\+|\\-)[\\d]+\\b"},{"name":"constant.numeric.natural","match":"\\b[\\d]+\\b"}]},"object-literal":{"name":"constant.other.object-literal","begin":"([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)\\s*\\{","end":"\\}","patterns":[{"include":"#string"},{"include":"#number"},{"include":"#boolean"}],"beginCaptures":{"1":{"name":"entity.name.type.resource"}}},"operator":{"match":"(\\+|-|\\*|\\/|\u003c|\u003e|=|!)","captures":{"1":{"name":"keyword.control"}}},"resource-block":{"name":"meta.resource-block","begin":"(?\u003cresourceType\u003e[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*){0}((?:(resource|actor)\\s+(\\g\u003cresourceType\u003e)(?:\\s+(extends)\\s+(\\g\u003cresourceType\u003e(?:\\s*,\\s*\\g\u003cresourceType\u003e)*)\\s*,?\\s*)?)|(global))\\s*{","end":"\\}","patterns":[{"name":"punctuation.separator.sequence.declarations","match":";"},{"name":"meta.relation-declaration","begin":"\\{","end":"\\}","patterns":[{"include":"#specializer"},{"include":"#comment"},{"name":"punctuation.separator.sequence.dict","match":","}]},{"include":"#term"}],"beginCaptures":{"3":{"name":"keyword.control"},"4":{"name":"entity.name.type"},"5":{"name":"keyword.control"},"6":{"patterns":[{"name":"entity.name.type","match":"([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)"}]},"7":{"name":"keyword.control"}}},"rule":{"name":"meta.rule","patterns":[{"include":"#rule-functor"},{"begin":"\\bif\\b","end":";","patterns":[{"include":"#term"}],"beginCaptures":{"0":{"name":"keyword.control.if"}}},{"match":";"}]},"rule-functor":{"begin":"([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)\\s*\\(","end":"\\)","patterns":[{"include":"#specializer"},{"name":"punctuation.separator.sequence.list","match":","},{"include":"#term"}],"beginCaptures":{"1":{"name":"support.function.rule"}}},"rule-type":{"name":"meta.rule-type","begin":"\\btype\\b","end":";","patterns":[{"include":"#rule-functor"}],"beginCaptures":{"0":{"name":"keyword.other.type-decl"}}},"specializer":{"match":"[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*\\s*:\\s*([a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z0-9_]+)*)","captures":{"1":{"name":"entity.name.type.resource"}}},"string":{"name":"string.quoted.double","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape","match":"\\\\."}]},"term":{"patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#number"},{"include":"#keyword"},{"include":"#operator"},{"include":"#boolean"},{"include":"#object-literal"},{"name":"meta.bracket.list","begin":"\\[","end":"\\]","patterns":[{"include":"#term"},{"name":"punctuation.separator.sequence.list","match":","}]},{"name":"meta.bracket.dict","begin":"\\{","end":"\\}","patterns":[{"include":"#term"},{"name":"punctuation.separator.sequence.dict","match":","}]},{"name":"meta.parens","begin":"\\(","end":"\\)","patterns":[{"include":"#term"}]}]},"test-block":{"name":"meta.test-block","begin":"(test)\\s+(\"[^\"]*\")\\s*\\{","end":"\\}","patterns":[{"name":"meta.test-setup","begin":"(setup)\\s*\\{","end":"\\}","patterns":[{"include":"#rule"},{"include":"#comment"},{"include":"#fixture"}],"beginCaptures":{"1":{"name":"keyword.control"}}},{"include":"#rule"},{"name":"keyword.other","match":"\\b(assert|assert_not)\\b"},{"include":"#comment"},{"name":"meta.iff-rule","patterns":[{"include":"#rule-functor"},{"begin":"\\biff\\b","end":";","patterns":[{"include":"#term"}],"beginCaptures":{"0":{"name":"keyword.control"}}},{"match":";"}]}],"beginCaptures":{"1":{"name":"keyword.control"},"2":{"name":"string.quoted.double"}}}}}
|