github-linguist 9.3.0 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/grammars/dart.inline.edgeql.json +1 -0
- data/grammars/go.inline.edgeql.json +1 -0
- data/grammars/inline.surrealql-js-literal.json +1 -0
- data/grammars/js.inline.edgeql.json +1 -0
- data/grammars/markdown.move.codeblock.json +1 -1
- data/grammars/markdown.surrealql.codeblock.json +1 -0
- data/grammars/markdown.vue.codeblock.json +1 -1
- data/grammars/markdown.wesl.codeblock.json +1 -0
- data/grammars/markdown.wgsl.codeblock.json +1 -0
- data/grammars/mdx.vue.codeblock.json +1 -1
- data/grammars/res.inline.edgeql.json +1 -0
- data/grammars/source.abl.json +1 -1
- data/grammars/source.agda.json +1 -1
- data/grammars/source.al.json +1 -1
- data/grammars/source.algol60.json +1 -0
- data/grammars/source.apex.json +1 -1
- data/grammars/source.b.json +1 -0
- data/grammars/source.bicep.json +1 -1
- data/grammars/source.brs.json +1 -1
- data/grammars/source.bru.json +1 -1
- data/grammars/source.c++.json +1 -1
- data/grammars/source.c.json +1 -1
- data/grammars/source.c3.json +1 -1
- data/grammars/source.cadence.json +1 -1
- data/grammars/source.cj.json +1 -0
- data/grammars/source.clar.json +1 -1
- data/grammars/source.clean.json +1 -1
- data/grammars/source.comment-string.wesl.json +1 -0
- data/grammars/source.comment-string.wgsl.json +1 -0
- data/grammars/source.cql.json +1 -0
- data/grammars/source.cs.json +1 -1
- data/grammars/source.csv.json +1 -0
- data/grammars/source.data-weave.json +1 -1
- data/grammars/source.dsv.json +1 -0
- data/grammars/source.erlang.json +1 -1
- data/grammars/source.fsharp.json +1 -1
- data/grammars/source.gfm.blade.json +1 -1
- data/grammars/source.go-template.json +1 -0
- data/grammars/source.go.injection.double.go-template.json +1 -0
- data/grammars/source.go.injection.raw.go-template.json +1 -0
- data/grammars/source.hack.json +1 -1
- data/grammars/source.hurl.json +1 -0
- data/grammars/source.isabelle.theory.json +1 -1
- data/grammars/source.jac.json +1 -0
- data/grammars/source.jai.json +1 -1
- data/grammars/source.just.json +1 -1
- data/grammars/source.kcl.json +1 -0
- data/grammars/source.langium.json +1 -0
- data/grammars/source.lean.markdown.json +1 -1
- data/grammars/source.lean4.json +1 -1
- data/grammars/source.lean4.markdown.json +1 -1
- data/grammars/source.lp.json +1 -0
- data/grammars/source.lua.json +1 -1
- data/grammars/source.luau.json +1 -1
- data/grammars/source.m2.json +1 -1
- data/grammars/source.mask.json +1 -1
- data/grammars/source.mdx.json +1 -1
- data/grammars/source.mermaid.zenuml.json +1 -1
- data/grammars/source.mo.json +1 -1
- data/grammars/source.mojo.json +1 -1
- data/grammars/source.moonbit.json +1 -1
- data/grammars/source.move.json +1 -1
- data/grammars/source.ned.json +1 -1
- data/grammars/source.nr.json +1 -1
- data/grammars/source.nushell.json +1 -1
- data/grammars/source.proto.json +1 -1
- data/grammars/source.pyjade.json +1 -1
- data/grammars/source.quakec.json +1 -1
- data/grammars/source.rascal.json +1 -1
- data/grammars/source.rascript.json +1 -0
- data/grammars/source.rego.json +1 -1
- data/grammars/source.roc.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.shell.json +1 -1
- data/grammars/source.singularity.json +1 -1
- data/grammars/source.soql.json +1 -1
- data/grammars/source.sqf.json +1 -1
- data/grammars/source.surrealql.json +1 -0
- data/grammars/source.teal.json +1 -0
- data/grammars/source.tmdl.json +1 -0
- data/grammars/source.tsp.json +1 -1
- data/grammars/source.tsv.json +1 -0
- data/grammars/source.vb6.json +1 -0
- data/grammars/source.vba.json +1 -1
- data/grammars/source.vento.json +1 -1
- data/grammars/source.vscode.c3.json +1 -0
- data/grammars/source.wdl.json +1 -1
- data/grammars/source.wgsl.json +1 -1
- data/grammars/source.wwb.json +1 -1
- data/grammars/text.git-commit.json +1 -0
- data/grammars/text.haml.json +1 -1
- data/grammars/text.html.markdown.d2.json +1 -1
- data/grammars/text.html.vue.json +1 -0
- data/grammars/text.injection.go-template.json +1 -0
- data/grammars/text.k.json +1 -0
- data/grammars/text.markdown.go-template.codeblock.json +1 -0
- data/grammars/text.marko.json +1 -1
- data/grammars/text.md.json +1 -1
- data/grammars/text.slim.json +1 -1
- data/grammars/text.source.mps.json +1 -0
- data/grammars/text.valve-cfg.json +1 -1
- data/grammars/v.mod.json +1 -0
- data/grammars/version +1 -1
- data/grammars/vue.directives.json +1 -1
- data/grammars/vue.interpolations.json +1 -1
- data/grammars/vue.sfc.script.leading-operator-fix.json +1 -0
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +24 -0
- data/lib/linguist/generic.yml +1 -0
- data/lib/linguist/heuristics.yml +62 -6
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +222 -26
- data/lib/linguist/samples.json +1 -1
- metadata +40 -3
- data/grammars/inline.edgeql.json +0 -1
- data/grammars/source.vue.json +0 -1
data/grammars/source.move.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"scopeName":"source.move","patterns":[{"include":"#address"},{"include":"#comments"},{"include":"#module"},{"include":"#script"},{"include":"#annotation"},{"include":"#comments"},{"include":"#annotation"},{"include":"#entry"},{"include":"#public-scope"},{"include":"#public"},{"include":"#native"},{"include":"#import"},{"include":"#friend"},{"include":"#const"},{"include":"#struct"},{"include":"#has_ability"},{"include":"#enum"},{"include":"#macro"},{"include":"#fun"},{"include":"#spec"}],"repository":{"=== DEPRECATED_BELOW ===":{},"abilities":{"name":"support.type.ability.move","match":"\\b(store|key|drop|copy)\\b"},"address":{"name":"meta.address_block.move","begin":"\\b(address)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"name":"meta.address.definition.move","begin":"(?\u003c=address)","end":"(?=[{])","patterns":[{"include":"#comments"},{"include":"#address_literal"},{"name":"entity.name.type.move","match":"\\b(\\w+)\\b"}]},{"include":"#module"}],"beginCaptures":{"1":{"name":"storage.modifier.type.address.keyword.move"}}},"annotation":{"name":"support.constant.annotation.move","begin":"#\\[","end":"\\]","patterns":[{"name":"meta.annotation.name.move","match":"\\b(\\w+)\\s*(?=\\=)"},{"name":"meta.annotation.value.move","begin":"=","end":"(?=[,\\]])","patterns":[{"include":"#literals"}]}]},"as":{"name":"keyword.control.as.move","match":"\\b(as)\\b"},"as-import":{"name":"meta.import.as.move","match":"\\b(as)\\b"},"block":{"name":"meta.block.move","begin":"{","end":"}","patterns":[{"include":"#expr"}]},"block-comments":{"patterns":[{"name":"comment.block.documentation.move","begin":"/\\*[\\*!](?![\\*/])","end":"\\*/"},{"name":"comment.block.move","begin":"/\\*","end":"\\*/"}]},"capitalized":{"name":"entity.name.type.use.move","match":"\\b([A-Z][a-zA-Z_0-9]*)\\b"},"comments":{"name":"meta.comments.move","patterns":[{"include":"#doc-comments"},{"include":"#line-comments"},{"include":"#block-comments"}]},"const":{"name":"meta.const.move","begin":"\\b(const)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#primitives"},{"include":"#literals"},{"include":"#types"},{"name":"constant.other.move","match":"\\b([A-Z][A-Z_0-9]+)\\b"},{"include":"#error_const"}],"beginCaptures":{"1":{"name":"storage.modifier.const.move"}}},"control":{"name":"keyword.control.move","match":"\\b(return|while|loop|if|else|break|continue|abort)\\b"},"doc-comments":{"name":"comment.block.documentation.move","begin":"///","end":"$","patterns":[{"match":"`(\\w+)`","captures":{"1":{"name":"markup.underline.link.move"}}}]},"entry":{"name":"storage.modifier.visibility.entry.move","match":"\\b(entry)\\b"},"enum":{"name":"meta.enum.move","begin":"\\b(enum)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#type_param"},{"name":"entity.name.type.enum.move","match":"\\b[A-Z][a-zA-Z_0-9]*\\b"},{"include":"#has"},{"include":"#abilities"},{"name":"meta.enum.definition.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"name":"entity.name.function.enum.move","match":"\\b([A-Z][A-Za-z_0-9]*)\\b(?=\\s*\\()"},{"name":"entity.name.type.enum.move","match":"\\b([A-Z][A-Za-z_0-9]*)\\b"},{"name":"meta.enum.tuple.move","begin":"\\(","end":"\\)","patterns":[{"include":"#comments"},{"include":"#expr_generic"},{"include":"#capitalized"},{"include":"#types"}]},{"name":"meta.enum.struct.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#expr_generic"},{"include":"#capitalized"},{"include":"#types"}]}]}],"beginCaptures":{"1":{"name":"keyword.control.enum.move"}}},"error_const":{"name":"variable.other.error.const.move","match":"\\b(E[A-Z][A-Za-z0-9_]*)\\b"},"escaped_identifier":{"name":"variable.language.escaped.move","begin":"`","end":"`"},"expr":{"name":"meta.expression.move","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#expr_generic"},{"include":"#packed_field"},{"include":"#import"},{"include":"#as"},{"include":"#mut"},{"include":"#let"},{"include":"#types"},{"include":"#literals"},{"include":"#control"},{"include":"#move_copy"},{"include":"#resource_methods"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#label"},{"include":"#macro_call"},{"include":"#local_call"},{"include":"#method_call"},{"include":"#path_access"},{"include":"#match_expression"},{"name":"keyword.operator.macro.dollar.move","match":"\\$(?=[a-z])"},{"name":"variable.other.meta.move","match":"(?\u003c=[$])[a-z][A-Z_0-9a-z]*"},{"name":"constant.other.move","match":"\\b([A-Z][A-Z_]+)\\b"},{"include":"#error_const"},{"name":"entity.name.type.move","match":"\\b([A-Z][a-zA-Z_0-9]*)\\b"},{"include":"#paren"},{"include":"#block"}]},"expr_generic":{"name":"meta.expression.generic.type.move","begin":"\u003c(?=([\\sa-z_,0-9A-Z\u003c\u003e]+\u003e))","end":"\u003e","patterns":[{"include":"#comments"},{"include":"#types"},{"include":"#capitalized"},{"include":"#expr_generic"}]},"friend":{"name":"meta.friend.move","begin":"\\b(friend)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#address_literal"},{"name":"entity.name.type.module.move","match":"\\b([a-zA-Z][A-Za-z_0-9]*)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"fun":{"patterns":[{"include":"#fun_signature"},{"include":"#block"}]},"fun_body":{"name":"meta.fun_body.move","begin":"{","end":"(?\u003c=})","patterns":[{"include":"#expr"}]},"fun_call":{"name":"meta.fun_call.move","begin":"\\b(\\w+)\\s*(?:\u003c[\\w\\s,]+\u003e)?\\s*[(]","end":"[)]","patterns":[{"include":"#comments"},{"include":"#resource_methods"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#move_copy"},{"include":"#literals"},{"include":"#fun_call"},{"include":"#block"},{"include":"#mut"},{"include":"#as"}],"beginCaptures":{"1":{"name":"entity.name.function.call.move"}}},"fun_signature":{"name":"meta.fun_signature.move","begin":"\\b(fun)\\b","end":"(?=[;{])","patterns":[{"include":"#comments"},{"include":"#module_access"},{"include":"#capitalized"},{"include":"#types"},{"include":"#mut"},{"name":"meta.function_name.move","begin":"(?\u003c=\\bfun)","end":"(?=[\u003c(])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"name":"entity.name.function.move","match":"\\b(\\w+)\\b"}]},{"include":"#fun_type_param"},{"name":"meta.parentheses.move","begin":"[(]","end":"[)]","patterns":[{"include":"#comments"},{"include":"#self_access"},{"include":"#expr_generic"},{"include":"#escaped_identifier"},{"include":"#module_access"},{"include":"#capitalized"},{"include":"#types"},{"include":"#mut"}]},{"name":"storage.modifier","match":"\\b(acquires)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.fun.move"}}},"fun_type_param":{"name":"meta.fun_generic_param.move","begin":"\u003c","end":"\u003e","patterns":[{"include":"#comments"},{"include":"#types"},{"include":"#phantom"},{"include":"#capitalized"},{"include":"#module_access"},{"include":"#abilities"}]},"has":{"name":"keyword.control.ability.has.move","match":"\\b(has)\\b"},"has_ability":{"name":"meta.has.ability.move","begin":"(?\u003c=[})])\\s+(has)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#abilities"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"ident":{"name":"meta.identifier.move","match":"\\b([a-zA-Z][A-Z_a-z0-9]*)\\b"},"import":{"name":"meta.import.move","begin":"\\b(use)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#use_fun"},{"include":"#address_literal"},{"include":"#as-import"},{"name":"entity.name.type.move","match":"\\b([A-Z]\\w*)\\b"},{"begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#as-import"},{"name":"entity.name.type.move","match":"\\b([A-Z]\\w*)\\b"}]},{"name":"meta.entity.name.type.module.move","match":"\\b(\\w+)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"inline":{"name":"storage.modifier.visibility.inline.move","match":"\\b(inline)\\b"},"label":{"name":"string.quoted.single.label.move","match":"'[a-z][a-z_0-9]*"},"let":{"name":"keyword.control.move","match":"\\b(let)\\b"},"line-comments":{"name":"comment.line.double-slash.move","begin":"//","end":"$"},"literals":{"name":"meta.literal.move","patterns":[{"name":"support.constant.address.base16.move","match":"@0x[A-F0-9a-f]+"},{"name":"support.constant.address.name.move","match":"@[a-zA-Z][a-zA-Z_0-9]*"},{"name":"constant.numeric.hex.move","match":"0x[_a-fA-F0-9]+(?:u(?:8|16|32|64|128|256))?"},{"name":"constant.numeric.move","match":"(?\u003c!(?:\\w|(?:(?\u003c!\\.)\\.)))[0-9][_0-9]*(?:\\.(?!\\.)(?:[0-9][_0-9]*)?)?(?:[eE][+\\-]?[_0-9]+)?(?:[u](?:8|16|32|64|128|256))?"},{"name":"meta.vector.literal.ascii.move","begin":"\\bb\"","end":"\"","patterns":[{"name":"constant.character.escape.move","match":"\\\\."},{"name":"constant.character.escape.move","match":"\\\\[nrt\\0\"]"},{"name":"constant.character.escape.hex.move","match":"\\\\x[a-fA-F0-9][A-Fa-f0-9]"},{"name":"string.quoted.double.raw.move","match":"[\\x00-\\x7F]"}]},{"name":"meta.vector.literal.hex.move","begin":"x\"","end":"\"","patterns":[{"name":"constant.character.move","match":"[A-Fa-f0-9]+"}]},{"name":"constant.language.boolean.move","match":"\\b(?:true|false)\\b"},{"name":"meta.vector.literal.move","begin":"(\\bvector\\b)\\[","end":"\\]","patterns":[{"include":"#expr"}],"captures":{"1":{"name":"support.type.vector.move"}}}]},"local_call":{"name":"entity.name.function.call.local.move","match":"\\b([a-z][_a-z0-9]*)(?=[\u003c\\(])"},"macro":{"name":"meta.macro.move","begin":"\\b(macro)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"include":"#fun"}],"beginCaptures":{"1":{"name":"keyword.control.macro.move"}}},"macro_call":{"name":"meta.macro.call","match":"(\\b|\\.)([a-z][A-Za-z0-9_]*)!","captures":{"2":{"name":"support.function.macro.move"}}},"match_expression":{"name":"meta.match.move","begin":"\\b(match)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#types"},{"name":"meta.match.block.move","begin":"{","end":"}","patterns":[{"name":"operator.match.move","match":"\\b(=\u003e)\\b"},{"include":"#expr"}]},{"include":"#expr"}],"beginCaptures":{"1":{"name":"keyword.control.match.move"}}},"method_call":{"name":"meta.path.call.move","match":"\\.([a-z][_a-z0-9]*)(?=[\u003c\\(])","captures":{"1":{"name":"entity.name.function.call.path.move"}}},"module":{"name":"meta.module.move","begin":"\\b(module)\\b","end":"(?\u003c=[;}])","patterns":[{"include":"#comments"},{"begin":"(?\u003c=\\b(module)\\b)","end":"(?=[;{])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"name":"constant.other.move","begin":"(?\u003c=\\b(module))","end":"(?=[(::){])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"}]},{"name":"entity.name.type.move","begin":"(?\u003c=::)","end":"(?=[\\s;{])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"}]}]},{"name":"meta.module_scope.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#annotation"},{"include":"#entry"},{"include":"#public-scope"},{"include":"#public"},{"include":"#native"},{"include":"#import"},{"include":"#friend"},{"include":"#const"},{"include":"#struct"},{"include":"#has_ability"},{"include":"#enum"},{"include":"#macro"},{"include":"#fun"},{"include":"#spec"}]}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"module_access":{"name":"meta.module_access.move","match":"\\b(\\w+)::(\\w+)\\b","captures":{"1":{"name":"meta.entity.name.type.accessed.module.move"},"2":{"name":"entity.name.function.call.move"}}},"module_label":{"name":"meta.module.label.move","begin":"^\\s*(module)\\b","end":";\\s*$","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"name":"constant.other.move","begin":"(?\u003c=\\bmodule\\b)","end":"(?=[(::){])"},{"name":"entity.name.type.move","begin":"(?\u003c=::)","end":"(?=[\\s{])"}]},"move_copy":{"name":"variable.language.move","match":"\\b(move|copy)\\b"},"mut":{"name":"storage.modifier.mut.move","match":"\\b(mut)\\b"},"native":{"name":"storage.modifier.visibility.native.move","match":"\\b(native)\\b"},"packed_field":{"name":"meta.struct.field.move","match":"[a-z][a-z0-9_]+\\s*:\\s*(?=\\s)"},"paren":{"name":"meta.paren.move","begin":"\\(","end":"\\)","patterns":[{"include":"#expr"}]},"path_access":{"name":"meta.path.access.move","match":"\\.[a-z][_a-z0-9]*\\b"},"phantom":{"name":"keyword.control.phantom.move","match":"\\b(phantom)\\b"},"primitives":{"name":"support.type.primitives.move","match":"\\b(u8|u16|u32|u64|u128|u256|address|bool|signer)\\b"},"public":{"name":"storage.modifier.visibility.public.move","match":"\\b(public)\\b"},"public-scope":{"name":"meta.public.scoped.move","begin":"(?\u003c=\\b(public))\\s*\\(","end":"\\)","patterns":[{"include":"#comments"},{"name":"keyword.control.public.scope.move","match":"\\b(friend|script|package)\\b"}]},"resource_methods":{"name":"support.function.typed.move","match":"\\b(borrow_global|borrow_global_mut|exists|move_from|move_to_sender|move_to)\\b"},"script":{"name":"meta.script.move","begin":"\\b(script)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"name":"meta.script_scope.move","begin":"{","end":"}","patterns":[{"include":"#const"},{"include":"#comments"},{"include":"#import"},{"include":"#fun"}]}],"beginCaptures":{"1":{"name":"storage.modifier.script.move"}}},"self_access":{"name":"meta.self_access.move","match":"\\b(Self)::(\\w+)\\b","captures":{"1":{"name":"variable.language.self.move"},"2":{"name":"entity.name.function.call.move"}}},"spec":{"name":"meta.spec.move","begin":"\\b(spec)\\b","end":"(?\u003c=[;}])","patterns":[{"name":"storage.modifier.spec.target.move","match":"\\b(module|schema|struct|fun)"},{"name":"storage.modifier.spec.define.move","match":"\\b(define)"},{"name":"entity.name.function.move","match":"\\b(\\w+)\\b"},{"begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#spec_block"},{"include":"#spec_types"},{"include":"#spec_define"},{"include":"#spec_keywords"},{"include":"#control"},{"include":"#fun_call"},{"include":"#literals"},{"include":"#types"},{"include":"#let"}]}],"beginCaptures":{"1":{"name":"storage.modifier.spec.move"}}},"spec_block":{"name":"meta.spec_block.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#spec_block"},{"include":"#spec_types"},{"include":"#fun_call"},{"include":"#literals"},{"include":"#control"},{"include":"#types"},{"include":"#let"}]},"spec_define":{"name":"meta.spec_define.move","begin":"\\b(define)\\b","end":"(?=[;{])","patterns":[{"include":"#comments"},{"include":"#spec_types"},{"include":"#types"},{"begin":"(?\u003c=\\bdefine)","end":"(?=[(])","patterns":[{"include":"#comments"},{"name":"entity.name.function.move","match":"\\b(\\w+)\\b"}]}],"beginCaptures":{"1":{"name":"keyword.control.move.spec"}}},"spec_keywords":{"name":"keyword.control.move.spec","match":"\\b(global|pack|unpack|pragma|native|include|ensures|requires|invariant|apply|aborts_if|modifies)\\b"},"spec_types":{"name":"support.type.vector.move","match":"\\b(range|num|vector|bool|u8|u16|u32|u64|u128|u256|address)\\b"},"struct":{"name":"meta.struct.move","begin":"\\b(struct)\\b","end":"(?\u003c=[};\\)])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#has"},{"include":"#abilities"},{"name":"entity.name.type.struct.move","match":"\\b[A-Z][a-zA-Z_0-9]*\\b"},{"name":"meta.struct.paren.move","begin":"\\(","end":"\\)","patterns":[{"include":"#comments"},{"include":"#capitalized"},{"include":"#types"}]},{"include":"#type_param"},{"name":"meta.struct.paren.move","begin":"\\(","end":"(?\u003c=[)])","patterns":[{"include":"#comments"},{"include":"#types"}]},{"name":"meta.struct.body.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#self_access"},{"include":"#escaped_identifier"},{"include":"#module_access"},{"include":"#expr_generic"},{"include":"#capitalized"},{"include":"#types"}]},{"include":"#has_ability"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"struct_pack":{"name":"meta.struct.pack.move","begin":"(?\u003c=[A-Za-z0-9_\u003e])\\s*{","end":"}","patterns":[{"include":"#comments"}]},"type_param":{"name":"meta.generic_param.move","begin":"\u003c","end":"\u003e","patterns":[{"include":"#comments"},{"include":"#phantom"},{"include":"#capitalized"},{"include":"#module_access"},{"include":"#abilities"}]},"types":{"name":"meta.types.move","patterns":[{"include":"#primitives"},{"include":"#vector"}]},"use_fun":{"name":"meta.import.fun.move","begin":"\\b(fun)\\b","end":"(?=;)","patterns":[{"include":"#comments"},{"name":"keyword.control.as.move","match":"\\b(as)\\b"},{"name":"variable.language.self.use.fun.move","match":"\\b(Self)\\b"},{"name":"entity.name.function.use.move","match":"\\b(_______[a-z][a-z_0-9]+)\\b"},{"include":"#types"},{"include":"#escaped_identifier"},{"include":"#capitalized"}],"beginCaptures":{"1":{"name":"storage.modifier.fun.move"}}},"vector":{"name":"support.type.vector.move","match":"\\b(vector)\\b"}}}
|
|
1
|
+
{"scopeName":"source.move","patterns":[{"include":"#address"},{"include":"#comments"},{"include":"#extend_module"},{"include":"#module"},{"include":"#script"},{"include":"#annotation"},{"include":"#entry"},{"include":"#public-scope"},{"include":"#public"},{"include":"#native"},{"include":"#import"},{"include":"#friend"},{"include":"#const"},{"include":"#struct"},{"include":"#has_ability"},{"include":"#enum"},{"include":"#macro"},{"include":"#fun"},{"include":"#spec"}],"repository":{"=== DEPRECATED_BELOW ===":{},"abilities":{"name":"support.type.ability.move","match":"\\b(store|key|drop|copy)\\b"},"address":{"name":"meta.address_block.move","begin":"\\b(address)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"name":"meta.address.definition.move","begin":"(?\u003c=address)","end":"(?=[{])","patterns":[{"include":"#comments"},{"include":"#address_literal"},{"name":"entity.name.type.move","match":"\\b(\\w+)\\b"}]},{"include":"#module"}],"beginCaptures":{"1":{"name":"storage.modifier.type.address.keyword.move"}}},"annotation":{"name":"support.constant.annotation.move","begin":"#\\[","end":"\\]","patterns":[{"include":"#comments"},{"name":"meta.annotation.name.move","match":"\\b(\\w+)\\s*(?=\\=)"},{"name":"meta.annotation.value.move","begin":"=","end":"(?=[,\\]])","patterns":[{"include":"#literals"}]}]},"as":{"name":"keyword.control.as.move","match":"\\b(as)\\b"},"as-import":{"name":"meta.import.as.move","match":"\\b(as)\\b"},"block":{"name":"meta.block.move","begin":"{","end":"}","patterns":[{"include":"#expr"}]},"block-comments":{"patterns":[{"name":"comment.block.documentation.move","begin":"/\\*[\\*!](?![\\*/])","end":"\\*/"},{"name":"comment.block.move","begin":"/\\*","end":"\\*/"}]},"capitalized":{"name":"entity.name.type.use.move","match":"\\b([A-Z][a-zA-Z_0-9]*)\\b"},"comments":{"name":"meta.comments.move","patterns":[{"include":"#doc-comments"},{"include":"#line-comments"},{"include":"#block-comments"}]},"const":{"name":"meta.const.move","begin":"\\b(const)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#primitives"},{"include":"#literals"},{"include":"#types"},{"name":"constant.other.move","match":"\\b([A-Z][A-Z_0-9]+)\\b"},{"include":"#error_const"}],"beginCaptures":{"1":{"name":"storage.modifier.const.move"}}},"control":{"name":"keyword.control.move","match":"\\b(return|while|loop|if|else|break|continue|abort)\\b"},"doc-comments":{"name":"comment.block.documentation.move","begin":"///","end":"$","patterns":[{"match":"`(\\w+)`","captures":{"1":{"name":"markup.underline.link.move"}}}]},"entry":{"name":"storage.modifier.visibility.entry.move","match":"\\b(entry)\\b"},"enum":{"name":"meta.enum.move","begin":"\\b(enum)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#type_param"},{"name":"entity.name.type.enum.move","match":"\\b[A-Z][a-zA-Z_0-9]*\\b"},{"include":"#has"},{"include":"#abilities"},{"name":"meta.enum.definition.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"name":"entity.name.function.enum.move","match":"\\b([A-Z][A-Za-z_0-9]*)\\b(?=\\s*\\()"},{"name":"entity.name.type.enum.move","match":"\\b([A-Z][A-Za-z_0-9]*)\\b"},{"name":"meta.enum.tuple.move","begin":"\\(","end":"\\)","patterns":[{"include":"#comments"},{"include":"#expr_generic"},{"include":"#capitalized"},{"include":"#types"}]},{"name":"meta.enum.struct.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#expr_generic"},{"include":"#capitalized"},{"include":"#types"}]}]}],"beginCaptures":{"1":{"name":"keyword.control.enum.move"}}},"error_const":{"name":"variable.other.error.const.move","match":"\\b(E[A-Z][A-Za-z0-9_]*)\\b"},"escaped_identifier":{"name":"variable.language.escaped.move","begin":"`","end":"`"},"expr":{"name":"meta.expression.move","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#expr_generic"},{"include":"#packed_field"},{"include":"#import"},{"include":"#as"},{"include":"#mut"},{"include":"#let"},{"include":"#types"},{"include":"#literals"},{"include":"#control"},{"include":"#move_copy"},{"include":"#resource_methods"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#label"},{"include":"#macro_call"},{"include":"#local_call"},{"include":"#method_call"},{"include":"#path_access"},{"include":"#match_expression"},{"name":"keyword.operator.macro.dollar.move","match":"\\$(?=[a-z])"},{"name":"variable.other.meta.move","match":"(?\u003c=[$])[a-z][A-Z_0-9a-z]*"},{"name":"constant.other.move","match":"\\b([A-Z][A-Z_]+)\\b"},{"include":"#error_const"},{"name":"entity.name.type.move","match":"\\b([A-Z][a-zA-Z_0-9]*)\\b"},{"include":"#paren"},{"include":"#block"}]},"expr_generic":{"name":"meta.expression.generic.type.move","begin":"\u003c(?=([\\sa-z_,0-9A-Z\u003c\u003e]+\u003e))","end":"\u003e","patterns":[{"include":"#comments"},{"include":"#types"},{"include":"#capitalized"},{"include":"#expr_generic"}]},"extend_module":{"name":"meta.extend_module.move","begin":"\\b(extend)\\b","end":"(?\u003c=[;}])","patterns":[{"include":"#comments"},{"include":"#module"}],"beginCaptures":{"1":{"name":"storage.modifier.type.extend.move"}}},"friend":{"name":"meta.friend.move","begin":"\\b(friend)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#address_literal"},{"name":"entity.name.type.module.move","match":"\\b([a-zA-Z][A-Za-z_0-9]*)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"fun":{"patterns":[{"include":"#fun_signature"},{"include":"#block"}]},"fun_body":{"name":"meta.fun_body.move","begin":"{","end":"(?\u003c=})","patterns":[{"include":"#expr"}]},"fun_call":{"name":"meta.fun_call.move","begin":"\\b(\\w+)\\s*(?:\u003c[\\w\\s,]+\u003e)?\\s*[(]","end":"[)]","patterns":[{"include":"#comments"},{"include":"#resource_methods"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#move_copy"},{"include":"#literals"},{"include":"#fun_call"},{"include":"#block"},{"include":"#mut"},{"include":"#as"}],"beginCaptures":{"1":{"name":"entity.name.function.call.move"}}},"fun_signature":{"name":"meta.fun_signature.move","begin":"\\b(fun)\\b","end":"(?=[;{])","patterns":[{"include":"#comments"},{"include":"#module_access"},{"include":"#capitalized"},{"include":"#types"},{"include":"#mut"},{"name":"meta.function_name.move","begin":"(?\u003c=\\bfun)","end":"(?=[\u003c(])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"name":"entity.name.function.move","match":"\\b(\\w+)\\b"}]},{"include":"#fun_type_param"},{"name":"meta.parentheses.move","begin":"[(]","end":"[)]","patterns":[{"include":"#comments"},{"include":"#self_access"},{"include":"#expr_generic"},{"include":"#escaped_identifier"},{"include":"#module_access"},{"include":"#capitalized"},{"include":"#types"},{"include":"#mut"}]},{"name":"storage.modifier","match":"\\b(acquires)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.fun.move"}}},"fun_type_param":{"name":"meta.fun_generic_param.move","begin":"\u003c","end":"\u003e","patterns":[{"include":"#comments"},{"include":"#types"},{"include":"#phantom"},{"include":"#capitalized"},{"include":"#module_access"},{"include":"#abilities"}]},"has":{"name":"keyword.control.ability.has.move","match":"\\b(has)\\b"},"has_ability":{"name":"meta.has.ability.move","begin":"(?\u003c=[})])\\s+(has)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#abilities"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"ident":{"name":"meta.identifier.move","match":"\\b([a-zA-Z][A-Z_a-z0-9]*)\\b"},"import":{"name":"meta.import.move","begin":"\\b(use)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#use_fun"},{"include":"#address_literal"},{"include":"#as-import"},{"name":"entity.name.type.move","match":"\\b([A-Z]\\w*)\\b"},{"begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#as-import"},{"name":"entity.name.type.move","match":"\\b([A-Z]\\w*)\\b"}]},{"name":"meta.entity.name.type.module.move","match":"\\b(\\w+)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"inline":{"name":"storage.modifier.visibility.inline.move","match":"\\b(inline)\\b"},"label":{"name":"string.quoted.single.label.move","match":"'[a-z][a-z_0-9]*"},"let":{"name":"keyword.control.move","match":"\\b(let)\\b"},"line-comments":{"name":"comment.line.double-slash.move","begin":"//","end":"$"},"literals":{"name":"meta.literal.move","patterns":[{"name":"support.constant.address.base16.move","match":"@0x[A-F0-9a-f]+"},{"name":"support.constant.address.name.move","match":"@[a-zA-Z][a-zA-Z_0-9]*"},{"name":"constant.numeric.hex.move","match":"0x[_a-fA-F0-9]+(?:u(?:8|16|32|64|128|256))?"},{"name":"constant.numeric.move","match":"(?\u003c!(?:\\w|(?:(?\u003c!\\.)\\.)))[0-9][_0-9]*(?:\\.(?!\\.)(?:[0-9][_0-9]*)?)?(?:[eE][+\\-]?[_0-9]+)?(?:[u](?:8|16|32|64|128|256))?"},{"name":"meta.vector.literal.ascii.move","begin":"\\bb\"","end":"\"","patterns":[{"name":"constant.character.escape.move","match":"\\\\."},{"name":"constant.character.escape.move","match":"\\\\[nrt\\0\"]"},{"name":"constant.character.escape.hex.move","match":"\\\\x[a-fA-F0-9][A-Fa-f0-9]"},{"name":"string.quoted.double.raw.move","match":"[\\x00-\\x7F]"}]},{"name":"meta.vector.literal.hex.move","begin":"x\"","end":"\"","patterns":[{"name":"constant.character.move","match":"[A-Fa-f0-9]+"}]},{"name":"constant.language.boolean.move","match":"\\b(?:true|false)\\b"},{"name":"meta.vector.literal.move","begin":"(\\bvector\\b)\\[","end":"\\]","patterns":[{"include":"#expr"}],"captures":{"1":{"name":"support.type.vector.move"}}}]},"local_call":{"name":"entity.name.function.call.local.move","match":"\\b([a-z][_a-z0-9]*)(?=[\u003c\\(])"},"macro":{"name":"meta.macro.move","begin":"\\b(macro)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"include":"#fun"}],"beginCaptures":{"1":{"name":"keyword.control.macro.move"}}},"macro_call":{"name":"meta.macro.call","match":"(\\b|\\.)([a-z][A-Za-z0-9_]*)(!)","captures":{"2":{"name":"support.function.macro.move"},"3":{"name":"support.function.operator.macro.move"}}},"match_expression":{"name":"meta.match.move","begin":"\\b(match)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#types"},{"name":"meta.match.block.move","begin":"{","end":"}","patterns":[{"name":"operator.match.move","match":"\\b(=\u003e)\\b"},{"include":"#expr"}]},{"include":"#expr"}],"beginCaptures":{"1":{"name":"keyword.control.match.move"}}},"method_call":{"name":"meta.path.call.move","match":"\\.([a-z][_a-z0-9]*)(?=[\u003c\\(])","captures":{"1":{"name":"entity.name.function.call.path.move"}}},"module":{"name":"meta.module.move","begin":"\\b(module)\\b","end":"(?\u003c=[;}])","patterns":[{"include":"#comments"},{"begin":"(?\u003c=\\b(module)\\b)","end":"(?=[;{])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"name":"constant.other.move","begin":"(?\u003c=\\b(module))","end":"(?=[(::){])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"}]},{"name":"entity.name.type.move","begin":"(?\u003c=::)","end":"(?=[\\s;{])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"}]}]},{"name":"meta.module_scope.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#annotation"},{"include":"#entry"},{"include":"#public-scope"},{"include":"#public"},{"include":"#native"},{"include":"#import"},{"include":"#friend"},{"include":"#const"},{"include":"#struct"},{"include":"#has_ability"},{"include":"#enum"},{"include":"#macro"},{"include":"#fun"},{"include":"#spec"}]}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"module_access":{"name":"meta.module_access.move","match":"\\b(\\w+)::(\\w+)\\b","captures":{"1":{"name":"meta.entity.name.type.accessed.module.move"},"2":{"name":"entity.name.function.call.move"}}},"move_copy":{"name":"variable.language.move","match":"\\b(move|copy)\\b"},"mut":{"name":"storage.modifier.mut.move","match":"\\b(mut)\\b"},"native":{"name":"storage.modifier.visibility.native.move","match":"\\b(native)\\b"},"packed_field":{"name":"meta.struct.field.move","match":"[a-z][a-z0-9_]+\\s*:\\s*(?=\\s)"},"paren":{"name":"meta.paren.move","begin":"\\(","end":"\\)","patterns":[{"include":"#expr"}]},"path_access":{"name":"meta.path.access.move","match":"\\.[a-z][_a-z0-9]*\\b"},"phantom":{"name":"keyword.control.phantom.move","match":"\\b(phantom)\\b"},"primitives":{"name":"support.type.primitives.move","match":"\\b(u8|u16|u32|u64|u128|u256|address|bool|signer)\\b"},"public":{"name":"storage.modifier.visibility.public.move","match":"\\b(public)\\b"},"public-scope":{"name":"meta.public.scoped.move","begin":"(?\u003c=\\b(public))\\s*\\(","end":"\\)","patterns":[{"include":"#comments"},{"name":"keyword.control.public.scope.move","match":"\\b(friend|script|package)\\b"}]},"resource_methods":{"name":"support.function.typed.move","match":"\\b(borrow_global|borrow_global_mut|exists|move_from|move_to_sender|move_to)\\b"},"script":{"name":"meta.script.move","begin":"\\b(script)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"name":"meta.script_scope.move","begin":"{","end":"}","patterns":[{"include":"#const"},{"include":"#comments"},{"include":"#import"},{"include":"#fun"}]}],"beginCaptures":{"1":{"name":"storage.modifier.script.move"}}},"self_access":{"name":"meta.self_access.move","match":"\\b(Self)::(\\w+)\\b","captures":{"1":{"name":"variable.language.self.move"},"2":{"name":"entity.name.function.call.move"}}},"spec":{"name":"meta.spec.move","begin":"\\b(spec)\\b","end":"(?\u003c=[;}])","patterns":[{"name":"storage.modifier.spec.target.move","match":"\\b(module|schema|struct|fun)"},{"name":"storage.modifier.spec.define.move","match":"\\b(define)"},{"name":"entity.name.function.move","match":"\\b(\\w+)\\b"},{"begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#spec_block"},{"include":"#spec_types"},{"include":"#spec_define"},{"include":"#spec_keywords"},{"include":"#control"},{"include":"#fun_call"},{"include":"#literals"},{"include":"#types"},{"include":"#let"}]}],"beginCaptures":{"1":{"name":"storage.modifier.spec.move"}}},"spec_block":{"name":"meta.spec_block.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#spec_block"},{"include":"#spec_types"},{"include":"#fun_call"},{"include":"#literals"},{"include":"#control"},{"include":"#types"},{"include":"#let"}]},"spec_define":{"name":"meta.spec_define.move","begin":"\\b(define)\\b","end":"(?=[;{])","patterns":[{"include":"#comments"},{"include":"#spec_types"},{"include":"#types"},{"begin":"(?\u003c=\\bdefine)","end":"(?=[(])","patterns":[{"include":"#comments"},{"name":"entity.name.function.move","match":"\\b(\\w+)\\b"}]}],"beginCaptures":{"1":{"name":"keyword.control.move.spec"}}},"spec_keywords":{"name":"keyword.control.move.spec","match":"\\b(global|pack|unpack|pragma|native|include|ensures|requires|invariant|apply|aborts_if|modifies)\\b"},"spec_types":{"name":"support.type.vector.move","match":"\\b(range|num|vector|bool|u8|u16|u32|u64|u128|u256|address)\\b"},"struct":{"name":"meta.struct.move","begin":"\\b(struct)\\b","end":"(?\u003c=[};\\)])","patterns":[{"include":"#comments"},{"include":"#escaped_identifier"},{"include":"#has"},{"include":"#abilities"},{"name":"entity.name.type.struct.move","match":"\\b[A-Z][a-zA-Z_0-9]*\\b"},{"name":"meta.struct.paren.move","begin":"\\(","end":"\\)","patterns":[{"include":"#comments"},{"include":"#capitalized"},{"include":"#types"}]},{"include":"#type_param"},{"name":"meta.struct.paren.move","begin":"\\(","end":"(?\u003c=[)])","patterns":[{"include":"#comments"},{"include":"#types"}]},{"name":"meta.struct.body.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#self_access"},{"include":"#escaped_identifier"},{"include":"#module_access"},{"include":"#expr_generic"},{"include":"#capitalized"},{"include":"#types"}]},{"include":"#has_ability"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"struct_pack":{"name":"meta.struct.pack.move","begin":"(?\u003c=[A-Za-z0-9_\u003e])\\s*{","end":"}","patterns":[{"include":"#comments"}]},"type_param":{"name":"meta.generic_param.move","begin":"\u003c","end":"\u003e","patterns":[{"include":"#comments"},{"include":"#phantom"},{"include":"#capitalized"},{"include":"#module_access"},{"include":"#abilities"}]},"types":{"name":"meta.types.move","patterns":[{"include":"#primitives"},{"include":"#vector"}]},"use_fun":{"name":"meta.import.fun.move","begin":"\\b(fun)\\b","end":"(?=;)","patterns":[{"include":"#comments"},{"name":"keyword.control.as.move","match":"\\b(as)\\b"},{"name":"variable.language.self.use.fun.move","match":"\\b(Self)\\b"},{"name":"entity.name.function.use.move","match":"\\b(_______[a-z][a-z_0-9]+)\\b"},{"include":"#types"},{"include":"#escaped_identifier"},{"include":"#capitalized"}],"beginCaptures":{"1":{"name":"storage.modifier.fun.move"}}},"vector":{"name":"support.type.vector.move","match":"\\b(vector)\\b"}}}
|
data/grammars/source.ned.json
CHANGED
|
@@ -1 +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"}]}}}
|
|
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|parent)\\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":[{"match":"(pub|pub\\(.+\\))?\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*:\\s*(.+)","patterns":[{"include":"#comments"}],"captures":{"1":{"patterns":[{"include":"#code"}]},"2":{"name":"support.type.property-name.nr"},"3":{"patterns":[{"include":"#code"}]}}},{"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|while|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
|
+
{"name":"The Noir Programming Language","scopeName":"source.nr","patterns":[{"include":"#code"}],"repository":{"--struct-content":{"patterns":[{"match":"(pub|pub\\(.+\\))?\\s*([a-zA-Z_][a-zA-Z0-9_]*)\\s*:\\s*(.+)","patterns":[{"include":"#comments"}],"captures":{"1":{"patterns":[{"include":"#code"}]},"2":{"name":"support.type.property-name.nr"},"3":{"patterns":[{"include":"#code"}]}}},{"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|while|enum|match|break|continue)\\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|ttr(?: (?:category|deprecated|example|search-terms))?)|b(?: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)|s(?:plit|tarts-with)))?)|c(?:al|d|h(?:ar|unk(?:-by|s))|lear|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|flatten|nu|reset|use-colors))?|st|tinue))|p)|d(?:ate(?: (?:f(?:ormat|rom-human)|humanize|list-timezone|now|to-timezone))?|e(?:bug(?: (?:e(?:nv|xperimental-options)|info|profile))?|code(?: (?:base(?:32(?:hex)?|64)|hex))?|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))?|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|or(?:mat(?: (?:bits|d(?:ate|uration)|filesize|number|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|pipe-and-redirect))?)|i(?:de(?:-env)?|sto(?:gram|ry(?: (?:import|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(?:inary|ool)|cell-path|d(?:atetime|uration)|f(?:ilesize|loat)|glob|int|record|s(?:qlite|tring)|value))?))|s-(?:admin|empty|not-empty|terminal)|tems)|j(?:o(?:b(?: (?:flush|id|kill|list|recv|s(?:end|pawn)|tag|unfreeze))?|in)|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))?)|e(?:rge(?: deep)?|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|s(?:elf|plit)|type))?)|lugin(?: (?:add|list|rm|stop|use))?|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|vert-time-zone)|unt(?:-null)?)|u(?:mulative|t))|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)|horizontal|i(?:mplode|nt(?:eger|o-(?:d(?:f|type)|lazy|nu|repr|schema))|s-(?:duplicated|in|n(?:ot-null|ull)|unique))|join(?:-where)?|l(?:ast|en|i(?:st-contains|t)|owercase)|m(?:a(?:th|x)|e(?:an|dian)|in)|n(?:-unique|ot)|o(?:pen|therwise|ver)|p(?:ivot|rofile)|q(?:cut|u(?:antile|ery))|r(?:e(?:name|place(?:-time-zone)?|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|replace(?:-all)?|s(?:lice|plit|trip-chars))|ftime|uct-json-encode))|um(?:mary)?)|t(?:ake|runcate)|u(?:n(?:ique|nest|pivot)|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column)))?|rt)|r(?:epend|int)|s)|query(?: (?:db|git|json|web(?:page-info)?|xml))?|r(?:andom(?: (?:b(?:inary|ool)|chars|dice|float|int|uuid))?|e(?:duce|g(?:ex|istry(?: query)?)|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-(?:external|internal))|s(?:ave|c(?:hema|ope(?: (?:aliases|commands|e(?:ngine-stats|xterns)|modules|variables))?)|e(?:lect|q(?: (?:char|date))?)|huffle|kip(?: (?:until|while))?|l(?:eep|ice)|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:ell-path|hars|olumn)|list|row|words))?|t(?:art|or(?: (?:create|delete|export|i(?:mport|nsert)|open|reset|update))?|r(?: (?:c(?:a(?:mel-case|pitalize)|o(?:mpress|ntains))|d(?:e(?:compress|dent|unicode)|istance|owncase)|e(?:nds-with|xpand)|inde(?:nt|x-of)|join|kebab-case|length|pascal-case|re(?:place|verse)|s(?:creaming-snake-case|hl-(?:quote|split)|imilarity|lug|nake-case|ta(?:rts-with|ts)|ubstring)|t(?:itle-case|rim)|upcase|wrap)|ess_internals)?)|ys(?: (?:cpu|disks|host|mem|net|temp|users))?)|t(?:a(?:ble|ke(?: (?:until|while))?)|e(?:e|rm(?: (?:query|size))?)|imeit|o(?: (?:csv|html|json|m(?:d|sgpack(?:z)?)|nuon|p(?:arquet|list)|t(?:ext|oml|sv)|xml|y(?:aml|ml))|uch)?|r(?:anspose|y)|utor)|u(?:limit|n(?:ame|iq(?:-by)?)|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|decode|encode|join|parse|split-query))?|se)|v(?:alues|ersion(?: check)?|iew(?: (?:blocks|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":"#numbers-octal"},{"include":"#numbers-binary"},{"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":"#string-raw"},{"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-])_*+[-+]?_*+(?:(?i:NaN|infinity|inf)_*+|(?:\\d[\\d_]*+\\.?|\\._*+\\d)[\\d_]*+(?i:E_*+[-+]?_*+\\d[\\d_]*+)?)(?i:ns|us|µs|ms|sec|min|hr|day|wk|b|kb|mb|gb|tb|pt|eb|zb|kib|mib|gib|tib|pit|eib|zib)?(?:(?![\\w.])|(?=\\.\\.))"},"numbers-binary":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+b_*+[01][01_]*+(?![\\w.])"},"numbers-hexa":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+x_*+[0-9a-fA-F][0-9a-fA-F_]*+(?![\\w.])"},"numbers-octal":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+o_*+[0-7][0-7_]*+(?![\\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|like|has)|not|and|or|xor|bit-(?:or|and|xor|shl|shr)|starts-with|ends-with|like|has)(?= |\\)|$)"},"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-raw"},{"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-raw":{"name":"string.raw.nushell","begin":"r(#+)'","end":"'\\1","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|ttr(?: (?:category|deprecated|example|search-terms))?)|b(?: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)|s(?:plit|tarts-with)))?)|c(?:al|d|h(?:ar|unk(?:-by|s))|lear|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|flatten|nu|reset|use-colors))?|st|tinue))|p)|d(?:ate(?: (?:f(?:ormat|rom-human)|humanize|list-timezone|now|to-timezone))?|e(?:bug(?: (?:e(?:nv|xperimental-options)|info|profile))?|code(?: (?:base(?:32(?:hex)?|64)|hex))?|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))?|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|or(?:mat(?: (?:bits|d(?:ate|uration)|filesize|number|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|pipe-and-redirect))?)|i(?:de(?:-env)?|sto(?:gram|ry(?: (?:import|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(?:inary|ool)|cell-path|d(?:atetime|uration)|f(?:ilesize|loat)|glob|int|record|s(?:qlite|tring)|value))?))|s-(?:admin|empty|not-empty|terminal)|tems)|j(?:o(?:b(?: (?:flush|id|kill|list|recv|s(?:end|pawn)|tag|unfreeze))?|in)|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))?)|e(?:rge(?: deep)?|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|s(?:elf|plit)|type))?)|lugin(?: (?:add|list|rm|stop|use))?|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|vert-time-zone)|unt(?:-null)?)|u(?:mulative|t))|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)|horizontal|i(?:mplode|nt(?:eger|o-(?:d(?:f|type)|lazy|nu|repr|schema))|s-(?:duplicated|in|n(?:ot-null|ull)|unique))|join(?:-where)?|l(?:ast|en|i(?:st-contains|t)|owercase)|m(?:a(?:th|x)|e(?:an|dian)|in)|n(?:-unique|ot)|o(?:pen|therwise|ver)|p(?:ivot|rofile)|q(?:cut|u(?:antile|ery))|r(?:e(?:name|place(?:-time-zone)?|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|replace(?:-all)?|s(?:lice|plit|trip-chars))|ftime|uct-json-encode))|um(?:mary)?)|t(?:ake|runcate)|u(?:n(?:ique|nest|pivot)|ppercase)|va(?:lue-counts|r)|w(?:hen|ith-column)))?|rt)|r(?:epend|int)|s)|query(?: (?:db|git|json|web(?:page-info)?|xml))?|r(?:andom(?: (?:b(?:inary|ool)|chars|dice|float|int|uuid))?|e(?:duce|g(?:ex|istry(?: query)?)|ject|name|turn|verse)|m|o(?:ll(?: (?:down|left|right|up))?|tate)|un-(?:external|internal))|s(?:ave|c(?:hema|ope(?: (?:aliases|commands|e(?:ngine-stats|xterns)|modules|variables))?)|e(?:lect|q(?: (?:char|date))?)|huffle|kip(?: (?:until|while))?|l(?:eep|ice)|o(?:rt(?:-by)?|urce(?:-env)?)|plit(?: (?:c(?:ell-path|hars|olumn)|list|row|words))?|t(?:art|or(?: (?:create|delete|export|i(?:mport|nsert)|open|reset|update))?|r(?: (?:c(?:a(?:mel-case|pitalize)|o(?:mpress|ntains))|d(?:e(?:compress|dent|unicode)|istance|owncase)|e(?:nds-with|xpand)|inde(?:nt|x-of)|join|kebab-case|length|pascal-case|re(?:place|verse)|s(?:creaming-snake-case|hl-(?:quote|split)|imilarity|lug|nake-case|ta(?:rts-with|ts)|ubstring)|t(?:itle-case|rim)|upcase|wrap)|ess_internals)?)|ys(?: (?:cpu|disks|host|mem|net|temp|users))?)|t(?:a(?:ble|ke(?: (?:until|while))?)|e(?:e|rm(?: (?:query|size))?)|imeit|o(?: (?:csv|html|json|m(?:d|sgpack(?:z)?)|nuon|p(?:arquet|list)|t(?:ext|oml|sv)|xml|y(?:aml|ml))|uch)?|r(?:anspose|y)|utor)|u(?:limit|n(?:ame|iq(?:-by)?)|p(?:date(?: cells)?|sert)|rl(?: (?:build-query|decode|encode|join|parse|split-query))?|se)|v(?:alues|ersion(?: check)?|iew(?: (?:blocks|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":"#numbers-octal"},{"include":"#numbers-binary"},{"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":"#string-raw"},{"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+)*)))?\\s+([\\w\\-]+|\"[\\w\\- ]+\"|'[\\w\\- ]+'|`[\\w\\- ]+`)(?:\\s+((?:--\\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.function.nushell"},"3":{"name":"entity.name.type.nushell"},"4":{"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-])_*+[-+]?_*+(?:(?i:NaN|infinity|inf)_*+|(?:\\d[\\d_]*+\\.?|\\._*+\\d)[\\d_]*+(?i:E_*+[-+]?_*+\\d[\\d_]*+)?)(?i:ns|us|µs|ms|sec|min|hr|day|wk|b|kb|mb|gb|tb|pt|eb|zb|kib|mib|gib|tib|pit|eib|zib)?(?:(?![\\w.])|(?=\\.\\.))"},"numbers-binary":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+b_*+[01][01_]*+(?![\\w.])"},"numbers-hexa":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+x_*+[0-9a-fA-F][0-9a-fA-F_]*+(?![\\w.])"},"numbers-octal":{"name":"constant.numeric.nushell","match":"(?\u003c![\\w-])_*+0_*+o_*+[0-7][0-7_]*+(?![\\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|like|has)|not|and|or|xor|bit-(?:or|and|xor|shl|shr)|starts-with|ends-with|like|has)(?= |\\)|$)"},"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-raw"},{"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-raw":{"name":"string.raw.nushell","begin":"r(#+)'","end":"'\\1","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.proto.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"Protocol Buffer 3","scopeName":"source.proto","patterns":[{"include":"#comments"},{"include":"#syntax"},{"include":"#package"},{"include":"#import"},{"include":"#optionStmt"},{"include":"#message"},{"include":"#enum"},{"include":"#service"}],"repository":{"comments":{"patterns":[{"name":"comment.block.proto","begin":"/\\*","end":"\\*/"},{"name":"comment.line.double-slash.proto","begin":"//","end":"$\\n?"}]},"constants":{"name":"constant.language.proto","match":"\\b(true|false|max|[A-Z_]+)\\b"},"enum":{"begin":"(enum)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(\\{)?","end":"\\}","patterns":[{"include":"#reserved"},{"include":"#optionStmt"},{"include":"#comments"},{"begin":"([A-Za-z][A-Za-z0-9_]*)\\s*(=)\\s*(0[xX][0-9a-fA-F]
|
|
1
|
+
{"name":"Protocol Buffer 3","scopeName":"source.proto","patterns":[{"include":"#comments"},{"include":"#syntax"},{"include":"#package"},{"include":"#import"},{"include":"#optionStmt"},{"include":"#message"},{"include":"#enum"},{"include":"#service"}],"repository":{"comments":{"patterns":[{"name":"comment.block.proto","begin":"/\\*","end":"\\*/"},{"name":"comment.line.double-slash.proto","begin":"//","end":"$\\n?"}]},"constants":{"name":"constant.language.proto","match":"\\b(true|false|max|[A-Z_]+)\\b"},"enum":{"begin":"(enum)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(\\{)?","end":"\\}","patterns":[{"include":"#reserved"},{"include":"#optionStmt"},{"include":"#comments"},{"begin":"([A-Za-z][A-Za-z0-9_]*)\\s*(=)\\s*(-?0[xX][0-9a-fA-F]+|-?[0-9]+)","end":"(;)","patterns":[{"include":"#fieldOptions"}],"beginCaptures":{"1":{"name":"variable.other.proto"},"2":{"name":"keyword.operator.assignment.proto"},"3":{"name":"constant.numeric.proto"}},"endCaptures":{"1":{"name":"punctuation.terminator.proto"}}}],"beginCaptures":{"1":{"name":"keyword.other.proto"},"3":{"name":"entity.name.class.proto"}}},"field":{"begin":"\\s*(optional|repeated|required)?\\s*(\\.?[\\w.]+)\\s+(\\w+)\\s*(=)\\s*(0[xX][0-9a-fA-F]+|[0-9]+)","end":"(;)","patterns":[{"include":"#fieldOptions"}],"beginCaptures":{"1":{"name":"storage.modifier.proto"},"2":{"name":"storage.type.proto"},"3":{"name":"variable.other.proto"},"4":{"name":"keyword.operator.assignment.proto"},"5":{"name":"constant.numeric.proto"}},"endCaptures":{"1":{"name":"punctuation.terminator.proto"}}},"fieldOptions":{"begin":"\\[","end":"\\]","patterns":[{"include":"#constants"},{"include":"#number"},{"include":"#string"},{"include":"#subMsgOption"},{"include":"#optionName"}]},"ident":{"name":"entity.name.class.proto","match":"\\.?[A-Za-z][A-Za-z0-9_.]*"},"import":{"match":"\\s*(import)\\s+(weak|public)?\\s*(\"[^\"]+\")\\s*(;)","captures":{"1":{"name":"keyword.other.proto"},"2":{"name":"keyword.other.proto"},"3":{"name":"string.quoted.double.proto.import"},"4":{"name":"punctuation.terminator.proto"}}},"kv":{"begin":"(\\w+)\\s*(:)","end":"(;)|,|(?=[}/_a-zA-Z])","patterns":[{"include":"#constants"},{"include":"#number"},{"include":"#string"},{"include":"#subMsgOption"}],"beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"punctuation.separator.key-value.proto"}},"endCaptures":{"1":{"name":"punctuation.terminator.proto"}}},"mapfield":{"begin":"\\s*(map)\\s*(\u003c)\\s*(\\.?[\\w.]+)\\s*,\\s*(\\.?[\\w.]+)\\s*(\u003e)\\s+(\\w+)\\s*(=)\\s*(\\d+)","end":"(;)","patterns":[{"include":"#fieldOptions"}],"beginCaptures":{"1":{"name":"storage.type.proto"},"2":{"name":"punctuation.definition.typeparameters.begin.proto"},"3":{"name":"storage.type.proto"},"4":{"name":"storage.type.proto"},"5":{"name":"punctuation.definition.typeparameters.end.proto"},"6":{"name":"variable.other.proto"},"7":{"name":"keyword.operator.assignment.proto"},"8":{"name":"constant.numeric.proto"}},"endCaptures":{"1":{"name":"punctuation.terminator.proto"}}},"message":{"begin":"(message|extend)(\\s+)([A-Za-z_][A-Za-z0-9_.]*)(\\s*)(\\{)?","end":"\\}","patterns":[{"include":"#reserved"},{"include":"$self"},{"include":"#enum"},{"include":"#optionStmt"},{"include":"#comments"},{"include":"#oneof"},{"include":"#field"},{"include":"#mapfield"}],"beginCaptures":{"1":{"name":"keyword.other.proto"},"3":{"name":"entity.name.class.message.proto"}}},"method":{"begin":"(rpc)\\s+([A-Za-z][A-Za-z0-9_]*)","end":"\\}|(;)","patterns":[{"include":"#comments"},{"include":"#optionStmt"},{"include":"#rpcKeywords"},{"include":"#ident"}],"beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"entity.name.function"}},"endCaptures":{"1":{"name":"punctuation.terminator.proto"}}},"number":{"name":"constant.numeric.proto","match":"\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b"},"oneof":{"begin":"(oneof)\\s+([A-Za-z][A-Za-z0-9_]*)\\s*\\{?","end":"\\}","patterns":[{"include":"#optionStmt"},{"include":"#comments"},{"include":"#field"}],"beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"variable.other.proto"}}},"optionName":{"match":"(\\w+|\\(\\w+(\\.\\w+)*\\))(\\.\\w+)*","captures":{"1":{"name":"support.other.proto"},"2":{"name":"support.other.proto"},"3":{"name":"support.other.proto"}}},"optionStmt":{"begin":"(option)\\s+(\\w+|\\(\\w+(\\.\\w+)*\\))(\\.\\w+)*\\s*(=)","end":"(;)","patterns":[{"include":"#constants"},{"include":"#number"},{"include":"#string"},{"include":"#subMsgOption"}],"beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"support.other.proto"},"3":{"name":"support.other.proto"},"4":{"name":"support.other.proto"},"5":{"name":"keyword.operator.assignment.proto"}},"endCaptures":{"1":{"name":"punctuation.terminator.proto"}}},"package":{"match":"\\s*(package)\\s+([\\w.]+)\\s*(;)","captures":{"1":{"name":"keyword.other.proto"},"2":{"name":"string.unquoted.proto.package"},"3":{"name":"punctuation.terminator.proto"}}},"reserved":{"begin":"(reserved)\\s+","end":"(;)","patterns":[{"match":"(\\d+)(\\s+(to)\\s+(\\d+))?","captures":{"1":{"name":"constant.numeric.proto"},"3":{"name":"keyword.other.proto"},"4":{"name":"constant.numeric.proto"}}},{"include":"#string"}],"beginCaptures":{"1":{"name":"keyword.other.proto"}},"endCaptures":{"1":{"name":"punctuation.terminator.proto"}}},"rpcKeywords":{"name":"keyword.other.proto","match":"\\b(stream|returns)\\b"},"service":{"begin":"(service)\\s+([A-Za-z][A-Za-z0-9_.]*)\\s*\\{?","end":"\\}","patterns":[{"include":"#comments"},{"include":"#optionStmt"},{"include":"#method"}],"beginCaptures":{"1":{"name":"keyword.other.proto"},"2":{"name":"entity.name.class.message.proto"}}},"storagetypes":{"name":"storage.type.proto","match":"\\b(double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\\b"},"string":{"name":"string.quoted.double.proto","match":"([\"'])(?:\\\\.|[^\\\\])*?\\1"},"subMsgOption":{"begin":"\\{","end":"\\}","patterns":[{"include":"#kv"},{"include":"#comments"}]},"syntax":{"match":"\\s*(syntax)\\s*(=)\\s*(\"proto[23]\")\\s*(;)","captures":{"1":{"name":"keyword.other.proto"},"2":{"name":"keyword.operator.assignment.proto"},"3":{"name":"string.quoted.double.proto.syntax"},"4":{"name":"punctuation.terminator.proto"}}}}}
|
data/grammars/source.pyjade.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"Jade (Python)","scopeName":"source.pyjade","patterns":[{"name":"comment.other.doctype.jade","match":"^(!!!|doctype)(\\s*[a-zA-Z0-9-_]+)?"},{"name":"comment.unbuffered.block.jade","begin":"^(\\s*)//-","end":"^(?!(\\1\\s)|\\s*$)"},{"name":"comment.buffered.block.jade","begin":"\u003c!--","end":"--\\s*\u003e","patterns":[{"name":"invalid.illegal.comment.comment.block.jade","match":"--"}]},{"name":"string.comment.buffered.block.jade","begin":"^(\\s*)//","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"name":"string.comment.buffered.block.jade","match":"^\\s*(//)(?!-)","captures":{"1":{"name":"invalid.illegal.comment.comment.block.jade"}}}]},{"name":"javascript.embedded.jade","begin":"^(\\s*)-$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.python"}]},{"name":"source.script.jade","begin":"^(\\s*)(script)(?=[.#(\\s])((?![^\\n]*type=)|(?=[^\\n]*(text|application)/javascript))","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"name":"stuff.tag.script.jade","begin":"\\G(?=\\()","end":"$","patterns":[{"include":"#tag_attributes"}]},{"name":"stuff.tag.script.jade","begin":"\\G(?=[.#])","end":"$","patterns":[{"include":"#complete_tag"}]},{"include":"source.python"}],"beginCaptures":{"2":{"name":"entity.name.tag.script.jade"}}},{"name":"source.style.jade","begin":"^(\\s*)(style)(?=[.#(\\s])","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"name":"stuff.tag.style.jade","begin":"\\G(?=\\()","end":"$","patterns":[{"include":"#tag_attributes"}]},{"name":"stuff.tag.style.jade","begin":"\\G(?=[.#])","end":"$","patterns":[{"include":"#complete_tag"}]},{"include":"source.css"}],"beginCaptures":{"2":{"name":"entity.name.tag.script.jade"}}},{"name":"text.markdown.filter.jade","begin":"^(\\s*):(markdown)(?=\\(|$)$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"source.gfm"}],"beginCaptures":{"2":{"name":"constant.language.name.markdown.filter.jade"}}},{"name":"source.sass.filter.jade","begin":"^(\\s*):(sass)(?=\\(|$)$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"source.sass"}],"beginCaptures":{"2":{"name":"constant.language.name.sass.filter.jade"}}},{"name":"source.less.filter.jade","begin":"^(\\s*):(less)(?=\\(|$)$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"source.css.less"}],"beginCaptures":{"2":{"name":"constant.language.name.less.filter.jade"}}},{"name":"source.stylus.filter.jade","begin":"^(\\s*):(stylus)(?=\\(|$)$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"source.stylus"}],"beginCaptures":{"2":{"name":"constant.language.name.stylus.filter.jade"}}},{"name":"source.coffeescript.filter.jade","begin":"^(\\s*):(coffee(-?script)?)(?=\\(|$)","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"source.coffee"}],"beginCaptures":{"2":{"name":"constant.language.name.coffeescript.filter.jade"}}},{"name":"text.generic.filter.jade","begin":"^(\\s*)((:(?=.))|(:$))","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"name":"name.generic.filter.jade","begin":"\\G(?\u003c=:)(?=.)","end":"$","patterns":[{"name":"invalid.illegal.name.generic.filter.jade","match":"\\G\\("},{"name":"constant.language.name.generic.filter.jade","match":"\\w"},{"include":"#filter_args"},{"name":"invalid.illegal.name.generic.filter.jade","match":"\\W"}]}],"beginCaptures":{"4":{"name":"invalid.illegal.empty.generic.filter.jade"}}},{"name":"text.block.dot.tag.jade","begin":"^(\\s*)(?=[\\w.#].*?\\.$)(?=(?:(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?\u003c!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?\u003c!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*)(?:(?:(?::\\s+)|(?\u003c=\\)))(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?\u003c!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?\u003c!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*))*)\\.$)(?:(?:(#[\\w-]+)|(\\.[\\w-]+))|((?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#tag_attributes"},{"include":"#complete_tag"},{"name":"text.block.jade","begin":"^(?=.)","end":"$","patterns":[{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]}],"beginCaptures":{"2":{"name":"constant.id.tag.jade"},"3":{"name":"constant.language.js"},"4":{"name":"entity.name.tag.jade"}}},{"name":"tag.jade","begin":"^\\s*","end":"$","patterns":[{"include":"#inline_jade"},{"include":"#blocks_and_includes"},{"include":"#unbuffered_code"},{"include":"#mixins"},{"include":"#flow_control"},{"include":"#case_conds"},{"name":"text.block.pipe.jade","begin":"\\|","end":"$","patterns":[{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#printed_expression"},{"name":"text.jade","begin":"\\G(?=(#[^\\{\\w-])|[^\\w.#])","end":"$","patterns":[{"begin":"\u003c/?(?=[!#])","end":"\u003e|$","patterns":[{"include":"#inline_jade"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#complete_tag"}]}],"repository":{"blocks_and_includes":{"name":"meta.first-class.jade","match":"(extends|include|yield|append|prepend|block( (append|prepend))?)\\s+(.*)$","captures":{"1":{"name":"storage.type.import.include.jade"},"4":{"name":"variable.control.import.include.jade"}}},"brackets_js":{"name":"js.value.attribute.tag.jade","begin":"\\[","end":"\\]","patterns":[{"include":"#brackets_js"},{"include":"source.python"}]},"case_conds":{"name":"meta.control.flow.jade","begin":"(default|when)((\\s+|(?=:))|$)","end":"$","patterns":[{"name":"js.embedded.control.flow.jade","begin":"\\G(?!:)","end":"(?=:\\s+)|$","patterns":[{"include":"#case_when_paren"},{"include":"source.python"}]},{"name":"tag.case.control.flow.jade","begin":":\\s+","end":"$","patterns":[{"include":"#complete_tag"}]}],"captures":{"1":{"name":"storage.type.function.jade"}}},"case_when_paren":{"name":"js.when.control.flow.jade","begin":"\\(","end":"\\)","patterns":[{"include":"#case_when_paren"},{"name":"invalid.illegal.name.tag.jade","match":":"},{"include":"source.python"}]},"complete_tag":{"name":"complete_tag.jade","begin":"(?=[\\w.#])|(:\\s*)","end":"(\\.?$)|(?=:.)","patterns":[{"include":"#blocks_and_includes"},{"include":"#unbuffered_code"},{"include":"#mixins"},{"include":"#flow_control"},{"name":"invalid.illegal.name.tag.jade","match":"(?\u003c=:)\\w.*$"},{"include":"#tag_name"},{"include":"#tag_id"},{"include":"#tag_classes"},{"include":"#tag_attributes"},{"include":"#tag_mixin_attributes"},{"match":"((\\.)\\s+$)|((:)\\s*$)","captures":{"2":{"name":"invalid.illegal.end.tag.jade"},"4":{"name":"invalid.illegal.end.tag.jade"}}},{"include":"#printed_expression"},{"include":"#tag_text"}]},"embedded_html":{"name":"html","begin":"(?=\u003c[^\u003e]*\u003e)","end":"$|(?=\u003e)","patterns":[{"include":"text.html.basic"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"filter_args":{"name":"args.filter.jade","begin":"\\G(\\()","end":"(\\))(.*?$)","patterns":[{"name":"attributes.tag.jade","contentName":"string.value.args.filter.jade","begin":"([^\\s(),=]+)(=?)","end":"((?=\\))|,|$)","patterns":[{"include":"#filter_args_paren"}],"beginCaptures":{"1":{"name":"entity.other.attribute-name.tag.jade"},"2":{"name":"punctuation.separator.key-value.jade"}}}],"captures":{"1":{"name":"meta.args.filter.jade"},"2":{"name":"invalid.illegal.extra.args.filter.jade"}}},"filter_args_paren":{"begin":"\\(","end":"\\)|$","patterns":[{"include":"#filter_args_paren"}]},"flow_control":{"name":"meta.control.flow.jade","begin":"(for|if|else if|else|each|until|while|unless|case)(\\s+|$)","end":"$","patterns":[{"name":"js.embedded.control.flow.jade","end":"$","patterns":[{"include":"source.python"}]}],"captures":{"1":{"name":"storage.type.function.jade"}}},"html_entity":{"patterns":[{"name":"constant.character.entity.html.text.jade","match":"(\u0026)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)"},{"name":"invalid.illegal.html_entity.text.jade","match":"[\u003c\u003e\u0026]"}]},"inline_jade":{"name":"inline.jade","begin":"(?\u003c!\\\\)(#\\[)","end":"(\\])","patterns":[{"include":"#inline_jade"},{"include":"#mixins"},{"name":"tag.inline.jade","begin":"(?\u003c!\\])(?=[\\w.#])|(:\\s*)","end":"(?=\\]|(:.)|=|\\s)","patterns":[{"include":"#tag_name"},{"include":"#tag_id"},{"include":"#tag_classes"},{"include":"#tag_attributes"},{"include":"#tag_mixin_attributes"},{"include":"#inline_jade"},{"name":"invalid.illegal.tag.jade","match":"\\["}]},{"include":"#unbuffered_code"},{"include":"#printed_expression"},{"name":"invalid.illegal.tag.jade","match":"\\["},{"include":"#inline_jade_text"}],"captures":{"1":{"name":"entity.name.function.jade"},"2":{"name":"entity.name.function.jade"}}},"inline_jade_text":{"name":"text.jade","end":"(?=\\])","patterns":[{"begin":"\\[","end":"\\]","patterns":[{"include":"#inline_jade_text"}]},{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"interpolated_error":{"name":"invalid.illegal.tag.jade","match":"(?\u003c!\\\\)[#!]\\{(?=[^}]*$)"},"interpolated_value":{"name":"string.interpolated.jade","begin":"(?\u003c!\\\\)[#!]\\{(?=.*?\\})","end":"\\}","patterns":[{"name":"invalid.illegal.tag.jade","match":"{"},{"include":"source.python"}]},"mixins":{"name":"meta.mixin.jade","begin":"(((mixin\\s+)|\\+)([\\w-]+))\\s*","end":"(?=\\])|$","patterns":[{"name":"args.mixin.jade","end":"(?=\\])|$","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#complete_tag"}]}],"beginCaptures":{"2":{"name":"storage.type.function.jade"},"4":{"name":"entity.name.function.jade"}}},"printed_expression":{"begin":"(!?\\=)\\s*","end":"(?=\\])|$","patterns":[{"include":"#brackets_js"},{"include":"source.python"}],"captures":{"1":{"name":"constant"}}},"string":{"name":"string.quoted.jade","begin":"(['\"])","end":"(?\u003c!\\\\)\\1","patterns":[{"name":"constant.character.quoted.jade","match":"\\\\((x[0-9a-fA-F]{2})|(u[0-9]{4})|.)"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"tag_attribute_value_braces":{"name":"js.value.attribute.tag.jade","begin":"\\{","end":"\\}","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#string"},{"include":"source.python"}]},"tag_attribute_value_brackets":{"name":"js.value.attribute.tag.jade","begin":"\\[","end":"\\]","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#string"},{"include":"source.python"}]},"tag_attribute_value_paren":{"name":"js.value.attribute.tag.jade","begin":"\\(","end":"\\)","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#string"},{"include":"source.python"}]},"tag_attributes":{"name":"attributes.tag.jade","begin":"(\\()","end":"(\\))","patterns":[{"name":"attributes.tag.jade","match":"([^\\s(),=/]+)\\s*((?=\\))|,|\\s+|$)(?!\\!?\\=)","captures":{"1":{"name":"entity.other.attribute-name.tag.jade"}}},{"name":"attributes.tag.jade","begin":"([^\\s(),=/]*[^\\s(),=!/])\\s*(!?\\=)","end":"(,|$|(?=\\)|((?\u003c![+/*|\u0026=:^~!?\u003c\u003e%-])\\s+[^+/*|\u0026=:^~!?\u003c\u003e%-])))","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#string"},{"include":"source.python"}],"beginCaptures":{"1":{"name":"entity.other.attribute-name.tag.jade"},"2":{"name":"punctuation.separator.key-value.jade"}}}],"captures":{"1":{"name":"constant.name.attribute.tag.jade"}}},"tag_classes":{"name":"constant.language.js","match":"\\.([^\\w-])?[\\w-]*","captures":{"1":{"name":"invalid.illegal.tag.jade"}}},"tag_id":{"name":"constant.id.tag.jade","match":"#[\\w-]+"},"tag_mixin_attributes":{"name":"attributes.tag.jade","begin":"(\u0026attributes\\()","end":"(\\))","patterns":[{"name":"storage.type.keyword.jade","match":"attributes(?=\\))"},{"include":"source.python"}],"captures":{"1":{"name":"entity.name.function.jade"}}},"tag_name":{"name":"entity.name.tag.jade","begin":"([#!]\\{(?=.*?\\}))|(\\w(([\\w:-]+[\\w-])|([\\w-]*)))","end":"(\\G(?\u003c!\\5[^\\w-]))|\\}|$","patterns":[{"name":"entity.name.tag.jade","begin":"\\G(?\u003c=\\{)","end":"(?=\\})","patterns":[{"name":"invalid.illegal.tag.jade","match":"{"},{"include":"source.python"}]}]},"tag_text":{"name":"text.jade","begin":"(?=.)","end":"$","patterns":[{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"unbuffered_code":{"name":"javascript.embedded.jade","begin":"(-|(([a-zA-Z0-9_]+)\\s+=))","end":"(?=\\])|$","patterns":[{"include":"#brackets_js"},{"include":"source.python"}],"beginCaptures":{"3":{"name":"variable.parameter.javascript.embedded.jade"}}}}}
|
|
1
|
+
{"name":"Jade (Python)","scopeName":"source.pyjade","patterns":[{"name":"comment.other.doctype.jade","match":"^(!!!|doctype)(\\s*[a-zA-Z0-9-_]+)?"},{"name":"comment.unbuffered.block.jade","begin":"^(\\s*)//-","end":"^(?!(\\1\\s)|\\s*$)"},{"name":"comment.buffered.block.jade","begin":"\u003c!--","end":"--\\s*\u003e","patterns":[{"name":"invalid.illegal.comment.comment.block.jade","match":"--"}]},{"name":"string.comment.buffered.block.jade","begin":"^(\\s*)//","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"name":"string.comment.buffered.block.jade","match":"^\\s*(//)(?!-)","captures":{"1":{"name":"invalid.illegal.comment.comment.block.jade"}}}]},{"name":"javascript.embedded.jade","begin":"^(\\s*)-$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"source.python"}]},{"name":"source.script.jade","begin":"^(\\s*)(script)(?=[.#(\\s])((?![^\\n]*type=)|(?=[^\\n]*(text|application)/javascript))","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"name":"stuff.tag.script.jade","begin":"\\G(?=\\()","end":"$","patterns":[{"include":"#tag_attributes"}]},{"name":"stuff.tag.script.jade","begin":"\\G(?=[.#])","end":"$","patterns":[{"include":"#complete_tag"}]},{"include":"source.python"}],"beginCaptures":{"2":{"name":"entity.name.tag.script.jade"}}},{"name":"source.style.jade","begin":"^(\\s*)(style)(?=[.#(\\s])","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"name":"stuff.tag.style.jade","begin":"\\G(?=\\()","end":"$","patterns":[{"include":"#tag_attributes"}]},{"name":"stuff.tag.style.jade","begin":"\\G(?=[.#])","end":"$","patterns":[{"include":"#complete_tag"}]},{"include":"source.css"}],"beginCaptures":{"2":{"name":"entity.name.tag.script.jade"}}},{"name":"text.markdown.filter.jade","begin":"^(\\s*):(markdown)(?=\\(|$)$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"text.md"}],"beginCaptures":{"2":{"name":"constant.language.name.markdown.filter.jade"}}},{"name":"source.sass.filter.jade","begin":"^(\\s*):(sass)(?=\\(|$)$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"source.sass"}],"beginCaptures":{"2":{"name":"constant.language.name.sass.filter.jade"}}},{"name":"source.less.filter.jade","begin":"^(\\s*):(less)(?=\\(|$)$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"source.css.less"}],"beginCaptures":{"2":{"name":"constant.language.name.less.filter.jade"}}},{"name":"source.stylus.filter.jade","begin":"^(\\s*):(stylus)(?=\\(|$)$","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"source.stylus"}],"beginCaptures":{"2":{"name":"constant.language.name.stylus.filter.jade"}}},{"name":"source.coffeescript.filter.jade","begin":"^(\\s*):(coffee(-?script)?)(?=\\(|$)","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#filter_args"},{"include":"source.coffee"}],"beginCaptures":{"2":{"name":"constant.language.name.coffeescript.filter.jade"}}},{"name":"text.generic.filter.jade","begin":"^(\\s*)((:(?=.))|(:$))","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"name":"name.generic.filter.jade","begin":"\\G(?\u003c=:)(?=.)","end":"$","patterns":[{"name":"invalid.illegal.name.generic.filter.jade","match":"\\G\\("},{"name":"constant.language.name.generic.filter.jade","match":"\\w"},{"include":"#filter_args"},{"name":"invalid.illegal.name.generic.filter.jade","match":"\\W"}]}],"beginCaptures":{"4":{"name":"invalid.illegal.empty.generic.filter.jade"}}},{"name":"text.block.dot.tag.jade","begin":"^(\\s*)(?=[\\w.#].*?\\.$)(?=(?:(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?\u003c!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?\u003c!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*)(?:(?:(?::\\s+)|(?\u003c=\\)))(?:(?:(?:(?:#[\\w-]+)|(?:\\.[\\w-]+))|(?:(?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))(?:(?:#[\\w-]+)|(?:\\.[\\w-]+)|(?:\\((?:[^()\\'\\\"]*(?:(?:\\'(?:[^\\']|(?:(?\u003c!\\\\)\\\\\\'))*\\')|(?:\\\"(?:[^\\\"]|(?:(?\u003c!\\\\)\\\\\\\"))*\\\")))*[^()]*\\))*)*))*)\\.$)(?:(?:(#[\\w-]+)|(\\.[\\w-]+))|((?:[#!]\\{[^}]*\\})|(?:\\w(?:(?:[\\w:-]+[\\w-])|(?:[\\w-]*)))))","end":"^(?!(\\1\\s)|\\s*$)","patterns":[{"include":"#tag_attributes"},{"include":"#complete_tag"},{"name":"text.block.jade","begin":"^(?=.)","end":"$","patterns":[{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]}],"beginCaptures":{"2":{"name":"constant.id.tag.jade"},"3":{"name":"constant.language.js"},"4":{"name":"entity.name.tag.jade"}}},{"name":"tag.jade","begin":"^\\s*","end":"$","patterns":[{"include":"#inline_jade"},{"include":"#blocks_and_includes"},{"include":"#unbuffered_code"},{"include":"#mixins"},{"include":"#flow_control"},{"include":"#case_conds"},{"name":"text.block.pipe.jade","begin":"\\|","end":"$","patterns":[{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#printed_expression"},{"name":"text.jade","begin":"\\G(?=(#[^\\{\\w-])|[^\\w.#])","end":"$","patterns":[{"begin":"\u003c/?(?=[!#])","end":"\u003e|$","patterns":[{"include":"#inline_jade"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},{"include":"#complete_tag"}]}],"repository":{"blocks_and_includes":{"name":"meta.first-class.jade","match":"(extends|include|yield|append|prepend|block( (append|prepend))?)\\s+(.*)$","captures":{"1":{"name":"storage.type.import.include.jade"},"4":{"name":"variable.control.import.include.jade"}}},"brackets_js":{"name":"js.value.attribute.tag.jade","begin":"\\[","end":"\\]","patterns":[{"include":"#brackets_js"},{"include":"source.python"}]},"case_conds":{"name":"meta.control.flow.jade","begin":"(default|when)((\\s+|(?=:))|$)","end":"$","patterns":[{"name":"js.embedded.control.flow.jade","begin":"\\G(?!:)","end":"(?=:\\s+)|$","patterns":[{"include":"#case_when_paren"},{"include":"source.python"}]},{"name":"tag.case.control.flow.jade","begin":":\\s+","end":"$","patterns":[{"include":"#complete_tag"}]}],"captures":{"1":{"name":"storage.type.function.jade"}}},"case_when_paren":{"name":"js.when.control.flow.jade","begin":"\\(","end":"\\)","patterns":[{"include":"#case_when_paren"},{"name":"invalid.illegal.name.tag.jade","match":":"},{"include":"source.python"}]},"complete_tag":{"name":"complete_tag.jade","begin":"(?=[\\w.#])|(:\\s*)","end":"(\\.?$)|(?=:.)","patterns":[{"include":"#blocks_and_includes"},{"include":"#unbuffered_code"},{"include":"#mixins"},{"include":"#flow_control"},{"name":"invalid.illegal.name.tag.jade","match":"(?\u003c=:)\\w.*$"},{"include":"#tag_name"},{"include":"#tag_id"},{"include":"#tag_classes"},{"include":"#tag_attributes"},{"include":"#tag_mixin_attributes"},{"match":"((\\.)\\s+$)|((:)\\s*$)","captures":{"2":{"name":"invalid.illegal.end.tag.jade"},"4":{"name":"invalid.illegal.end.tag.jade"}}},{"include":"#printed_expression"},{"include":"#tag_text"}]},"embedded_html":{"name":"html","begin":"(?=\u003c[^\u003e]*\u003e)","end":"$|(?=\u003e)","patterns":[{"include":"text.html.basic"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"filter_args":{"name":"args.filter.jade","begin":"\\G(\\()","end":"(\\))(.*?$)","patterns":[{"name":"attributes.tag.jade","contentName":"string.value.args.filter.jade","begin":"([^\\s(),=]+)(=?)","end":"((?=\\))|,|$)","patterns":[{"include":"#filter_args_paren"}],"beginCaptures":{"1":{"name":"entity.other.attribute-name.tag.jade"},"2":{"name":"punctuation.separator.key-value.jade"}}}],"captures":{"1":{"name":"meta.args.filter.jade"},"2":{"name":"invalid.illegal.extra.args.filter.jade"}}},"filter_args_paren":{"begin":"\\(","end":"\\)|$","patterns":[{"include":"#filter_args_paren"}]},"flow_control":{"name":"meta.control.flow.jade","begin":"(for|if|else if|else|each|until|while|unless|case)(\\s+|$)","end":"$","patterns":[{"name":"js.embedded.control.flow.jade","end":"$","patterns":[{"include":"source.python"}]}],"captures":{"1":{"name":"storage.type.function.jade"}}},"html_entity":{"patterns":[{"name":"constant.character.entity.html.text.jade","match":"(\u0026)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)"},{"name":"invalid.illegal.html_entity.text.jade","match":"[\u003c\u003e\u0026]"}]},"inline_jade":{"name":"inline.jade","begin":"(?\u003c!\\\\)(#\\[)","end":"(\\])","patterns":[{"include":"#inline_jade"},{"include":"#mixins"},{"name":"tag.inline.jade","begin":"(?\u003c!\\])(?=[\\w.#])|(:\\s*)","end":"(?=\\]|(:.)|=|\\s)","patterns":[{"include":"#tag_name"},{"include":"#tag_id"},{"include":"#tag_classes"},{"include":"#tag_attributes"},{"include":"#tag_mixin_attributes"},{"include":"#inline_jade"},{"name":"invalid.illegal.tag.jade","match":"\\["}]},{"include":"#unbuffered_code"},{"include":"#printed_expression"},{"name":"invalid.illegal.tag.jade","match":"\\["},{"include":"#inline_jade_text"}],"captures":{"1":{"name":"entity.name.function.jade"},"2":{"name":"entity.name.function.jade"}}},"inline_jade_text":{"name":"text.jade","end":"(?=\\])","patterns":[{"begin":"\\[","end":"\\]","patterns":[{"include":"#inline_jade_text"}]},{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"interpolated_error":{"name":"invalid.illegal.tag.jade","match":"(?\u003c!\\\\)[#!]\\{(?=[^}]*$)"},"interpolated_value":{"name":"string.interpolated.jade","begin":"(?\u003c!\\\\)[#!]\\{(?=.*?\\})","end":"\\}","patterns":[{"name":"invalid.illegal.tag.jade","match":"{"},{"include":"source.python"}]},"mixins":{"name":"meta.mixin.jade","begin":"(((mixin\\s+)|\\+)([\\w-]+))\\s*","end":"(?=\\])|$","patterns":[{"name":"args.mixin.jade","end":"(?=\\])|$","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#complete_tag"}]}],"beginCaptures":{"2":{"name":"storage.type.function.jade"},"4":{"name":"entity.name.function.jade"}}},"printed_expression":{"begin":"(!?\\=)\\s*","end":"(?=\\])|$","patterns":[{"include":"#brackets_js"},{"include":"source.python"}],"captures":{"1":{"name":"constant"}}},"string":{"name":"string.quoted.jade","begin":"(['\"])","end":"(?\u003c!\\\\)\\1","patterns":[{"name":"constant.character.quoted.jade","match":"\\\\((x[0-9a-fA-F]{2})|(u[0-9]{4})|.)"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"tag_attribute_value_braces":{"name":"js.value.attribute.tag.jade","begin":"\\{","end":"\\}","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#string"},{"include":"source.python"}]},"tag_attribute_value_brackets":{"name":"js.value.attribute.tag.jade","begin":"\\[","end":"\\]","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#string"},{"include":"source.python"}]},"tag_attribute_value_paren":{"name":"js.value.attribute.tag.jade","begin":"\\(","end":"\\)","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#string"},{"include":"source.python"}]},"tag_attributes":{"name":"attributes.tag.jade","begin":"(\\()","end":"(\\))","patterns":[{"name":"attributes.tag.jade","match":"([^\\s(),=/]+)\\s*((?=\\))|,|\\s+|$)(?!\\!?\\=)","captures":{"1":{"name":"entity.other.attribute-name.tag.jade"}}},{"name":"attributes.tag.jade","begin":"([^\\s(),=/]*[^\\s(),=!/])\\s*(!?\\=)","end":"(,|$|(?=\\)|((?\u003c![+/*|\u0026=:^~!?\u003c\u003e%-])\\s+[^+/*|\u0026=:^~!?\u003c\u003e%-])))","patterns":[{"include":"#tag_attribute_value_paren"},{"include":"#tag_attribute_value_brackets"},{"include":"#tag_attribute_value_braces"},{"include":"#string"},{"include":"source.python"}],"beginCaptures":{"1":{"name":"entity.other.attribute-name.tag.jade"},"2":{"name":"punctuation.separator.key-value.jade"}}}],"captures":{"1":{"name":"constant.name.attribute.tag.jade"}}},"tag_classes":{"name":"constant.language.js","match":"\\.([^\\w-])?[\\w-]*","captures":{"1":{"name":"invalid.illegal.tag.jade"}}},"tag_id":{"name":"constant.id.tag.jade","match":"#[\\w-]+"},"tag_mixin_attributes":{"name":"attributes.tag.jade","begin":"(\u0026attributes\\()","end":"(\\))","patterns":[{"name":"storage.type.keyword.jade","match":"attributes(?=\\))"},{"include":"source.python"}],"captures":{"1":{"name":"entity.name.function.jade"}}},"tag_name":{"name":"entity.name.tag.jade","begin":"([#!]\\{(?=.*?\\}))|(\\w(([\\w:-]+[\\w-])|([\\w-]*)))","end":"(\\G(?\u003c!\\5[^\\w-]))|\\}|$","patterns":[{"name":"entity.name.tag.jade","begin":"\\G(?\u003c=\\{)","end":"(?=\\})","patterns":[{"name":"invalid.illegal.tag.jade","match":"{"},{"include":"source.python"}]}]},"tag_text":{"name":"text.jade","begin":"(?=.)","end":"$","patterns":[{"include":"#inline_jade"},{"include":"#embedded_html"},{"include":"#html_entity"},{"include":"#interpolated_value"},{"include":"#interpolated_error"}]},"unbuffered_code":{"name":"javascript.embedded.jade","begin":"(-|(([a-zA-Z0-9_]+)\\s+=))","end":"(?=\\])|$","patterns":[{"include":"#brackets_js"},{"include":"source.python"}],"beginCaptures":{"3":{"name":"variable.parameter.javascript.embedded.jade"}}}}}
|
data/grammars/source.quakec.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"QuakeC","scopeName":"source.quakec","patterns":[{"include":"#
|
|
1
|
+
{"name":"QuakeC","scopeName":"source.quakec","patterns":[{"include":"#comment"},{"include":"#directive"},{"include":"#command"},{"include":"#toplevel-declaration"}],"repository":{"block-comment":{"name":"comment.block.quakec","begin":"/\\*","end":"\\*/"},"builtin-literal":{"name":"constant.other.builtin.quakec","match":"#[0-9]+\\b"},"code-block":{"begin":"{","end":"}","patterns":[{"include":"#comment"},{"include":"#directive"},{"include":"#statement"}]},"command":{"name":"keyword.other.command.quakec","match":"\\$(cd|origin|base|skin|frame|scale)\\b"},"comment":{"patterns":[{"include":"#block-comment"},{"include":"#line-comment"}]},"ctl-keyword":{"name":"keyword.control.quakec","match":"\\b(if|else|while|do|for|break|continue|goto|return|switch|case|default)\\b"},"directive":{"patterns":[{"name":"meta.preprocessor","begin":"^\\s*#\\s*(if|ifdef|ifndef|elif|endif|else|define|undef|pragma|include|append|error|message)\\b","end":"([^\\\\]|^)\r?\n"}]},"expression":{"patterns":[{"include":"#literal"},{"include":"#operator"},{"include":"#code-block"}]},"line-comment":{"name":"comment.line.double-slash.quakec","begin":"//","end":"$"},"literal":{"patterns":[{"include":"#raw-string"},{"include":"#string-literal"},{"include":"#vector-literal"},{"include":"#builtin-literal"},{"include":"#number-literal"}]},"modifier":{"name":"storage.modifier.quakec","match":"\\b(local|const|static|__wrap)\\b"},"number-literal":{"patterns":[{"name":"constant.numeric.quakec","match":"\\b0x[0-9a-fA-F]+\\b"},{"name":"constant.numeric.quakec","match":"-?\\b[0-9]+\\.[0-9]+([eE]-?[0-9]+)?\\b"},{"name":"constant.numeric.quakec","match":"-?\\b[0-9]+(\\.|i)?"}]},"operator":{"patterns":[{"name":"keyword.operator.symbole.quakec","match":"(\u003e\u003e=|\u003c\u003c=|\u0026\u0026=|\\|\\|=)"},{"name":"keyword.operator.symbole.quakec","match":"(\u003e\u003c|\u003e=|\u003c=|==|!=|\u0026\u0026|\\|\\|~=|\u0026=|\\|=|\\^=|\\*=|/=|\\+=|-=|\\+\\+|--)"},{"name":"keyword.operator.symbole.quakec","match":"(\\.|!|~|\u0026|\\||\\^|\\*|%|/|\\+|-|\u003e|\u003c|=|\\?|:)"},{"name":"keyword.operator.new.quakec","match":"\\bnew\\b"}]},"primitive":{"name":"storage.type.quakec","match":"\\b(float|int|string|vector|entity|void|__variant)\\b"},"raw-string":{"name":"string.quoted.double","begin":"R\"(\\S*)\\(","end":"\\)\\1\""},"statement":{"patterns":[{"include":"#modifier"},{"include":"#type"},{"include":"#ctl-keyword"},{"patterns":[{"name":"support.function","match":"\\bprior\\b"}]},{"include":"#expression"}]},"string-literal":{"name":"string.quoted.double.quakec","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.quakec","match":"\\\\([\\\\\"'nrts0-9\\(=\\)\u003c\\-\u003e]|x[0-9a-fA-F][0-9a-fA-F])"}]},"toplevel-declaration":{"patterns":[{"include":"#type-declaration-keyword"},{"include":"#type"},{"include":"#modifier"},{"include":"#code-block"},{"include":"#expression"}]},"type":{"patterns":[{"include":"#primitive"}]},"type-declaration-keyword":{"name":"storage.type.quakec","match":"\\b(struct|class|enum|union|typedef)\\b"},"vector-literal":{"name":"string.quoted.single.quakec","begin":"'","end":"'"}}}
|
data/grammars/source.rascal.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"Rascal","scopeName":"source.rascal","patterns":[{"include":"#top_level"}],"repository":{"annotation":{"patterns":[{"name":"comment.block.annotation.rascal","begin":"(@[^ {]+)({)","end":"(})","beginCaptures":{"1":{"name":"storage.type.annotation.block.rascal"},"2":{"name":"punctuation.annotation-argument.begin.rascal"}},"endCaptures":{"1":{"name":"punctuation.annotation-argument.end.rascal"}}},{"name":"meta.annotation.inline.rascal","match":"(@[A-Za-z_0-9]+)","captures":{"1":{"name":"storage.type.annotation.inline.rascal"}}}]},"char_set":{"patterns":[{"name":"punctuation.other.lexicalcharset.rascal","begin":"\\[","end":"\\]","patterns":[{"include":"#string_escape"}]}]},"comment":{"patterns":[{"name":"comment.line.double-slash.rascal","match":"//.*$\\n?"},{"name":"comment.block.rascal","begin":"/\\*","end":"\\*/"}]},"regex":{"patterns":[{"name":"string.regexp.rascal","end":"/([dims]*)","patterns":[{"include":"#regex_escape"},{"include":"#string_interpolation"}],"endCaptures":{"1":{"name":"storage.modifier.regex.rascal"}}}]},"regex_escape":{"patterns":[{"name":"constant.character.escape.regex.rascal","match":"\\\\(/|\u003c|\u003e|\\\\)"}]},"string":{"patterns":[{"name":"string.quoted.single.rascal","begin":"'","end":"'","patterns":[{"include":"#string_escape"}]},{"name":"string.quoted.double.rascal","begin":"\"","end":"\"","patterns":[{"include":"#string_escape"},{"include":"#string_interpolation"}]},{"name":"string.interpolated.rascal","begin":"`","end":"`","patterns":[{"include":"#string_interpolation"},{"include":"#syntax_escape"}]}]},"string_escape":{"patterns":[{"name":"constant.character.escape.ordinary.rascal","match":"\\\\(\\\"|\\'|\u003c|\u003e|\\\\|[bnfrt])"},{"name":"constant.character.escape.unicode.rascal","match":"\\\\(u[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f] |U(0[0-9 A-F a-f]|10)[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f] |a[0-7][0-9A-Fa-f] )"}]},"string_interpolation":{"patterns":[{"name":"support.interpolated-string.rascal","begin":"(\u003c)","end":"(\u003e)","patterns":[{"include":"#top_level"}],"beginCaptures":{"1":{"name":"punctuation.interpolation.begin.rascal"}},"endCaptures":{"2":{"name":"punctuation.interpolation.end.rascal"}}}]},"syntax_escape":{"patterns":[{"name":"constant.character.escape.syntax.rascal","match":"\\\\(\\\\|\u003c|\u003e|`)"}]},"top_level":{"patterns":[{"name":"punctuation.other.syntactic.rascal","begin":"(lexical|syntax)\\s+([a-zA-Z][A-Za-z_0-9]*)","end":";","patterns":[{"include":"#char_set"},{"include":"#string"},{"include":"#comment"},{"include":"#regex"},{"include":"#annotation"}],"captures":{"1":{"name":"keyword.control.rascal"},"2":{"name":"entity.name.type.rascal"}}},{"name":"constant.numeric.decimal.rascal","match":"(?\u003c![A-Za-z_])(0(?![0-9a-z_A-Z])|[1-9][0-9]*(?![0-9a-z_A-Z]))"},{"name":"constant.numeric.hex.rascal","match":"(?\u003c![A-Za-z_])0[Xx][0-9A-Fa-f]+(?![0-9a-z_A-Z])"},{"name":"constant.numeric.octal.rascal","match":"(?\u003c![A-Za-z_])0[0-7]+(?![0-9a-z_A-Z])"},{"name":"string.other.datetime.rascal","begin":"\\\\$","end":"\\\\$"},{"name":"constant.numeric.real.rascal","match":"(?\u003c![A-Za-z_]) ([0-9]+[dDfF] |[0-9]+[eE][+\\-]?[0-9]+[dDfF]? |[0-9]+\\.(?!\\.)[0-9]*[dDfF]? |[0-9]+\\.[0-9]*[eE][+\\-]?[0-9]+[dDfF]? |\\.(?!\\.)[0-9]+[dDfF]? |\\.(?!\\.)[0-9]+[eE][+\\-]?[0-9]+[dDfF]? )"},{"name":"constant.language.bool.rascal","match":"\\b(true|false)\\b"},{"name":"constant.numeric.rational.rascal","match":"(?\u003c![A-Za-z_])([0-9][0-9]*r|[1-9][0-9]*r[0-9][0-9]*(?![0-9a-z_A-Z]))"},{"name":"keyword.control.rascal","match":"\\b(syntax|keyword|lexical|break|continue|finally|private|fail|filter|if|tag|extend|append|non-assoc|assoc|test|anno|layout|data|join|it|bracket|in|import|all|solve|try|catch|notin|else|insert|switch|return|case|while|throws|visit|for|assert|default|map|alias|any|module|mod|public|one|throw|start)\\b"},{"name":"support.type.basic.rascal","match":"\\b(value|loc|node|num|type|bag|int|rat|rel|lrel|real|tuple|str|bool|void|datetime|set|map|list)\\b"},{"include":"#string"},{"include":"#regex"},{"include":"#annotation"},{"include":"#comment"},{"name":"variable.other.ordinary.rascal","match":"\\b[a-zA-Z][A-Za-z_0-9]*\\b"},{"name":"variable.other.escaped-keyword.rascal","match":"\\\\(syntax|keyword|lexical|break|continue|finally|private|fail|filter|if|tag|extend|append|non-assoc|assoc|test|anno|layout|data|join|it|bracket|in|import|all|solve|try|catch|notin|else|insert|switch|return|case|while|throws|visit|for|assert|default|map|alias|any|module|mod|public|one|throw|start|value|loc|node|num|type|bag|int|rat|rel|lrel|real|tuple|str|bool|void|datetime|set|map|list)"},{"name":"string.other.url.rascal","match":"\\|([0-9a-z_A-Z.\\-_~:/?#\\[\\]@!$\u0026'()*+,;=`])+\\|","captures":{"1":{"name":"markup.underline.link.rascal"}}}]}}}
|
|
1
|
+
{"name":"Rascal","scopeName":"source.rascal","patterns":[{"include":"#top_level"}],"repository":{"annotation":{"patterns":[{"name":"comment.block.annotation.rascal","begin":"(@[^ {]+)({)","end":"(})","beginCaptures":{"1":{"name":"storage.type.annotation.block.rascal"},"2":{"name":"punctuation.annotation-argument.begin.rascal"}},"endCaptures":{"1":{"name":"punctuation.annotation-argument.end.rascal"}}},{"name":"meta.annotation.inline.rascal","match":"(@[A-Za-z_0-9]+)","captures":{"1":{"name":"storage.type.annotation.inline.rascal"}}}]},"char_set":{"patterns":[{"name":"punctuation.other.lexicalcharset.rascal","begin":"\\[","end":"\\]","patterns":[{"include":"#string_escape"}]}]},"comment":{"patterns":[{"name":"comment.line.double-slash.rascal","match":"//.*$\\n?"},{"name":"comment.block.rascal","begin":"/\\*","end":"\\*/"}]},"regex":{"patterns":[{"name":"string.regexp.rascal","begin":"/(?!/|\\*)","end":"/([dims]*)","patterns":[{"include":"#regex_escape"},{"include":"#string_interpolation"}],"endCaptures":{"1":{"name":"storage.modifier.regex.rascal"}}}]},"regex_escape":{"patterns":[{"name":"constant.character.escape.regex.rascal","match":"\\\\(/|\u003c|\u003e|\\\\)"}]},"string":{"patterns":[{"name":"string.quoted.single.rascal","begin":"'","end":"'","patterns":[{"include":"#string_escape"}]},{"name":"string.quoted.double.rascal","begin":"\"","end":"\"","patterns":[{"include":"#string_escape"},{"include":"#string_interpolation"}]},{"name":"string.interpolated.rascal","begin":"`","end":"`","patterns":[{"include":"#string_interpolation"},{"include":"#syntax_escape"}]}]},"string_escape":{"patterns":[{"name":"constant.character.escape.ordinary.rascal","match":"\\\\(\\\"|\\'|\u003c|\u003e|\\\\|[bnfrt])"},{"name":"constant.character.escape.unicode.rascal","match":"\\\\(u[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f] |U(0[0-9 A-F a-f]|10)[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f] |a[0-7][0-9A-Fa-f] )"}]},"string_interpolation":{"patterns":[{"name":"support.interpolated-string.rascal","begin":"(\u003c)","end":"(\u003e)","patterns":[{"include":"#top_level"}],"beginCaptures":{"1":{"name":"punctuation.interpolation.begin.rascal"}},"endCaptures":{"2":{"name":"punctuation.interpolation.end.rascal"}}}]},"syntax_escape":{"patterns":[{"name":"constant.character.escape.syntax.rascal","match":"\\\\(\\\\|\u003c|\u003e|`)"}]},"top_level":{"patterns":[{"name":"punctuation.other.syntactic.rascal","begin":"(lexical|syntax)\\s+([a-zA-Z][A-Za-z_0-9]*)","end":";","patterns":[{"include":"#char_set"},{"include":"#string"},{"include":"#comment"},{"include":"#regex"},{"include":"#annotation"}],"captures":{"1":{"name":"keyword.control.rascal"},"2":{"name":"entity.name.type.rascal"}}},{"name":"constant.numeric.decimal.rascal","match":"(?\u003c![A-Za-z_])(0(?![0-9a-z_A-Z])|[1-9][0-9]*(?![0-9a-z_A-Z]))"},{"name":"constant.numeric.hex.rascal","match":"(?\u003c![A-Za-z_])0[Xx][0-9A-Fa-f]+(?![0-9a-z_A-Z])"},{"name":"constant.numeric.octal.rascal","match":"(?\u003c![A-Za-z_])0[0-7]+(?![0-9a-z_A-Z])"},{"name":"string.other.datetime.rascal","begin":"\\\\$","end":"\\\\$"},{"name":"constant.numeric.real.rascal","match":"(?\u003c![A-Za-z_]) ([0-9]+[dDfF] |[0-9]+[eE][+\\-]?[0-9]+[dDfF]? |[0-9]+\\.(?!\\.)[0-9]*[dDfF]? |[0-9]+\\.[0-9]*[eE][+\\-]?[0-9]+[dDfF]? |\\.(?!\\.)[0-9]+[dDfF]? |\\.(?!\\.)[0-9]+[eE][+\\-]?[0-9]+[dDfF]? )"},{"name":"constant.language.bool.rascal","match":"\\b(true|false)\\b"},{"name":"constant.numeric.rational.rascal","match":"(?\u003c![A-Za-z_])([0-9][0-9]*r|[1-9][0-9]*r[0-9][0-9]*(?![0-9a-z_A-Z]))"},{"name":"keyword.control.rascal","match":"\\b(syntax|keyword|lexical|break|continue|finally|private|fail|filter|if|tag|extend|append|non-assoc|assoc|test|anno|layout|data|join|it|bracket|in|import|all|solve|try|catch|notin|else|insert|switch|return|case|while|throws|visit|for|assert|default|map|alias|any|module|mod|public|one|throw|start)\\b"},{"name":"support.type.basic.rascal","match":"\\b(value|loc|node|num|type|bag|int|rat|rel|lrel|real|tuple|str|bool|void|datetime|set|map|list)\\b"},{"include":"#string"},{"include":"#regex"},{"include":"#annotation"},{"include":"#comment"},{"name":"variable.other.ordinary.rascal","match":"\\b[a-zA-Z][A-Za-z_0-9]*\\b"},{"name":"variable.other.escaped-keyword.rascal","match":"\\\\(syntax|keyword|lexical|break|continue|finally|private|fail|filter|if|tag|extend|append|non-assoc|assoc|test|anno|layout|data|join|it|bracket|in|import|all|solve|try|catch|notin|else|insert|switch|return|case|while|throws|visit|for|assert|default|map|alias|any|module|mod|public|one|throw|start|value|loc|node|num|type|bag|int|rat|rel|lrel|real|tuple|str|bool|void|datetime|set|map|list)"},{"name":"string.other.url.rascal","match":"\\|([0-9a-z_A-Z.\\-_~:/?#\\[\\]@!$\u0026'()*+,;=`])+\\|","captures":{"1":{"name":"markup.underline.link.rascal"}}}]}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"RAScript","scopeName":"source.rascript","patterns":[{"include":"#statements"}],"repository":{"booleans":{"patterns":[{"name":"constant.language.boolean.rascript","match":"\\b(true|false)\\b"}]},"class-definitions":{"patterns":[{"match":"(\\bclass\\b)[\\t ]*(([a-zA-Z_][\\w]*)|(.+))","captures":{"1":{"name":"keyword.class.rascript"},"3":{"name":"entity.name.class.rascript"},"4":{"name":"invalid.illegal.identifier.rascript"}}}]},"comments":{"patterns":[{"name":"comment.block.rascript","begin":"/\\*","end":"\\*/","captures":{"0":{"name":"punctuation.definition.comment.block.rascript"}}},{"name":"comment.line.double-slash.rascript","begin":"//","end":"$","beginCaptures":{"0":{"name":"punctuation.definition.comment.single.rascript"}}}]},"controls":{"patterns":[{"name":"keyword.control.rascript","match":"\\b(if|else|for|in|return)\\b"}]},"function-definitions":{"patterns":[{"begin":"(\\bfunction\\b)[\\t ]*(([a-zA-Z_][\\w]*)|(.+))\\(","end":"\\)","patterns":[{"name":"invalid.illegal.identifier.rascript","match":"(?:[\\w]+\\s+[\\w]+)"},{"name":"invalid.illegal.identifier.rascript","match":"(?:[^\\s\\,!]*[\\%\\!\\@\\#\\$\\%\\^\\\u0026\\*\\-\\=\\+\\[\\]\\{\\}\\;\\:\\'\"\\.\\\u003c\\\u003e\\/\\?]+[^\\s\\,]*)"},{"name":"variable.parameter.rascript","match":"(?:[a-zA-Z_][\\w]*)"},{"name":"invalid.illegal.identifier.rascript","match":"(?:\\w+)"}],"beginCaptures":{"1":{"name":"keyword.function.rascript"},"3":{"name":"entity.name.function.rascript"},"4":{"name":"invalid.illegal.identifier.rascript"}}}]},"function-names":{"patterns":[{"match":"(([0-9][\\w+]*)|(\\w+))\\(","captures":{"2":{"name":"invalid.illegal.identifier.rascript"},"3":{"name":"entity.name.function.rascript"}}}]},"header":{"patterns":[{"name":"comment.line.double-slash.rascript","match":"^//\\s*(#ID)\\s*=\\s*(\\d+)$","captures":{"1":{"name":"keyword.other.id.rascript"},"2":{"name":"constant.numeric.id.rascript"}}},{"name":"comment.line.double-slash.rascript","match":"^//\\s*(#MinimumVersion)\\s*=\\s*(\\d+(\\.\\d)?)$","captures":{"1":{"name":"keyword.other.version.rascript"},"2":{"name":"constant.numeric.version.rascript"}}}]},"numbers":{"patterns":[{"name":"constant.numeric.decimal.rascript","match":"\\b[0-9]+\\b"},{"name":"constant.numeric.hexadecimal.rascript","match":"(?i)\\$\\b[[:xdigit:]]+\\b|\\b0x[[:xdigit:]]+\\b"}]},"statements":{"patterns":[{"include":"#controls"},{"include":"#booleans"},{"include":"#strings"},{"include":"#numbers"},{"include":"#class-definitions"},{"include":"#function-definitions"},{"include":"#function-names"},{"include":"#header"},{"include":"#comments"},{"include":"#variable-language-this"},{"include":"#variable-assignment"},{"include":"#variable-other"}]},"strings":{"patterns":[{"name":"string.quoted.double.rascript","match":"(?:\".*?\")"}]},"variable-assignment":{"patterns":[{"match":"([a-zA-Z_][\\w]*)[\\t ]*=","captures":{"1":{"name":"variable.other.assignment.rascript"}}}]},"variable-language-this":{"patterns":[{"name":"variable.language.this.rascript","match":"\\b(this)\\b"}]},"variable-other":{"patterns":[{"match":"([a-zA-Z_][\\w]*)","captures":{"1":{"name":"variable.other.rascript"}}}]}}}
|