github-linguist 7.23.0 → 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/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.cairo.json +1 -1
- data/grammars/source.cl.json +1 -1
- data/grammars/source.csswg.json +1 -1
- data/grammars/source.cypher.json +1 -0
- data/grammars/source.data-weave.json +1 -1
- data/grammars/source.denizenscript.json +1 -1
- data/grammars/source.editorconfig.json +1 -1
- data/grammars/source.elvish.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.hack.json +1 -1
- data/grammars/source.httpspec.json +1 -1
- data/grammars/source.imba.json +1 -0
- data/grammars/source.ink.json +1 -0
- data/grammars/source.just.json +1 -0
- 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.pddl.happenings.json +1 -0
- data/grammars/source.pddl.json +1 -0
- data/grammars/source.pddl.plan.json +1 -0
- data/grammars/source.polar.json +1 -0
- data/grammars/source.python.json +1 -1
- data/grammars/source.rescript.json +1 -1
- data/grammars/source.rpgle.json +1 -1
- data/grammars/source.scala.json +1 -1
- data/grammars/source.scenic.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.svelte.json +1 -1
- data/grammars/source.toc.json +1 -1
- data/grammars/source.ts.json +1 -1
- data/grammars/source.tsx.json +1 -1
- data/grammars/source.xojo.json +1 -1
- data/grammars/source.yara.json +1 -1
- data/grammars/text.adblock.json +1 -1
- data/grammars/text.grammarkdown.json +1 -0
- data/grammars/text.html.ecmarkup.json +1 -0
- data/grammars/text.html.statamic.json +1 -1
- data/grammars/text.restructuredtext.json +1 -1
- data/grammars/text.roff.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 +30 -1
- data/lib/linguist/heuristics.yml +36 -2
- data/lib/linguist/languages.json +1 -1
- data/lib/linguist/languages.yml +219 -4
- data/lib/linguist/samples.json +1 -1
- data/lib/linguist/vendor.yml +0 -1
- metadata +29 -3
data/grammars/source.xojo.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"
|
1
|
+
{"name":"Xojo","scopeName":"source.xojo","patterns":[{"include":"#xml"},{"include":"#tags"}],"repository":{"block":{"begin":"^\\s*Begin.*$","end":"^\\s*End$","patterns":[{"include":"#block"},{"include":"#string-literal"},{"include":"#keywords-numeric"},{"include":"#numbers"},{"include":"#numbers-literal"},{"include":"#numbers-binary"}],"beginCaptures":{"0":{"name":"entity.name.section"}},"endCaptures":{"0":{"name":"entity.name.section"}}},"comment":{"name":"comment","match":"(//|').*$"},"comment-rem":{"name":"comment","match":"(?i)(rem .++)$"},"declare":{"name":"keyword","match":"^\\s*(?i)((protected|private|public)\\s+)*(soft\\s+)*(?i)declare\\s+(sub|function)\\s+\\w+"},"directives":{"name":"keyword","match":"(?i)#(if|else|elseif|endif|pragma).*$\\b"},"keywords":{"name":"keyword","match":"\\b(?i)(me|self|super|return|dim|var|const|static|as|if|then|else|elseif|for|next|do|loop|until|while|wend|end if|select case|case|end select|inherits|try|catch|finally|nil|and|or|not|mod|to|downto|new|get|set|end|return|call|invoke)\\b"},"keywords-functions":{"name":"entity.name.function","match":"\\b(?i)(private|protected|public|shared|end)? ?(sub|function|class)\\b(\\s\\w++\\b)?"},"keywords-numeric":{"name":"keyword","match":"\\b(?i)(boolean|integer|double|single|ptr|wstring|cgfloat|long|string|color|true|false|(u)*int(8|16|32|64))\\b"},"numbers":{"match":"\\b((-)?[0-9.]+)\\b","captures":{"1":{"name":"constant.numeric"}}},"numbers-binary":{"name":"constant.numeric.integer","match":"(?i)\u0026b[01]+"},"numbers-literal":{"name":"constant.numeric.integer","match":"(?i)(\u0026h|\u0026c)[0-9a-f]+"},"string-literal":{"name":"string.quoted.double","match":"(\\\".*?\\\")"},"tags":{"begin":"^\\s*(#tag\\s\\w+)(\\s\\w+)?(.*)$","end":"^\\s*(#tag end.*)$","patterns":[{"include":"#block"},{"include":"#comment"},{"include":"#comment-rem"},{"include":"#tags"},{"include":"#string-literal"},{"include":"#directives"},{"include":"#keywords-numeric"},{"include":"#keywords-functions"},{"include":"#keywords"},{"include":"#declare"},{"include":"#numbers"},{"include":"#numbers-literal"},{"include":"#numbers-binary"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin"},"2":{"name":"entity.name.type"},"3":{"patterns":[{"include":"#string-literal"},{"include":"#numbers"},{"include":"#numbers-literal"},{"include":"#numbers-binary"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end"}}},"xml":{"begin":"^\\s*(\u003c[^/].*?\u003e)","end":"(\u003c/\\w*\u003e)$","patterns":[{"include":"#xml"},{"include":"#comment"},{"include":"#comment-rem"},{"include":"#string-literal"},{"include":"#directives"},{"include":"#keywords-numeric"},{"include":"#keywords-functions"},{"include":"#keywords"},{"include":"#declare"},{"include":"#numbers"},{"include":"#numbers-literal"},{"include":"#numbers-binary"}],"beginCaptures":{"1":{"name":"punctuation.definition.tag.begin","patterns":[{"include":"#string-literal"}]}},"endCaptures":{"1":{"name":"punctuation.definition.tag.end"}}}}}
|
data/grammars/source.yara.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"YARA","scopeName":"source.yara","patterns":[{"name":"comment.line.double-slash.yara","match":"//.*\\n"},{"name":"comment.block.yara","begin":"/\\*","end":"\\*/"},{"name":"constant.language.boolean.true.yara","match":"(\\btrue\\b|\\bfalse\\b)"},{"name":"constant.numeric.hex.yara","match":"\\b0x[a-fA-F0-9]+\\b"},{"name":"constant.numeric.decimal.yara","match":"\\b[0-9]+(MB|KB)?\\b"},{"name":"keyword.other.all.yara","match":"\\ball\\b"},{"name":"keyword.other.logical.and.yara","match":"\\band\\b"},{"name":"keyword.other.any.yara","match":"\\bany\\b"},{"name":"keyword.other.at.yara","match":"\\bat\\b"},{"name":"keyword.operator.bitwise.yara","match":"(\\\u0026|\\||\\\u003e\\\u003e|\\\u003c\\\u003c|~|\\^)"},{"name":"keyword.other.condition.yara","match":"\\bcondition\\b","end":":"},{"name":"keyword.other.contains.yara","match":"\\bcontains\\b"},{"name":"keyword.other.defined.yara","match":"\\bdefined\\b"},{"name":"keyword.other.icontains.yara","match":"\\bicontains\\b"},{"name":"keyword.other.iequals.yara","match":"\\biequals\\b"},{"name":"keyword.other.startswith.yara","match":"\\bstartswith\\b"},{"name":"keyword.other.istartswith.yara","match":"\\bistartswith\\b"},{"name":"keyword.other.endswith.yara","match":"\\bendswith\\b"},{"name":"keyword.other.iendswith.yara","match":"\\biendswith\\b"},{"name":"keyword.other.filesize.yara","match":"\\bfilesize\\b"},{"name":"keyword.other.for.yara","match":"\\bfor\\b"},{"name":"keyword.other.import.yara","match":"\\bimport\\b"},{"name":"keyword.other.in.yara","match":"\\bin\\b"},{"name":"keyword.other.include.yara","match":"\\binclude\\b"},{"name":"keyword.other.matches.yara","match":"\\bmatches\\b"},{"name":"keyword.other.meta.yara","match":"\\bmeta\\b","end":":"},{"name":"keyword.other.none.yara","match":"\\bnone\\b"},{"name":"keyword.other.logical.not.yara","match":"\\bnot\\b"},{"name":"keyword.other.of.yara","match":"\\bof\\b"},{"name":"keyword.other.logical.or.yara","match":"\\bor\\b"},{"name":"keyword.operator.relational.yara","match":"(\\\u003c=?|\\\u003e=?|==|\\!=)"},{"name":"keyword.other.rule.yara","match":"\\brule\\b"},{"name":"keyword.other.strings.yara","match":"\\bstrings\\b","end":":"},{"name":"keyword.other.them.yara","match":"\\bthem\\b"},{"name":"variable.parameter.source.yara","match":"(\\$|\\#|\\@)[a-zA-Z0-9_]*"},{"name":"string.quoted.double.yara","begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.yara","match":"\\\\[\"\\\\nrt]"},{"name":"string.quoted.double.hex.yara","match":"\\\\x[a-fA-F0-9]{2}"},{"name":"invalid.illegal.missing.escape.yara","match":"\\\\."}]},{"name":"string.regexp.yara","match":"/.*?[^\\\\]/(i|c|x|t|s|m|p|w|n|J|U|d|b|e|q|x)*"},{"contentName":"entity.name.hex.yara","begin":"=\\s*?{","end":"}","patterns":[{"name":"comment.line.double-slash.hex.yara","match":"//.*\\n"},{"name":"comment.block.hex.yara","begin":"/\\*","end":"\\*/"},{"name":"entity.name.jump.hex.yara","begin":"\\[","end":"\\]","patterns":[{"name":"constant.numeric.jump.hex.yara","match":"[0-9]"},{"name":"entity.other.dash.jump.hex.yara","match":"\\-"},{"name":"invalid.illegal.jump.yara","match":"."}]},{"name":"string.other.hex.yara","match":"[a-fA-F0-9]"},{"name":"constant.other.placeholder.hex.yara","match":"\\?"},{"name":"entity.other.special.hex.yara","match":"[\\[\\]\\(\\)\\s|]"},{"name":"invalid.illegal.hex.yara","match":"[^\\[\\]\\s]"}]},{"name":"storage.type.other.yara","match":"(\\bascii\\b|\\bentrypoint\\b)"},{"name":"storage.modifier.yara","match":"(\\bbase64\\b|\\bbase64wide\\b|\\bfullword\\b|\\bglobal\\b|\\bnocase\\b|\\bprivate\\b|\\bwide\\b|\\bxor\\b)"},{"name":"storage.type.int.yara","match":"(\\bint8\\b|\\bint16\\b|\\bint32\\b)"},{"name":"storage.type.intbe.yara","match":"(\\bint8be\\b|\\bint16be\\b|\\bint32be\\b)"},{"name":"storage.type.uint.yara","match":"(\\buint8\\b|\\buint16\\b|\\buint32\\b)"},{"name":"storage.type.uintbe.yara","match":"(\\buint8be\\b|\\buint16be\\b|\\buint32be\\b)"}]}
|
1
|
+
{"name":"YARA","scopeName":"source.yara","patterns":[{"include":"#includes"},{"include":"#imports"},{"include":"#rules"},{"include":"#comments"},{"include":"#unmatched-characters"}],"repository":{"arithmetic-operators":{"name":"keyword.operator.arithmetic.yara","match":"(?\u003c=[0-9A-Z_a-z()\\[\\]\\s]|^)([+*\\\\%])(?=[-0-9A-Z_a-z()\\s]|[!@#$]|$)"},"arithmetic-unary-operators":{"name":"keyword.operator.arithmetic.yara","match":"(?\u003c=[0-9A-Z_a-z()\\[\\]\\s]|^)(-)(?=[-0-9A-Z_a-z()\\s]|[!@#$]|$)"},"array-subscripting":{"name":"punctuation.definition.array.access.yara","match":"(\\[|\\])"},"base64-modifier":{"begin":"\\b(base64)\\s*(\\()(?=\\s*\")","end":"(\\))","patterns":[{"include":"#quoted-strings-64"},{"include":"#unmatched-characters"}],"beginCaptures":{"1":{"name":"keyword.other.modifier.yara"},"2":{"name":"punctuation.parenthesis.begin.yara"}},"endCaptures":{"1":{"name":"punctuation.parenthesis.end.yara"}}},"bitwise-operators":{"name":"keyword.operator.bitwise.yara","match":"(?\u003c=[0-9A-Z_a-z()\\[\\]\\s]|^)([\u0026|^]|\u003c\u003c|\u003e\u003e)(?=[-0-9A-Z_a-z()\\s]|[!@#$]|$)"},"bitwise-unary-operators":{"name":"keyword.operator.bitwise.yara","match":"(?\u003c=[0-9A-Z_a-z()\\[\\]\\s]|^)(~)(?=[-0-9A-Z_a-z()\\s]|[!@#$]|$)"},"boolean-operators":{"name":"keyword.operator.logical.yara","match":"\\b(not|defined|and|or)\\b"},"booleans":{"name":"constant.language.yara","match":"\\b(false|true)\\b"},"comments":{"name":"meta.comment.yara","patterns":[{"name":"comment.line.double-slash.yara","match":"//.*$"},{"name":"comment.block.yara","begin":"/\\*","end":"\\*/"}]},"condition-expression":{"patterns":[{"include":"#comments"},{"include":"#condition-nested-expression"},{"include":"#boolean-operators"},{"include":"#struct-member-access"},{"include":"#array-subscripting"},{"include":"#relational-operators"},{"include":"#relational-operators-text"},{"include":"#relational-operators-regexp"},{"include":"#arithmetic-unary-operators"},{"include":"#arithmetic-operators"},{"include":"#bitwise-unary-operators"},{"include":"#bitwise-operators"},{"include":"#regexp-strings"},{"include":"#quoted-strings"},{"include":"#numbers"},{"include":"#separator"},{"include":"#range-operator"},{"include":"#string-identifiers"},{"include":"#booleans"},{"name":"constant.numeric.keyword.yara","match":"\\b(all|any|none|filesize)\\b"},{"name":"constant.numeric.keyword.yara invalid.deprecated.keyword.yara","match":"\\b(entrypoint)\\b"},{"name":"variable.language.string.identifier.wildcard.yara","match":"\\b(them)\\b"},{"name":"keyword.other.yara","match":"\\b(at|for|in|of)\\b"},{"name":"support.function.other.yara","match":"\\b((?:u?int)(?:8|16|32)(?:be)?)(?=\\s*(\\(|\n))"},{"name":"variable.language.loop.variable.yara","match":"([!@#$])(?![0-9A-Z_a-z])"},{"name":"variable.language.loop.enter.yara"},{"include":"#identifiers"},{"include":"#unmatched-characters"}]},"condition-nested-expression":{"begin":"(:\\s*)?\\(","end":"\\)","patterns":[{"include":"#condition-expression"}]},"hex-alternate-values":{"begin":"\\(","end":"\\)","patterns":[{"include":"#hex-values"},{"name":"entity.other.special.pipe.hex.yara","match":"\\|"},{"include":"#hex-alternate-values"},{"include":"#unmatched-characters"}]},"hex-jump":{"name":"entity.name.jump.hex.yara","begin":"\\[\\s*(?=([1-9][0-9]*|[0-9]*\\s*-|[0-9]+\\s*-\\s*[0-9]*)\\s*\\])","end":"\\]","patterns":[{"name":"constant.numeric.jump.hex.yara","match":"[0-9]"},{"name":"entity.other.dash.jump.hex.yara","match":"-"},{"include":"#unmatched-characters"}]},"hex-string-value":{"contentName":"entity.name.hex.yara","begin":"\\{","end":"\\}|(?=[^?0-9A-Fa-f\\[\\-\\]()/\\s\\n])(.*)","patterns":[{"include":"#comments"},{"include":"#hex-jump"},{"include":"#hex-values"},{"include":"#hex-alternate-values"},{"include":"#unmatched-characters"}],"endCaptures":{"1":{"name":"invalid.illegal.newline.yara"}}},"hex-values":{"contentName":"string.other.hex.yara","begin":"(?=[0-9?A-Fa-f])","end":"(?=[\\s\\[()}/|])","patterns":[{"name":"invalid.illegal.hex.missingchar.yara","match":"(?\u003c![0-9?A-Fa-f])[0-9?A-Fa-f]([0-9?A-Fa-f]{2})*(?![0-9?A-Fa-f])"},{"name":"string.other.hex.yara","match":"[0-9A-Fa-f]"},{"name":"constant.other.placeholder.hex.yara","match":"\\?"},{"include":"#unmatched-characters"}]},"identifiers":{"name":"variable.other.identifier.yara","patterns":[{"include":"#reserved-identifiers"},{"name":"variable.other.identifier.yara","match":"\\b[A-Z_a-z][0-9A-Z_a-z]{0,127}\\b"},{"include":"#unmatched-characters"}]},"imports":{"name":"keyword.control.directive.yara","begin":"\\b(import)(?=\\s+\")","end":"(?\u003c=\")","patterns":[{"include":"#quoted-strings"}]},"includes":{"name":"keyword.control.directive.yara","begin":"\\b(include)(?=\\s+\")","end":"(?\u003c=\")","patterns":[{"include":"#quoted-strings"}]},"integers":{"patterns":[{"name":"constant.numeric.dec.yara","match":"\\b[0-9]+(KB|MB)?\\b","captures":{"1":{"name":"storage.type.number.postfix.yara"}}},{"name":"constant.numeric.hex.yara","match":"\\b(0x)[0-9A-Fa-f]+\\b","captures":{"1":{"name":"storage.modifier.number.yara"}}},{"name":"constant.numeric.oct.yara","match":"\\b(0o)([0-7]+)\\b","captures":{"1":{"name":"storage.type.number.yara"}}}]},"meta-value-bool":{"name":"support.other.meta-name.strings.yara","match":"\\b([A-Z_a-z][0-9A-Z_a-z]{0,127})\\s*(=)\\s*(true|false)","captures":{"1":{"name":"entity.other.meta.identifier.yara"},"2":{"name":"keyword.operator.assignment.yara"},"3":{"name":"constant.language.yara"}}},"meta-value-int":{"name":"support.other.meta-name.strings.yara","match":"\\b([A-Z_a-z][0-9A-Z_a-z]{0,127})\\s*(=)\\s*([0-9]+)(KB|MB)?","captures":{"1":{"name":"entity.other.meta.identifier.yara"},"2":{"name":"keyword.operator.assignment.yara"},"3":{"name":"constant.numeric.yara"},"4":{"name":"storage.type.number.postfix.yara"}}},"meta-value-string":{"name":"support.other.meta-name.strings.yara","begin":"\\b([A-Z_a-z][0-9A-Z_a-z]{0,127})\\s*(=)\\s*(?=\")","end":"(?\u003c=\")","patterns":[{"include":"#quoted-strings"}],"beginCaptures":{"1":{"name":"entity.other.meta.identifier.yara"},"2":{"name":"keyword.operator.assignment.yara"}}},"numbers":{"patterns":[{"name":"constant.numeric.yara","match":"\\b([0-9]+\\.[0-9]+)\\b"},{"include":"#integers"}]},"quoted-strings":{"name":"string.quoted.double.yara","begin":"(?\u003c!\")(\")(?!\\n)","end":"(\")|((?:\\\\\")?[^\"]*\\n)","patterns":[{"name":"constant.character.escape.yara","match":"\\\\([nrt\\\\\"]|x[0-9A-Fa-f]{2})"},{"name":"string.quoted.double.ascii.yara","match":"[\\x20\\x21\\x23-\\x5B\\x5D-\\x7E]"},{"name":"string.quoted.double.unicode.yara","match":"[^\\x00-\\x7F]"},{"name":"invalid.illegal.character.yara","match":"[\"\\\\\\n\\r]"}],"beginCaptures":{"1":{"name":"punctuation.definition.string.begin.yara"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.yara"},"2":{"name":"invalid.illegal.newline.yara"}}},"quoted-strings-64":{"name":"string.quoted.double.yara","begin":"(\")(?=(\\\\([nrt\\\\\"]|x[0-9A-Fa-f]{2})|[\\x20\\x21\\x23-\\x5B\\x5D-\\x7E]){64}\")","end":"(\")|(\\n)","patterns":[{"name":"constant.character.escape.yara","match":"\\\\([nrt\\\\\"]|x[0-9A-Fa-f]{2})"},{"name":"string.double.quoted.ascii.yara","match":"[\\x20\\x21\\x23-\\x5B\\x5D-\\x7E]"}],"beginCaptures":{"1":{"name":"punctuation.definition.string.begin.yara"},"2":{"name":"invalid.illegal.character.length.yara"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.yara"},"2":{"name":"invalid.illegal.newline.yara"}}},"range-operator":{"name":"keyword.operator.range.yara","match":"(?\u003c!\\.)\\.\\.(?!\\.)"},"regexp-base-expression":{"patterns":[{"name":"constant.character.class.regexp","match":"\\."},{"name":"constant.character.assertion.regexp","match":"\\^"},{"name":"constant.character.assertion.regexp","match":"\\$"},{"name":"keyword.operator.quantifier.regexp","match":"[+*?]\\??"},{"name":"keyword.operator.disjunction.regexp","match":"\\|"},{"name":"keyword.operator.quantifier.regexp","match":"\\{([0-9]+|[0-9]+,(?:[0-9]+)?|,[0-9]+)\\}","captures":{"1":{"name":"constant.numeric.yara"}}},{"include":"#regexp-escape-sequence"},{"name":"string.regexp.yara","match":"[\\x20!\"#%\u0026',\\-0-9:-\u003e@A-Z\\]_`a-z{}~]"},{"include":"#unmatched-characters"}]},"regexp-character-set":{"patterns":[{"name":"meta.character.set.regexp","begin":"(\\[)(\\^)?(\\])?(-)?","end":"(-?)(\\])|([^\\]]*)(?=\\n)","patterns":[{"include":"#regexp-character-set-escapes"},{"include":"#regexp-escape-sequence"},{"name":"constant.character.set.regexp","match":"[\\x20-\\x2E\\x30-\\x5B\\x5E-\\x7E]"}],"beginCaptures":{"1":{"name":"constant.other.set.regexp punctuation.character.set.begin.regexp"},"2":{"name":"keyword.operator.negation.regexp"},"3":{"name":"constant.character.set.regexp"},"4":{"name":"constant.character.set.regexp"}},"endCaptures":{"1":{"name":"constant.character.set.regexp"},"2":{"name":"constant.other.set.regexp punctuation.character.set.end.regexp"},"3":{"name":"invalid.illegal.newline.yara"}}}]},"regexp-character-set-escapes":{"patterns":[{"name":"constant.character.escape.regexp","match":"\\\\([\\]bB])"},{"match":"(-)(-)(-)","captures":{"1":{"name":"constant.character.set.regexp"},"2":{"name":"constant.character.class.range.regexp"},"3":{"name":"constant.character.set.regexp"}}},{"match":"(-)","captures":{"1":{"name":"constant.character.class.range.regexp"}}}]},"regexp-escape-sequence":{"patterns":[{"name":"constant.character.escape.regexp","match":"\\\\[./afnrt\\\\]"},{"match":"(\\\\x[0-9A-Fa-f]{2})|(\\\\x[^\\]/]{0,2})","captures":{"1":{"name":"constant.character.escape.regexp"},"2":{"name":"invalid.illegal.character.escape.regex"}}},{"name":"constant.character.class.regexp","match":"\\\\([wWsSdD])"},{"name":"constant.character.assertion.regexp","match":"\\\\([bB])"},{"name":"constant.character.escape.regexp","match":"\\\\(.)"}]},"regexp-expression":{"patterns":[{"include":"#regexp-parentheses"},{"include":"#regexp-character-set"},{"include":"#regexp-base-expression"},{"name":"invalid.illegal.regexp.end.yara","match":"/"}]},"regexp-parentheses":{"begin":"(\\()([+*?])?","end":"(\\))|([^)]*)(?=\\n)","patterns":[{"include":"#regexp-expression"}],"beginCaptures":{"1":{"name":"punctuation.parenthesis.begin.regexp support.other.parenthesis.regexp"},"2":{"name":"invalid.illegal.group.construct.regexp"}},"endCaptures":{"1":{"name":"punctuation.parenthesis.end.regexp support.other.parenthesis.regexp"},"2":{"name":"invalid.illegal.newline.yara"}}},"regexp-strings":{"name":"string.regexp.yara","begin":"(?\u003c!/)(/)(?!/|\\n)","end":"(?\u003c!\\\\)(/)(i?s?)|((?:\\\\/)?[^/]*\\n)","patterns":[{"include":"#regexp-expression"}],"beginCaptures":{"1":{"name":"punctuation.definition.regexp.begin.yara"}},"endCaptures":{"1":{"name":"punctuation.definition.regexp.end.yara"},"2":{"name":"storage.modifier.flag.regexp"},"3":{"name":"invalid.illegal.newline.yara"}}},"relational-operators":{"name":"keyword.operator.comparison.yara","match":"(?\u003c=[0-9A-Z_a-z()\\[\\]\\s]|^)(\u003e=?|\u003c=?|==|!=)(?=[-0-9A-Z_a-z()\\s]|[!@#$]|$)"},"relational-operators-regexp":{"name":"keyword.operator.comparison.yara","match":"\\b(matches)(?=\\s*/)"},"relational-operators-text":{"name":"keyword.operator.comparison.yara","match":"\\b(contains|icontains|startswith|istartswith|endswith|iendswith|iequals)(?=\\s*\")"},"reserved-identifiers":{"name":"invalid.illegal.identifier.yara","match":"\\b(all|and|any|ascii|at|base64|base64wide|condition|contains|endswith|entrypoint|false|filesize|for|fullword|global|import|icontains|iendswith|iequals|in|include|int16|int16be|int32|int32be|int8|int8be|istartswith|matches|meta|nocase|none|not|of|or|private|rule|startswith|strings|them|true|uint16|uint16be|uint32|uint32be|uint8|uint8be|wide|xor|defined)\\b"},"rule-conditions":{"name":"entity.name.section.condition.yara","begin":"\\b(condition)\\s*:","end":"(?=\\})","patterns":[{"include":"#comments"},{"include":"#condition-expression"},{"include":"#reserved-identifiers"},{"include":"#unmatched-characters"}],"beginCaptures":{"1":{"name":"keyword.other.condition.yara"}}},"rule-declaration":{"name":"meta.function.yara","begin":"\\b(rule)\\b","end":"(?=[{:])","patterns":[{"include":"#reserved-identifiers"},{"name":"entity.name.function.yara","match":"\\b[A-Z_a-z][0-9A-Z_a-z]{0,127}\\b"},{"include":"#unmatched-characters"}],"beginCaptures":{"1":{"name":"storage.type.function.yara"}}},"rule-end":{"name":"punctuation.definition.rule.end.yara","match":"\\}"},"rule-meta":{"begin":"\\b(meta)\\s*:","end":"(?=\\b(strings|condition)\\b)","patterns":[{"include":"#reserved-identifiers"},{"include":"#comments"},{"include":"#meta-value-bool"},{"include":"#meta-value-int"},{"include":"#meta-value-string"},{"include":"#unmatched-characters"}],"beginCaptures":{"1":{"name":"keyword.other.meta.yara"}}},"rule-restrictions":{"patterns":[{"name":"entity.name.type.restrictions.yara","match":"\\b(global|private)\\b"}]},"rule-start":{"name":"punctuation.definition.rule.start.yara","match":"\\{"},"rule-strings":{"name":"entity.name.section.strings.yara","begin":"\\b(strings)\\s*:","end":"(?=\\b(condition)\\b)","patterns":[{"include":"#reserved-identifiers"},{"include":"#comments"},{"include":"#string-assignment-text"},{"include":"#string-assignment-regex"},{"include":"#string-assignment-hex"},{"include":"#unmatched-characters"}],"beginCaptures":{"1":{"name":"keyword.other.strings.yara"}}},"rule-tags":{"name":"entity.name.tag.yara","begin":":","end":"(?=\\{)","patterns":[{"include":"#identifiers"}]},"rules":{"patterns":[{"include":"#rule-restrictions"},{"include":"#rule-declaration"},{"include":"#rule-tags"},{"include":"#rule-start"},{"include":"#rule-meta"},{"include":"#rule-strings"},{"include":"#rule-conditions"},{"include":"#comments"},{"include":"#rule-end"}]},"separator":{"name":"punctuation.separator.arguments.yara","match":","},"string-assignment-hex":{"name":"support.other.attribute-name.strings.yara","begin":"(\\$)([0-9A-Z_a-z]+\\b)?+\\s*+([^\\n\\s=][^=]*)?(=)","end":"(?=\\b(condition)\\b|\\$)","patterns":[{"include":"#comments"},{"include":"#hex-string-value"},{"name":"keyword.other.modifier.yara","match":"\\b(private)\\b"},{"include":"#reserved-identifiers"},{"include":"#unmatched-characters"}],"beginCaptures":{"1":{"name":"variable.language.string.identifier.yara"},"2":{"name":"variable.other.string.identifier.yara"},"3":{"name":"invalid.illegal.string.identifier.yara"},"4":{"name":"keyword.operator.assignment.yara"}}},"string-assignment-regex":{"name":"support.other.attribute-name.strings.yara","begin":"(\\$)([0-9A-Z_a-z]+\\b)?+\\s*+([^\\n\\s=][^=]*)?(=)(?=\\s*/)","end":"(?=\\b(condition)\\b|\\$)","patterns":[{"include":"#comments"},{"include":"#regexp-strings"},{"name":"keyword.other.modifier.yara","match":"\\b(nocase|wide|ascii|fullword|private)\\b"},{"include":"#reserved-identifiers"},{"include":"#unmatched-characters"}],"beginCaptures":{"1":{"name":"variable.language.string.identifier.yara"},"2":{"name":"variable.other.string.identifier.yara"},"3":{"name":"invalid.illegal.string.identifier.yara"},"4":{"name":"keyword.operator.assignment.yara"}}},"string-assignment-text":{"name":"support.other.attribute-name.strings.yara","begin":"(\\$)([0-9A-Z_a-z]+\\b)?+\\s*+([^\\n\\s=][^=]*)?(=)(?=\\s*\")","end":"(?=\\b(condition)\\b|\\$)","patterns":[{"include":"#comments"},{"include":"#text-strings"},{"include":"#reserved-identifiers"},{"include":"#unmatched-characters"}],"beginCaptures":{"1":{"name":"variable.language.string.identifier.yara"},"2":{"name":"variable.other.string.identifier.yara"},"3":{"name":"invalid.illegal.string.identifier.yara"},"4":{"name":"keyword.operator.assignment.yara"}}},"string-identifiers":{"name":"variable.other.string_identifier.yara","match":"([!@#$])([0-9A-Z_a-z]+|(?=[*]))([*]?)","captures":{"1":{"name":"variable.language.string.identifier.yara"},"2":{"name":"variable.other.string.identifier.yara"},"3":{"name":"string.interpolated.string.identifier.yara"}}},"struct-member-access":{"name":"meta.struct.access.yara","match":"(?!\u003c\\.\\s*)\\.\\s*(?!\\.)"},"text-strings":{"patterns":[{"include":"#quoted-strings"},{"include":"#xor-modifier"},{"include":"#base64-modifier"},{"name":"keyword.other.modifier.yara","match":"\\b(nocase|wide|ascii|xor|base64|base64wide|fullword|private)\\b(?!\\()"},{"include":"#comments"},{"include":"#unmatched-characters"}]},"unmatched-characters":{"name":"invalid.illegal.character.yara","match":"\\S"},"xor-modifier":{"match":"\\b(xor)\\s*(\\()\\s*(0x[0-9A-Fa-f]{1,2}|0o[0-7]{1,3}|[0-9]{1,3})(?:\\s*(-)\\s*(0x[0-9A-Fa-f]{1,2}|0o[0-7]{1,3}|[0-9]{1,3}))?\\s*(\\))","captures":{"1":{"name":"keyword.other.modifier.yara"},"2":{"name":"punctuation.parenthesis.begin.yara"},"3":{"name":"constant.numeric.yara"},"4":{"name":"constant.character.hyphen.yara"},"5":{"name":"constant.numeric.yara"},"6":{"name":"punctuation.parenthesis.end.yara"}}}}}
|
data/grammars/text.adblock.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"Adblock","scopeName":"text.adblock","patterns":[{"include":"#adblockAgent"},{"include":"#preprocessor"},{"include":"#comments"},{"include":"#snippetRulesABP"},{"include":"#cssRules"},{"include":"#scriptletRules"},{"include":"#scriptletRulesUBO"},{"include":"#jsRules"},{"include":"#contentRules"},{"include":"#elemhideRules"},{"include":"#basicRulesNoUrl"},{"include":"#basicRules"}],"repository":{"adblockAgent":{"patterns":[{"match":"^(\\[)([^\\]]+)(\\])\\s*$","captures":{"1":{"name":"punctuation.definition.array.start.ablock.agent"},"2":{"patterns":[{"include":"#adblockData"},{"name":"punctuation.separator","match":";"},{"name":"invalid.illegal","match":".*"}]},"3":{"name":"punctuation.definition.array.end.ablock.agent"}}}]},"adblockData":{"patterns":[{"match":"(?:\\s*)([Aa]d[Bb]lock(?:\\s[Pp]lus)?|u[Bb]lock(?:\\s[Oo]rigin)?|[Aa]d[Gg]uard)(?:\\s+(\\d+(?:\\.\\d+)*+\\+?))?(?:\\s*)","captures":{"1":{"name":"constant.language.agent.adblocker.name"},"2":{"name":"constant.numeric.decimal"}}}]},"appListPipeSeparated":{"patterns":[{"match":"((~?)([a-zA-Z0-9.-_]+)(\\|?))","captures":{"2":{"name":"keyword.other.adblock"},"3":{"name":"string.unquoted.adblock"},"4":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.app-list","match":".*"}]},"basicRules":{"patterns":[{"match":"^(.+?)((\\$(?!\\/))(.*))?$","captures":{"1":{"patterns":[{"include":"#urlPattern"}]},"3":{"name":"keyword.control.adblock"},"4":{"patterns":[{"include":"#basicRulesOptions"}]}}}]},"basicRulesNoUrl":{"patterns":[{"match":"^(\\$)(.+)$","captures":{"1":{"name":"keyword.control.adblock"},"2":{"patterns":[{"include":"#basicRulesOptions"}]}}}]},"basicRulesOptions":{"patterns":[{"name":"keyword.other.adblock","match":"replace=((\\/)(((\\\\\\/)|[^,/]|(\\\\,))+?)(\\/)(((\\\\\\/)|[^,/]|(\\\\,))*?)(\\/)([a-z]*))","captures":{"1":{"name":"string.regexp.adblock"}}},{"match":"(domain|denyallow)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#domainListPipeSeparated"}]}}},{"match":"(app)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#appListPipeSeparated"}]}}},{"match":"(dnstype)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#dnsTypesPipeSeparated"}]}}},{"match":"(client|ctag)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#dnsClientsPipeSeparated"}]}}},{"name":"keyword.other.adblock","match":"(redirect|redirect-rule|csp|cookie)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"name":"string.unquoted.adblock"}}},{"name":"keyword.other.adblock","match":"(dnsrewrite)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"name":"keyword.other.delimiter","match":";"},{"name":"string.unquoted.adblock","match":"[^;]*"}]}}},{"name":"keyword.other.adblock","match":"(removeheader)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"name":"keyword.other.delimiter","match":":"},{"name":"string.unquoted.adblock","match":"[^:]*"}]}}},{"name":"keyword.other.adblock","match":"(rewrite)(=)(abp-resource:)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"name":"keyword.other.adblock"},"4":{"name":"string.unquoted.adblock"}}},{"name":"keyword.other.adblock","match":"(removeparam|queryprune)(=)(~)?(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"name":"keyword.other.adblock"},"4":{"name":"string.unquoted.adblock"}}},{"name":"keyword.other.adblock","match":"(inline-script|inline-font|mp4|empty|badfilter|genericblock|generichide|network|popup|popunder|important|cookie|csp|replace|stealth|removeparam|queryprune)"},{"name":"keyword.other.adblock","match":"(~?)(xhr|first-party|third-party|match-case|elemhide|content|jsinject|urlblock|document|image|stylesheet|script|object-subrequest|object|font|media|subdocument|xmlhttprequest|websocket|other|webrtc|ping|extension|all|1p|3p|css|frame|ghide|ehide|shide|specifichide)"},{"name":"punctuation.definition.adblock","match":","},{"name":"invalid.illegal.redundant.modifier.separator","match":"\\$"}]},"comments":{"patterns":[{"name":"comment.line","match":"^!.*"},{"name":"comment.line.batch-style","match":"^# .*"},{"name":"comment.line.batch-style","match":"^#$"}]},"contentAttributes":{"patterns":[{"match":"(\\[)([^\"=]+?)(\\=)(\".+?\")(\\])","captures":{"1":{"name":"punctuation.section.adblock"},"2":{"name":"keyword.other.adblock"},"3":{"name":"keyword.operator.adblock"},"4":{"name":"string.quoted.adblock"},"5":{"name":"punctuation.section.adblock"}}},{"name":"invalid.illegal.adblock","match":".*"}]},"contentRules":{"patterns":[{"match":"^(\\[.+?\\])?(.*?)(\\$@?\\$)(.+?)(\\[.+)?$","captures":{"1":{"patterns":[{"include":"#cosmeticRulesOptions"}]},"2":{"patterns":[{"include":"#domainListCommaSeparated"}]},"3":{"name":"keyword.control.adblock"},"4":{"name":"entity.name.function.adblock"},"5":{"patterns":[{"include":"#contentAttributes"}]}}}]},"cosmeticRulesOptions":{"match":"(\\[)(.+?)(\\])","captures":{"1":{"name":"keyword.control.adblock"},"2":{"patterns":[{"match":"(path)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"name":"string.unquoted.adblock"}}},{"match":"(domain)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#domainListPipeSeparated"}]}}},{"match":"(app)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#appListPipeSeparated"}]}}},{"name":"keyword.control.adblock","match":"\\$"},{"name":"punctuation.definition.adblock","match":","},{"name":"invalid.illegal.adblock","match":".*"}]},"3":{"name":"keyword.control.adblock"}}},"cssRules":{"patterns":[{"match":"^(\\[.+?\\])?(.*?)(#@?\\$\\??#)(.+)$","captures":{"1":{"patterns":[{"include":"#cosmeticRulesOptions"}]},"2":{"patterns":[{"include":"#domainListCommaSeparated"}]},"3":{"name":"keyword.control.adblock"},"4":{"patterns":[{"include":"#cssStyle"}]}}}]},"cssSelector":{"patterns":[{"name":"entity.name.function.adblock","match":".+"}]},"cssStyle":{"patterns":[{"match":"([^{}]+)\\s*((\\{)(.+?)(\\}))","captures":{"1":{"name":"entity.name.function.adblock"},"3":{"name":"punctuation.section.adblock"},"4":{"name":"string.quoted.adblock"},"5":{"name":"punctuation.section.adblock"}}},{"name":"invalid.illegal.adblock","match":".*"}]},"dnsClientsPipeSeparated":{"patterns":[{"match":"((~?)([^|]+)(\\|?))","captures":{"2":{"name":"keyword.other.adblock"},"3":{"name":"string.unquoted.adblock"},"4":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.app-list","match":".*"}]},"dnsTypesPipeSeparated":{"patterns":[{"match":"((~?)([a-zA-Z0-9.-_]+)(\\|?))","captures":{"2":{"name":"keyword.other.adblock"},"3":{"name":"string.unquoted.adblock"},"4":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.app-list","match":".*"}]},"domainListCommaSeparated":{"patterns":[{"match":"(~?)([a-zA-Z0-9.*-]+)(,?)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"string.unquoted.adblock"},"3":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.domain-list","match":".*"}]},"domainListPipeSeparated":{"patterns":[{"match":"(~?)([a-zA-Z0-9.*-]+)(\\|?)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"string.unquoted.adblock"},"3":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.domain-list","match":".*"}]},"elemhideRules":{"patterns":[{"match":"^(\\[.+?\\])?(.*?)(#@?\\??#\\^?)(.+)$","captures":{"1":{"patterns":[{"include":"#cosmeticRulesOptions"}]},"2":{"patterns":[{"include":"#domainListCommaSeparated"}]},"3":{"name":"keyword.control.adblock"},"4":{"patterns":[{"include":"#cssSelector"}]}}}]},"jsFunction":{"patterns":[{"name":"constant.character.jscode.adblock","match":".+"}]},"jsRules":{"patterns":[{"match":"^(.*?)(#@?%#)(.+)$","captures":{"1":{"patterns":[{"include":"#domainListCommaSeparated"}]},"2":{"name":"keyword.control.adblock"},"3":{"patterns":[{"include":"#jsFunction"}]}}}]},"preprocessor":{"patterns":[{"match":"^(!#if) (.*)$","captures":{"1":{"name":"keyword.preprocessor.directive"},"2":{"patterns":[{"name":"constant.language.platform.name","match":"(adguard_app_windows|adguard_app_mac|adguard_app_android|adguard_app_ios|adguard_ext_chromium|adguard_ext_firefox|adguard_ext_edge|adguard_ext_safari|adguard_ext_opera|adguard_ext_android_cb|adguard|ext_abp|ext_ublock|env_chromium|env_edge|env_firefox|env_mobile|env_safari|false|cap_html_filtering|cap_user_stylesheet)"},{"name":"keyword.control.characters","match":"(\u0026\u0026|!|\\|\\|| )"},{"name":"keyword.control.characters","match":"(\\(|\\))"},{"name":"invalid.illegal","match":".*"}]}}},{"match":"^(!#include) (.*)$","captures":{"1":{"name":"keyword.preprocessor.directive"},"2":{"name":"string.unquoted"}}},{"name":"keyword.preprocessor.directive","match":"^!#endif\\s*$"},{"match":"^(!#safari_cb_affinity)(.*)$","captures":{"1":{"name":"keyword.preprocessor.directive"},"2":{"patterns":[{"name":"constant.language.contentblocker.name","match":"(all|general|privacy|social|security|other|custom)"},{"name":"keyword.control.characters","match":"(\\(|\\)|,)"},{"name":"invalid.illegal","match":".*"}]}}},{"match":"^(!\\+) (.*)$","captures":{"1":{"name":"keyword.preprocessor.hint"},"2":{"patterns":[{"name":"keyword.control.hint.name","match":"(NOT_OPTIMIZED|OPTIMIZED|PLATFORM|NOT_PLATFORM)"},{"name":"constant.language.platform.name","match":"(windows|mac|android|ios|ext_chromium|ext_ff|ext_edge|ext_opera|ext_ublock|ext_safari|ext_android_cb)"},{"name":"keyword.control.characters","match":"(\\(|\\)|,)"}]}}},{"name":"invalid.preprocessor","match":"^!#.+$"}]},"scriptletFunction":{"patterns":[{"match":"((['|\"])(.*?)(?\u003c!\\\\)(\\2))(,\\s*)?","captures":{"1":{"name":"string.quoted.adblock"},"5":{"name":"keyword.operator.adblock"}}},{"name":"invalid.illegal.adblock","match":".*"}]},"scriptletFunctionUBO":{"patterns":[{"match":"([^,]+)(,\\s*)?","captures":{"1":{"name":"string.quoted.adblock"},"2":{"name":"keyword.operator.adblock"}}},{"name":"invalid.illegal.adblock","match":".*"}]},"scriptletRules":{"patterns":[{"match":"^(\\[.+?\\])?(.*?)(#@?%#)(\\/\\/scriptlet)(\\()(.+)(\\)\\s*)$","captures":{"1":{"patterns":[{"include":"#cosmeticRulesOptions"}]},"2":{"patterns":[{"include":"#domainListCommaSeparated"}]},"3":{"name":"keyword.control.adblock"},"4":{"name":"entity.name.function.adblock"},"5":{"name":"punctuation.section.adblock"},"6":{"patterns":[{"include":"#scriptletFunction"}]},"7":{"name":"punctuation.section.adblock"}}}]},"scriptletRulesUBO":{"patterns":[{"match":"^(.*?)(##)(\\+js)(\\()(.+)(\\)\\s*)$","captures":{"1":{"patterns":[{"include":"#domainListCommaSeparated"}]},"2":{"name":"keyword.control.adblock"},"3":{"name":"entity.name.function.adblock"},"4":{"name":"punctuation.section.adblock"},"5":{"patterns":[{"include":"#scriptletFunctionUBO"}]},"6":{"name":"punctuation.section.adblock"}}}]},"snippetRulesABP":{"patterns":[{"match":"^(.*?)(#\\$#)([^{]+)$","captures":{"1":{"patterns":[{"include":"#domainListCommaSeparated"}]},"2":{"name":"keyword.control.adblock"},"3":{"name":"constant.character.snippet.adblock"}}}]},"urlPattern":{"patterns":[{"name":"string.regexp.adblock","match":"^(@@)?(\\/)(.+)\\/$","captures":{"1":{"name":"keyword.other.adblock"}}},{"name":"keyword.other.adblock","match":"^@@\\|?\\|?"},{"name":"keyword.other.adblock","match":"^\\|\\|"},{"name":"keyword.other.adblock","match":"^\\|"},{"name":"keyword.other.adblock","match":"\\|$"},{"name":"keyword.other.adblock","match":"\\^"},{"name":"keyword.other.adblock","match":"\\*"}]}}}
|
1
|
+
{"name":"Adblock","scopeName":"text.adblock","patterns":[{"include":"#adblockAgent"},{"include":"#preprocessor"},{"include":"#comments"},{"include":"#snippetRulesABP"},{"include":"#cssRules"},{"include":"#scriptletRules"},{"include":"#scriptletRulesUBO"},{"include":"#jsRules"},{"include":"#contentRules"},{"include":"#elemhideRules"},{"include":"#basicRulesNoUrl"},{"include":"#basicRulesRegex"},{"include":"#basicRules"}],"repository":{"adblockAgent":{"patterns":[{"match":"^(\\[)([^\\]]+)(\\])\\s*$","captures":{"1":{"name":"punctuation.definition.array.start.ablock.agent"},"2":{"patterns":[{"include":"#adblockData"},{"name":"punctuation.separator","match":";"},{"name":"invalid.illegal","match":".*"}]},"3":{"name":"punctuation.definition.array.end.ablock.agent"}}}]},"adblockData":{"patterns":[{"match":"(?:\\s*)([Aa]d[Bb]lock(?:\\s[Pp]lus)?|u[Bb]lock(?:\\s[Oo]rigin)?|[Aa]d[Gg]uard)(?:\\s+(\\d+(?:\\.\\d+)*+\\+?))?(?:\\s*)","captures":{"1":{"name":"constant.language.agent.adblocker.name"},"2":{"name":"constant.numeric.decimal"}}}]},"appListPipeSeparated":{"patterns":[{"match":"((~?)([a-zA-Z0-9.-_]+)(\\|?))","captures":{"2":{"name":"keyword.other.adblock"},"3":{"name":"string.unquoted.adblock"},"4":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.app-list","match":".*"}]},"basicRules":{"patterns":[{"match":"^(.+?)((\\$(?!\\/))(.*))?$","captures":{"1":{"patterns":[{"include":"#urlPattern"}]},"3":{"name":"keyword.control.adblock"},"4":{"patterns":[{"include":"#basicRulesOptions"}]}}}]},"basicRulesNoUrl":{"patterns":[{"match":"^(\\$)(.+)$","captures":{"1":{"name":"keyword.control.adblock"},"2":{"patterns":[{"include":"#basicRulesOptions"}]}}}]},"basicRulesOptions":{"patterns":[{"name":"keyword.other.adblock","match":"replace=((\\/)(((\\\\\\/)|[^,/]|(\\\\,))+?)(\\/)(((\\\\\\/)|[^,/]|(\\\\,))*?)(\\/)([a-z]*))","captures":{"1":{"name":"string.regexp.adblock"}}},{"match":"(domain|denyallow)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#domainListPipeSeparated"}]}}},{"match":"(app)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#appListPipeSeparated"}]}}},{"match":"(dnstype)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#dnsTypesPipeSeparated"}]}}},{"match":"(client|ctag)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#dnsClientsPipeSeparated"}]}}},{"name":"keyword.other.adblock","match":"(redirect|redirect-rule|csp|cookie)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"name":"string.unquoted.adblock"}}},{"name":"keyword.other.adblock","match":"(dnsrewrite)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"name":"keyword.other.delimiter","match":";"},{"name":"string.unquoted.adblock","match":"[^;]*"}]}}},{"name":"keyword.other.adblock","match":"(removeheader)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"name":"keyword.other.delimiter","match":":"},{"name":"string.unquoted.adblock","match":"[^:]*"}]}}},{"name":"keyword.other.adblock","match":"(rewrite)(=)(abp-resource:)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"name":"keyword.other.adblock"},"4":{"name":"string.unquoted.adblock"}}},{"name":"keyword.other.adblock","match":"(removeparam|queryprune)(=)(~)?(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"name":"keyword.other.adblock"},"4":{"name":"string.unquoted.adblock"}}},{"name":"keyword.other.adblock","match":"(inline-script|inline-font|mp4|empty|badfilter|genericblock|generichide|network|popup|popunder|important|cookie|csp|replace|stealth|removeparam|queryprune)"},{"name":"keyword.other.adblock","match":"(~?)(xhr|first-party|third-party|match-case|elemhide|content|jsinject|urlblock|document|image|stylesheet|script|object-subrequest|object|font|media|subdocument|xmlhttprequest|websocket|other|webrtc|ping|extension|all|1p|3p|css|frame|ghide|ehide|shide|specifichide)"},{"name":"punctuation.definition.adblock","match":","},{"name":"invalid.illegal.redundant.modifier.separator","match":"\\$"}]},"basicRulesRegex":{"patterns":[{"match":"^(\\/[^\\/\\\\]*(?:\\\\.[^\\/\\\\]*)*\\/[dgimsuy]*)(?:(\\$)(.+))?$","captures":{"1":{"patterns":[{"include":"#regularExpression"}]},"2":{"name":"keyword.control.adblock"},"3":{"patterns":[{"include":"#basicRulesOptions"}]}}}]},"comments":{"patterns":[{"name":"comment.line","match":"^!.*"},{"name":"comment.line.batch-style","match":"^# .*"},{"name":"comment.line.batch-style","match":"^#$"}]},"contentAttributes":{"patterns":[{"match":"(\\[)([^\"=]+?)(\\=)(\".+?\")(\\])","captures":{"1":{"name":"punctuation.section.adblock"},"2":{"name":"keyword.other.adblock"},"3":{"name":"keyword.operator.adblock"},"4":{"name":"string.quoted.adblock"},"5":{"name":"punctuation.section.adblock"}}},{"name":"invalid.illegal.adblock","match":".*"}]},"contentRules":{"patterns":[{"match":"^(\\[.+?\\])?(.*?)(\\$@?\\$)(.+?)(\\[.+)?$","captures":{"1":{"patterns":[{"include":"#cosmeticRulesOptions"}]},"2":{"patterns":[{"include":"#domainListCommaSeparated"}]},"3":{"name":"keyword.control.adblock"},"4":{"name":"entity.name.function.adblock"},"5":{"patterns":[{"include":"#contentAttributes"}]}}}]},"cosmeticRulesOptions":{"match":"(\\[)(.+?)(\\])","captures":{"1":{"name":"keyword.control.adblock"},"2":{"patterns":[{"match":"(path)(=)(((\\\\,)|[^,])+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"name":"string.unquoted.adblock"}}},{"match":"(domain)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#domainListPipeSeparated"}]}}},{"match":"(app)(=)([^,]+)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"keyword.operator.adblock"},"3":{"patterns":[{"include":"#appListPipeSeparated"}]}}},{"name":"keyword.control.adblock","match":"\\$"},{"name":"punctuation.definition.adblock","match":","},{"name":"invalid.illegal.adblock","match":".*"}]},"3":{"name":"keyword.control.adblock"}}},"cssRules":{"patterns":[{"match":"^(\\[.+?\\])?(.*?)(#@?\\$\\??#)(.+)$","captures":{"1":{"patterns":[{"include":"#cosmeticRulesOptions"}]},"2":{"patterns":[{"include":"#domainListCommaSeparated"}]},"3":{"name":"keyword.control.adblock"},"4":{"patterns":[{"include":"#cssStyle"}]}}}]},"cssSelector":{"patterns":[{"name":"entity.name.function.adblock","match":".+"}]},"cssStyle":{"patterns":[{"match":"([^{}]+)\\s*((\\{)(.+?)(\\}))","captures":{"1":{"name":"entity.name.function.adblock"},"3":{"name":"punctuation.section.adblock"},"4":{"name":"string.quoted.adblock"},"5":{"name":"punctuation.section.adblock"}}},{"name":"invalid.illegal.adblock","match":".*"}]},"dnsClientsPipeSeparated":{"patterns":[{"match":"((~?)([^|]+)(\\|?))","captures":{"2":{"name":"keyword.other.adblock"},"3":{"name":"string.unquoted.adblock"},"4":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.app-list","match":".*"}]},"dnsTypesPipeSeparated":{"patterns":[{"match":"((~?)([a-zA-Z0-9.-_]+)(\\|?))","captures":{"2":{"name":"keyword.other.adblock"},"3":{"name":"string.unquoted.adblock"},"4":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.app-list","match":".*"}]},"domainListCommaSeparated":{"patterns":[{"match":"(~?)([^,]+)(,?)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"string.unquoted.adblock"},"3":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.domain-list","match":".*"}]},"domainListPipeSeparated":{"patterns":[{"match":"(~?)([^|]+)(\\|?)","captures":{"1":{"name":"keyword.other.adblock"},"2":{"name":"string.unquoted.adblock"},"3":{"name":"punctuation.definition.adblock"}}},{"name":"invalid.illegal.domain-list","match":".*"}]},"elemhideRules":{"patterns":[{"match":"^(\\[.+?\\])?(.*?)(#@?\\??#\\^?)(.+)$","captures":{"1":{"patterns":[{"include":"#cosmeticRulesOptions"}]},"2":{"patterns":[{"include":"#domainListCommaSeparated"}]},"3":{"name":"keyword.control.adblock"},"4":{"patterns":[{"include":"#cssSelector"}]}}}]},"jsFunction":{"patterns":[{"name":"constant.character.jscode.adblock","match":".+"}]},"jsRules":{"patterns":[{"match":"^(.*?)(#@?%#)(.+)$","captures":{"1":{"patterns":[{"include":"#domainListCommaSeparated"}]},"2":{"name":"keyword.control.adblock"},"3":{"patterns":[{"include":"#jsFunction"}]}}}]},"preprocessor":{"patterns":[{"match":"^(!#if) (.*)$","captures":{"1":{"name":"keyword.preprocessor.directive"},"2":{"patterns":[{"name":"constant.language.platform.name","match":"(adguard_app_windows|adguard_app_mac|adguard_app_android|adguard_app_ios|adguard_ext_chromium|adguard_ext_firefox|adguard_ext_edge|adguard_ext_safari|adguard_ext_opera|adguard_ext_android_cb|adguard|ext_abp|ext_ublock|env_chromium|env_edge|env_firefox|env_mobile|env_safari|false|cap_html_filtering|cap_user_stylesheet|env_legacy)"},{"name":"keyword.control.characters","match":"(\u0026\u0026|!|\\|\\|| )"},{"name":"keyword.control.characters","match":"(\\(|\\))"},{"name":"invalid.illegal","match":".*"}]}}},{"match":"^(!#include) (.*)$","captures":{"1":{"name":"keyword.preprocessor.directive"},"2":{"name":"string.unquoted"}}},{"name":"keyword.preprocessor.directive","match":"^!#endif\\s*$"},{"match":"^(!#safari_cb_affinity)(.*)$","captures":{"1":{"name":"keyword.preprocessor.directive"},"2":{"patterns":[{"name":"constant.language.contentblocker.name","match":"(all|general|privacy|social|security|other|custom)"},{"name":"keyword.control.characters","match":"(\\(|\\)|,)"},{"name":"invalid.illegal","match":".*"}]}}},{"match":"^(!\\+) (.*)$","captures":{"1":{"name":"keyword.preprocessor.hint"},"2":{"patterns":[{"name":"keyword.control.hint.name","match":"(NOT_OPTIMIZED|OPTIMIZED|PLATFORM|NOT_PLATFORM)"},{"name":"constant.language.platform.name","match":"(windows|mac|android|ios|ext_chromium|ext_ff|ext_edge|ext_opera|ext_ublock|ext_safari|ext_android_cb)"},{"name":"keyword.control.characters","match":"(\\(|\\)|,)"}]}}},{"name":"invalid.illegal.preprocessor","match":"^!#(?!#).+$"}]},"regularExpression":{"patterns":[{"contentName":"string.regexp","begin":"(/)","end":"((?\u003c!\\\\)/)([dgimsuy]*)?","patterns":[{"name":"keyword.control.regex","match":"(?\u003c!\\\\)([/\\^\\$\\|])"}],"beginCaptures":{"1":{"name":"keyword.other.regex.begin"}},"endCaptures":{"1":{"name":"keyword.other.regex.end"},"2":{"name":"keyword.other.regex"}}}]},"scriptletFunction":{"patterns":[{"match":"((['|\"])(.*?)(?\u003c!\\\\)(\\2))(,\\s*)?","captures":{"1":{"name":"string.quoted.adblock"},"5":{"name":"keyword.operator.adblock"}}},{"name":"invalid.illegal.adblock","match":".*"}]},"scriptletFunctionUBO":{"patterns":[{"match":"([^,]*)(,\\s*)?","captures":{"1":{"name":"string.quoted.adblock"},"2":{"name":"keyword.operator.adblock"}}},{"name":"invalid.illegal.adblock","match":".*"}]},"scriptletRules":{"patterns":[{"match":"^(\\[.+?\\])?(.*?)(#@?%#)(\\/\\/scriptlet)(\\()(.+)(\\)\\s*)$","captures":{"1":{"patterns":[{"include":"#cosmeticRulesOptions"}]},"2":{"patterns":[{"include":"#domainListCommaSeparated"}]},"3":{"name":"keyword.control.adblock"},"4":{"name":"entity.name.function.adblock"},"5":{"name":"punctuation.section.adblock"},"6":{"patterns":[{"include":"#scriptletFunction"}]},"7":{"name":"punctuation.section.adblock"}}}]},"scriptletRulesUBO":{"patterns":[{"match":"^(.*?)(##)(\\+js)(\\()(.+)(\\)\\s*)$","captures":{"1":{"patterns":[{"include":"#domainListCommaSeparated"}]},"2":{"name":"keyword.control.adblock"},"3":{"name":"entity.name.function.adblock"},"4":{"name":"punctuation.section.adblock"},"5":{"patterns":[{"include":"#scriptletFunctionUBO"}]},"6":{"name":"punctuation.section.adblock"}}}]},"snippetRulesABP":{"patterns":[{"match":"^(.*?)(#\\$#)([^{]+)$","captures":{"1":{"patterns":[{"include":"#domainListCommaSeparated"}]},"2":{"name":"keyword.control.adblock"},"3":{"name":"constant.character.snippet.adblock"}}}]},"urlPattern":{"patterns":[{"name":"string.regexp.adblock","match":"^(@@)?(\\/)(.+)\\/$","captures":{"1":{"name":"keyword.other.adblock"}}},{"name":"keyword.other.adblock","match":"^@@\\|?\\|?"},{"name":"keyword.other.adblock","match":"^\\|\\|"},{"name":"keyword.other.adblock","match":"^\\|"},{"name":"keyword.other.adblock","match":"\\|$"},{"name":"keyword.other.adblock","match":"\\^"},{"name":"keyword.other.adblock","match":"\\*"}]}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"Grammarkdown","scopeName":"text.grammarkdown","patterns":[{"include":"#main"}],"repository":{"assertion":{"name":"meta.assertion.grammarkdown","begin":"\\[","end":"\\]","patterns":[{"include":"#assertion-empty"},{"include":"#assertion-lookahead"},{"include":"#assertion-no-symbol"},{"include":"#assertion-lexical-goal"},{"include":"#assertion-parameter"},{"include":"#assertion-prose"}],"beginCaptures":{"0":{"name":"punctuation.definition.assertion.begin.grammarkdown"}},"endCaptures":{"0":{"name":"punctuation.definition.assertion.end.grammarkdown"}}},"assertion-empty":{"match":"\\G\\s*(empty)(?:\\s+((?=\\S)[^\\]]*))?","captures":{"1":{"name":"keyword.operator.assertion.empty.grammarkdown"},"2":{"name":"invalid.illegal.unexpected-junk.grammarkdown"}}},"assertion-lexical-goal":{"begin":"\\G\\s*(lexical\\s+goal)(?=$|\\s)","end":"\\s*(?=$|\\])","patterns":[{"include":"#ref"}],"captures":{"1":{"name":"keyword.operator.assertion.lexical-goal.grammarkdown"}}},"assertion-lookahead":{"patterns":[{"name":"meta.lookahead-operation.grammarkdown","begin":"\\G\\s*(lookahead)\\s*(==|!=|≠)[ \\t]*","end":"(?!\\G)","patterns":[{"include":"#literal"}],"beginCaptures":{"1":{"name":"keyword.operator.assertion.lookahead.grammarkdown"},"2":{"name":"keyword.operator.comparison.equality.grammarkdown"}}},{"name":"meta.lookahead-operation.grammarkdown","begin":"\\G\\s*(lookahead)\\s*(\u003c-|\u003c!|∈|∉)[ \\t]*","end":"(?!\\G)","patterns":[{"name":"meta.string-set.grammarkdown","begin":"\\G{","end":"}","patterns":[{"include":"#literal"},{"include":"#comma"}],"beginCaptures":{"0":{"name":"punctuation.definition.set.begin.grammarkdown"}},"endCaptures":{"0":{"name":"punctuation.definition.set.end.grammarkdown"}}}],"beginCaptures":{"1":{"name":"keyword.operator.assertion.lookahead.grammarkdown"},"2":{"name":"keyword.operator.comparison.equality.grammarkdown"}}}]},"assertion-no-symbol":{"begin":"\\G\\s*(no)(?=$|\\s)","end":"((?\u003c=\\s)here)?\\s*(?=$|\\])","patterns":[{"include":"#ref"}],"captures":{"1":{"name":"keyword.operator.assertion.no-symbol-here.grammarkdown"}}},"assertion-parameter":{"match":"(?:^|\\G|(,))\\s*([+~?])\\s*(\\w+)","captures":{"1":{"patterns":[{"include":"#comma"}]},"2":{"name":"keyword.operator.parameter-test.grammarkdown"},"3":{"patterns":[{"include":"#ref"}]}}},"assertion-prose":{"name":"markup.quote.prose.grammarkdown","begin":"\\G\\s*(\u003e)[ \\t]*","end":"\\s*(?=\\])","beginCaptures":{"1":{"name":"punctuation.section.quote.grammarkdown"}}},"comma":{"name":"punctuation.delimiter.comma.grammarkdown","match":","},"comments":{"patterns":[{"name":"comment.line.double-slash.grammarkdown","begin":"//","end":"$","beginCaptures":{"0":{"name":"punctuation.definition.comment.grammarkdown"}}},{"name":"comment.block.grammarkdown","begin":"/\\*","end":"\\*/","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.grammarkdown"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.grammarkdown"}}}]},"exclusion":{"name":"meta.exclusion.grammarkdown","begin":"(?:^|\\G|(?\u003c=\\s))(but\\s+not)(?=$|\\s)","end":"(?=\\s*(?i:$|/[/*]|\u003c/emu-grammar\\s*\u003e))","patterns":[{"name":"keyword.operator.logical.or.grammarkdown","match":"(?\u003c=\\s)or(?=$|\\s)"},{"name":"keyword.operator.selection.one-of.grammarkdown","match":"(?\u003c=\\s)one\\s+of(?=$|\\s)"},{"include":"#production-innards"}],"beginCaptures":{"1":{"name":"keyword.operator.logical.negation.negate.not.grammarkdown"}}},"link-id":{"name":"meta.custom-permalink.grammarkdown","match":"(?:^|\\G)\\s*(\\w+)\\s*(\\[[^\\]]*\\])\\s*((#)([-\\w]+))","captures":{"1":{"name":"variable.language.production-reference.grammarkdown"},"2":{"patterns":[{"include":"#parameters"}]},"3":{"name":"constant.other.permalink.grammarkdown"},"4":{"name":"punctuation.definition.permalink.grammarkdown"},"5":{"name":"constant.other.reference.link.permalink.grammarkdown"}}},"literal":{"patterns":[{"name":"string.quoted.single.verbatim.grammarkdown","match":"(`)`(`)","captures":{"1":{"name":"punctuation.definition.string.begin.grammarkdown"},"2":{"name":"punctuation.definition.string.end.grammarkdown"}}},{"name":"string.quoted.verbatim.grammarkdown","begin":"`","end":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.grammarkdown"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.grammarkdown"}}}]},"main":{"patterns":[{"include":"#comments"},{"include":"#meta"},{"include":"#production"}]},"meta":{"patterns":[{"name":"meta.import.directive.grammarkdown","begin":"^\\s*((@)import)(?=$|\\s)[ \\t]*","end":"(?=\\s*(?i:$|/[/*]|\u003c/emu-grammar\\s*\u003e))","patterns":[{"include":"#meta-string"}],"beginCaptures":{"1":{"name":"keyword.control.import.grammarkdown"},"2":{"name":"punctuation.definition.keyword.grammarkdown"}}},{"name":"meta.source-line.directive.grammarkdown","begin":"^\\s*((@)line)(?=$|\\s)[ \\t]*","end":"(?=\\s*(?i:$|/[/*]|\u003c/emu-grammar\\s*\u003e))","patterns":[{"match":"\\G\\s*(\\d+)","captures":{"1":{"name":"constant.numeric.decimal.integer.line-number.grammarkdown"}}},{"include":"#meta-string"}],"beginCaptures":{"1":{"name":"keyword.control.line.grammarkdown"},"2":{"name":"punctuation.definition.keyword.grammarkdown"}}},{"name":"meta.define.directive.grammarkdown","begin":"^\\s*((@)define)(?=$|\\s)[ \\t]*","end":"(?=\\s*(?i:$|/[/*]|\u003c/emu-grammar\\s*\u003e))","patterns":[{"name":"variable.assignment.setting-name.grammarkdown","match":"\\G\\w+"},{"include":"#meta-value"}],"beginCaptures":{"1":{"name":"keyword.control.define.grammarkdown"},"2":{"name":"punctuation.definition.keyword.grammarkdown"}}}]},"meta-string":{"patterns":[{"name":"string.quoted.double.grammarkdown","begin":"\"","end":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.grammarkdown"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.grammarkdown"}}},{"name":"string.quoted.single.grammarkdown","begin":"'","end":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.grammarkdown"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.grammarkdown"}}}]},"meta-value":{"patterns":[{"name":"constant.language.default.grammarkdown","match":"(?:^|\\G|(?\u003c=\\s))default(?=\\s*(?i:$|/[/*]|\u003c/emu-grammar\\s*\u003e))"},{"name":"constant.language.boolean.$1.grammarkdown","match":"(?:^|\\G|(?\u003c=\\s))(true|false)(?=\\s*(?i:$|/[/*]|\u003c/emu-grammar\\s*\u003e))"},{"name":"string.unquoted.setting-value.grammarkdown","match":"(?:^|\\G|(?\u003c=\\s))(?=\\S)(?:[^\\r\\n/]|/(?!/|\\*))++"}]},"one-of-list":{"name":"meta.one-of-list.grammarkdown","match":"\\G\\s*(one\\s+of)(?=$|\\s)[ \\t]*((?=\\S)(?:[^\\r\\n/]|/(?!/|\\*))++)?","captures":{"1":{"name":"keyword.operator.selection.one-of.grammarkdown"},"2":{"patterns":[{"include":"#terminal"}]}}},"optional":{"name":"keyword.operator.quantifier.optional.grammarkdown","match":"(?\u003c=\\S)\\s*\\?"},"parameters":{"name":"meta.parameters.list.grammarkdown","begin":"\\[","end":"\\]","patterns":[{"name":"variable.parameter.grammarkdown","match":"\\w+"},{"name":"keyword.operator.other.grammarkdown","match":"[\\?+~]"},{"include":"#comma"}],"beginCaptures":{"0":{"name":"punctuation.definition.list.begin.grammarkdown"}},"endCaptures":{"0":{"name":"punctuation.definition.list.end.grammarkdown"}}},"production":{"patterns":[{"name":"meta.production.indented.grammarkdown","begin":"(?:^|\\G)(\\s*)(\\w+)(?:\\s*(\\[[^\\]]*\\]))?\\s*(:{1,3})[ \\t]*(?:(one\\s+of)(?=$|\\s)\\s*)?[ \\t]*$","end":"(?i)(?=\\s*\u003c/emu-grammar\\s*\u003e)|^(?:(?=\\s*$)|(?!\\1[ \\t]+(?:[^\\s/]|/(?!/|\\*))))","patterns":[{"include":"#comments"},{"include":"#one-of-list"},{"include":"#production-innards"}],"beginCaptures":{"2":{"name":"entity.name.production.grammarkdown","patterns":[{"include":"#reserved"}]},"3":{"patterns":[{"include":"#parameters"}]},"4":{"name":"keyword.assignment.rule.grammarkdown"},"5":{"name":"keyword.operator.selection.one-of.grammarkdown"}}},{"name":"meta.production.single-line.grammarkdown","begin":"(?:^|\\G)\\s*(\\w+)(?:\\s*(\\[[^\\]]*\\]))?\\s*(:{1,3})[ \\t]*(?:(one\\s+of(?=$|\\s))\\s*)?(?=[^\\s/]|/(?!/|\\*))","end":"(?=\\s*(?i:$|/[/*]|\u003c/emu-grammar\\s*\u003e))","patterns":[{"include":"#one-of-list"},{"include":"#production-innards"}],"beginCaptures":{"1":{"name":"entity.name.production.grammarkdown","patterns":[{"include":"#reserved"}]},"2":{"patterns":[{"include":"#parameters"}]},"3":{"name":"keyword.assignment.rule.grammarkdown"},"4":{"name":"keyword.operator.selection.one-of.grammarkdown"}}}]},"production-innards":{"patterns":[{"include":"#prose"},{"include":"#exclusion"},{"include":"#unicode-range"},{"include":"#terminal"},{"include":"#optional"},{"include":"#link-id"},{"include":"#ref"}]},"prose":{"name":"markup.quote.prose.grammarkdown","begin":"(?:^|\\G)\\s*(\u003e)[ \\t]*","end":"(?=\\s*(?i:$|/[/*]|\u003c/emu-grammar\\s*\u003e))","beginCaptures":{"1":{"name":"punctuation.section.quote.grammarkdown"}}},"ref":{"name":"variable.reference.grammarkdown","match":"\\w+","captures":{"0":{"patterns":[{"include":"#reserved"}]}}},"reserved":{"name":"invalid.illegal.reserved-keyword.grammarkdown","match":"(?:^|\\G)(but|empty|goal|here|lexical|lookahead|not?|of|one|or)$"},"terminal":{"patterns":[{"include":"#assertion"},{"include":"#literal"},{"include":"#unicode-char"},{"include":"#unicode-codepoint"}]},"unicode-char":{"name":"constant.character.named.unicode-name.grammarkdown","match":"(\u003c)(?!/emu-grammar\\s*\u003e)[^\u003e]+(\u003e)","captures":{"1":{"name":"punctuation.definition.character.begin.grammarkdown"},"2":{"name":"punctuation.definition.character.end.grammarkdown"}}},"unicode-codepoint":{"name":"constant.numeric.other.codepoint.grammarkdown","match":"U\\+[A-Fa-f0-9]+"},"unicode-range":{"name":"meta.character-range.grammarkdown","match":"(?x)\n((\u003c[^\u003e]+\u003e) | (U\\+[A-Fa-f0-9]+))\n\\s+ (through) \\s+\n((\u003c[^\u003e]+\u003e) | (U\\+[A-Fa-f0-9]+))","captures":{"1":{"name":"meta.start-character.grammarkdown"},"2":{"patterns":[{"include":"#unicode-char"}]},"3":{"patterns":[{"include":"#unicode-codepoint"}]},"4":{"name":"keyword.operator.range.grammarkdown"},"5":{"name":"meta.end-character.grammarkdown"},"6":{"patterns":[{"include":"#unicode-char"}]},"7":{"patterns":[{"include":"#unicode-codepoint"}]}}}}}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"Ecmarkup","scopeName":"text.html.ecmarkup","patterns":[{"begin":"\\A(?=\\s*(?:\\d+\\.|\\*)(?=$|\\s))","end":"(?=A)B","patterns":[{"include":"#list"},{"include":"#main"}]},{"include":"#main"}],"repository":{"code-blocks":{"name":"meta.tag.opaque-element.${2:/downcase}.html.ecmarkup","begin":"(?i)\\s*(\u003c(pre|code)(?=$|\\s|\u003e))","end":"(?i)\\s*(\u003c/\\2\\s*\u003e)","patterns":[{"include":"#tag-opening-rest"},{"include":"#main"}],"beginCaptures":{"1":{"patterns":[{"include":"#tag-opening-start"}]}},"endCaptures":{"1":{"patterns":[{"include":"#tag-closing"}]}}},"emu-alg":{"name":"meta.emu-alg.html.ecmarkup","begin":"(?i)\\s*(\u003cemu-alg(?=$|\\s|\u003e))","end":"(?i)\\s*(\u003c/emu-alg\\s*\u003e)","patterns":[{"include":"#tag-opening-rest"},{"begin":"(?\u003c=\u003e)","end":"(?i)(?=\\s*(\u003c/emu-alg\\s*\u003e))","patterns":[{"include":"#list"},{"include":"#main"}]}],"beginCaptures":{"1":{"patterns":[{"include":"#tag-opening-start"}]}},"endCaptures":{"1":{"patterns":[{"include":"#tag-closing"}]}}},"emu-element":{"name":"meta.${2:/downcase}.html.ecmarkup","begin":"(?i)\\s*(\u003c(emu-[\\w][-\\w]*)(?=$|\\s|\u003e))","end":"(?i)\\s*(\u003c/\\2\\s*\u003e)","patterns":[{"include":"#tag-opening-rest"},{"include":"#tag-body"}],"beginCaptures":{"1":{"patterns":[{"include":"#tag-opening-start"}]}},"endCaptures":{"1":{"patterns":[{"include":"#tag-closing"}]}}},"emu-grammar":{"name":"meta.emu-grammar.html.ecmarkup","begin":"(?i)\\s*(\u003cemu-grammar(?=$|\\s|\u003e))","end":"(?i)\\s*(\u003c/emu-grammar\\s*\u003e)","patterns":[{"include":"#tag-opening-rest"},{"name":"meta.grammar.ecmarkup","contentName":"text.embedded.grammarkdown","begin":"(?\u003c=\u003e)","end":"(?i)(?=\\s*(\u003c/emu-grammar\\s*\u003e))","patterns":[{"include":"text.grammarkdown"}]}],"beginCaptures":{"1":{"patterns":[{"include":"#tag-opening-start"}]}},"endCaptures":{"1":{"patterns":[{"include":"#tag-closing"}]}}},"escape":{"name":"constant.character.escape.ecmarkup","match":"(\\\\)[*_`\u003c|~\\\\]","captures":{"1":{"name":"punctuation.definition.escape.backslash.ecmarkup"}}},"formatting":{"patterns":[{"name":"variable.reference.ecmarkup","match":"(?\u003c![\\w*_`\u003c|~])(_)((?:\\\\_|[^\\s_])++)(_)","captures":{"1":{"name":"punctuation.definition.variable.begin.ecmarkup"},"2":{"patterns":[{"include":"#escape"}]},"3":{"name":"punctuation.definition.variable.end.ecmarkup"}}},{"name":"constant.other.value.ecmarkup","match":"(?\u003c![\\w*_`\u003c|~])(\\*)(?=\\S)((?:\\\\\\*|[^*])++)(?\u003c=\\S)(\\*)","captures":{"1":{"name":"punctuation.definition.value.begin.ecmarkup"},"2":{"patterns":[{"include":"#escape"}]},"3":{"name":"punctuation.definition.value.end.ecmarkup"}}},{"name":"markup.raw.code.monospace.ecmarkup","match":"(\\`)(?=\\S)((?:\\\\`|[^`])++)(?\u003c=\\S)(\\`)","captures":{"1":{"name":"punctuation.definition.value.begin.ecmarkup"},"2":{"patterns":[{"include":"#escape"}]},"3":{"name":"punctuation.definition.value.end.ecmarkup"}}},{"name":"support.constant.spec-level.ecmarkup","match":"(?\u003c![\\w*_`\u003c|~])(~)(?=\\S)((?:\\\\~|[^~])++)(?\u003c=\\S)(~)","captures":{"1":{"name":"punctuation.definition.constant.begin.ecmarkup"},"2":{"patterns":[{"include":"#escape"}]},"3":{"name":"punctuation.definition.constant.end.ecmarkup"}}},{"include":"#nonterminal"}]},"list":{"name":"meta.list.ecmarkup","begin":"^(\\s*)((\\d+\\.|\\*))(?=$|\\s)(?:\\s*(Assert(:)))?[ \\t]*","end":"(?=\\s*\u003c/(?i:emu-alg)\\s*\u003e)|(?!\\G)^(?=\\s*(?:$|(?:\\d+\\.|\\*)(?:$|\\s)))","patterns":[{"begin":"\\G(?=\\[)","end":"(?\u003c=\\])(?:\\s*(Assert(:)))?","patterns":[{"name":"meta.attributes.ecmarkup","begin":"\\G(\\[)","end":"(\\])","patterns":[{"name":"meta.attribute.ecmarkup","begin":"(\\w[-\\w]*)\\s*(=)\\s*(?=\")","end":"(?!\\G)","patterns":[{"include":"etc#strDouble"},{"include":"etc#comma"}],"beginCaptures":{"1":{"name":"entity.other.attribute-name.ecmarkup"},"2":{"patterns":[{"include":"etc#eql"}]}},"applyEndPatternLast":true}],"beginCaptures":{"0":{"name":"punctuation.definition.list.begin.ecmarkup"},"1":{"name":"brackethighlighter.square"}},"endCaptures":{"0":{"name":"punctuation.definition.list.end.ecmarkup"},"1":{"name":"brackethighlighter.square"}}}],"endCaptures":{"1":{"name":"support.constant.assertion.ecmarkup"},"2":{"name":"puncutation.definition.constant.ecmarkup"}}},{"include":"#main"}],"beginCaptures":{"2":{"name":"markup.list.marker.ecmarkup"},"3":{"name":"punctuation.definition.list.ecmarkup"},"4":{"name":"support.constant.assertion.ecmarkup"},"5":{"name":"puncutation.definition.constant.ecmarkup"}}},"main":{"patterns":[{"include":"#emu-alg"},{"include":"#emu-grammar"},{"include":"#emu-element"},{"include":"#metadata-block"},{"include":"#code-blocks"},{"include":"#escape"},{"include":"#formatting"},{"include":"text.html.basic"}]},"metadata-block":{"name":"meta.tag.block.pre.front-matter.html.ecmarkup","contentName":"source.embedded.yaml.front-matter.ecmarkup","begin":"(?ix) \\s*\n((\u003c)(pre)\n(\n\t\\s+[^\u003e]*?(?\u003c=\\s)\n\tclass \\s* = \\s*\n\t(?:\"metadata\"|'metadata'|metadata)\n\t(?=\\s|\u003e) [^\u003e]*\n)\n(\u003e))","end":"(?i)\\s*((\u003c/)(pre)\\s*(\u003e))","patterns":[{"include":"source.yaml"}],"beginCaptures":{"1":{"name":"meta.tag.other.html.ecmarkup"},"2":{"name":"punctuation.definition.tag.begin.html.ecmarkup"},"3":{"name":"entity.name.tag.block.pre.html"},"4":{"patterns":[{"include":"text.html.basic#tag-stuff"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"endCaptures":{"1":{"name":"meta.tag.block.pre.html"},"2":{"name":"punctuation.definition.tag.begin.html"},"3":{"name":"entity.name.tag.block.pre.html"},"4":{"name":"punctuation.definition.tag.end.html"}}},"nonterminal":{"name":"meta.nonterminal.ecmarkup","match":"(?x) (?\u003c![\\w*_`\u003c|~])\n((\\|))\n([A-Za-z0-9]+)\n(\\[ [^\\]]* \\])?\n(?: (\\?) | ((_)opt))?\n((\\|))","captures":{"1":{"name":"punctuation.definition.nonterminal.begin.ecmarkup"},"2":{"name":"brackethighlighter.tag"},"3":{"name":"keyword.other.nonterminal.ecmarkup"},"4":{"patterns":[{"include":"#nonterminal-params"}]},"5":{"name":"keyword.operator.optional.question-mark.ecmarkup"},"6":{"name":"keyword.operator.optional.english.ecmarkup"},"7":{"name":"punctuation.separator.suffix.ecmarkup"},"8":{"name":"punctuation.definition.nonterminal.end.ecmarkup"},"9":{"name":"brackethighlighter.tag"}}},"nonterminal-params":{"name":"meta.parameters.ecmarkup","begin":"(\\[)","end":"(\\])","patterns":[{"name":"variable.parameter.nonterminal.ecmarkup","match":"\\w[-\\w]*"},{"name":"keyword.operator.optional.question-mark.ecmarkup","match":"\\?"},{"include":"#escape"},{"include":"etc#comma"}],"beginCaptures":{"0":{"name":"punctuation.section.list.begin.ecmarkup"},"1":{"name":"brackethighlighter.square"}},"endCaptures":{"0":{"name":"punctuation.section.list.end.ecmarkup"},"1":{"name":"brackethighlighter.square"}}},"tag-body":{"name":"meta.tag-contents.html.ecmarkup","begin":"(?\u003c=\u003e)","end":"(?=\\s*\u003c/emu-[-\\w]*\\s*\u003e)","patterns":[{"include":"#main"}]},"tag-closing":{"name":"meta.tag.other.html.ecmarkup","match":"(?i)(?:^|\\G)(\u003c/)(\\w[-\\w]*)\\s*(\u003e)","captures":{"1":{"name":"punctuation.definition.tag.begin.html.ecmarkup"},"2":{"name":"entity.name.tag.other.html.ecmarkup"},"3":{"name":"punctuation.definition.tag.end.html.ecmarkup"}}},"tag-opening-rest":{"begin":"\\G","end":"\\s*(\u003e)","patterns":[{"include":"text.html.basic#tag-stuff"}],"endCaptures":{"1":{"name":"punctuation.definition.tag.end.html.ecmarkup"}}},"tag-opening-start":{"name":"meta.tag.other.html.ecmarkup","match":"(?:^|\\G)(\u003c)(\\w[-\\w]*)(?=$|\\s|\u003e)","captures":{"1":{"name":"punctuation.definition.tag.begin.html.ecmarkup"},"2":{"name":"entity.name.tag.other.html.ecmarkup"}}}},"injections":{"L:(source.embedded.yaml.front-matter.ecmarkup - (comment | embedded))":{"patterns":[{"include":"text.html.basic#character-reference"}]},"L:(text.html.ecmarkup meta.tag.opaque-element - (meta.emu-alg | meta.emu-grammar))":{"patterns":[{"match":"[*_`|~\\\\]"}]}}}
|
@@ -1 +1 @@
|
|
1
|
-
{"name":"Antlers (Statamic Syntax)","scopeName":"text.html.statamic","patterns":[{"include":"#php-tag"},{"include":"#statamic-comments"},{"include":"#frontMatter"},{"include":"#antlers-tags"}],"repository":{"antlers-conditionals":{"name":"keyword.control.statamic","match":"(?\u003c!:)(/?else|/?elseif|/?if|/?unless|endif|endunless|unlesselse|stop)"},"antlers-constants":{"match":"(\\G|\\s|\\b)(true|TRUE|false|FALSE|yes|YES|no|NO|null|as)\\s","captures":{"2":{"name":"constant.language.statamic"}}},"antlers-expression":{"patterns":[{"name":"punctuation.terminator.expression.statamic","match":";"},{"include":"#antlers-strings"},{"include":"#antlers-numbers"},{"name":"keyword.operator.key.statamic","match":"=\u003e"},{"name":"keyword.operator.class.statamic","match":"-\u003e"},{"include":"#statamic-explicit-tags"},{"include":"#statamic-core-tags"},{"name":"keyword.operator.comparison.statamic","match":"===|==|!==|!=|\u003c\u003e"},{"name":"keyword.operator.string.statamic","match":"\\\u0026=?"},{"name":"keyword.operator.assignment.statamic","match":"=|\\+=|\\-=|\\*\\*?=|/=|%=|\\|=|\\^=|\u003c\u003c=|\u003e\u003e="},{"name":"keyword.operator.logical.statamic","match":"(?i)(!|\\?\\?|\\?=|\\?|\u0026\u0026|\u0026|\\|\\|)|\\b(and|or|xor)\\b"},{"name":"keyword.operator.bitwise.statamic","match":"(?i)\\b(bwa|bwo|bxor|bnot|bsl|bsr)\\b"},{"name":"keyword.operator.comparison.statamic","match":"\u003c=\u003e|\u003c=|\u003e=|\u003c|\u003e"},{"name":"keyword.operator.arithmetic.statamic","match":"\\-|\\+|\\*\\*?|/|%"},{"name":"meta.array.statamic","begin":"(arr|list|switch)\\s*(\\()","end":"\\)|(?=\\?\u003e)","patterns":[{"include":"#antlers-expression"}],"beginCaptures":{"1":{"name":"support.function.construct.statamic"},"2":{"name":"punctuation.definition.array.begin.bracket.round.statamic"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.bracket.round.statamic"}}},{"begin":"(?\u003c!@){(\\s?)","end":"(\\s?)}","patterns":[{"include":"#antlers-expression"}]},{"include":"#antlers-tag-parameter-variable"},{"include":"#antlers-language-operators"},{"include":"#antlers-variable"},{"include":"#antlers-modifier-pipe"},{"include":"#antlers-variable-modifier-name"},{"include":"#antlers-variable-modifiers"},{"include":"#antlers-constants"}]},"antlers-language-operators":{"match":"(\\w+)[\\s]","captures":{"1":{"name":"variable.statamic","patterns":[{"include":"#antlers-numbers"},{"include":"#language-operators"}]}}},"antlers-modifier-pipe":{"name":"keyword.operator.other.statamic","match":"(\\|)"},"antlers-numbers":{"name":"constant.numeric.statamic","match":"0|[1-9](?:_?[0-9]+)*"},"antlers-strings":{"patterns":[{"include":"#string-double-quoted"},{"include":"#string-single-quoted"}]},"antlers-tag-parameter-variable":{"match":"(:?([\\S:]+?)(=)('|\")([^\\4]*?)(\\4))","captures":{"1":{"patterns":[{"match":":([\\S:]+?)(=)('|\")(.*?)(\\3)","captures":{"1":{"name":"entity.other.attribute-name"},"2":{"name":"keyword.operator.assignment.statamic"},"3":{"name":"punctuation.definition.string.begin.statamic"},"4":{"patterns":[{"include":"#antlers-expression"}]},"5":{"name":"punctuation.definition.string.end.statamic"}}},{"match":"([\\S]+?)(=)(('|\")(.*?)(\\4))","captures":{"1":{"name":"entity.other.attribute-name"},"2":{"name":"keyword.operator.assignment.statamic"},"3":{"patterns":[{"include":"#string-single-quoted"},{"include":"#string-double-quoted"}]}}}]}}},"antlers-tags":{"name":"meta.embedded.block.statamic","begin":"(?\u003c!@){{(?!\\$)(\\s?)","end":"(\\s?)}}","patterns":[{"include":"#statamic-comments"},{"include":"#php-tag"},{"include":"#antlers-conditionals"},{"include":"#antlers-expression"}]},"antlers-variable":{"match":"(/?\\w+)(:)?(\\w+)?","captures":{"1":{"name":"variable.statamic"},"2":{"name":"keyword.operator.statamic"},"3":{"name":"variable.statamic","patterns":[{"include":"$self"}]}}},"antlers-variable-modifier-name":{"match":"(\\s)?(\\|)(\\s)?(\\w+((^:([a-zA-Z0-9-_/-@]+)){1,2})?|((-|\\+|\\*|/|\\^|\\%):(\\d*)?\\.?(\\d+)))+","captures":{"2":{"name":"keyword.operator.statamic"},"4":{"name":"support.function.statamic"}}},"antlers-variable-modifiers":{"match":"(\\s)?(\\|)(\\s)?(\\w+((:([a-zA-Z0-9-_/-@]+)){1,2})?|((-|\\+|\\*|/|\\^|\\%):(\\d*)?\\.?(\\d+)))+","captures":{"2":{"name":"keyword.operator.statamic"},"4":{"name":"support.function.statamic","patterns":[{"include":"#antlers-expression"}]}}},"core-tag-names":{"patterns":[{"name":"entity.name.tag.statamic","match":"(?i)\\b(taxonomy|user_groups|user_roles|collection|asset|nocache|vite|mount_url|form|assets|cache|can|dd|ddd|dump|get_content|get_error|get_errors|get_files|glide|in|increment|installed|is|iterate|foreach|link|locales|markdown|member|mix|nav|not_found|404|obfuscate|parent|partial|path|query|range|loop|redirect|relate|rotate|route|scope|section|session|set|structure|svg|theme|trans|trans_choice|user|users|widont|yields|yield|slot|once|noparse|view|stack|push)\\b"}]},"frontMatter":{"contentName":"meta.embedded.block.frontmatter","begin":"\\A-{3}\\s*$","end":"(^|\\G)-{3}|\\.{3}\\s*$","patterns":[{"include":"source.yaml"}]},"language-operators":{"patterns":[{"name":"support.function.array.statamic","match":"(?i)\\b(pluck|take|skip|arr|orderby|groupby|merge|where|switch|bwa|bwo|bxor|bnot|bsl|bsr|if|elseif|else|void)(\\b)"}]},"php-tag":{"patterns":[{"name":"meta.embedded.block.statamic","contentName":"source.php","begin":"\u003c\\?(?i:php|=)?(?![^?]*\\?\u003e)","end":"(\\?)\u003e","patterns":[{"include":"text.html.php"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.statamic"},"1":{"name":"source.php"}}},{"name":"meta.embedded.line.statamic","contentName":"source.php","begin":"(?\u003c!@){{([\\$\\?]\\s?)","end":"(\\s?)[\\$\\?]}}","patterns":[{"include":"text.html.php"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.statamic"},"1":{"name":"source.php"}}},{"name":"meta.embedded.line.statamic","contentName":"source.php","begin":"\u003c\\?(?i:php|=)?","end":"(\\?)\u003e","patterns":[{"include":"text.html.php"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.statamic"},"1":{"name":"source.php"}}}]},"statamic-comments":{"name":"comment.block.statamic","begin":"{{#","end":"#}}"},"statamic-core-closing-tags":{"match":"\\/(\\w+)+","captures":{"1":{"name":"variable.statamic","patterns":[{"include":"#core-tag-names"}]}}},"statamic-core-tags":{"match":"\\G(/?\\w+)+","captures":{"1":{"name":"variable.statamic","patterns":[{"include":"#core-tag-names"}]}}},"statamic-explicit-tags":{"match":"\\G(/?%\\w+)+","captures":{"1":{"name":"entity.name.tag.statamic"}}},"string-double-quoted":{"name":"string.quoted.double.statamic","begin":"\"","end":"\"","patterns":[{"begin":"(?\u003c!@){(\\s?)","end":"(\\s?)}","patterns":[{"include":"#antlers-expression"}]}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.statamic"}}},"string-single-quoted":{"name":"string.quoted.single.statamic","begin":"'","end":"'","patterns":[{"name":"constant.character.escape.statamic","match":"\\\\[\\\\']"},{"begin":"(?\u003c!@){(\\s?)","end":"(\\s?)}","patterns":[{"include":"#antlers-expression"}]}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.statamic"}}}},"injections":{"text.html.statamic":{"patterns":[{"include":"#statamic-comments"},{"include":"#antlers-tags"}]},"text.html.statamic - (meta.embedded | meta.tag | comment.block.statamic), L:(text.html.statamic meta.tag - (comment.block.statamic | meta.embedded.statamic))":{"patterns":[{"include":"text.html.basic"}]},"text.html.statamic - (meta.embedded | meta.tag), L:((text.html.statamic meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.css - (meta.embedded.block.php | meta.embedded.line.php))":{"patterns":[{"include":"#php-tag"}]}}}
|
1
|
+
{"name":"Antlers (Statamic Syntax)","scopeName":"text.html.statamic","patterns":[{"include":"#php-tag"},{"include":"#statamic-comments"},{"include":"#frontMatter"},{"include":"#antlers-tags"}],"repository":{"antlers-conditionals":{"name":"keyword.control.statamic","match":"(?\u003c!:)(/?else|/?elseif|/?if|/?unless|endif|endunless|unlesselse|stop)"},"antlers-constants":{"match":"(\\G|\\s|\\b)(true|TRUE|false|FALSE|yes|YES|no|NO|null|as)\\s","captures":{"2":{"name":"constant.language.statamic"}}},"antlers-expression":{"patterns":[{"name":"punctuation.terminator.expression.statamic","match":";"},{"include":"#antlers-strings"},{"include":"#antlers-numbers"},{"name":"keyword.operator.key.statamic","match":"=\u003e"},{"name":"keyword.operator.class.statamic","match":"-\u003e"},{"include":"#statamic-explicit-tags"},{"include":"#statamic-core-tags"},{"name":"keyword.operator.comparison.statamic","match":"===|==|!==|!=|\u003c\u003e"},{"name":"keyword.operator.string.statamic","match":"\\\u0026=?"},{"name":"keyword.operator.assignment.statamic","match":"=|\\+=|\\-=|\\*\\*?=|/=|%=|\\|=|\\^=|\u003c\u003c=|\u003e\u003e="},{"name":"keyword.operator.logical.statamic","match":"(?i)(!|\\?\\?|\\?=|\\?|\u0026\u0026|\u0026|\\|\\|)|\\b(and|or|xor)\\b"},{"name":"keyword.operator.bitwise.statamic","match":"(?i)\\b(bwa|bwo|bxor|bnot|bsl|bsr)\\b"},{"name":"keyword.operator.comparison.statamic","match":"\u003c=\u003e|\u003c=|\u003e=|\u003c|\u003e"},{"name":"keyword.operator.arithmetic.statamic","match":"\\-|\\+|\\*\\*?|/|%"},{"name":"meta.array.statamic","begin":"(arr|list|switch)\\s*(\\()","end":"\\)|(?=\\?\u003e)","patterns":[{"include":"#antlers-expression"}],"beginCaptures":{"1":{"name":"support.function.construct.statamic"},"2":{"name":"punctuation.definition.array.begin.bracket.round.statamic"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.bracket.round.statamic"}}},{"begin":"(?\u003c!@){(\\s?)","end":"(\\s?)}","patterns":[{"include":"#antlers-expression"}]},{"include":"#antlers-tag-parameter-variable"},{"include":"#antlers-language-operators"},{"include":"#antlers-variable"},{"include":"#antlers-modifier-pipe"},{"include":"#antlers-variable-modifier-name"},{"include":"#antlers-variable-modifiers"},{"include":"#antlers-constants"}]},"antlers-language-operators":{"match":"(\\w+)[\\s]","captures":{"1":{"name":"variable.statamic","patterns":[{"include":"#antlers-numbers"},{"include":"#language-operators"}]}}},"antlers-modifier-pipe":{"name":"keyword.operator.other.statamic","match":"(\\|)"},"antlers-numbers":{"name":"constant.numeric.statamic","match":"0|[1-9](?:_?[0-9]+)*"},"antlers-strings":{"patterns":[{"include":"#string-double-quoted"},{"include":"#string-single-quoted"}]},"antlers-tag-parameter-variable":{"match":"(:?([\\S:]+?)(=)('|\")([^\\4]*?)(\\4))","captures":{"1":{"patterns":[{"match":":([\\S:]+?)(=)('|\")(.*?)(\\3)","captures":{"1":{"name":"entity.other.attribute-name"},"2":{"name":"keyword.operator.assignment.statamic"},"3":{"name":"punctuation.definition.string.begin.statamic"},"4":{"patterns":[{"include":"#antlers-expression"}]},"5":{"name":"punctuation.definition.string.end.statamic"}}},{"match":"([\\S]+?)(=)(('|\")(.*?)(\\4))","captures":{"1":{"name":"entity.other.attribute-name"},"2":{"name":"keyword.operator.assignment.statamic"},"3":{"patterns":[{"include":"#string-single-quoted"},{"include":"#string-double-quoted"}]}}}]}}},"antlers-tags":{"name":"meta.embedded.block.statamic","begin":"(?\u003c!@){{(?!\\$)(\\s?)","end":"(\\s?)}}","patterns":[{"include":"#statamic-comments"},{"include":"#php-tag"},{"include":"#antlers-conditionals"},{"include":"#antlers-expression"}]},"antlers-variable":{"match":"(/?\\w+)(:)?(\\w+)?","captures":{"1":{"name":"variable.statamic"},"2":{"name":"keyword.operator.statamic"},"3":{"name":"variable.statamic","patterns":[{"include":"$self"}]}}},"antlers-variable-modifier-name":{"match":"(\\s)?(\\|)(\\s)?(\\w+((^:([a-zA-Z0-9-_/-@]+)){1,2})?|((-|\\+|\\*|/|\\^|\\%):(\\d*)?\\.?(\\d+)))+","captures":{"2":{"name":"keyword.operator.statamic"},"4":{"name":"support.function.statamic"}}},"antlers-variable-modifiers":{"match":"(\\s)?(\\|)(\\s)?(\\w+((:([a-zA-Z0-9-_/-@]+)){1,2})?|((-|\\+|\\*|/|\\^|\\%):(\\d*)?\\.?(\\d+)))+","captures":{"2":{"name":"keyword.operator.statamic"},"4":{"name":"support.function.statamic","patterns":[{"include":"#antlers-expression"}]}}},"core-tag-names":{"patterns":[{"name":"entity.name.tag.statamic","match":"(?i)\\b(taxonomy|cookie|user_groups|user_roles|collection|asset|nocache|vite|mount_url|form|assets|cache|can|dd|ddd|dump|get_content|get_error|get_errors|get_files|glide|in|increment|installed|is|iterate|foreach|link|locales|markdown|member|mix|nav|not_found|404|obfuscate|parent|partial|path|query|range|loop|redirect|relate|rotate|route|scope|section|session|set|structure|svg|theme|trans|trans_choice|user|users|widont|yields|yield|slot|once|noparse|view|stack|push)\\b"}]},"frontMatter":{"contentName":"meta.embedded.block.frontmatter","begin":"\\A-{3}\\s*$","end":"(^|\\G)-{3}|\\.{3}\\s*$","patterns":[{"include":"source.yaml"}]},"language-operators":{"patterns":[{"name":"support.function.array.statamic","match":"(?i)\\b(pluck|take|skip|arr|orderby|groupby|merge|where|switch|bwa|bwo|bxor|bnot|bsl|bsr|if|elseif|else|void)(\\b)"}]},"php-tag":{"patterns":[{"name":"meta.embedded.block.statamic","contentName":"source.php","begin":"\u003c\\?(?i:php|=)?(?![^?]*\\?\u003e)","end":"(\\?)\u003e","patterns":[{"include":"text.html.php"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.statamic"},"1":{"name":"source.php"}}},{"name":"meta.embedded.line.statamic","contentName":"source.php","begin":"(?\u003c!@){{([\\$\\?]\\s?)","end":"(\\s?)[\\$\\?]}}","patterns":[{"include":"text.html.php"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.statamic"},"1":{"name":"source.php"}}},{"name":"meta.embedded.line.statamic","contentName":"source.php","begin":"\u003c\\?(?i:php|=)?","end":"(\\?)\u003e","patterns":[{"include":"text.html.php"}],"beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.section.embedded.end.statamic"},"1":{"name":"source.php"}}}]},"statamic-comments":{"name":"comment.block.statamic","begin":"{{#","end":"#}}"},"statamic-core-closing-tags":{"match":"\\/(\\w+)+","captures":{"1":{"name":"variable.statamic","patterns":[{"include":"#core-tag-names"}]}}},"statamic-core-tags":{"match":"\\G(/?\\w+)+","captures":{"1":{"name":"variable.statamic","patterns":[{"include":"#core-tag-names"}]}}},"statamic-explicit-tags":{"match":"\\G(/?%\\w+)+","captures":{"1":{"name":"entity.name.tag.statamic"}}},"string-double-quoted":{"name":"string.quoted.double.statamic","begin":"\"","end":"\"","patterns":[{"begin":"(?\u003c!@){(\\s?)","end":"(\\s?)}","patterns":[{"include":"#antlers-expression"}]}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.statamic"}}},"string-single-quoted":{"name":"string.quoted.single.statamic","begin":"'","end":"'","patterns":[{"name":"constant.character.escape.statamic","match":"\\\\[\\\\']"},{"begin":"(?\u003c!@){(\\s?)","end":"(\\s?)}","patterns":[{"include":"#antlers-expression"}]}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.statamic"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.statamic"}}}},"injections":{"text.html.statamic":{"patterns":[{"include":"#statamic-comments"},{"include":"#antlers-tags"}]},"text.html.statamic - (meta.embedded | meta.tag | comment.block.statamic), L:(text.html.statamic meta.tag - (comment.block.statamic | meta.embedded.statamic))":{"patterns":[{"include":"text.html.basic"}]},"text.html.statamic - (meta.embedded | meta.tag), L:((text.html.statamic meta.tag) - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.js - (meta.embedded.block.php | meta.embedded.line.php)), L:(source.css - (meta.embedded.block.php | meta.embedded.line.php))":{"patterns":[{"include":"#php-tag"}]}}}
|