github-linguist 7.22.1 → 7.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/github-linguist +13 -3
- data/grammars/etc.json +1 -1
- data/grammars/hidden.manref.json +1 -1
- data/grammars/inline.graphql.json +1 -0
- data/grammars/inline.graphql.php.json +1 -0
- data/grammars/inline.graphql.python.json +1 -0
- data/grammars/inline.graphql.re.json +1 -0
- data/grammars/inline.graphql.res.json +1 -0
- data/grammars/inline.prisma.json +1 -1
- data/grammars/liquid.injection.json +1 -1
- data/grammars/markdown.graphql.codeblock.json +1 -0
- data/grammars/markdown.rescript.codeblock.json +1 -0
- data/grammars/source.abapcds.json +1 -1
- data/grammars/source.astro.json +1 -1
- data/grammars/source.ats.json +1 -1
- data/grammars/source.bicep.json +1 -1
- data/grammars/source.brs.json +1 -1
- data/grammars/source.cairo.json +1 -1
- data/grammars/source.cl.json +1 -1
- data/grammars/source.cobol.json +1 -1
- data/grammars/source.context.json +1 -0
- data/grammars/source.cs.json +1 -1
- data/grammars/source.csswg.json +1 -1
- data/grammars/source.curry.json +1 -1
- data/grammars/source.cypher.json +1 -0
- data/grammars/source.dart.json +1 -1
- data/grammars/source.data-weave.json +1 -1
- data/grammars/source.denizenscript.json +1 -1
- data/grammars/source.ditroff.json +1 -1
- data/grammars/source.editorconfig.json +1 -1
- data/grammars/source.elvish-transcript.json +1 -0
- data/grammars/source.elvish.in.markdown.json +1 -0
- data/grammars/source.elvish.json +1 -0
- data/grammars/source.fsharp.json +1 -1
- data/grammars/source.ftl.json +1 -1
- data/grammars/source.gcode.json +1 -1
- data/grammars/source.gdscript.json +1 -1
- data/grammars/source.gdshader.json +1 -1
- data/grammars/source.gemini.json +1 -0
- data/grammars/source.graphql.json +1 -1
- data/grammars/source.hack.json +1 -1
- data/grammars/source.hocon.json +1 -0
- data/grammars/source.httpspec.json +1 -1
- data/grammars/source.imba.json +1 -0
- data/grammars/source.ink.json +1 -0
- data/grammars/source.jsonnet.json +1 -1
- data/grammars/source.julia.json +1 -1
- data/grammars/source.just.json +1 -0
- data/grammars/source.kusto.json +1 -1
- data/grammars/source.llvm.json +1 -1
- data/grammars/source.man-conf.json +1 -1
- data/grammars/source.mermaid.c4c-diagram.json +1 -0
- data/grammars/source.mermaid.class-diagram.json +1 -0
- data/grammars/source.mermaid.er-diagram.json +1 -0
- data/grammars/source.mermaid.flowchart.json +1 -0
- data/grammars/source.mermaid.gantt.json +1 -0
- data/grammars/source.mermaid.gitgraph.json +1 -0
- data/grammars/source.mermaid.json +1 -0
- data/grammars/source.mermaid.pie-chart.json +1 -0
- data/grammars/source.mermaid.requirement-diagram.json +1 -0
- data/grammars/source.mermaid.sequence-diagram.json +1 -0
- data/grammars/source.mermaid.state-diagram.json +1 -0
- data/grammars/source.mermaid.user-journey.json +1 -0
- data/grammars/source.mo.json +1 -1
- data/grammars/source.move.json +1 -1
- data/grammars/source.opts.json +1 -1
- data/grammars/source.p4.json +1 -1
- data/grammars/source.pddl.happenings.json +1 -0
- data/grammars/source.pddl.json +1 -0
- data/grammars/source.pddl.plan.json +1 -0
- data/grammars/source.pic.json +1 -1
- data/grammars/source.polar.json +1 -0
- data/grammars/source.postscript.json +1 -1
- data/grammars/source.python.json +1 -1
- data/grammars/source.ql.json +1 -1
- data/grammars/source.rescript.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.rsc.json +1 -1
- data/grammars/source.scala.json +1 -1
- data/grammars/source.scenic.json +1 -0
- data/grammars/source.sexp.json +1 -0
- data/grammars/source.sfv.json +1 -0
- data/grammars/source.smithy.json +1 -0
- data/grammars/source.sqf.json +1 -1
- data/grammars/source.stan.json +1 -1
- data/grammars/source.svelte.json +1 -1
- data/grammars/source.toc.json +1 -1
- data/grammars/source.ts.json +1 -1
- data/grammars/source.ts.prismaClientRawSQL.json +1 -0
- data/grammars/source.tsx.json +1 -1
- data/grammars/source.v.json +1 -1
- data/grammars/source.xojo.json +1 -1
- data/grammars/source.yara.json +1 -1
- data/grammars/text.adblock.json +1 -0
- data/grammars/text.checksums.json +1 -1
- data/grammars/text.grammarkdown.json +1 -0
- data/grammars/text.html.ecmarkup.json +1 -0
- data/grammars/text.html.liquid.json +1 -1
- data/grammars/text.html.statamic.json +1 -1
- data/grammars/text.info.json +1 -1
- data/grammars/text.marko.json +1 -1
- data/grammars/text.restructuredtext.json +1 -1
- data/grammars/text.roff.json +1 -1
- data/grammars/text.texinfo.json +1 -1
- data/grammars/text.youtube.json +1 -0
- data/grammars/version +1 -1
- data/lib/linguist/VERSION +1 -1
- data/lib/linguist/generated.rb +32 -3
- data/lib/linguist/generic.yml +1 -0
- data/lib/linguist/heuristics.yml +86 -4
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +264 -5
- data/lib/linguist/samples.json +1 -1
- data/lib/linguist/vendor.yml +0 -1
- metadata +45 -3
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.class-diagram","patterns":[{"include":"#main"}],"repository":{"annotation":{"name":"meta.annotation.mermaid","contentName":"entity.name.tag.annotation.mermaid","begin":"(\u003c\u003c)","end":"(\u003e\u003e)","beginCaptures":{"0":{"name":"punctuation.definition.annotation.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark"}},"endCaptures":{"0":{"name":"punctuation.definition.annotation.end.mermaid"},"1":{"name":"sublimelinter.gutter-mark"}}},"annotation-statement":{"name":"meta.annotation.statement.mermaid","match":"^\\s*(\u003c\u003c.*?\u003e\u003e)(?:\\s+((?=[a-zA-Z])\\w+)(?=\\s*(?:$|[^{}\\s])))?","captures":{"1":{"patterns":[{"include":"#annotation"}]},"2":{"name":"entity.name.type.class.mermaid"}}},"cardinality":{"name":"string.quoted.double.cardinality.mermaid","begin":"\"","end":"\"","patterns":[{"name":"constant.language.variable-amount.mermaid","match":"\\*"},{"name":"constant.language.range.mermaid","match":"\\.\\."}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.mermaid"}}},"class":{"patterns":[{"name":"meta.class.definition.mermaid","begin":"(?x) ^\n\\s* (class)\n\\s+ ((?=[a-zA-Z])\\w+)\n(?:\\s* (~\\w+~))?\n(?:\\s* (:::) \\s* ([^\\s{}]+))?\n\\s* ({)","end":"}","patterns":[{"include":"source.mermaid#comment"},{"include":"#annotation"},{"include":"#member"}],"beginCaptures":{"1":{"name":"storage.type.class.mermaid"},"2":{"name":"entity.name.type.class.mermaid"},"3":{"patterns":[{"include":"#generic"}]},"4":{"name":"keyword.operator.css-class.mermaid"},"5":{"name":"constant.language.css-class.mermaid"},"6":{"patterns":[{"include":"source.mermaid#brace"}]}},"endCaptures":{"0":{"patterns":[{"include":"source.mermaid#brace"}]}}},{"name":"meta.class.statement.mermaid","match":"(?x) ^\n\\s* (class)\n\\s+ ((?=[a-zA-Z])\\w+(?:\\s+\\S.+?)?)\n(?: \\s* (~\\w+~))?\n(?: \\s* (:::) \\s* ([^\\s{}]+))?\n(?= \\s*)","captures":{"1":{"name":"storage.type.class.mermaid"},"2":{"name":"entity.name.type.class.mermaid"},"3":{"patterns":[{"include":"#generic"}]},"4":{"name":"keyword.operator.css-class.mermaid"},"5":{"name":"constant.language.css-class.mermaid"}}}]},"classifier":{"patterns":[{"name":"storage.modifier.classifier.abstract.mermaid","match":"\\*","captures":{"0":{"name":"sublimelinter.gutter-mark"}}},{"name":"storage.modifier.classifier.static.mermaid","match":"\\$","captures":{"0":{"name":"sublimelinter.gutter-mark"}}}]},"generic":{"name":"meta.generic.mermaid","contentName":"entity.name.tag.type.mermaid","begin":"(?:^|\\G)\\s*((~))","end":"(~)","beginCaptures":{"1":{"name":"punctuation.definition.type.begin.mermaid"},"2":{"name":"sublimelinter.gutter-mark"}},"endCaptures":{"0":{"name":"punctuation.definition.type.end.mermaid"},"1":{"name":"sublimelinter.gutter-mark"}}},"interaction":{"name":"meta.$1-handler.mermaid","begin":"^\\s*(link|callback)(?=$|\\s)","end":"(?!\\G)","patterns":[{"begin":"(?\u003c=link)\\G","end":"(?=\\s*$)","patterns":[{"name":"entity.name.tag.node.mermaid","begin":"\\G\\s+((?=[a-zA-Z])\\w+)","end":"\\s+(\"[^\"]*\")","beginCaptures":{"1":{"name":"entity.name.tag.node.mermaid"}},"endCaptures":{"1":{"patterns":[{"include":"source.mermaid.flowchart#url"}]}}},{"include":"source.mermaid.flowchart#tooltip"}]},{"begin":"(?\u003c=callback)\\G","end":"(?=\\s*$)","patterns":[{"name":"entity.name.tag.node.mermaid","begin":"\\G\\s+((?=[a-zA-Z])\\w+)","end":"\\s+((\")[^\"]*(\"))","beginCaptures":{"1":{"name":"entity.name.tag.node.mermaid"}},"endCaptures":{"1":{"name":"string.quoted.double.callback-name.mermaid"},"2":{"name":"punctuation.definition.string.begin.mermaid"},"3":{"name":"punctuation.definition.string.end.mermaid"}}},{"include":"source.mermaid.flowchart#tooltip"}]}],"beginCaptures":{"1":{"name":"storage.type.$1-assignment.mermaid"}}},"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"source.mermaid#direction"},{"include":"#annotation-statement"},{"include":"#relation"},{"include":"#class"},{"include":"#member-statement"},{"include":"#interaction"},{"include":"source.mermaid.flowchart#click"}]},"member":{"patterns":[{"name":"meta.member.method.mermaid","begin":"([-+#~]\\s*|(?![-+#~]))(?!})([^\\s\\(]+)(?=\\()","end":"(?\u003c=\\))(?:\\s*([*$]))?(?:\\s+(\\S+?)(\\s*~[^~]+~\\s*)?)?(?=$|\\s)","patterns":[{"include":"#params"}],"beginCaptures":{"1":{"patterns":[{"include":"#visibility"}]},"2":{"name":"entity.name.function.member.method.mermaid"}},"endCaptures":{"1":{"patterns":[{"include":"#classifier"}]},"2":{"name":"storage.type.return-value.mermaid"},"3":{"patterns":[{"include":"#generic"}]}}},{"name":"meta.member.attribute.mermaid","begin":"([-+#~]\\s*|(?![-+#~]))(?!})([^\\s\\(]+?)(\\s*~[^~]+~\\s*)?(?=$|\\s)","end":"\\S+|(?=\\s*$)","beginCaptures":{"1":{"patterns":[{"include":"#visibility"}]},"2":{"name":"storage.type.attribute.mermaid"},"3":{"patterns":[{"include":"#generic"}]}},"endCaptures":{"0":{"name":"entity.name.member.mermaid"}}}]},"member-statement":{"name":"meta.member.statement.mermaid","begin":"^\\s*((?=[a-zA-Z])\\w+)\\s*(:)[ \\t]*","end":"(?!\\G)","patterns":[{"include":"#member"}],"beginCaptures":{"1":{"name":"entity.name.type.class.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}},"applyEndPatternLast":true},"params":{"name":"meta.parameters.mermaid","begin":"\\G\\(","end":"\\)","patterns":[{"match":"(?:([^\\s(),]+?)(\\s*~[^~]+~)?\\s+)?([^\\s(),]+)","captures":{"1":{"name":"storage.type.parameter.mermaid"},"2":{"patterns":[{"include":"#generic"}]},"3":{"name":"variable.function.parameter.mermaid"}}},{"include":"source.mermaid#comma"}],"beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.parameters.end.mermaid"}}},"relation":{"name":"meta.relation.mermaid","begin":"(?x)\n# First operand\n(?:\n\t((?=[a-zA-Z])\\w+) # Name\n\t(?:\\s+(\"[^\"]*\"))? # Cardinality\n\t\\s*\n)?\n\n# Link operator\n(?:\n\t# (Possibly asymmetrical) two-way relation\n\t((?:[*o]|\u003c\\|?)(?:--|\\.\\.)(?:[*o]|\\|?\u003e))\n\t\n\t# One-way relations\n\t| (--\\|\u003e | \u003c\\|--) # Inheritance\n\t| (--\\* | \\*--) # Composition\n\t| (--o | o--) # Aggregation\n\t| (--\u003e | \u003c--) # Association\n\t| (\\.{2}\\|\u003e | \u003c\\|\\.{2}) # Realisation\n\t| (\\.{2}\u003e | \u003c\\.{2}) # Dependency\n\t| (\\.{2}) # Link, dashed\n\t| (--) # Link, solid\n)\n\n# Second operand\n(?:\n\t\\s*\n\t(?:(\"[^\"]*\")\\s+)? # Cardinality\n\t((?=[a-zA-Z])\\w+) # Name\n)?","end":"(?!\\G)","patterns":[{"name":"meta.label.mermaid","contentName":"string.unquoted.relation-text.mermaid","begin":"\\G\\s*(:)[ \\t]*","end":"(?=\\s*$)","beginCaptures":{"1":{"patterns":[{"include":"source.mermaid#colon"}]}}}],"beginCaptures":{"1":{"name":"entity.name.type.class.first.mermaid"},"10":{"name":"keyword.operator.relation.dependency.mermaid"},"11":{"name":"keyword.operator.relation.link.dashed.mermaid"},"12":{"patterns":[{"include":"#cardinality"}]},"13":{"name":"entity.name.type.class.second.mermaid"},"2":{"patterns":[{"include":"#cardinality"}]},"3":{"name":"keyword.operator.relation.two-way.mermaid"},"4":{"name":"keyword.operator.relation.inheritance.mermaid"},"5":{"name":"keyword.operator.relation.composition.mermaid"},"6":{"name":"keyword.operator.relation.aggregation.mermaid"},"7":{"name":"keyword.operator.relation.association.mermaid"},"8":{"name":"keyword.operator.relation.link.solid.mermaid"},"9":{"name":"keyword.operator.relation.realisation.mermaid"}}},"visibility":{"patterns":[{"name":"storage.modifier.visibility.public.mermaid","match":"\\+","captures":{"0":{"name":"sublimelinter.gutter-mark"}}},{"name":"storage.modifier.visibility.private.mermaid","match":"-","captures":{"0":{"name":"sublimelinter.gutter-mark"}}},{"name":"storage.modifier.visibility.protected.mermaid","match":"#","captures":{"0":{"name":"sublimelinter.gutter-mark"}}},{"name":"storage.modifier.visibility.internal.mermaid","match":"~","captures":{"0":{"name":"sublimelinter.gutter-mark"}}}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.er-diagram","patterns":[{"include":"#main"}],"repository":{"attribute":{"name":"meta.attribute.mermaid","match":"(?x)\n((?=[a-zA-Z])[-\\w]+) # Attribute type\n\\s+\n((?=[a-zA-Z])[-\\w]+) # Attribute name\n(?:\\s+ (PK|FK))? # Primary/foreign key\n(?:\\s* (\"[^\"]*\"))? # Comment","captures":{"1":{"name":"storage.type.attribute.mermaid"},"2":{"name":"entity.name.attribute.mermaid"},"3":{"name":"constant.language.other.key-type.mermaid"},"4":{"patterns":[{"include":"#string"}]}}},"attributes":{"name":"meta.attributes.mermaid","begin":"((?=[a-zA-Z])[-\\w]+)\\s*({)","end":"}","patterns":[{"include":"#attribute"},{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"}],"beginCaptures":{"1":{"name":"entity.name.assignee.mermaid"},"2":{"patterns":[{"include":"source.mermaid#brace"}]}},"endCaptures":{"0":{"patterns":[{"include":"source.mermaid#brace"}]}}},"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"#attributes"},{"include":"#relationship"}]},"relationship":{"name":"meta.relationship.mermaid","match":"(?x)\n((?=[a-zA-Z])[-\\w]+) # Entity 1\n\n(?:\n\t\\s*\n\t# Cardinality configuration thingie\n\t(\n\t\t# Entity 1's cardinality\n\t\t(?: \\|o # Zero or one\n\t\t| \\|\\| # Exactly one\n\t\t| }o # Zero or more\n\t\t| }\\| # One or more\n\t\t)\n\t\t\n\t\t# Stroke style\n\t\t(?: -- # Solid\n\t\t| \\.\\. # Dashed\n\t\t)\n\t\t\n\t\t# Entity 2's cardinality\n\t\t(?: o\\| # Zero or one\n\t\t| \\|\\| # Exactly one\n\t\t| o{ # Zero or more\n\t\t| \\|{ # One or more\n\t\t)\n\t)\n\t\\s*\n\t((?=[a-zA-Z])[-\\w]+) # Entity 2\n\t\n\t# Relationship label\n\t\\s* (:) \\s*\n\t(?: (\"[^\"]*\") # Quoted\n\t| ((?=[a-zA-Z])[-\\w]+) # Unquoted\n\t| ((?:[^\\s%]|%(?!%))+) # Invalid\n\t)?\n)?","captures":{"1":{"name":"entity.name.operand.first.mermaid"},"2":{"name":"keyword.operator.cardinality.mermaid"},"3":{"name":"entity.name.operand.second.mermaid"},"4":{"patterns":[{"include":"source.mermaid#colon"}]},"5":{"patterns":[{"include":"#string"}]},"6":{"name":"string.unquoted.label-text.mermaid"},"7":{"name":"invalid.illegal.unexpected-characters.mermaid"}}},"string":{"name":"string.quoted.double.label-text.mermaid","begin":"\"","end":"\"","patterns":[{"include":"source.mermaid#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.mermaid"}}}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.flowchart","patterns":[{"include":"#main"}],"repository":{"class":{"name":"meta.class.statement.mermaid","begin":"(?:\\G|^|(?\u003c=\\s|;|%%))class(?=$|\\s|;)","end":"([\\w$\u0026]+)?[ \\t]*(?=$|;)","patterns":[{"name":"entity.name.tag.node.mermaid","match":"([\\w$\u0026]+)(?=$|\\s|;|,)"},{"include":"#comma"}],"beginCaptures":{"0":{"name":"storage.type.style-assignment.mermaid"}},"endCaptures":{"1":{"name":"entity.name.class.mermaid"}}},"click":{"name":"meta.click.statement.mermaid","begin":"(?:\\G|^|(?\u003c=\\s|;|%%))(click)(?=$|\\s|;)(?:\\s+([\\w$\u0026]+))?","end":"[ \\t]*$|(?=;)","patterns":[{"include":"#click-href"},{"include":"#click-call"}],"beginCaptures":{"1":{"name":"storage.type.interactive-command.mermaid"},"2":{"name":"entity.name.tag.node.mermaid"}}},"click-call":{"name":"meta.callback-assignment.mermaid","begin":"\\G\\s+(?:(call)(?=$|\\s|;)[ \\t]*|(?=[^\\s\\(%;\"']))","end":"[ \\t]*$|(?=;)","patterns":[{"name":"meta.callback-reference.mermaid","begin":"\\G[^\\s\\(%;\"']+","end":"(?!\\G)|(?=[ \\t]*(?:$|;))","patterns":[{"name":"meta.callback-arguments.mermaid","begin":"\\G\\(","end":"\\)","patterns":[{"name":"variable.parameter.function.mermaid","match":"[^\\s,\\)%;]+"},{"include":"#comma"}],"beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.parameters.end.mermaid"}}}],"beginCaptures":{"0":{"name":"entity.name.function.callback.mermaid"}}},{"include":"#tooltip"}],"beginCaptures":{"1":{"name":"storage.modifier.callback-assignment.mermaid"}}},"click-href":{"name":"meta.link-assignment.mermaid","begin":"\\G\\s+(?:(href)(?=$|\\s|;)[ \\t]*|(?=[\"']))","end":"[ \\t]*$|(?=;)","patterns":[{"begin":"\\G(?=\"|')","end":"(?!\\G)","patterns":[{"include":"#url"}]},{"include":"#tooltip"},{"include":"#target-name"}],"beginCaptures":{"1":{"name":"storage.modifier.link-assignment.mermaid"}}},"link":{"patterns":[{"name":"meta.labelled-link.delimited.mermaid","contentName":"string.quoted.other.link-label.mermaid","begin":"([xo\u003c]?(?:--+[-xo\u003e]|==+[=xo\u003e]|-?\\.+-[xo\u003e]?))\\s*(\\|)[ \\t]*","end":"\\s*(\\|)","beginCaptures":{"1":{"patterns":[{"include":"#link"}]},"2":{"name":"keyword.operator.link-label.begin.mermaid"}},"endCaptures":{"1":{"name":"keyword.operator.link-label.end.mermaid"}}},{"name":"keyword.operator.link.thin.mermaid","match":"[xo\u003c]?--+[-xo\u003e]"},{"name":"keyword.operator.link.thick.mermaid","match":"[xo\u003c]?==+[=xo\u003e]"},{"name":"keyword.operator.link.dotted.mermaid","match":"[xo\u003c]?-?\\.+-[xo\u003e]?"},{"name":"meta.labelled-link.mermaid","contentName":"string.unquoted.link-label.mermaid","begin":"([xo\u003c]?--)[ \\t]*","end":"\\s*([xo\u003c]?--+[-xo\u003e])","beginCaptures":{"1":{"name":"keyword.operator.link.thin.begin.mermaid"}},"endCaptures":{"1":{"name":"keyword.operator.link.thin.end.mermaid"}}},{"name":"meta.link.thick.labelled.unpiped.mermaid","contentName":"string.unquoted.link-label.mermaid","begin":"([xo\u003c]?==)[ \\t]*","end":"\\s*([xo\u003c]?==+[=xo\u003e])","beginCaptures":{"1":{"name":"keyword.operator.link.thick.begin.mermaid"}},"endCaptures":{"1":{"name":"keyword.operator.link.thick.end.mermaid"}}},{"name":"meta.link.dotted.labelled.unpiped.mermaid","contentName":"string.unquoted.link-label.mermaid","begin":"([xo\u003c]?-\\.)[ \\t]*","end":"\\s*([xo\u003c]?-?\\.+-[xo\u003e]?)","beginCaptures":{"1":{"name":"keyword.operator.link.dotted.begin.mermaid"}},"endCaptures":{"1":{"name":"keyword.operator.link.dotted.end.mermaid"}}}]},"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"#style"},{"include":"#class"},{"include":"#click"},{"include":"#link"},{"include":"#subgraph"},{"include":"#node"},{"include":"source.mermaid#terminator"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"}]},"node":{"name":"meta.node.statement.mermaid","begin":"[\\w$\u0026]+","end":"(?!\\G)|(?=\\s*(?:$|;))","patterns":[{"name":"string.unquoted.node-text.polygon.mermaid","begin":"\\G(\\[[/\\\\])","end":"(([\\\\/]\\]))|((?:[^\\r\\n\\]]|(?\u003c![\\\\/])\\])++)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.stadium.mermaid","begin":"\\G(\\(\\[)","end":"((\\]\\)))|((?:[^\\r\\n)]|(?\u003c!\\])\\))++)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.cylinder.mermaid","begin":"\\G(\\[\\()","end":"((\\)\\]))|((?:[^\\r\\n)]|\\)(?!\\]))++)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.subroutine.mermaid","begin":"\\G(\\[\\[)","end":"((\\]\\]))|((?:[^\\r\\n\\]]|(?\u003c!\\])\\])++)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.rectangle-with-props.mermaid","begin":"\\G((\\[\\|))([A-Za-z]+)((:))([A-Za-z]+)((\\|))(?!\\])","end":"((\\|\\]))|((?:[^\\r\\n\\]]|(?\u003c!\\|)\\])++)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"1":{"name":"punctuation.definition.string.begin.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"entity.other.attribute-name.class.mermaid"},"4":{"name":"punctuation.separator.key-value.colon.mermaid"},"5":{"name":"sublimelinter.gutter-mark.mermaid"},"6":{"name":"constant.other.attribute-value.mermaid"},"7":{"name":"punctuation.separator.pipe.mermaid"},"8":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.square.mermaid","begin":"\\G(\\[)","end":"((\\]))|([^\\r\\n\\]]+)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.double-circle.mermaid","begin":"\\G(\\({3})","end":"((\\){3}))|((?:[^\\r\\n)]|(?\u003c!\\)\\))\\))++)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.circle.mermaid","begin":"\\G(\\({2})","end":"((\\){2}))|((?:(?\u003c!\\))\\)(?!\\))|[^\\r\\n)])++)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.ellipse.mermaid","begin":"\\G(\\(-)","end":"((-\\)))|((?:[^-\\r\\n)]|-(?!\\)))++)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.round.mermaid","begin":"\\G(\\()","end":"((\\)))|([^\\r\\n)]+)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.hexagon.mermaid","begin":"\\G({{)","end":"((}}))|((?:[^\\r\\n}]|}(?!}))++)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.diamond.mermaid","begin":"\\G({)","end":"((}))|([^\\r\\n}]+)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"name":"string.unquoted.node-text.ribbon.mermaid","begin":"\\G(\u003e)","end":"((\\]))|([^\\r\\n\\]]+)$","patterns":[{"include":"#node-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"sublimelinter.gutter-mark.mermaid"},"3":{"name":"invalid.illegal.unclosed-string.mermaid","patterns":[{"include":"#br"}]}}},{"match":"(?\u003c=\\S)(:::)(?:(?:(default)|([\\w$\u0026]+))(?:\\b|(?\u003c=[$\u0026])))?","captures":{"1":{"name":"keyword.operator.node-class.mermaid"},"2":{"name":"constant.language.default-styling.mermaid"},"3":{"name":"entity.name.class.mermaid"}}},{"match":"\\s+(\u0026)(?:$|[ \\t]+)","captures":{"1":{"name":"keyword.operator.logical.and.mermaid"}}},{"include":"#link"}],"beginCaptures":{"0":{"name":"entity.name.tag.node.mermaid"}},"applyEndPatternLast":true},"node-innards":{"patterns":[{"name":"string.quoted.double.mermaid","begin":"\\G\"","end":"(\")|([^\"]+)$","patterns":[{"include":"#br"},{"include":"#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"invalid.illegal.unclosed-string.mermaid"}}},{"name":"string.quoted.single.mermaid","begin":"\\G'","end":"(')|([^']+)$","patterns":[{"include":"#br"},{"include":"#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"invalid.illegal.unclosed-string.mermaid"}}},{"include":"#br"},{"include":"#entity"}]},"style":{"name":"meta.$1.statement.mermaid","begin":"(?:\\G|^|(?\u003c=\\s|;|%%))(style|classDef|linkStyle)(?=$|\\s|;)","end":"[ \\t]*$|(?=;)","patterns":[{"match":"(?\u003c=style)\\G\\s+([\\w$\u0026]+)","captures":{"1":{"name":"entity.name.tag.node.mermaid"}}},{"match":"(?\u003c=classDef)\\G\\s+(?:(default)|([\\w$\u0026]+))(?:\\b|(?\u003c=[$\u0026]))","captures":{"1":{"name":"constant.language.default-styling.mermaid"},"2":{"name":"entity.name.class.mermaid"}}},{"match":"(?\u003c=linkStyle)\\G\\s+(?:(default)|([,\\d]+))(?:\\s+(interpolate)\\s+([\\w$\u0026]+))?(?=$|\\s|;)","captures":{"1":{"name":"constant.language.default-styling.mermaid"},"2":{"name":"meta.link-indexes.mermaid","patterns":[{"name":"constant.numeric.integer.link-index.mermaid","match":"\\d+"},{"include":"#comma"}]},"3":{"name":"keyword.operator.interpolation-type.mermaid"},"4":{"name":"support.constant.interpolation-type.mermaid"}}},{"include":"source.mermaid#inline-css"}],"beginCaptures":{"0":{"name":"storage.type.style-definition.mermaid"}}},"subgraph":{"name":"meta.subgraph.mermaid","begin":"(?:\\G|^|(?\u003c=\\s|;|%%))subgraph(?=$|\\s|;)","end":"(?:\\G|^|(?\u003c=\\s|;|%%))end(?=$|\\s|;)","patterns":[{"begin":"\\G\\s+([\\w$\u0026]+)[ \\t]*","end":"(?!\\G)|(?=[ \\t]*(?:$|;))","patterns":[{"name":"string.unquoted.subgraph-title.mermaid","begin":"\\G(\\[)","end":"(\\])","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.mermaid"},"1":{"name":"sublimelinter.gutter-mark.mermaid"}}}],"beginCaptures":{"1":{"name":"entity.name.subgraph.mermaid"}}},{"include":"source.mermaid#direction"},{"include":"#main"}],"beginCaptures":{"0":{"name":"keyword.control.subgraph.begin.mermaid"}},"endCaptures":{"0":{"name":"keyword.control.subgraph.end.mermaid"}}},"target-name":{"name":"constant.language.link-target.mermaid","match":"(?\u003c=\\s|;|%%)(_)[-\\w]+(?=$|\\s|;|%%)","captures":{"1":{"name":"punctuation.definition.link-target.mermaid"}}},"tooltip":{"name":"string.quoted.double.callback-tooltip.mermaid","begin":"\"","end":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.mermaid"}}},"url":{"patterns":[{"name":"string.quoted.double.link-destination.mermaid","contentName":"string.other.link.mermaid","begin":"\"","end":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.mermaid"}}},{"name":"string.quoted.single.link-destination.mermaid","contentName":"string.other.link.mermaid","begin":"'","end":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.mermaid"}}}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.gantt","patterns":[{"include":"#main"}],"repository":{"axis-format":{"name":"meta.axis-format.statement.mermaid","contentName":"string.unquoted.date-format.mermaid","begin":"(?i)^\\s*(axisFormat)(?=$|\\s)[ \\t]*","end":"(?=\\s*$)","patterns":[{"name":"constant.other.placeholder.date-component.mermaid","match":"(%)[%ABHILMSUWXYZabcdejmpwxy]","captures":{"1":{"name":"punctuation.definition.placeholder.mermaid"}}},{"include":"source.mermaid#entity"}],"beginCaptures":{"1":{"name":"storage.type.date-format.mermaid"}}},"date":{"name":"constant.numeric.date.iso8601.mermaid","match":"\\d{4}-\\d{2}-\\d{2}"},"date-format":{"name":"meta.date-format.statement.mermaid","contentName":"string.unquoted.date-format.mermaid","begin":"(?i)^\\s*(dateFormat)(?=$|\\s)[ \\t]*","end":"(?=\\s*(?:$|%%))","patterns":[{"name":"constant.other.placeholder.date-component.mermaid","match":"YYYY|YY|Q|MM?|MMMM?|Do|DDDD?|DD?|X|x|HH?|hh?|A|a|mm?|ss?|S{1,3}|ZZ?"},{"include":"source.mermaid#entity"}],"beginCaptures":{"1":{"name":"storage.type.date-format.mermaid"}}},"day":{"name":"constant.language.weekday-name.mermaid","match":"(?i)\\b(Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)\\b"},"filters":{"name":"meta.${2:/downcase}-list.statement.mermaid","contentName":"meta.${2:/downcase}d-dates.mermaid","begin":"(?i)^\\s*((exclude|include)s)(?=$|\\s)[ \\t]*","end":"(?=\\s*$)","patterns":[{"include":"source.mermaid#comma"},{"include":"#date"},{"include":"#day"},{"name":"constant.language.weekends.mermaid","match":"(?i)\\b(weekends)\\b"}],"beginCaptures":{"1":{"name":"storage.type.${1:/downcase}.mermaid"}}},"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"source.mermaid#terminator"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"#title"},{"include":"#date-format"},{"include":"#axis-format"},{"include":"#today-marker"},{"include":"#filters"},{"include":"#section"},{"include":"source.mermaid.flowchart#click"},{"include":"#undocumented"}]},"section":{"name":"meta.section.mermaid","begin":"(?i)^\\s*(section)(?=$|\\s)[ \\t]*","end":"(?=^\\s*section(?:$|\\s))|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"name":"string.unquoted.section-description.mermaid","begin":"\\G(?=\\S)","end":"(?=\\s*$)","patterns":[{"include":"source.mermaid#entity"}]},{"include":"#task"},{"include":"#main"}],"beginCaptures":{"1":{"name":"storage.type.section.mermaid"}}},"task":{"name":"meta.task.mermaid","contentName":"meta.task-data.mermaid","begin":"(?i)^\\s*((?=\\S)[^:]+)\\s(:)[ \\t]*","end":"(?=\\s*$)","patterns":[{"match":"(?:^|\\G|(?\u003c=,))\\s*(active|crit|done|milestone)[ \\t]*(?=$|,)","captures":{"1":{"name":"entity.name.tag.mermaid"}}},{"match":"(?:^|\\G|(?\u003c=,))\\s*(?i:(after)\\s+)?((?=[a-zA-Z])[-\\w]+)[ \\t]*(?=$|,)","captures":{"1":{"name":"keyword.operator.dependancy.mermaid"},"2":{"name":"entity.name.task.mermaid"}}},{"include":"#date"},{"match":"(?:^|\\G|(?\u003c=,))\\s*((\\d+)([wdhms]))[ \\t]*(?=$|,)","captures":{"1":{"name":"meta.duration.mermaid"},"2":{"name":"constant.numeric.decimal.duration.mermaid"},"3":{"name":"keyword.other.unit.duration.mermaid"}}},{"include":"source.mermaid#comma"}],"beginCaptures":{"1":{"name":"entity.other.task-description.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}}},"title":{"name":"meta.title.statement.mermaid","contentName":"string.unquoted.chart-title.mermaid","begin":"(?i)^\\s*(title)(?=$|\\s)[ \\t]*","end":"(?=\\s*$)","patterns":[{"include":"source.mermaid#entity"}],"beginCaptures":{"1":{"name":"storage.type.title.mermaid"}}},"today-marker":{"name":"meta.today-marker.statement.mermaid","begin":"(?i)^\\s*(todayMarker)(?=$|\\s)[ \\t]*","end":"(?!\\G)","patterns":[{"name":"constant.language.boolean.false.mermaid","match":"(?i)\\Goff(?=\\s*$)"},{"include":"source.mermaid#inline-css"}],"beginCaptures":{"1":{"name":"storage.type.today-marker.mermaid"}},"applyEndPatternLast":true},"undocumented":{"patterns":[{"name":"meta.include-end-dates.statement.mermaid","match":"(?i)^\\s*(inclusiveEndDates)(?=$|\\s)","captures":{"1":{"name":"keyword.operator.enable-inclusive-end-dates.mermaid"}}},{"name":"meta.enable-top-axis.statement.mermaid","match":"(?i)^\\s*(topAxis)(?=$|\\s)","captures":{"1":{"name":"keyword.operator.enable-top-axis.mermaid"}}}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.gitgraph","patterns":[{"include":"#main"}],"repository":{"command":{"name":"meta.${1:/downcase}.statement.mermaid","begin":"(?i)(?:^|\\G|(?\u003c=;))[ \\t]*(branch|checkout|cherry-pick|commit|merge|reset)(?=$|\\s)","end":"(?=\\s*(?:$|;))","patterns":[{"match":"\\G\\s*([^\"\\s:;]+)(?=$|\\s|;)(?!\\s*:)","captures":{"1":{"name":"entity.name.object.mermaid"}}},{"include":"#string"},{"include":"#fields"}],"beginCaptures":{"1":{"name":"keyword.operator.git-action.${1:/downcase}.mermaid"}}},"fields":{"patterns":[{"include":"#order"},{"include":"#tag"},{"include":"#type"},{"begin":"(?i)(?:^|\\G|(?\u003c=\\s))\\s*((?=\\w)[-\\w]+)\\s*(:)[ \\t]*","end":"(?!\\G)","patterns":[{"include":"#unquoted-string"},{"include":"#string"}],"beginCaptures":{"1":{"name":"variable.assignment.field.user-defined.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}}}]},"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"source.mermaid#terminator"},{"include":"#options"},{"include":"#command"}]},"options":{"name":"meta.options.mermaid","contentName":"source.embedded.json","begin":"(?i)(?:^|\\G|(?\u003c=\\s))(options)[ \\t]*$","end":"^\\s*(end)(?=$|\\s)","patterns":[{"include":"source.json"}],"beginCaptures":{"1":{"name":"keyword.control.options.begin.mermaid"}},"endCaptures":{"1":{"name":"keyword.control.options.end.mermaid"}}},"order":{"name":"meta.field.order.mermaid","begin":"(?i)(?:^|\\G|(?\u003c=\\s))\\s*(order)\\s*(:)[ \\t]*","end":"(?!\\G)","patterns":[{"name":"constant.numeric.decimal.order.index.mermaid","match":"\\G[-+]?\\d+(?:\\.\\d+)?"}],"beginCaptures":{"1":{"name":"variable.assignment.field.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}}},"string":{"name":"string.quoted.double.mermaid","begin":"(?:^|\\G|(?\u003c=\\s))\"","end":"(\")|([^\"\\r\\n]*)$","patterns":[{"include":"source.mermaid#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"invalid.illegal.unclosed-string.mermaid"}}},"tag":{"name":"meta.field.tag.mermaid","begin":"(?i)(?:^|\\G|(?\u003c=\\s))\\s*(tag)\\s*(:)[ \\t]*","end":"(?!\\G)","patterns":[{"include":"#string"}],"beginCaptures":{"1":{"name":"variable.assignment.field.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}}},"type":{"name":"meta.field.type.mermaid","begin":"(?i)(?:^|\\G|(?\u003c=\\s))\\s*(type)\\s*(:)[ \\t]*","end":"(?!\\G)","patterns":[{"name":"constant.language.merge-type.mermaid","match":"\\G(HIGHLIGHT|NORMAL|REVERSE)(?=$|\\s)"},{"name":"invalid.illegal.unrecognised-type.mermaid","match":"\\G[^\\s;]+"}],"beginCaptures":{"1":{"name":"variable.assignment.field.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}}},"unquoted-string":{"name":"string.unquoted.bareword.mermaid","match":"(?:\\G)[^\\s\":;]+(?!\\s*:)"}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"Mermaid","scopeName":"source.mermaid","patterns":[{"include":"#main"}],"repository":{"a11y":{"name":"meta.a11y-option.${1:/downcase}.mermaid","begin":"(?:\\G|^|(?\u003c=\\s|;|%%))acc(Title|Descr)(?:(?=\\s*[:{])|[ \\t]*$)","end":"(?!\\G)","patterns":[{"include":"#a11y-innards"},{"begin":"\\G$","end":"(?!\\G)","patterns":[{"begin":"\\G","end":"(?=\\S)"},{"begin":"(?=:|{)","end":"(?!\\G)","patterns":[{"include":"#a11y-innards"}]}],"applyEndPatternLast":true}],"beginCaptures":{"0":{"name":"variable.assignment.accessibility.mermaid"}}},"a11y-innards":{"patterns":[{"contentName":"string.unquoted.directive-value.single-line.mermaid","begin":"\\G\\s*(:)[ \\t]*","end":"[ \\t]*$","beginCaptures":{"1":{"name":"keyword.operator.assignment.key-value.colon"}}},{"contentName":"string.quoted.other.curly.brackets.directive-value.multi-line.mermaid","begin":"\\G\\s*({)[ \\t]*","end":"[ \\t]*(})","beginCaptures":{"1":{"name":"punctuation.definition.string.curly.bracket.begin.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.curly.bracket.end.mermaid"}}}]},"br":{"name":"text.embedded.html.basic","match":"(?i)\u003cbr\\s*/?\u003e","captures":{"0":{"patterns":[{"include":"text.html.basic"}]}}},"brace":{"patterns":[{"name":"punctuation.definition.class.block.begin.mermaid","match":"{","captures":{"0":{"name":"sublimelinter.gutter-mark"}}},{"name":"punctuation.definition.class.block.end.mermaid","match":"}","captures":{"0":{"name":"sublimelinter.gutter-mark"}}}]},"c4c-diagram":{"name":"meta.c4c-diagram.c4-${2:/downcase}.mermaid","begin":"^[ \\t]*(C4(Component|Container|Context|Deployment|Dynamic))(?=$|\\s|;)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.c4c-diagram"}],"beginCaptures":{"1":{"name":"keyword.control.c4c-diagram.begin.mermaid"}}},"class-diagram":{"name":"meta.class-diagram.mermaid","begin":"^[ \\t]*(classDiagram(?:-v2)?)(?=$|\\s|;)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.class-diagram"}],"beginCaptures":{"1":{"name":"keyword.control.class-diagram.begin.mermaid"}}},"colon":{"name":"keyword.operator.assignment.mermaid","match":":","captures":{"0":{"name":"punctuation.separator.message.key-value.mermaid"}}},"comma":{"name":"punctuation.delimiter.comma.mermaid","match":",","captures":{"0":{"name":"sublimelinter.gutter-mark.mermaid"}}},"comment":{"name":"comment.line.percentage.mermaid","begin":"(?:\\G|^|(?\u003c=\\s|;|%%))(%%)","end":"$","beginCaptures":{"1":{"name":"punctuation.definition.comment.mermaid"}}},"direction":{"name":"meta.direction.statement.mermaid","match":"(?:\\G|^|(?\u003c=\\s|;|%%))(direction)(?:\\s+(BT|LR|RL|TB|TD))?(?=$|\\s|;)","captures":{"1":{"name":"storage.type.direction.mermaid"},"2":{"name":"constant.language.orientation.diagram.mermaid"}}},"directive":{"name":"meta.directive.mermaid","contentName":"source.embedded.js","begin":"%%(?={)","end":"%%$","patterns":[{"include":"source.js"}],"beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.directive.end.mermaid"}}},"entity":{"patterns":[{"name":"constant.character.entity.codepoint.mermaid","match":"(#)\\d+(;)","captures":{"1":{"name":"punctuation.definition.entity.begin.mermaid"},"2":{"name":"punctuation.definition.entity.end.mermaid"}}},{"name":"constant.character.entity.named.mermaid","match":"(#)[a-zA-Z0-9]+(;)","captures":{"1":{"name":"punctuation.definition.entity.begin.mermaid"},"2":{"name":"punctuation.definition.entity.end.mermaid"}}}]},"er-diagram":{"name":"meta.er-diagram.mermaid","begin":"^[ \\t]*(erDiagram)(?=$|\\s|;)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.er-diagram"}],"beginCaptures":{"1":{"name":"keyword.control.er-diagram.begin.mermaid"}}},"flowchart":{"name":"meta.flowchart.mermaid","begin":"^[ \\t]*(flowchart(?:-v2)?|graph)(?!-)\\b","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"match":"\\G\\s+(BT|LR|RL|TB|TD)(?=$|\\s)","captures":{"1":{"name":"constant.language.orientation.flowchart.mermaid"}}},{"include":"source.mermaid.flowchart"}],"beginCaptures":{"1":{"name":"keyword.control.flowchart.begin.mermaid"}}},"gantt":{"name":"meta.gantt-chart.mermaid","begin":"(?i)^[ \\t]*(gantt)(?=$|\\s)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.gantt"}],"beginCaptures":{"1":{"name":"keyword.control.gantt-chart.begin.mermaid"}}},"gitgraph":{"name":"meta.gitgraph.mermaid","begin":"(?i)^[ \\t]*(gitGraph)(?:\\s+(LR|BT))?(?:\\s*(:))?(?=$|\\s)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.gitgraph"}],"beginCaptures":{"1":{"name":"keyword.control.gitgraph.begin.mermaid"},"2":{"name":"constant.language.orientation.flowchart.mermaid"},"3":{"patterns":[{"include":"source.mermaid#colon"}]}}},"inline-css":{"patterns":[{"name":"source.embedded.css","match":"(?=\\S)(?:[^,;\\r\\n%]|(?\u003c!%)%(?!%))++","captures":{"0":{"patterns":[{"include":"source.css#rule-list-innards"}]}}},{"include":"#comma"}]},"main":{"patterns":[{"include":"#directive"},{"include":"#comment"},{"include":"#flowchart"},{"include":"#sequence-diagram"},{"include":"#class-diagram"},{"include":"#state-diagram"},{"include":"#er-diagram"},{"include":"#user-journey"},{"include":"#gantt"},{"include":"#pie-chart"},{"include":"#requirement-diagram"},{"include":"#gitgraph"},{"include":"#c4c-diagram"}]},"pie-chart":{"name":"meta.pie-chart.mermaid","begin":"(?i)^[ \\t]*(pie)(?=$|\\s)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.pie-chart"}],"beginCaptures":{"1":{"name":"keyword.control.pie-chart.begin.mermaid"}}},"requirement-diagram":{"name":"meta.requirement-diagram.mermaid","begin":"(?i)^[ \\t]*(requirementDiagram)(?=$|\\s)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.requirement-diagram"}],"beginCaptures":{"1":{"name":"keyword.control.requirement-diagram.begin.mermaid"}}},"sequence-diagram":{"name":"meta.sequence-diagram.mermaid","begin":"(?i)^[ \\t]*(sequenceDiagram)(?=$|\\s|;)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.sequence-diagram"}],"beginCaptures":{"1":{"name":"keyword.control.sequence-diagram.begin.mermaid"}}},"state-diagram":{"name":"meta.state-diagram.mermaid","begin":"(?i)^[ \\t]*(stateDiagram(?:-v2)?)(?=$|\\s|;)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.state-diagram"}],"beginCaptures":{"1":{"name":"keyword.control.state-diagram.begin.mermaid"}}},"terminator":{"name":"punctuation.terminator.statement.mermaid","match":";","captures":{"0":{"name":"sublimelinter.gutter-mark.mermaid"}}},"user-journey":{"name":"meta.user-journey.mermaid","begin":"(?i)^[ \\t]*(journey)(?=$|\\s)","end":"(?=A)B|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"include":"source.mermaid.user-journey"}],"beginCaptures":{"1":{"name":"keyword.control.user-journey.begin.mermaid"}}}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.pie-chart","patterns":[{"include":"#main"}],"repository":{"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"#show-data"},{"include":"#title"},{"include":"#slice"}]},"show-data":{"match":"(?i)(?:\\G|(?\u003c=pie))\\s+(showData)(?=$|\\s)","captures":{"1":{"name":"keyword.operator.show-data.mermaid"}}},"slice":{"name":"meta.data-set.mermaid","match":"^\\s*((\")([^\"]*)(\"))\\s*(:)[ \\t]*(?:([-+]?\\d+(?:\\.\\d+)?))?","captures":{"1":{"name":"string.quoted.double.data-key.mermaid"},"2":{"patterns":[{"include":"source.mermaid#entity"}]},"4":{"name":"punctuation.definition.string.end.mermaid"},"5":{"patterns":[{"include":"source.mermaid#colon"}]},"6":{"name":"constant.numeric.decimal.data-value.mermaid"}}},"title":{"name":"meta.title.mermaid","contentName":"string.unquoted.diagram-title.mermaid","begin":"(?i)(?:^|\\G|(?\u003c=\\s))\\s*(title)(?=$|\\s)[ \\t]*","end":"(?=\\s*$)","patterns":[{"include":"source.mermaid#entity"}],"beginCaptures":{"1":{"name":"storage.type.title.mermaid"}}}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.requirement-diagram","patterns":[{"include":"#main"}],"repository":{"element":{"name":"meta.element.definition.mermaid","begin":"(?i)^\\s*(element)(?:\\s+(?:(\\w[^-{\u003c\u003e=]*?)|((\")([^\"]*)(\"))))?\\s*({)","end":"}","patterns":[{"include":"#field"},{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"}],"beginCaptures":{"1":{"name":"storage.type.element.mermaid"},"2":{"name":"entity.name.element.mermaid"},"3":{"name":"string.quoted.double.requirement.name.mermaid"},"4":{"name":"punctuation.definition.string.begin.mermaid"},"5":{"patterns":[{"include":"source.mermaid#entity"}]},"6":{"name":"punctuation.definition.string.end.mermaid"},"7":{"patterns":[{"include":"source.mermaid#brace"}]}},"endCaptures":{"0":{"patterns":[{"include":"source.mermaid#brace"}]}}},"field":{"name":"meta.field.${1:/downcase}.mermaid","begin":"(?i)^\\s*(\\w+)\\s*(:)[ \\t]*","end":"(?=\\s*$)","patterns":[{"include":"#field-innards"}],"beginCaptures":{"1":{"name":"variable.assignment.field.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}}},"field-innards":{"patterns":[{"contentName":"string.quoted.double.mermaid","begin":"\\G\\s*\"","end":"(\")(?:\\s*(?!%%)(\\S[^\\r\\n]*))?","patterns":[{"include":"source.mermaid#entity"}],"beginCaptures":{"1":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.mermaid"},"2":{"name":"invalid.illegal.unexpected-junk.mermaid"}}},{"name":"string.unquoted.mermaid","match":"\\G[^\"\\s][^\"\\r\\n]*"}]},"invalid-value":{"name":"invalid.illegal.bad-value.mermaid","match":"\\G\\S[^\\r\\n]*"},"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"#requirement"},{"include":"#element"},{"include":"#relationship"}]},"relationship":{"patterns":[{"name":"meta.relationship.source-to-destination.mermaid","match":"(?x)\n(\\w[^-{\u003c\u003e=\\r\\n]* | \"[^\"]*\") \\s* # Source\n(- \\s* \\w+ \\s* -\u003e) \\s* # Operator\n(\\w[^-{\u003c\u003e=\\r\\n]* | \"[^\"]*\") # Destination","captures":{"1":{"patterns":[{"include":"#relationship-source"}]},"2":{"patterns":[{"include":"#relationship-type"}]},"3":{"patterns":[{"include":"#relationship-destination"}]}}},{"name":"meta.relationship.destination-to-source.mermaid","match":"(?x)\n(\\w[^-{\u003c\u003e=\\r\\n]* | \"[^\"]*\") \\s* # Destination\n(\u003c- \\s* \\w+ \\s* -) \\s* # Operator\n(\\w[^-{\u003c\u003e=\\r\\n]* | \"[^\"]*\") # Source","captures":{"1":{"patterns":[{"include":"#relationship-destination"}]},"2":{"patterns":[{"include":"#relationship-type"}]},"3":{"patterns":[{"include":"#relationship-source"}]}}}]},"relationship-destination":{"patterns":[{"name":"string.quoted.double.relationship-operand.destination.mermaid","begin":"(?:^|\\G)\"","end":"\"","patterns":[{"include":"source.mermaid#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.mermaid"}}},{"name":"entity.name.relationship-operand.destination.mermaid","match":"(?:^|\\G)\\w.*"}]},"relationship-source":{"patterns":[{"name":"string.quoted.double.relationship-operand.source.mermaid","begin":"(?:^|\\G)\"","end":"\"","patterns":[{"include":"source.mermaid#entity"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.mermaid"}}},{"name":"entity.name.relationship-operand.source.mermaid","match":"(?:^|\\G)\\w.*"}]},"relationship-type":{"patterns":[{"name":"keyword.operator.arrow.left.mermaid","match":"-\u003e"},{"name":"keyword.operator.arrow.right.mermaid","match":"\u003c-"},{"name":"keyword.operator.dash.mermaid","match":"-"},{"name":"keyword.operator.relation.${1:/downcase}.mermaid","match":"(?ix)\n(?:^|\\G|(?\u003c=-|\\s))\n( contains\n| copies\n| derives\n| refines\n| satisfies\n| traces\n| verifies\n) (?=$|-|\\s)"},{"name":"invalid.illegal.unsupported-type.mermaid","match":"\\w+"}]},"requirement":{"name":"meta.requirement.definition.mermaid","begin":"(?xi) ^\\s*\n( functionalRequirement\n| interfaceRequirement\n| performanceRequirement\n| physicalRequirement\n| designConstraint\n| requirement\n)\n(?:\n\t\\s+\n\t# Requirement name\n\t(?: (\\w[^-{\u003c\u003e=]*?) # Unquoted\n\t| ((\")([^\"]*)(\")) # Quoted\n\t)\n)?\n\\s* ({)","end":"}","patterns":[{"include":"#risk"},{"include":"#verify-method"},{"include":"#field"},{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"}],"beginCaptures":{"1":{"name":"storage.type.requirement.mermaid"},"2":{"name":"entity.name.requirement.mermaid"},"3":{"name":"string.quoted.double.requirement.name.mermaid"},"4":{"name":"punctuation.definition.string.begin.mermaid"},"5":{"patterns":[{"include":"source.mermaid#entity"}]},"6":{"name":"punctuation.definition.string.end.mermaid"},"7":{"patterns":[{"include":"source.mermaid#brace"}]}},"endCaptures":{"0":{"patterns":[{"include":"source.mermaid#brace"}]}}},"risk":{"name":"meta.field.risk.mermaid","begin":"(?i)^\\s*(risk)\\s*(:)[ \\t]*","end":"(?=\\s*$)","patterns":[{"name":"constant.language.risk-level.${1:/downcase}.mermaid","match":"(?i)\\G(Low|Medium|High)(?=\\s*$)"},{"include":"#invalid-value"}],"beginCaptures":{"1":{"name":"variable.assignment.field.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}}},"verify-method":{"name":"meta.field.verify-method.mermaid","begin":"(?i)^\\s*(verifyMethod)\\s*(:)[ \\t]*","end":"(?=\\s*$)","patterns":[{"name":"constant.language.verify-method.${1:/downcase}.mermaid","match":"(?i)\\G(Analysis|Demonstration|Inspection|Test)(?=\\s*$)"},{"include":"#invalid-value"}],"beginCaptures":{"1":{"name":"variable.assignment.field.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}}}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.sequence-diagram","patterns":[{"include":"#main"}],"repository":{"activation":{"name":"keyword.operator.${1:/downcase}.mermaid","match":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))((?:de)?activate)(?=$|\\s|;)"},"actor":{"name":"meta.definition.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))(actor|participant)(?=$|\\s|;)[ \\t]*","end":"(?!\\G)|(?=\\s*(?:$|;))","patterns":[{"include":"#name"}],"beginCaptures":{"1":{"name":"storage.modifier.${1:/downcase}.mermaid"}}},"alt":{"name":"meta.alternation.block.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(alt)(?=$|\\s|;)","end":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(end)(?=$|\\s|;)","patterns":[{"name":"meta.branch.if.mermaid","begin":"\\G","end":"(?i)(?=(?:^|(?\u003c=\\s|;|%%))\\s*(?:end|else)(?:$|\\s|;))","patterns":[{"include":"#alt-innards"}]},{"name":"meta.branch.else.mermaid","begin":"(?i)(?:^|(?\u003c=\\s|;|%%))\\s*(else)(?=$|\\s|;)","end":"(?i)(?=(?:^|(?\u003c=\\s|;|%%))\\s*end(?:$|\\s|;))","patterns":[{"include":"#alt-innards"}],"beginCaptures":{"1":{"name":"keyword.control.flow.alternation.else.mermaid"}}}],"beginCaptures":{"1":{"name":"keyword.control.flow.alternation.begin.mermaid"}},"endCaptures":{"1":{"name":"keyword.control.flow.alternation.end.mermaid"}}},"alt-innards":{"patterns":[{"contentName":"string.unquoted.condition-text.mermaid","begin":"\\G[ \\t]*(?=\\S)","end":"(?=\\s*(?:$|;))","patterns":[{"include":"#string-innards"}]},{"include":"#main"}]},"autonumber":{"name":"keyword.operator.autonumber.mermaid","match":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))autonumber(?=$|\\s|;)"},"break":{"name":"meta.break.block.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))break(?=$|\\s|;)","end":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))end(?=$|\\s|;)","patterns":[{"contentName":"string.unquoted.break-text.mermaid","begin":"\\G[ \\t]*(?=\\S)","end":"(?=\\s*(?:$|;))","patterns":[{"include":"#string-innards"}]},{"include":"#main"}],"beginCaptures":{"0":{"name":"keyword.control.flow.break.begin.mermaid"}},"endCaptures":{"0":{"name":"keyword.control.flow.break.end.mermaid"}}},"critical":{"name":"meta.requirements.block.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(critical)(?=$|\\s|;)","end":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(end)(?=$|\\s|;)","patterns":[{"name":"meta.branch.required.first.mermaid","begin":"\\G","end":"(?i)(?=(?:^|(?\u003c=\\s|;|%%))\\s*(?:option|end)(?:$|\\s|;))","patterns":[{"include":"#alt-innards"}]},{"name":"meta.branch.required.rest.mermaid","begin":"(?i)(?:^|(?\u003c=\\s|;|%%))\\s*(option)(?=$|\\s|;)","end":"(?i)(?=(?:^|(?\u003c=\\s|;|%%))\\s*(?:option|end)(?:$|\\s|;))","patterns":[{"include":"#alt-innards"}],"beginCaptures":{"1":{"name":"keyword.control.flow.option.mermaid"}}}],"beginCaptures":{"1":{"name":"keyword.control.flow.requirements.begin.mermaid"}},"endCaptures":{"1":{"name":"keyword.control.flow.requirements.end.mermaid"}}},"loop":{"name":"meta.loop.block.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))loop(?=$|\\s|;)","end":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))end(?=$|\\s|;)","patterns":[{"contentName":"string.unquoted.loop-text.mermaid","begin":"\\G[ \\t]*(?=\\S)","end":"(?=\\s*(?:$|;))","patterns":[{"include":"#string-innards"}]},{"include":"#main"}],"beginCaptures":{"0":{"name":"keyword.control.loop.begin.mermaid"}},"endCaptures":{"0":{"name":"keyword.control.loop.end.mermaid"}}},"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"source.mermaid#terminator"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"#message"},{"include":"#autonumber"},{"include":"#activation"},{"include":"#actor"},{"include":"#note"},{"include":"#loop"},{"include":"#alt"},{"include":"#opt"},{"include":"#par"},{"include":"#critical"},{"include":"#break"},{"include":"#rect"},{"include":"#menu"},{"include":"#name"},{"include":"#signal"}]},"menu":{"patterns":[{"include":"#menu-single"},{"include":"#menu-json"}]},"menu-json":{"name":"meta.menu.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))links(?=$|\\s|;)","end":"(?=\\s*(?:$|;))","patterns":[{"name":"meta.lhs.mermaid","begin":"\\G","end":"(?!\\G)","patterns":[{"include":"#name"}],"applyEndPatternLast":true},{"begin":":[ \\t]*","end":"(?!\\G)","patterns":[{"include":"source.json"}],"beginCaptures":{"0":{"name":"keyword.operator.assignment.mermaid"},"1":{"name":"punctuation.separator.menu.key-value.mermaid"}},"applyEndPatternLast":true}],"beginCaptures":{"0":{"name":"storage.type.menu.mermaid"}}},"menu-single":{"name":"meta.menu-link.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))link(?=$|\\s|;)","end":"(?=\\s*(?:$|;))","patterns":[{"name":"meta.lhs.mermaid","begin":"\\G","end":"(?!\\G)","patterns":[{"include":"#name"}],"applyEndPatternLast":true},{"name":"meta.rhs.mermaid","begin":":","end":"(?!\\G)","patterns":[{"name":"meta.link-text.mermaid","match":"\\G\\s*([^;@]*)\\s*((@))","captures":{"1":{"name":"string.unquoted.link-text.mermaid","patterns":[{"include":"#string-innards"}]},"2":{"name":"keyword.operator.assignment.mermaid"},"3":{"name":"punctuation.separator.link-spec.mermaid"}}},{"name":"meta.link-target.mermaid","contentName":"constant.other.reference.link.mermaid","begin":"(?:(?\u003c=@)|(?\u003c=:)\\G)[ \\t]*(?![^;]*@)","end":"(?=\\s*(?:$|;))","patterns":[{"include":"#string-innards"}]}],"beginCaptures":{"0":{"name":"keyword.operator.assignment.mermaid"},"1":{"name":"punctuation.separator.link.key-value.mermaid"}},"applyEndPatternLast":true}],"beginCaptures":{"0":{"name":"storage.type.menu-link.mermaid"}}},"message":{"name":"meta.message.mermaid","contentName":"string.unquoted.message-text.mermaid","begin":"((:))[ \\t]*","end":"(?=[ \\t]*(?:$|;))","patterns":[{"include":"#string-innards"}],"beginCaptures":{"1":{"name":"keyword.operator.assignment.mermaid"},"2":{"name":"punctuation.separator.message.key-value.mermaid"}}},"name":{"name":"meta.name.mermaid","match":"(?ix)\n(\n\t(?=\\S)\n\t(?:[^-+\u003e:,;\\s]+|\\s+(?!as(?:$|\\s)))++\n\t(?:\n\t\t(?!--?[x\\x29])\n\t\t(?:-*[^-+\u003e:,;\\s]+|\\s+(?!as(?:$|\\s)))\n\t)*?\n)\n(?:\\s+(as)(?=$|\\s|;))?","captures":{"1":{"name":"entity.name.tag.actor.mermaid"},"2":{"name":"keyword.operator.alias.mermaid"}}},"note":{"name":"meta.note.mermaid","begin":"(?i)note\\s+(?:(?:left|right)\\s+of|over)(?=$|\\s)[ \\t]*","end":"(?!\\G)|(?=\\s*(?:$|;))","patterns":[{"include":"#name"},{"include":"source.mermaid#comma"}],"beginCaptures":{"0":{"name":"storage.type.note.mermaid"}},"applyEndPatternLast":true},"opt":{"name":"meta.option.block.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(opt)(?=$|\\s|;)","end":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(end)(?=$|\\s|;)","patterns":[{"include":"#alt-innards"}],"beginCaptures":{"1":{"name":"keyword.control.flow.option.begin.mermaid"}},"endCaptures":{"1":{"name":"keyword.control.flow.option.end.mermaid"}}},"par":{"name":"meta.parallel.block.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(par)(?=$|\\s|;)","end":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(end)(?=$|\\s|;)","patterns":[{"name":"meta.branch.parallel.first.mermaid","begin":"\\G","end":"(?i)(?=(?:^|(?\u003c=\\s|;|%%))\\s*(?:and|end)(?:$|\\s|;))","patterns":[{"include":"#alt-innards"}]},{"name":"meta.branch.parallel.rest.mermaid","begin":"(?i)(?:^|(?\u003c=\\s|;|%%))\\s*(and)(?=$|\\s|;)","end":"(?i)(?=(?:^|(?\u003c=\\s|;|%%))\\s*(?:and|end)(?:$|\\s|;))","patterns":[{"include":"#alt-innards"}],"beginCaptures":{"1":{"name":"keyword.control.flow.parallel.continue.mermaid"}}}],"beginCaptures":{"1":{"name":"keyword.control.flow.parallel.begin.mermaid"}},"endCaptures":{"1":{"name":"keyword.control.flow.parallel.end.mermaid"}}},"rect":{"name":"meta.rectangle.mermaid","begin":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(rect)(?=$|\\s|;)","end":"(?i)(?:\\G|^|(?\u003c=\\s|;|%%))\\s*(end)(?=$|\\s|;)","patterns":[{"name":"meta.function.background-colour.${1:/downcase}.mermaid","begin":"(?i)\\G\\s*(rgba?)(\\()","end":"\\)","patterns":[{"name":"constant.numeric.colour-component.mermaid","match":"[-+]?\\d+(?:\\.\\d+)?"},{"include":"source.mermaid#comma"}],"beginCaptures":{"1":{"name":"support.function.colour.mermaid"},"2":{"name":"punctuation.definition.arguments.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.arguments.end.mermaid"}}},{"include":"#main"}],"beginCaptures":{"0":{"name":"keyword.control.rectangle.begin.mermaid"}},"endCaptures":{"0":{"name":"keyword.control.rectangle.end.mermaid"}}},"signal":{"name":"meta.signal.mermaid","match":"(--?(?:\u003e\u003e?|x|\\)))(?:[ \\t]*(?:(-)|(\\+)))?","captures":{"1":{"name":"keyword.operator.link.mermaid"},"2":{"name":"keyword.operator.deactivate.mermaid"},"3":{"name":"keyword.operator.activate.mermaid"}}},"string-innards":{"patterns":[{"include":"source.mermaid#entity"}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.state-diagram","patterns":[{"include":"#main"}],"repository":{"composite-state":{"name":"meta.state.composite.mermaid","begin":"^\\s*(state)(?:\\s+([^-:\\s{]+))?\\s*({)","end":"}","patterns":[{"include":"#main"}],"beginCaptures":{"1":{"name":"storage.type.state.mermaid"},"2":{"name":"variable.state.name.mermaid"},"3":{"patterns":[{"include":"source.mermaid#brace"}]}},"endCaptures":{"0":{"patterns":[{"include":"source.mermaid#brace"}]}}},"concurrency":{"name":"keyword.control.flow.concurrency.mermaid","match":"--"},"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"source.mermaid#direction"},{"include":"#terminal"},{"include":"#transition"},{"include":"#composite-state"},{"include":"#note"},{"include":"#concurrency"},{"include":"#state"}]},"marker":{"name":"entity.name.tag.modifier.$2.mermaid","match":"((\u003c\u003c))(choice|fork|join)((\u003e\u003e))","captures":{"1":{"name":"punctuation.definition.marker.begin.mermaid"},"2":{"name":"sublimelinter.gutter-mark"},"4":{"name":"punctuation.definition.marker.end.mermaid"},"5":{"name":"sublimelinter.gutter-mark"}}},"note":{"name":"meta.note.mermaid","begin":"^\\s*(note)\\s+((?:left|right)\\s+of)\\s+([^-:\\s{]+)","end":"(?!\\G)","patterns":[{"contentName":"string.unquoted.note-text.mermaid","begin":"\\G[ \\t]*$","end":"^\\s*(end)\\s+(note)(?=$|\\s)","endCaptures":{"1":{"name":"keyword.operator.end-note.mermaid"},"2":{"name":"storage.type.note.mermaid"}}},{"contentName":"string.unquoted.note-text.mermaid","begin":"\\G\\s*(:)[ \\t]*","end":"(?=\\s*$)","beginCaptures":{"1":{"patterns":[{"include":"source.mermaid#colon"}]}}}],"beginCaptures":{"1":{"name":"storage.type.note.mermaid"},"2":{"name":"constant.language.note-position.mermaid"},"3":{"name":"variable.state.name.mermaid"}}},"state":{"patterns":[{"name":"meta.state.statement.mermaid","begin":"^\\s*(state)(?=$|\\s)[ \\t]*","end":"(?=\\s*$)","patterns":[{"name":"string.quoted.double.state-description.mermaid","begin":"\\G\"","end":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.mermaid"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.mermaid"}}},{"name":"variable.state.name.mermaid","match":"\\G(?:[^-:\\s{%]|%(?!%))++"},{"begin":"(?\u003c=\")\\s*(as)(?=$|\\s)","end":"[^-:\\s{]+|(?=\\s*(?:$|%%))","beginCaptures":{"1":{"name":"keyword.operator.alias.mermaid"}},"endCaptures":{"0":{"name":"variable.state.name.mermaid"}}},{"include":"#marker"}],"beginCaptures":{"1":{"name":"storage.type.state.mermaid"}}},{"contentName":"string.unquoted.state-description.mermaid","begin":"([^-:\\s{]+)\\s*(:)[ \\t]*","end":"(?=\\s*(?:$|%%))","beginCaptures":{"1":{"name":"variable.state.name.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]}}},{"name":"variable.state.name.mermaid","match":"[^-:\\s{]+"}]},"terminal":{"patterns":[{"name":"constant.language.state.initial.mermaid","match":"\\[\\*\\](?=\\s*--\u003e)"},{"match":"(?\u003c=--\u003e)\\s*(\\[\\*\\])","captures":{"1":{"name":"constant.language.state.final.mermaid"}}}]},"transition":{"name":"keyword.operator.transition.mermaid","match":"--\u003e"}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"scopeName":"source.mermaid.user-journey","patterns":[{"include":"#main"}],"repository":{"main":{"patterns":[{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"#title"},{"include":"#section"}]},"section":{"name":"meta.section.mermaid","begin":"(?i)section(?=$|\\s)[ \\t]*","end":"(?=\\s*section(?:$|\\s))|(?=^[ \\t]*(?:`{3,}|~{3,})\\s*$)","patterns":[{"name":"string.unquoted.section-description.mermaid","begin":"\\G(?=\\S)","end":"(?=\\s*$)","patterns":[{"include":"source.mermaid#entity"}]},{"include":"source.mermaid#a11y"},{"include":"source.mermaid#directive"},{"include":"source.mermaid#comment"},{"include":"#task"}],"beginCaptures":{"0":{"name":"storage.type.section.mermaid"}}},"task":{"name":"meta.task.mermaid","contentName":"meta.actors.mermaid","begin":"(?x)\n((?=\\S)(?:[^:%]|%(?!%))+?)\n\\s* (:) \\s* ([-+]?\\d+(?:\\.\\d+)?)?\n\\s* (:) [ \\t]*","end":"(?=\\s*$)","patterns":[{"name":"variable.parameter.actor.mermaid","match":"(?=\\S)[^,\\r\\n]+"},{"include":"source.mermaid#comma"}],"beginCaptures":{"1":{"name":"entity.name.task.mermaid"},"2":{"patterns":[{"include":"source.mermaid#colon"}]},"3":{"name":"constant.numeric.decimal.score.mermaid"},"4":{"patterns":[{"include":"source.mermaid#colon"}]}}},"title":{"name":"meta.title.mermaid","contentName":"string.unquoted.diagram-title.mermaid","begin":"(?i)title(?=$|\\s)[ \\t]*","end":"(?=\\s*$)","patterns":[{"include":"source.mermaid#entity"}],"beginCaptures":{"0":{"name":"storage.type.title.mermaid"}}}}}
|
data/grammars/source.mo.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"Motoko","scopeName":"source.mo","patterns":[{"include":"#shebang-line"},{"include":"#comment"},{"include":"#attribute"},{"include":"#literal"},{"include":"#operator"},{"include":"#declaration"},{"include":"#storage-type"},{"include":"#keyword"},{"include":"#type"},{"include":"#boolean"}],"repository":{"access-level-modifier":{"name":"keyword.other.access-level-modifier.motoko","match":"\\b(public|system|private)\\b"},"arithmetic-operator":{"name":"keyword.operator.arithmetic.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+|\\-|\\*|\\/)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"array-type":{"name":"meta.array.motoko","begin":"\\b(Array)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.array.motoko"},"2":{"name":"punctuation.array.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.array.end.motoko"}}},"assignment-operator":{"name":"keyword.operator.assignment.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+|\\-|\\*|\\/|%|\u003c\u003c|\u003e\u003e|\u0026|\\^|\\||\u0026\u0026|\\|\\|)?=(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"async-await-keyword":{"name":"keyword.async-await.motoko","match":"\\b(async|await)\\b"},"attribute":{"name":"meta.attribute.motoko","patterns":[{"contentName":"meta.attribute.arguments.motoko","begin":"((@)(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B))(\\()","end":"\\)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"storage.modifier.attribute.motoko"},"2":{"name":"punctuation.definition.attribute.motoko"},"3":{"name":"punctuation.definition.attribute-arguments.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.attribute-arguments.end.motoko"}}},{"match":"((@)(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B))","captures":{"1":{"name":"storage.modifier.attribute.motoko"},"2":{"name":"punctuation.definition.attribute.motoko"}}}]},"bitwise-operator":{"name":"keyword.operator.bitwise.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\u0026|\\||\\^|\u003c\u003c|\u003e\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"block-comment":{"name":"comment.block.motoko","begin":"/\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.end.motoko"}}},"boolean":{"name":"keyword.constant.boolean.motoko","match":"\\b(true|false)\\b"},"branch-statement-keyword":{"name":"keyword.control.branch.motoko","patterns":[{"include":"#if-statement-keyword"},{"include":"#switch-statement-keyword"}]},"catch-statement-keyword":{"name":"kewyord.control.catch.motoko","match":"\\b(catch|do)\\b"},"code-block":{"begin":"(\\{)","end":"(\\})","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.code-block.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.code-block.end.motoko"}}},"comment":{"patterns":[{"include":"#documentation-comment"},{"include":"#block-comment"},{"include":"#in-line-comment"}]},"comparative-operator":{"name":"keyword.operator.comparative.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])((=|!)==?|(\u003c|\u003e)=?|~=)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"control-transfer-statement-keyword":{"name":"keyword.control.transfer.motoko","match":"\\b(continue|break|return)\\b"},"custom-operator":{"patterns":[{"name":"keyword.operator.custom.prefix.unary.motoko","match":"(?\u003c=[\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?![\\s)\\]},;:])"},{"name":"keyword.operator.custom.postfix.unary.motoko","match":"(?\u003c![\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?![\\s)\\]},;:\\.])"},{"name":"keyword.operator.custom.binary.motoko","match":"(?\u003c=[\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?=[\\s)\\]},;:])"}]},"declaration":{"name":"meta.declaration.motoko","patterns":[{"include":"#import-declaration"}]},"declaration-modifier":{"name":"keyword.other.declaration-modifier.motoko","match":"\\b(class|object|type|shared)\\b"},"dictionary-type":{"name":"meta.dictionary.motoko","begin":"\\b(Dictionary)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.dictionary.motoko"},"2":{"name":"punctuation.dictionary.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.dictionary.end.motoko"}}},"documentation-comment":{"name":"comment.block.documentation.motoko","begin":"/\\*\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.documentation.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.documentation.end.motoko"}}},"floating-point-literal":{"name":"constant.numeric.floating-point.motoko","patterns":[{"match":"\\b([0-9][0-9_]*)(\\.([0-9][0-9_]*))?([eE][+\\-]?([0-9][0-9_]*))?\\b"},{"match":"\\b(0x[[:xdigit:]][[[:xdigit:]]_]*)(\\.(0x[[:xdigit:]][[[:xdigit:]]_]*))?([pP][+\\-]?(0x[[:xdigit:]][[[:xdigit:]]_]*))\\b"}]},"function-body":{"name":"meta.function-body.motoko","patterns":[{"include":"#code-block"}]},"function-declaration":{"name":"meta.function-declaration.motoko","begin":"\\b(func)\\s+(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+)\\s*(?=\\(|\u003c)","end":"(?\u003c=\\})","patterns":[{"include":"#generic-parameter-clause"},{"include":"#parameter-clause"},{"include":"#function-result"},{"include":"#function-body"}],"beginCaptures":{"1":{"name":"storage.type.function.motoko"},"2":{"name":"entity.type.function.motoko"}}},"function-result":{"name":"meta.function-result.motoko","begin":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\-\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\s*","end":"\\s*(?=\\{)","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.operator.function-result.motoko"}}},"generic-parameter-clause":{"name":"meta.generic-parameter-clause.motoko","begin":"(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.generic-parameter-clause.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.generic-parameter-clause.end.motoko"}}},"identifier":{"name":"meta.identifier.motoko","match":"(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B)"},"if-statement-keyword":{"name":"keyword.control.if.motoko","match":"\\b(if|else)\\b"},"import-declaration":{"name":"meta.import.motoko","match":"\\b(import)\\s+(?:(class|var|func)\\s+)?((?:\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+)(?:\\.(?:\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+))*)","captures":{"1":{"name":"keyword.other.import.motoko"},"2":{"name":"storage.modifier.motoko"},"3":{"name":"support.type.module.import.motoko"}}},"in-line-comment":{"name":"comment.line.double-slash.motoko","match":"(//).*","captures":{"1":{"name":"punctuation.definition.comment.line.double-slash.motoko"}}},"increment-decrement-operator":{"name":"keyword.operator.increment-or-decrement.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+\\+|\\-\\-)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"integer-literal":{"name":"constant.numeric.integer.motoko","patterns":[{"name":"constant.numeric.integer.binary.motoko","match":"(\\B\\-|\\b)(0b[01][01_]*)\\b"},{"name":"constant.numeric.integer.octal.motoko","match":"(\\B\\-|\\b)(0o[0-7][0-7_]*)\\b"},{"name":"constant.numeric.integer.decimal.motoko","match":"(\\B\\-|\\b)([0-9][0-9_]*)\\b"},{"name":"constant.numeric.integer.hexadecimal.motoko","match":"(\\B\\-|\\b)(0x[[:xdigit:]][[[:xdigit:]]_]*)\\b"}]},"keyword":{"patterns":[{"include":"#branch-statement-keyword"},{"include":"#control-transfer-statement-keyword"},{"include":"#loop-statement-keyword"},{"include":"#catch-statement-keyword"},{"include":"#async-await-keyword"},{"include":"#operator-declaration-modifier"},{"include":"#declaration-modifier"},{"include":"#access-level-modifier"},{"name":"keyword.declaration.motoko","match":"\\b(actor|and|class|func|import|let|module|not|or)\\b"},{"name":"keyword.statement.motoko","match":"\\b(assert|break|case|continue|default|debug|debug_show|else|if|ignore|in|for|label|return|switch|while|loop|try|throw)\\b"},{"name":"keyword.other.motoko","match":"\\b(flexible|query|stable)\\b"}]},"literal":{"patterns":[{"include":"#integer-literal"},{"include":"#floating-point-literal"},{"include":"#nil-literal"},{"include":"#string-literal"},{"include":"#special-literal"}]},"logical-operator":{"name":"keyword.operator.logical.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(!|\u0026\u0026|\\|\\|)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"loop-statement-keyword":{"name":"keyword.control.loop.motoko","match":"\\b(while|repeat|for|in|loop)\\b"},"null-literal":{"name":"constant.null.motoko","match":"\\bnull\\b"},"operator":{"patterns":[{"include":"#comparative-operator"},{"include":"#assignment-operator"},{"include":"#logical-operator"},{"include":"#remainder-operator"},{"include":"#increment-decrement-operator"},{"include":"#overflow-operator"},{"include":"#range-operator"},{"include":"#bitwise-operator"},{"include":"#arithmetic-operator"},{"include":"#ternary-operator"},{"include":"#type-casting-operator"},{"include":"#custom-operator"}]},"operator-declaration-modifier":{"name":"keyword.other.operator.motoko","match":"\\b(operator|prefix|infix|postfix)\\b"},"optional-type":{"name":"meta.optional.motoko","match":"\\b(Optional)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.optional.motoko"},"2":{"name":"punctuation.optional.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.optional.end.motoko"}}},"overflow-operator":{"name":"keyword.operator.overflow.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\\u0026(\\+|\\-|\\*|\\/|%)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"parameter-clause":{"name":"meta.parameter-clause.motoko","begin":"(\\()","end":"(\\))","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.function-arguments.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.function-arguments.end.motoko"}}},"primitive-type":{"name":"support.type.motoko","match":"\\b(Blob|Bool|Char|Float|(Int|Nat)(8|16|32|64)?|Principal|Text|Error)\\b"},"protocol-composition-type":{"name":"meta.protocol.motoko","match":"\\b(protocol)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.protocol.motoko"},"2":{"name":"punctuation.protocol.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.protocol.end.motoko"}}},"range-operator":{"name":"keyword.operator.range.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\.\\.(?:\\.)?(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"remainder-operator":{"name":"keyword.operator.remainder.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\%(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"resolved-type":{"name":"support.type.motoko","match":"\\b[A-Z].*?\\b"},"shebang-line":{"name":"comment.line.shebang.motoko","match":"^(#!).*$","captures":{"1":{"name":"punctuation.definition.comment.line.shebang.motoko"}}},"special-literal":{"name":"keyword.other.literal.motoko","match":"\\b__(FILE|LINE|COLUMN|FUNCTION)__\\b"},"storage-type":{"name":"storage.type.motoko","match":"\\b(var|func|let|class|enum)\\b"},"string-literal":{"name":"meta.literal.string.motoko","begin":"\\\"","end":"\\\"","patterns":[{"name":"constant.character.escape.motoko","match":"\\\\([0tnr\\\"\\'\\\\]|x[[:xdigit:]]{2}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})"},{"contentName":"meta.expression.motoko","begin":"(\\\\\\()","end":"(\\))","patterns":[{}],"beginCaptures":{"1":{"name":"support.punctuation.expression.begin.motoko"}},"endCaptures":{"1":{"name":"support.punctuation.expression.end.motoko"}}},{"name":"invalid.illegal.motoko","match":"(\\\"|\\\\)"},{"name":"string.quoted.double.motoko","match":"(.)"}],"beginCaptures":{"0":{"name":"string.quoted.double.motoko"}},"endCaptures":{"0":{"name":"string.quoted.double.motoko"}}},"switch-statement-keyword":{"name":"keyword.control.switch.motoko","match":"\\b(switch|case|default)\\b"},"type":{"patterns":[{"include":"#primitive-type"},{"include":"#resolved-type"},{"include":"#optional-type"},{"include":"#protocol-composition-type"}]}}}
|
1
|
+
{"name":"Motoko","scopeName":"source.mo","patterns":[{"include":"#shebang-line"},{"include":"#comment"},{"include":"#attribute"},{"include":"#literal"},{"include":"#operator"},{"include":"#declaration"},{"include":"#storage-type"},{"include":"#keyword"},{"include":"#type"},{"include":"#boolean"}],"repository":{"access-level-modifier":{"name":"keyword.other.access-level-modifier.motoko","match":"\\b(public|system|private)\\b"},"arithmetic-operator":{"name":"keyword.operator.arithmetic.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+|\\-|\\*|\\/)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"array-type":{"name":"meta.array.motoko","begin":"\\b(Array)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.array.motoko"},"2":{"name":"punctuation.array.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.array.end.motoko"}}},"assignment-operator":{"name":"keyword.operator.assignment.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+|\\-|\\*|\\/|%|\u003c\u003c|\u003e\u003e|\u0026|\\^|\\||\u0026\u0026|\\|\\|)?=(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"async-await-keyword":{"name":"keyword.async-await.motoko","match":"\\b(async|await)\\b"},"attribute":{"name":"meta.attribute.motoko","patterns":[{"contentName":"meta.attribute.arguments.motoko","begin":"((@)(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B))(\\()","end":"\\)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"storage.modifier.attribute.motoko"},"2":{"name":"punctuation.definition.attribute.motoko"},"3":{"name":"punctuation.definition.attribute-arguments.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.attribute-arguments.end.motoko"}}},{"match":"((@)(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B))","captures":{"1":{"name":"storage.modifier.attribute.motoko"},"2":{"name":"punctuation.definition.attribute.motoko"}}}]},"bitwise-operator":{"name":"keyword.operator.bitwise.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\u0026|\\||\\^|\u003c\u003c|\u003e\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"block-comment":{"name":"comment.block.motoko","begin":"/\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.end.motoko"}}},"boolean":{"name":"keyword.constant.boolean.motoko","match":"\\b(true|false)\\b"},"branch-statement-keyword":{"name":"keyword.control.branch.motoko","patterns":[{"include":"#if-statement-keyword"},{"include":"#switch-statement-keyword"}]},"catch-statement-keyword":{"name":"kewyord.control.catch.motoko","match":"\\b(catch|do)\\b"},"code-block":{"begin":"(\\{)","end":"(\\})","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.code-block.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.code-block.end.motoko"}}},"comment":{"patterns":[{"include":"#documentation-comment"},{"include":"#block-comment"},{"include":"#in-line-comment"}]},"comparative-operator":{"name":"keyword.operator.comparative.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])((=|!)==?|(\u003c|\u003e)=?|~=)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"control-transfer-statement-keyword":{"name":"keyword.control.transfer.motoko","match":"\\b(continue|break|return)\\b"},"custom-operator":{"patterns":[{"name":"keyword.operator.custom.prefix.unary.motoko","match":"(?\u003c=[\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?![\\s)\\]},;:])"},{"name":"keyword.operator.custom.postfix.unary.motoko","match":"(?\u003c![\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?![\\s)\\]},;:\\.])"},{"name":"keyword.operator.custom.binary.motoko","match":"(?\u003c=[\\s(\\[{,;:])([/=\\-+!*%\u003c\u003e\u0026|\\^~.]++)(?=[\\s)\\]},;:])"}]},"declaration":{"name":"meta.declaration.motoko","patterns":[{"include":"#import-declaration"}]},"declaration-modifier":{"name":"keyword.other.declaration-modifier.motoko","match":"\\b(class|object|type|shared)\\b"},"dictionary-type":{"name":"meta.dictionary.motoko","begin":"\\b(Dictionary)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.dictionary.motoko"},"2":{"name":"punctuation.dictionary.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.dictionary.end.motoko"}}},"documentation-comment":{"name":"comment.block.documentation.motoko","begin":"/\\*\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.documentation.begin.motoko"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.documentation.end.motoko"}}},"floating-point-literal":{"name":"constant.numeric.floating-point.motoko","patterns":[{"match":"\\b([0-9][0-9_]*)(\\.([0-9][0-9_]*))?([eE][+\\-]?([0-9][0-9_]*))?\\b"},{"match":"\\b(0x[[:xdigit:]][[[:xdigit:]]_]*)(\\.(0x[[:xdigit:]][[[:xdigit:]]_]*))?([pP][+\\-]?(0x[[:xdigit:]][[[:xdigit:]]_]*))\\b"}]},"function-body":{"name":"meta.function-body.motoko","patterns":[{"include":"#code-block"}]},"function-declaration":{"name":"meta.function-declaration.motoko","begin":"\\b(func)\\s+(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+)\\s*(?=\\(|\u003c)","end":"(?\u003c=\\})","patterns":[{"include":"#generic-parameter-clause"},{"include":"#parameter-clause"},{"include":"#function-result"},{"include":"#function-body"}],"beginCaptures":{"1":{"name":"storage.type.function.motoko"},"2":{"name":"entity.type.function.motoko"}}},"function-result":{"name":"meta.function-result.motoko","begin":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\-\u003e)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\s*","end":"\\s*(?=\\{)","patterns":[{"include":"#type"}],"beginCaptures":{"1":{"name":"keyword.operator.function-result.motoko"}}},"generic-parameter-clause":{"name":"meta.generic-parameter-clause.motoko","begin":"(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.generic-parameter-clause.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.generic-parameter-clause.end.motoko"}}},"identifier":{"name":"meta.identifier.motoko","match":"(\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B)"},"if-statement-keyword":{"name":"keyword.control.if.motoko","match":"\\b(if|else)\\b"},"import-declaration":{"name":"meta.import.motoko","match":"\\b(import)\\s+(?:(class|var|func)\\s+)?((?:\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+)(?:\\.(?:\\B\\$[0-9]+|\\b[\\w^\\d][\\w\\d]*\\b|\\B`[\\w^\\d][\\w\\d]*`\\B|[/=\\-+!*%\u003c\u003e\u0026|\\^~.]+))*)","captures":{"1":{"name":"keyword.other.import.motoko"},"2":{"name":"storage.modifier.motoko"},"3":{"name":"support.type.module.import.motoko"}}},"in-line-comment":{"name":"comment.line.double-slash.motoko","match":"(//).*","captures":{"1":{"name":"punctuation.definition.comment.line.double-slash.motoko"}}},"increment-decrement-operator":{"name":"keyword.operator.increment-or-decrement.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(\\+\\+|\\-\\-)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"integer-literal":{"name":"constant.numeric.integer.motoko","patterns":[{"name":"constant.numeric.integer.binary.motoko","match":"(\\B\\-|\\b)(0b[01][01_]*)\\b"},{"name":"constant.numeric.integer.octal.motoko","match":"(\\B\\-|\\b)(0o[0-7][0-7_]*)\\b"},{"name":"constant.numeric.integer.decimal.motoko","match":"(\\B\\-|\\b)([0-9][0-9_]*)\\b"},{"name":"constant.numeric.integer.hexadecimal.motoko","match":"(\\B\\-|\\b)(0x[[:xdigit:]][[[:xdigit:]]_]*)\\b"}]},"keyword":{"patterns":[{"include":"#branch-statement-keyword"},{"include":"#control-transfer-statement-keyword"},{"include":"#loop-statement-keyword"},{"include":"#catch-statement-keyword"},{"include":"#async-await-keyword"},{"include":"#operator-declaration-modifier"},{"include":"#declaration-modifier"},{"include":"#access-level-modifier"},{"name":"keyword.declaration.motoko","match":"\\b(actor|and|class|func|import|let|module|not|or)\\b"},{"name":"keyword.statement.motoko","match":"\\b(assert|break|case|continue|default|debug|debug_show|else|if|ignore|in|for|label|null|return|switch|while|loop|try|throw|catch|do|to_candid|from_candid|with)\\b"},{"name":"keyword.other.motoko","match":"\\b(flexible|query|stable)\\b"}]},"literal":{"patterns":[{"include":"#integer-literal"},{"include":"#floating-point-literal"},{"include":"#nil-literal"},{"include":"#string-literal"},{"include":"#special-literal"}]},"logical-operator":{"name":"keyword.operator.logical.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])(!|\u0026\u0026|\\|\\|)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"loop-statement-keyword":{"name":"keyword.control.loop.motoko","match":"\\b(while|repeat|for|in|loop)\\b"},"null-literal":{"name":"constant.null.motoko","match":"\\bnull\\b"},"operator":{"patterns":[{"include":"#comparative-operator"},{"include":"#assignment-operator"},{"include":"#logical-operator"},{"include":"#remainder-operator"},{"include":"#increment-decrement-operator"},{"include":"#overflow-operator"},{"include":"#range-operator"},{"include":"#bitwise-operator"},{"include":"#arithmetic-operator"},{"include":"#ternary-operator"},{"include":"#type-casting-operator"},{"include":"#custom-operator"}]},"optional-type":{"name":"meta.optional.motoko","match":"\\b(Optional)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.optional.motoko"},"2":{"name":"punctuation.optional.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.optional.end.motoko"}}},"overflow-operator":{"name":"keyword.operator.overflow.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\\u0026(\\+|\\-|\\*|\\/|%)(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"parameter-clause":{"name":"meta.parameter-clause.motoko","begin":"(\\()","end":"(\\))","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"punctuation.definition.function-arguments.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.definition.function-arguments.end.motoko"}}},"primitive-type":{"name":"support.type.motoko","match":"\\b(Blob|Bool|Char|Float|(Int|Nat)(8|16|32|64)?|Principal|Text|Error)\\b"},"protocol-composition-type":{"name":"meta.protocol.motoko","match":"\\b(protocol)(\u003c)","end":"(\u003e)","patterns":[{"include":"$self"}],"beginCaptures":{"1":{"name":"support.type.protocol.motoko"},"2":{"name":"punctuation.protocol.begin.motoko"}},"endCaptures":{"1":{"name":"punctuation.protocol.end.motoko"}}},"range-operator":{"name":"keyword.operator.range.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\.\\.(?:\\.)?(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"remainder-operator":{"name":"keyword.operator.remainder.motoko","match":"(?\u003c![/=\\-+!*%\u003c\u003e\u0026|\\^~.])\\%(?![/=\\-+!*%\u003c\u003e\u0026|\\^~.])"},"resolved-type":{"name":"support.type.motoko","match":"\\b[A-Z].*?\\b"},"shebang-line":{"name":"comment.line.shebang.motoko","match":"^(#!).*$","captures":{"1":{"name":"punctuation.definition.comment.line.shebang.motoko"}}},"special-literal":{"name":"keyword.other.literal.motoko","match":"\\b__(FILE|LINE|COLUMN|FUNCTION)__\\b"},"storage-type":{"name":"storage.type.motoko","match":"\\b(var|func|let|class|enum)\\b"},"string-literal":{"name":"meta.literal.string.motoko","begin":"\\\"","end":"\\\"","patterns":[{"name":"constant.character.escape.motoko","match":"\\\\([0tnr\\\"\\'\\\\]|x[[:xdigit:]]{2}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})"},{"contentName":"meta.expression.motoko","begin":"(\\\\\\()","end":"(\\))","patterns":[{}],"beginCaptures":{"1":{"name":"support.punctuation.expression.begin.motoko"}},"endCaptures":{"1":{"name":"support.punctuation.expression.end.motoko"}}},{"name":"invalid.illegal.motoko","match":"(\\\"|\\\\)"},{"name":"string.quoted.double.motoko","match":"(.)"}],"beginCaptures":{"0":{"name":"string.quoted.double.motoko"}},"endCaptures":{"0":{"name":"string.quoted.double.motoko"}}},"switch-statement-keyword":{"name":"keyword.control.switch.motoko","match":"\\b(switch|case|default)\\b"},"type":{"patterns":[{"include":"#primitive-type"},{"include":"#resolved-type"},{"include":"#optional-type"},{"include":"#protocol-composition-type"}]}}}
|
data/grammars/source.move.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"scopeName":"source.move","patterns":[{"include":"#comments"},{"include":"#module"},{"include":"#script"},{"include":"#macros"}],"repository":{"address_literal":{"patterns":[{"name":"support.constant.diem.address.move","match":"\\b(0x[A-Fa-f0-9][A-Fa-f0-9]{,31})\\b"},{"name":"support.constant.dfinance.address.move","match":"\\b(wallet1\\w{38})"},{"name":"support.constant.named.address.move","match":"\\s([@]\\w+)\\b"}]},"as":{"name":"keyword.control.move","match":"\\b(as)\\b"},"as-import":{"name":"meta.import_as.move","match":"\\b(as)\\b"},"assert":{"name":"support.function.assert.move","match":"\\b(assert)\\b"},"block":{"name":"meta.block.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#as"},{"include":"#mut"},{"include":"#let"},{"include":"#types"},{"include":"#assert"},{"include":"#literals"},{"include":"#control"},{"include":"#move_copy"},{"include":"#resource_methods"},{"include":"#module_access"},{"include":"#fun_call"},{"include":"#block"}]},"block-comments":{"patterns":[{"name":"comment.block.documentation.move","begin":"/\\*[\\*!](?![\\*/])","end":"\\*/"},{"name":"comment.block.move","begin":"/\\*","end":"\\*/"}]},"comments":{"name":"meta.comments.move","patterns":[{"include":"#line-comments"},{"include":"#block-comments"}]},"const":{"name":"meta.const.move","begin":"\\b(const)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#primitives"},{"include":"#vector"},{"include":"#literals"},{"name":"constant.other.move","match":"\\b([\\w_]+)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.const.move"}}},"control":{"name":"keyword.control.move","match":"\\b(return|while|loop|if|else|break|continue|abort)\\b"},"entry_fun":{"name":"meta.entry_fun.move","begin":"\\b(entry)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"name":"storage.modifier.native.move","match":"\\b(native)\\b"},{"name":"storage.modifier.public.move","match":"\\b(public)\\b"},{"include":"#fun"}],"beginCaptures":{"1":{"name":"storage.modifier.entry.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(\\w+)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"fun":{"patterns":[{"include":"#fun_signature"},{"include":"#fun_body"}]},"fun_body":{"name":"meta.fun_body.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#import"},{"include":"#as"},{"include":"#mut"},{"include":"#let"},{"include":"#types"},{"include":"#assert"},{"include":"#literals"},{"include":"#control"},{"include":"#move_copy"},{"include":"#resource_methods"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#fun_call"},{"include":"#block"}]},"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":"#types"},{"include":"#mut"},{"name":"meta.function_name.move","begin":"(?\u003c=fun)","end":"(?=[\u003c(])","patterns":[{"include":"#comments"},{"name":"entity.name.function.move","match":"\\b(\\w+)\\b"}]},{"include":"#type_param"},{"name":"meta.parentheses.move","begin":"[(]","end":"[)]","patterns":[{"include":"#comments"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#types"},{"include":"#mut"}]},{"name":"storage.modifier","match":"\\b(acquires)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.fun.move"}}},"import":{"name":"meta.import.move","begin":"\\b(use)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#address_literal"},{"include":"#as-import"},{"begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#as-import"},{"name":"entity.name.type.move","match":"\\b(\\w+)\\b"}]},{"name":"entity.name.type.module.move","match":"\\b(\\w+)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"let":{"name":"keyword.control.move","match":"\\b(let)\\b"},"line-comments":{"name":"comment.line.double-slash.move","begin":"//","end":"$"},"literals":{"patterns":[{"name":"constant.numeric.hex.move","match":"0x[_a-fA-F0-9]+(?:[iu](?:8|16|32|64|size))?"},{"name":"constant.numeric.move","match":"(?\u003c!(?:\\w|(?:(?\u003c!\\.)\\.)))[0-9][_0-9]*(?:\\.(?!\\.)(?:[0-9][_0-9]*)?)?(?:[eE][+\\-]?[_0-9]+)?(?:[u](?:8|64|128|))?"},{"match":"\\b(?:h)(\"[a-fA-F0-9]+\")","captures":{"1":{"name":"constant.character.move"}}},{"name":"meta.ascii_literal.move","match":"\\b(\"(.*)\")","captures":{"1":{"name":"string.quoted.double.raw.byte.move"}}},{"name":"meta.hex_literal.move","match":"x\"([A-F0-9a-f]+)\"","captures":{"1":{"name":"constant.numeric.hex.move"}}},{"name":"constant.language.boolean.move","match":"\\b(?:true|false)\\b"},{"include":"#address_literal"}]},"macros":{"name":"support.constant.macro.move","match":"#\\[(?:[\\w0-9=_\\(\\)\\s\"]+)\\]"},"module":{"name":"meta.module.move","begin":"\\b(module)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"begin":"(?\u003c=module)","end":"(?={)","patterns":[{"include":"#comments"},{"name":"constant.other.move","begin":"(?\u003c=module)","end":"(?=::)"},{"name":"entity.name.type.move","begin":"(?\u003c=::)","end":"(?={)"}]},{"name":"meta.module_scope.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#macros"},{"include":"#import"},{"include":"#friend"},{"include":"#const"},{"include":"#struct"},{"include":"#entry_fun"},{"include":"#native_fun"},{"include":"#public_fun"},{"include":"#fun"},{"include":"#spec"},{"include":"#block"}]}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"module_access":{"name":"meta.module_access.move","match":"\\b(\\w+)::(\\w+)\\b","captures":{"1":{"name":"entity.name.type.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":"(?\u003c=\u0026)(mut)\\b"},"native_fun":{"name":"meta.native_fun.move","begin":"\\b(native)\\b","end":"(?\u003c=[;}])","patterns":[{"include":"#comments"},{"name":"storage.modifier.public.move","match":"\\b(public)\\b"},{"name":"storage.modifier.entry.move","match":"\\b(entry)\\b"},{"include":"#fun_signature"}],"beginCaptures":{"1":{"name":"storage.modifier.native.move"}}},"phantom":{"name":"keyword.control.phantom.move","match":"\\b(phantom)\\b"},"primitives":{"name":"support.type.primitives.move","match":"\\b(u8|u64|u128|address|bool|signer)\\b"},"public_fun":{"name":"meta.public_fun.move","begin":"\\b(public)\\b","end":"(?\u003c=[;}])","patterns":[{"include":"#comments"},{"name":"storage.modifier.native.move","match":"\\b(native)\\b"},{"name":"storage.modifier.entry.move","match":"\\b(entry)\\b"},{"begin":"\\(","end":"\\)","patterns":[{"include":"#comments"},{"name":"storage.modifier.public.script.move","match":"\\b(script|friend)\\b"}]},{"include":"#fun"}],"beginCaptures":{"1":{"name":"storage.modifier.public.move"}}},"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=define)","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|u64|u128|address)\\b"},"struct":{"name":"meta.struct.move","begin":"\\b(struct)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"name":"meta.struct_def.move","begin":"(?\u003c=struct)","end":"(?={)","patterns":[{"include":"#comments"},{"name":"keyword.control.ability.has.move","match":"\\b(has)\\b"},{"name":"entity.name.type.ability.move","match":"\\b(store|key|drop|copy)\\b"},{"name":"entity.name.type.move","match":"\\b(\\w+)\\b"},{"include":"#type_param"}]},{"name":"meta.struct_body.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#types"}]}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"type_param":{"name":"meta.generic_param.move","begin":"\u003c","end":"\u003e","patterns":[{"include":"#comments"},{"include":"#phantom"},{"include":"#module_access"},{"name":"entity.name.type.kind.move","match":"\\b(store|drop|key|copy)\\b"}]},"types":{"name":"meta.types.move","patterns":[{"include":"#primitives"},{"include":"#vector"},{"name":"entity.name.type","match":"\\b([A-Z][A-Za-z_]+)\\b"},{"name":"constant.other.move","match":"\\b([A-Z_]+)\\b"}]},"vector":{"name":"meta.vector.move","begin":"\\b(vector)\u003c","end":"\u003e","patterns":[{"include":"#primitives"},{"include":"#vector"}],"beginCaptures":{"1":{"name":"support.type.vector.move"}}}}}
|
1
|
+
{"scopeName":"source.move","patterns":[{"include":"#address"},{"include":"#comments"},{"include":"#module"},{"include":"#script"},{"include":"#macros"}],"repository":{"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"}}},"address_literal":{"patterns":[{"name":"support.constant.diem.address.move","match":"\\b(0x[A-Fa-f0-9][A-Fa-f0-9]{,31})\\b"},{"name":"support.constant.dfinance.address.move","match":"\\b(wallet1\\w{38})"},{"name":"support.constant.named.address.move","match":"\\s([@]\\w+)\\b"}]},"as":{"name":"keyword.control.move","match":"\\b(as)\\b"},"as-import":{"name":"meta.import_as.move","match":"\\b(as)\\b"},"assert":{"name":"support.function.assert.move","match":"\\b(assert)\\b"},"block":{"name":"meta.block.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#as"},{"include":"#mut"},{"include":"#let"},{"include":"#types"},{"include":"#assert"},{"include":"#literals"},{"include":"#control"},{"include":"#move_copy"},{"include":"#resource_methods"},{"include":"#module_access"},{"include":"#fun_call"},{"include":"#block"}]},"block-comments":{"patterns":[{"name":"comment.block.documentation.move","begin":"/\\*[\\*!](?![\\*/])","end":"\\*/"},{"name":"comment.block.move","begin":"/\\*","end":"\\*/"}]},"comments":{"name":"meta.comments.move","patterns":[{"include":"#line-comments"},{"include":"#block-comments"}]},"const":{"name":"meta.const.move","begin":"\\b(const)\\b","end":";","patterns":[{"include":"#comments"},{"include":"#primitives"},{"include":"#vector"},{"include":"#literals"},{"name":"constant.other.move","match":"\\b([\\w_]+)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.const.move"}}},"control":{"name":"keyword.control.move","match":"\\b(return|while|loop|if|else|break|continue|abort)\\b"},"entry_fun":{"name":"meta.entry_fun.move","begin":"\\b(entry)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"name":"storage.modifier.native.move","match":"\\b(native)\\b"},{"name":"storage.modifier.public.move","match":"\\b(public)\\b"},{"include":"#fun"}],"beginCaptures":{"1":{"name":"storage.modifier.entry.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(\\w+)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"fun":{"patterns":[{"include":"#fun_signature"},{"include":"#fun_body"}]},"fun_body":{"name":"meta.fun_body.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#import"},{"include":"#as"},{"include":"#mut"},{"include":"#let"},{"include":"#types"},{"include":"#assert"},{"include":"#literals"},{"include":"#control"},{"include":"#move_copy"},{"include":"#resource_methods"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#fun_call"},{"include":"#block"}]},"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":"#types"},{"include":"#mut"},{"name":"meta.function_name.move","begin":"(?\u003c=fun)","end":"(?=[\u003c(])","patterns":[{"include":"#comments"},{"name":"entity.name.function.move","match":"\\b(\\w+)\\b"}]},{"include":"#type_param"},{"name":"meta.parentheses.move","begin":"[(]","end":"[)]","patterns":[{"include":"#comments"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#types"},{"include":"#mut"}]},{"name":"storage.modifier","match":"\\b(acquires)\\b"}],"beginCaptures":{"1":{"name":"storage.modifier.fun.move"}}},"import":{"name":"meta.import.move","begin":"\\b(use)\\b","end":";","patterns":[{"include":"#comments"},{"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"}}},"let":{"name":"keyword.control.move","match":"\\b(let)\\b"},"line-comments":{"name":"comment.line.double-slash.move","begin":"//","end":"$"},"literals":{"patterns":[{"name":"constant.numeric.hex.move","match":"0x[_a-fA-F0-9]+(?:[iu](?:8|16|32|64|size))?"},{"name":"constant.numeric.move","match":"(?\u003c!(?:\\w|(?:(?\u003c!\\.)\\.)))[0-9][_0-9]*(?:\\.(?!\\.)(?:[0-9][_0-9]*)?)?(?:[eE][+\\-]?[_0-9]+)?(?:[u](?:8|64|128|))?"},{"match":"\\b(?:h)(\"[a-fA-F0-9]+\")","captures":{"1":{"name":"constant.character.move"}}},{"name":"meta.ascii_literal.move","match":"\\b(\"(.*)\")","captures":{"1":{"name":"string.quoted.double.raw.byte.move"}}},{"name":"meta.hex_literal.move","match":"x\"([A-F0-9a-f]+)\"","captures":{"1":{"name":"constant.numeric.hex.move"}}},{"name":"constant.language.boolean.move","match":"\\b(?:true|false)\\b"},{"include":"#address_literal"}]},"macros":{"name":"support.constant.macro.move","match":"#\\[(?:[\\w0-9=_\\(\\)\\s\"]+)\\]"},"module":{"name":"meta.module.move","begin":"\\b(module)\\b","end":"(?\u003c=})","patterns":[{"include":"#comments"},{"begin":"(?\u003c=module)","end":"(?={)","patterns":[{"include":"#comments"},{"name":"constant.other.move","begin":"(?\u003c=module)","end":"(?=[(::){])"},{"name":"entity.name.type.move","begin":"(?\u003c=::)","end":"(?=[\\s{])"}]},{"name":"meta.module_scope.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#macros"},{"include":"#import"},{"include":"#friend"},{"include":"#const"},{"include":"#struct"},{"include":"#entry_fun"},{"include":"#native_fun"},{"include":"#public_fun"},{"include":"#fun"},{"include":"#spec"},{"include":"#block"}]}],"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":"(?\u003c=\u0026)(mut)\\b"},"native_fun":{"name":"meta.native_fun.move","begin":"\\b(native)\\b","end":"(?\u003c=[;}])","patterns":[{"include":"#comments"},{"name":"storage.modifier.public.move","match":"\\b(public)\\b"},{"name":"storage.modifier.entry.move","match":"\\b(entry)\\b"},{"include":"#fun_signature"}],"beginCaptures":{"1":{"name":"storage.modifier.native.move"}}},"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_fun":{"name":"meta.public_fun.move","begin":"\\b(public)\\b","end":"(?\u003c=[;}])","patterns":[{"include":"#comments"},{"name":"storage.modifier.native.move","match":"\\b(native)\\b"},{"name":"storage.modifier.entry.move","match":"\\b(entry)\\b"},{"begin":"\\(","end":"\\)","patterns":[{"include":"#comments"},{"name":"storage.modifier.public.script.move","match":"\\b(script|friend)\\b"}]},{"include":"#fun"}],"beginCaptures":{"1":{"name":"storage.modifier.public.move"}}},"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=define)","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"},{"name":"meta.struct_def.move","begin":"(?\u003c=struct)","end":"(?={)","patterns":[{"include":"#comments"},{"name":"keyword.control.ability.has.move","match":"\\b(has)\\b"},{"name":"entity.name.type.ability.move","match":"\\b(store|key|drop|copy)\\b"},{"name":"entity.name.type.move","match":"\\b(\\w+)\\b"},{"include":"#type_param"}]},{"name":"meta.struct_body.move","begin":"{","end":"}","patterns":[{"include":"#comments"},{"include":"#self_access"},{"include":"#module_access"},{"include":"#types"}]}],"beginCaptures":{"1":{"name":"storage.modifier.type.move"}}},"type_param":{"name":"meta.generic_param.move","begin":"\u003c","end":"\u003e","patterns":[{"include":"#comments"},{"include":"#phantom"},{"include":"#module_access"},{"name":"entity.name.type.kind.move","match":"\\b(store|drop|key|copy)\\b"}]},"types":{"name":"meta.types.move","patterns":[{"include":"#primitives"},{"include":"#vector"},{"name":"entity.name.type","match":"\\b([A-Z][A-Za-z_]+)\\b"},{"name":"constant.other.move","match":"\\b([A-Z_]+)\\b"}]},"vector":{"name":"meta.vector.move","begin":"\\b(vector)\u003c","end":"\u003e","patterns":[{"include":"#primitives"},{"include":"#vector"}],"beginCaptures":{"1":{"name":"support.type.vector.move"}}}}}
|
data/grammars/source.opts.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"Option list","scopeName":"source.opts","patterns":[{"include":"#main"}],"repository":{"escape":{"patterns":[{"include":"etc#esc"},{"name":"constant.character.percent.url-encoded.opts","match":"(%)[A-Fa-f0-9]{2}","captures":{"1":{"name":"punctuation.definition.character.percentage.opts"}}}]},"main":{"patterns":[{"include":"etc#comment"},{"include":"#option"},{"include":"#escape"}]},"option":{"patterns":[{"name":"meta.option.opts","begin":"(
|
1
|
+
{"name":"Option list","scopeName":"source.opts","patterns":[{"include":"#main"}],"repository":{"escape":{"patterns":[{"include":"etc#esc"},{"name":"constant.character.percent.url-encoded.opts","match":"(%)[A-Fa-f0-9]{2}","captures":{"1":{"name":"punctuation.definition.character.percentage.opts"}}}]},"main":{"patterns":[{"include":"etc#comment"},{"include":"#option"},{"include":"#escape"}]},"option":{"patterns":[{"name":"meta.option.opts","begin":"((--?)[^-\\s=][^\\s=]*)","end":"(?!\\G)(?=\\$|\\S)","patterns":[{"match":"(?xi)\n(?\u003c= # HACK: Fixed-width look-behinds enforced by Oniguruma\n\t\\w[-_]pattern \\G\n\t| reg[-_]exp \\G\n\t| regexp \\G\n\t| reg[-_]ex \\G\n\t| regex \\G\n) \\s+ (\\S+)","captures":{"1":{"name":"string.regexp.opts","patterns":[{"include":"source.regexp"}]}}},{"match":"\\G(=)(\\S*)","captures":{"1":{"patterns":[{"include":"etc#eql"}]},"2":{"patterns":[{"include":"#value"}]}}},{"match":"\\G\\s+(?!#|-)(\\S+)","captures":{"1":{"patterns":[{"include":"#value"}]}}}],"beginCaptures":{"1":{"name":"entity.name.option.opts"},"2":{"name":"punctuation.definition.option.name.dash.opts"}}}]},"value":{"patterns":[{"include":"etc"},{"include":"etc#bareword"}]}}}
|
data/grammars/source.p4.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"P4
|
1
|
+
{"name":"P4","scopeName":"source.p4","patterns":[{"name":"comment.block.p4","begin":"/\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.begin.p4"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.block.end.p4"}}},{"name":"string.quoted.double.p4","begin":"\"","end":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.p4"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.p4"}}},{"name":"comment.line.p4","begin":"//","end":"\\n","beginCaptures":{"0":{"name":"comment.p4"}}},{"name":"storage.type.object.p4","match":"\\b(header_type|header|metadata|field_list|field_list_calculation|parser|parser_exception|parser_value_set|counter|meter|register|action|action_profile|table|control|extern)\\b"},{"name":"storage.data.type.p4","match":"\\b(bool|bit|varbit|int)\\b"},{"name":"variable.language.p4","match":"\\b(hit|miss|latest|return|default)\\b"},{"name":"keyword.control.p4","match":"\\b(if|else if|else|return|hit|miss|true|false)\\b"},{"name":"keyword.operator.p4","match":"\\b(and|or)\\b"},{"name":"entity.name.type.p4","match":"\\b(exact|ternary|lpm|range|valid|mask)\\b"},{"name":"storage.type.p4","match":"\\b(reads|actions|min_size|max_size|size|support_timeout|action_profile)\\b"},{"name":"storage.type.p4","match":"\\b(bytes|packets)\\b"},{"name":"entity.name.type.p4","match":"\\b(width|layout|attributes|type|static|result|direct|instance_count|min_width|saturating)\\b"},{"name":"entity.name.type.p4","match":"\\b(length|fields|max_length)\\b"},{"name":"meta.preprocessor.include.p4","match":"\\#include"},{"name":"meta.preprocessor.define.p4","match":"\\#define"},{"name":"support.function.primitive.p4","match":"\\b(apply|valid|select|current|extract|add_header|copy_header|remove_header|modify_field|add_to_field|add|set_field_to_hash_index|truncate|drop|no_op|push|pop|count|meter|generate_digest|resubmit|recirculate|clone_ingress_pkt_to_ingress|clone_egress_pkt_to_ingress|clone_ingress_pkt_to_egress|clone_egress_pkt_to_egress|register_write|register_read)\\b"},{"name":"support.any-method.p4","match":"[a-zA-Z_][0-9a-zA-Z_]*"},{"name":"constant.numeric.p4","match":"[\\+|-]?[0-9]+'[0-9]+"},{"name":"constant.numeric.p4","match":"0(x|X)[0-9a-fA-F]+"},{"name":"constant.numeric.p4","match":"0(b|B)[01]+"},{"name":"constant.numeric.p4","match":"[0-9]+"},{"name":"constant.language.p4","match":"\\b(true|false)\\b"}]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"PDDL Plan Happenings","scopeName":"source.pddl.happenings","patterns":[{"include":"#happening"},{"include":"#meta"},{"include":"#comments"},{"include":"#scalars"},{"include":"#unexpected"}],"repository":{"comments":{"patterns":[{"name":"comment.line","match":";.*$"}]},"happening":{"patterns":[{"name":"variable.happening","match":"^\\s*((\\d+|\\d+\\.\\d+|\\.\\d+)\\s*:)?\\s*(start|end)?\\s*\\(([\\w -]+)\\)\\s*(#\\d+)?\\s*(;.*)?$","captures":{"2":{"name":"constant.numeric.happening.time"},"3":{"name":"keyword.control.happening.snap"},"4":{"name":"support.function.action.name"},"5":{"name":"constant.other.happening.counter"},"6":{"name":"comment.line"}}},{"name":"variable.til","match":"^\\s*((\\d+|\\d+\\.\\d+|\\.\\d+)\\s*:)?\\s*(set|unset)\\s*\\(([\\w -]+)\\)\\s*(;.*)?$","captures":{"2":{"name":"constant.numeric.happening.time"},"3":{"name":"keyword.control.happening.operator"},"4":{"name":"support.variable.predicate.name"},"5":{"name":"comment.line"}}},{"name":"variable.tif","match":"^\\s*((\\d+|\\d+\\.\\d+|\\.\\d+)\\s*:)?\\s*\\(=\\s*\\(([\\w -]+)\\)\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)\\s*\\)\\s*(;.*)?$","captures":{"2":{"name":"constant.numeric.happening.time"},"3":{"name":"keyword.control.happening.operator"},"4":{"name":"support.variable.function.name"},"5":{"name":"constant.numeric.function.value"},"6":{"name":"comment.line"}}}]},"meta":{"patterns":[{"name":"meta.preprocessor.reference","match":"^;;\\s*!(domain|problem):\\s*([\\w-]+)\\s*$","captures":{"1":{"name":"variable.parameter.key"},"3":{"name":"variable.parameter.value"}}},{"name":"meta.preprocessor","match":"^;;\\s*!"}]},"scalars":{"patterns":[{"name":"constant.numeric","match":"\\b[-+]?([0-9]*\\.[0-9]+|[0-9]+)\\b"}]},"unexpected":{"patterns":[{"name":"invalid.illegal","match":":[\\w-]+\\b"},{"name":"invalid.illegal","match":"\\?"},{"name":"invalid.illegal","match":".*"}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"PDDL","scopeName":"source.pddl","patterns":[{"include":"#meta"},{"include":"#keywords"},{"include":"#comments"},{"include":"#scalars"},{"include":"#time-qualifiers"},{"include":"#operators"},{"include":"#parameters"},{"include":"#unexpected"}],"repository":{"comments":{"patterns":[{"name":"comment.line","match":";.*$"}]},"keywords":{"patterns":[{"name":"keyword.control.pddl.header","match":"\\b(define|domain|problem)\\b"},{"name":"keyword.control.pddl.requirements","match":":(strips|typing|negative-preconditions|disjunctive-preconditions|equality|existential-preconditions|universal-preconditions|quantified-preconditions|conditional-effects|fluents|numeric-fluents|object-fluents|adl|durative-actions|duration-inequalities|continuous-effects|derived-predicates|derived-functions|timed-initial-literals|timed-effects|preferences|constraints|action-costs|timed-initial-fluents|time|supply-demand)\\b"},{"name":"keyword.control.pddl.global","match":":(requirements|types|constants|predicates|functions|derived|action|durative-action|event|process|domain|objects|init|goal|metric)\\b"},{"name":"keyword.control.pddl.action","match":":(parameters|precondition|effect)\\b"},{"name":"keyword.control.pddl.action.durative","match":":(parameters|duration|condition|effect)\\b"}]},"meta":{"patterns":[{"name":"meta.preprocessor.pre-parsing","match":"^;;\\s*!pre-parsing:\\s*{\\s*type:\\s*\"(command|nunjucks|jinja2|python)\"\\s*,\\s*(command:\\s*\"([\\w:\\-/\\\\\\. ]+)\"\\s*(,\\s*args:\\s*\\[([^\\]]*)\\])?|data:\\s*\"([\\w:\\-/\\\\\\. ]+)\")\\s*}","captures":{"1":{"name":"variable.parameter.pre-parsing.type"},"3":{"name":"variable.parameter.pre-parsing.command"},"5":{"patterns":[{"name":"variable.parameter.pre-parsing.data","begin":"\"","end":"\""}]},"6":{"name":"variable.parameter.pre-parsing.data"}}},{"name":"meta.preprocessor","match":"^;;\\s*!"},{"name":"meta.preprocessor.template.flow-control","match":"{%[^%]+%}"},{"name":"meta.preprocessor.template.literal","match":"{{[^}]+}}"}]},"operators":{"patterns":[{"name":"keyword.operator.logical","match":"\\b(and|not|or|either)\\b"},{"name":"keyword.other.numeric","match":"(\u003e|\u003c|\u003e=|\u003c=|=|/|\\*|\\+)"},{"name":"keyword.other.effects","match":"\\b(assign|increase|decrease|forall|exists)\\b"},{"name":"keyword.other.undefined","match":"\\b(undefined)\\b"},{"name":"keyword.other.metric","match":"\\b(minimize|maximize)\\b"}]},"parameters":{"patterns":[{"name":"variable.parameter","match":"\\?\\w+\\b"}]},"scalars":{"patterns":[{"name":"constant.numeric","match":"\\b[-+]?([0-9]*\\.[0-9]+|[0-9]+)\\b"}]},"time-qualifiers":{"patterns":[{"name":"keyword.other.pddl_qualifier","match":"\\b(at start|at end|over all)\\b"},{"name":"keyword.other.delta_t","match":"#t\\b"}]},"unexpected":{"patterns":[{"name":"invalid.illegal","match":":[\\w-]+\\b"}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"PDDL Plan","scopeName":"source.pddl.plan","patterns":[{"include":"#action"},{"include":"#meta"},{"include":"#comments"},{"include":"#scalars"},{"include":"#unexpected"}],"repository":{"action":{"patterns":[{"name":"variable.action","match":"^\\s*((\\d+|\\d+\\.\\d+|\\.\\d+)\\s*:)?\\s*\\(([\\w -]+)\\)\\s*(\\[\\s*(\\d+|\\d+\\.\\d+|\\.\\d+)\\s*\\])?\\s*","captures":{"2":{"name":"constant.numeric.action.time"},"3":{"name":"support.function.action.name"},"5":{"name":"constant.numeric.action.duration"}}}]},"comments":{"patterns":[{"name":"comment.line","match":";.*$"}]},"meta":{"patterns":[{"name":"meta.preprocessor.reference","match":"^;;\\s*!(domain|problem):\\s*([\\w-]+)\\s*$","captures":{"1":{"name":"variable.parameter.pre-parsing.type"},"3":{"name":"variable.parameter.pre-parsing.command"}}},{"name":"meta.preprocessor","match":"^;;\\s*!"}]},"scalars":{"patterns":[{"name":"constant.numeric","match":"\\b[-+]?([0-9]*\\.[0-9]+|[0-9]+)\\b"}]},"unexpected":{"patterns":[{"name":"invalid.illegal","match":":[\\w-]+\\b"},{"name":"invalid.illegal","match":"\\?"},{"name":"invalid.illegal","match":".*"}]}}}
|