shiki 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/langs/angular-template-blocks.mjs +1 -1
- package/dist/langs/common-lisp.mjs +1 -1
- package/dist/langs/kusto.mjs +1 -1
- package/dist/langs/nix.mjs +1 -1
- package/dist/langs/regex.d.mts +1 -0
- package/dist/langs/regex.mjs +1 -0
- package/dist/langs/regexp.d.mts +1 -0
- package/dist/langs/regexp.mjs +6 -0
- package/dist/langs/typespec.mjs +1 -1
- package/dist/langs/vue.mjs +3 -2
- package/dist/langs.d.mts +1 -1
- package/dist/langs.mjs +8 -0
- package/dist/themes/vitesse-black.mjs +6 -4
- package/dist/themes/vitesse-dark.mjs +6 -4
- package/dist/themes/vitesse-light.mjs +4 -2
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import angular_expression from './angular-expression.mjs';
|
|
2
2
|
import angular_template from './angular-template.mjs';
|
|
3
3
|
|
|
4
|
-
const lang = Object.freeze({ "injectTo": ["text.html.derivative", "text.html.derivative.ng", "source.ts.ng"], "injectionSelector": "L:text.html -comment -expression.ng -meta.tag -source.css -source.js", "name": "angular-template-blocks", "patterns": [{ "include": "#block" }], "repository": { "block": { "begin": "(@)((?:\\
|
|
4
|
+
const lang = Object.freeze({ "injectTo": ["text.html.derivative", "text.html.derivative.ng", "source.ts.ng"], "injectionSelector": "L:text.html -comment -expression.ng -meta.tag -source.css -source.js", "name": "angular-template-blocks", "patterns": [{ "include": "#block" }], "repository": { "block": { "begin": "(@)(if|else if|else|defer|placeholder|loading|error|switch|case|default|for|empty)(?:\\s*)", "beginCaptures": { "1": { "patterns": [{ "include": "#transition" }] }, "2": { "name": "keyword.control.block.kind.ng" } }, "contentName": "control.block.ng", "end": "(?<=\\})", "patterns": [{ "include": "#blockExpression" }, { "include": "#blockBody" }] }, "blockBody": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "contentName": "control.block.body.ng", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.block.ts" } }, "patterns": [{ "include": "text.html.derivative.ng" }, { "include": "template.ng" }] }, "blockExpression": { "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.ts" } }, "contentName": "control.block.expression.ng", "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.ts" } }, "patterns": [{ "include": "expression.ng" }] }, "transition": { "match": "@", "name": "keyword.control.block.transition.ng" } }, "scopeName": "template.blocks.ng", "embeddedLangs": ["angular-expression", "angular-template"] });
|
|
5
5
|
var angular_template_blocks = [
|
|
6
6
|
...angular_expression,
|
|
7
7
|
...angular_template,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({ "displayName": "Common Lisp", "fileTypes": ["lisp", "lsp", "l", "cl", "asd", "asdf"], "foldingStartMarker": "\\(", "foldingStopMarker": "\\)", "name": "common-lisp", "patterns": [{ "include": "#comment" }, { "include": "#block-comment" }, { "include": "#string" }, { "include": "#escape" }, { "include": "#constant" }, { "include": "#lambda-list" }, { "include": "#function" }, { "include": "#style-guide" }, { "include": "#def-name" }, { "include": "#macro" }, { "include": "#symbol" }, { "include": "#special-operator" }, { "include": "#declaration" }, { "include": "#type" }, { "include": "#class" }, { "include": "#condition-type" }, { "include": "#package" }, { "include": "#variable" }, { "include": "#punctuation" }], "repository": { "block-comment": { "begin": "\\#\\|", "contentName": "comment.block.commonlisp", "end": "\\|\\#", "name": "comment", "patterns": [{ "include": "#block-comment", "name": "comment" }] }, "class": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:two-way-stream|synonym-stream|symbol|structure-object|structure-class|string-stream|stream|standard-object|standard-method|\nstandard-generic-function|standard-class|sequence|restart|real|readtable|ratio|random-state|package|number|method|integer|hash-table|\ngeneric-function|file-stream|echo-stream|concatenated-stream|class|built-in-class|broadcast-stream|bit-vector|array)\n(?=(\\s|\\(|\\)))", "name": "support.class.commonlisp" }, "comment": { "begin": "(^[ \\t]+)?(?=;)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.commonlisp" } }, "end": "(?!\\G)", "patterns": [{ "begin": ";", "beginCaptures": { "0": { "name": "punctuation.definition.comment.commonlisp" } }, "end": "\\n", "name": "comment.line.semicolon.commonlisp" }] }, "condition-type": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:warning|undefined-function|unbound-variable|unbound-slot|type-error|style-warning|stream-error|storage-condition|simple-warning|\nsimple-type-error|simple-error|simple-condition|serious-condition|reader-error|program-error|print-not-readable|parse-error|package-error|\nfloating-point-underflow|floating-point-overflow|floating-point-invalid-operation|floating-point-inexact|file-error|error|end-of-file|\ndivision-by-zero|control-error|condition|cell-error|arithmetic-error)\n(?=(\\s|\\(|\\)))", "name": "support.type.exception.commonlisp" }, "constant": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\()\n(?:t|single-float-negative-epsilon|single-float-epsilon|short-float-negative-epsilon|short-float-epsilon|pi|\nnil|multiple-values-limit|most-positive-single-float|most-positive-short-float|most-positive-long-float|\nmost-positive-fixnum|most-positive-double-float|most-negative-single-float|most-negative-short-float|\nmost-negative-long-float|most-negative-fixnum|most-negative-double-float|long-float-negative-epsilon|\nlong-float-epsilon|least-positive-single-float|least-positive-short-float|least-positive-normalized-single-float|\nleast-positive-normalized-short-float|least-positive-normalized-long-float|least-positive-normalized-double-float|\nleast-positive-long-float|least-positive-double-float|least-negative-single-float|least-negative-short-float|\nleast-negative-normalized-single-float|least-negative-normalized-short-float|least-negative-normalized-long-float|\nleast-negative-normalized-double-float|least-negative-long-float|least-negative-double-float|lambda-parameters-limit|\nlambda-list-keywords|internal-time-units-per-second|double-float-negative-epsilon|double-float-epsilon|char-code-limit|\ncall-arguments-limit|boole-xor|boole-set|boole-orc2|boole-orc1|boole-nor|boole-nand|boole-ior|boole-eqv|boole-clr|\nboole-c2|boole-c1|boole-andc2|boole-andc1|boole-and|boole-2|boole-1|array-total-size-limit|array-rank-limit|array-dimension-limit)\n(?=(\\s|\\(|\\)))", "name": "constant.language.commonlisp" }, { "match": "(?x)\n(?<=^|\\s|\\()\n([+-]?[0-9]+(?:\\/[0-9]+)*|\n[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?|\n(\\#b|\\#B)[01\\/+-]+|(\\#o|\\#O)[0-7\\/+-]+|(\\#x|\\#X)[0-9a-fA-F\\/+-]+|(\\#[0-9]+[rR]?)[0-9a-zA-Z\\/+-]+)\n(?=(\\s|\\)))", "name": "constant.numeric.commonlisp" }, { "match": "(?xi)\n(?<=\\s)\n(\\.)\n(?=\\s)", "name": "variable.other.constant.dot.commonlisp" }, { "match": "(?x)\n(?<=^|\\s|\\()\n([+-]?[0-9]*\\.[0-9]*((e|s|f|d|l|E|S|F|D|L)[+-]?[0-9]+)?|\n[+-]?[0-9]+(\\.[0-9]*)?(e|s|f|d|l|E|S|F|D|L)[+-]?[0-9]+)\n(?=(\\s|\\)))", "name": "constant.numeric.commonlisp" }] }, "declaration": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:type|speed|special|space|safety|optimize|notinline|inline|ignore|ignorable|ftype|dynamic-extent|declaration|debug|compilation-speed)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.declaration.commonlisp" }, "def-name": { "patterns": [{ "captures": { "1": { "name": "storage.type.function.defname.commonlisp" }, "3": { "name": "storage.type.function.defname.commonlisp" }, "4": { "name": "variable.other.constant.defname.commonlisp" }, "6": { "patterns": [{ "include": "#package" }, { "match": "\\S+?", "name": "entity.name.function.commonlisp" }] }, "7": { "name": "variable.other.constant.defname.commonlisp" }, "9": { "patterns": [{ "include": "#package" }, { "match": "\\S+?", "name": "entity.name.function.commonlisp" }] } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(defun|defsetf|defmethod|defmacro|define-symbol-macro|define-setf-expander|\ndefine-modify-macro|define-method-combination|define-compiler-macro|defgeneric)\n\\s+\n( \\(\\s*\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+)\n\\s*\n((,@|,\\.|,)?)\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n|\n((,@|,\\.|,)?)\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n)\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "storage.type.function.defname.commonlisp" }, "2": { "name": "entity.name.type.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(deftype|defpackage|define-condition|defclass)\n\\s+\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "storage.type.function.defname.commonlisp" }, "2": { "patterns": [{ "include": "#package" }, { "match": "\\S+?", "name": "variable.other.constant.defname.commonlisp" }] } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(defconstant)\n\\s+\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "storage.type.function.defname.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(defvar|defparameter)\n\\s+\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "storage.type.function.defname.commonlisp" }, "2": { "name": "entity.name.type.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(defstruct)\n\\s+\\(?\\s*\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "keyword.control.commonlisp" }, "2": { "patterns": [{ "include": "#package" }, { "match": "\\S+?", "name": "entity.name.function.commonlisp" }] } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(macrolet|labels|flet)\n\\s+\\(\\s*\\(\\s*\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))" }] }, "escape": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:\\#\\\\\\S+?)\n(?=(\\s|\\(|\\)))", "name": "constant.character.escape.commonlisp" }, "function": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:values|third|tenth|symbol-value|symbol-plist|symbol-function|svref|subseq|sixth|seventh|second|schar|sbit|row-major-aref|\nrest|readtable-case|nth|ninth|mask-field|macro-function|logical-pathname-translations|ldb|gethash|getf|get|fourth|first|\nfind-class|fill-pointer|fifth|fdefinition|elt|eighth|compiler-macro-function|char|cdr|cddr|cdddr|cddddr|cdddar|cddar|cddadr|\ncddaar|cdar|cdadr|cdaddr|cdadar|cdaar|cdaadr|cdaaar|car|cadr|caddr|cadddr|caddar|cadar|cadadr|cadaar|caar|caadr|caaddr|caadar|\ncaaar|caaadr|caaaar|bit|aref)\n(?=(\\s|\\(|\\)))", "name": "support.function.accessor.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:yes-or-no-p|y-or-n-p|write-sequence|write-char|write-byte|warn|vector-pop|use-value|use-package|unuse-package|union|unintern|\nunexport|terpri|tailp|substitute-if-not|substitute-if|substitute|subst-if-not|subst-if|subst|sublis|string-upcase|string-downcase|\nstring-capitalize|store-value|sleep|signal|shadowing-import|shadow|set-syntax-from-char|set-macro-character|set-exclusive-or|\nset-dispatch-macro-character|set-difference|set|rplacd|rplaca|room|reverse|revappend|require|replace|remprop|remove-if-not|remove-if|\nremove-duplicates|remove|remhash|read-sequence|read-byte|random|provide|pprint-tabular|pprint-newline|pprint-linear|pprint-fill|\nnunion|nsubstitute-if-not|nsubstitute-if|nsubstitute|nsubst-if-not|nsubst-if|nsubst|nsublis|nstring-upcase|nstring-downcase|nstring-capitalize|\nnset-exclusive-or|nset-difference|nreverse|nreconc|nintersection|nconc|muffle-warning|method-combination-error|maphash|makunbound|ldiff|\ninvoke-restart-interactively|invoke-restart|invoke-debugger|invalid-method-error|intersection|inspect|import|get-output-stream-string|\nget-macro-character|get-dispatch-macro-character|gentemp|gensym|fresh-line|fill|file-position|export|describe|delete-if-not|delete-if|\ndelete-duplicates|delete|continue|clrhash|close|clear-input|break|abort)\n(?=(\\s|\\(|\\)))", "name": "support.function.f.sideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:zerop|write-to-string|write-string|write-line|write|wild-pathname-p|vectorp|vector-push-extend|vector-push|vector|values-list|\nuser-homedir-pathname|upper-case-p|upgraded-complex-part-type|upgraded-array-element-type|unread-char|unbound-slot-instance|typep|type-of|\ntype-error-expected-type|type-error-datum|two-way-stream-output-stream|two-way-stream-input-stream|truncate|truename|tree-equal|translate-pathname|\ntranslate-logical-pathname|tanh|tan|synonym-stream-symbol|symbolp|symbol-package|symbol-name|sxhash|subtypep|subsetp|stringp|string>=|string>|\nstring=|string<=|string<|string\\/=|string-trim|string-right-trim|string-not-lessp|string-not-greaterp|string-not-equal|string-lessp|\nstring-left-trim|string-greaterp|string-equal|string|streamp|stream-external-format|stream-error-stream|stream-element-type|standard-char-p|\nstable-sort|sqrt|special-operator-p|sort|some|software-version|software-type|slot-value|slot-makunbound|slot-exists-p|slot-boundp|sinh|sin|\nsimple-vector-p|simple-string-p|simple-condition-format-control|simple-condition-format-arguments|simple-bit-vector-p|signum|short-site-name|\nset-pprint-dispatch|search|scale-float|round|restart-name|rename-package|rename-file|rem|reduce|realpart|realp|readtablep|\nread-preserving-whitespace|read-line|read-from-string|read-delimited-list|read-char-no-hang|read-char|read|rationalp|rationalize|\nrational|rassoc-if-not|rassoc-if|rassoc|random-state-p|proclaim|probe-file|print-not-readable-object|print|princ-to-string|princ|\nprin1-to-string|prin1|pprint-tab|pprint-indent|pprint-dispatch|pprint|position-if-not|position-if|position|plusp|phase|peek-char|pathnamep|\npathname-version|pathname-type|pathname-name|pathname-match-p|pathname-host|pathname-directory|pathname-device|pathname|parse-namestring|\nparse-integer|pairlis|packagep|package-used-by-list|package-use-list|package-shadowing-symbols|package-nicknames|package-name|package-error-package|\noutput-stream-p|open-stream-p|open|oddp|numerator|numberp|null|nthcdr|notevery|notany|not|next-method-p|nbutlast|namestring|name-char|mod|mismatch|\nminusp|min|merge-pathnames|merge|member-if-not|member-if|member|max|maplist|mapl|mapcon|mapcar|mapcan|mapc|map-into|map|make-two-way-stream|\nmake-synonym-stream|make-symbol|make-string-output-stream|make-string-input-stream|make-string|make-sequence|make-random-state|make-pathname|\nmake-package|make-load-form-saving-slots|make-list|make-hash-table|make-echo-stream|make-dispatch-macro-character|make-condition|\nmake-concatenated-stream|make-broadcast-stream|make-array|macroexpand-1|macroexpand|machine-version|machine-type|machine-instance|lower-case-p|\nlong-site-name|logxor|logtest|logorc2|logorc1|lognot|lognor|lognand|logior|logical-pathname|logeqv|logcount|logbitp|logandc2|logandc1|logand|\nlog|load-logical-pathname-translations|load|listp|listen|list-length|list-all-packages|list\\*|list|lisp-implementation-version|\nlisp-implementation-type|length|ldb-test|lcm|last|keywordp|isqrt|intern|interactive-stream-p|integerp|integer-length|integer-decode-float|\ninput-stream-p|imagpart|identity|host-namestring|hash-table-test|hash-table-size|hash-table-rehash-threshold|hash-table-rehash-size|hash-table-p|\nhash-table-count|graphic-char-p|get-universal-time|get-setf-expansion|get-properties|get-internal-run-time|get-internal-real-time|\nget-decoded-time|gcd|functionp|function-lambda-expression|funcall|ftruncate|fround|format|force-output|fmakunbound|floor|floatp|float-sign|\nfloat-radix|float-precision|float-digits|float|finish-output|find-symbol|find-restart|find-package|find-if-not|find-if|find-all-symbols|find|\nfile-write-date|file-string-length|file-namestring|file-length|file-error-pathname|file-author|ffloor|fceiling|fboundp|expt|exp|every|evenp|\neval|equalp|equal|eql|eq|ensure-generic-function|ensure-directories-exist|enough-namestring|endp|encode-universal-time|ed|echo-stream-output-stream|\necho-stream-input-stream|dribble|dpb|disassemble|directory-namestring|directory|digit-char-p|digit-char|deposit-field|denominator|delete-package|\ndelete-file|decode-universal-time|decode-float|count-if-not|count-if|count|cosh|cos|copy-tree|copy-symbol|copy-structure|copy-seq|copy-readtable|\ncopy-pprint-dispatch|copy-list|copy-alist|constantp|constantly|consp|cons|conjugate|concatenated-stream-streams|concatenate|compute-restarts|\ncomplexp|complex|complement|compiled-function-p|compile-file-pathname|compile-file|compile|coerce|code-char|clear-output|class-of|cis|characterp|\ncharacter|char>=|char>|char=|char<=|char<|char\\/=|char-upcase|char-not-lessp|char-not-greaterp|char-not-equal|char-name|char-lessp|char-int|\nchar-greaterp|char-equal|char-downcase|char-code|cerror|cell-error-name|ceiling|call-next-method|byte-size|byte-position|byte|butlast|\nbroadcast-stream-streams|boundp|both-case-p|boole|bit-xor|bit-vector-p|bit-orc2|bit-orc1|bit-not|bit-nor|bit-nand|bit-ior|bit-eqv|bit-andc2|\nbit-andc1|bit-and|atom|atanh|atan|assoc-if-not|assoc-if|assoc|asinh|asin|ash|arrayp|array-total-size|array-row-major-index|array-rank|\narray-in-bounds-p|array-has-fill-pointer-p|array-element-type|array-displacement|array-dimensions|array-dimension|arithmetic-error-operation|\narithmetic-error-operands|apropos-list|apropos|apply|append|alphanumericp|alpha-char-p|adjustable-array-p|adjust-array|adjoin|acosh|acos|acons|\nabs|>=|>|=|<=|<|1-|1\\+|\\/=|\\/|-|\\+|\\*)\n(?=(\\s|\\(|\\)))", "name": "support.function.f.sideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:variable|update-instance-for-redefined-class|update-instance-for-different-class|structure|slot-unbound|slot-missing|shared-initialize|\nremove-method|print-object|no-next-method|no-applicable-method|method-qualifiers|make-load-form|make-instances-obsolete|make-instance|\ninitialize-instance|function-keywords|find-method|documentation|describe-object|compute-applicable-methods|compiler-macro|class-name|\nchange-class|allocate-instance|add-method)\n(?=(\\s|\\(|\\)))", "name": "support.function.sgf.nosideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:reinitialize-instance)\n(?=(\\s|\\(|\\)))", "name": "support.function.sgf.sideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:satisfies)\n(?=(\\s|\\(|\\)))", "name": "support.function.typespecifier.commonlisp" }] }, "lambda-list": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:&[#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?|&whole|&rest|&optional|&key|&environment|&body|&aux|&allow-other-keys)\n(?=(\\s|\\(|\\)))", "name": "keyword.other.lambdalist.commonlisp" }, "macro": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\()\n(?:with-standard-io-syntax|with-slots|with-simple-restart|with-package-iterator|with-hash-table-iterator|with-condition-restarts|\nwith-compilation-unit|with-accessors|when|unless|typecase|time|step|shiftf|setf|rotatef|return|restart-case|restart-bind|psetf|prog2|prog1|\nprog\\*|prog|print-unreadable-object|pprint-logical-block|pprint-exit-if-list-exhausted|or|nth-value|multiple-value-setq|multiple-value-list|\nmultiple-value-bind|make-method|loop|lambda|ignore-errors|handler-case|handler-bind|formatter|etypecase|dotimes|dolist|do-symbols|do-external-symbols|\ndo-all-symbols|do\\*|do|destructuring-bind|defun|deftype|defstruct|defsetf|defpackage|defmethod|defmacro|define-symbol-macro|define-setf-expander|\ndefine-condition|define-compiler-macro|defgeneric|defconstant|defclass|declaim|ctypecase|cond|call-method|assert|and)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.m.nosideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:with-output-to-string|with-open-stream|with-open-file|with-input-from-string|untrace|trace|remf|pushnew|push|psetq|pprint-pop|pop|\notherwise|loop-finish|incf|in-package|ecase|defvar|defparameter|define-modify-macro|define-method-combination|decf|check-type|ccase|case)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.m.sideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:setq)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.specialform.commonlisp" }] }, "package": { "patterns": [{ "captures": { "2": { "name": "support.type.package.commonlisp" }, "3": { "name": "support.type.package.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\n([A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n|\n(\\#)\n)\n(?=\\:\\:|\\:)" }] }, "punctuation": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n('|`)\n(?=\\S)", "name": "variable.other.constant.singlequote.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(?:\\:[#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))", "name": "entity.name.variable.commonlisp" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)([0-9]*)\n(?=\\()" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" }, "3": { "name": "variable.other.constant.sharpsign.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n([0-9]*)\n(\\*)\n(?=0|1)" }, { "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#\\*|\\#0\\*)\n(?=(\\s|\\(|\\)))", "name": "variable.other.constant.sharpsign.commonlisp" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" }, "3": { "name": "variable.other.constant.sharpsign.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n([0-9]+)\n(a|A)\n(?=.)" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" }, "3": { "name": "variable.other.constant.sharpsign.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n([0-9]+)\n(=)\n(?=.)" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" }, "3": { "name": "variable.other.constant.sharpsign.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n([0-9]+)\n(\\#)\n(?=.)" }, { "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#(\\+|-))\n(?=\\S)", "name": "variable.other.constant.sharpsign.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#('|,|\\.|c|C|s|S|p|P))\n(?=\\S)", "name": "variable.other.constant.sharpsign.commonlisp" }, { "captures": { "1": { "name": "support.type.package.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n(:)\n(?=\\S)" }, { "captures": { "2": { "name": "variable.other.constant.backquote.commonlisp" }, "3": { "name": "variable.other.constant.backquote.commonlisp" }, "4": { "name": "variable.other.constant.backquote.commonlisp" }, "5": { "name": "variable.other.constant.backquote.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(\n(`\\#)\n|\n(`)(,@|,\\.|,)?\n|\n(,@|,\\.|,)\n)\n(?=\\S)" }] }, "special-operator": { "captures": { "2": { "name": "keyword.control.commonlisp" } }, "match": "(?xi)\n(\\(\\s*)\n(unwind-protect|throw|the|tagbody|symbol-macrolet|return-from|quote|progv|progn|multiple-value-prog1|multiple-value-call|\nmacrolet|locally|load-time-value|let\\*|let|labels|if|go|function|flet|eval-when|catch|block)\n(?=(\\s|\\(|\\)))" }, "string": { "begin": '(")', "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.commonlisp" } }, "end": '(")', "endCaptures": { "1": { "name": "punctuation.definition.string.end.commonlisp" } }, "name": "string.quoted.double.commonlisp", "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.commonlisp" }, { "captures": { "1": { "name": "storage.type.function.formattedstring.commonlisp" }, "2": { "name": "variable.other.constant.formattedstring.commonlisp" }, "8": { "name": "storage.type.function.formattedstring.commonlisp" }, "10": { "name": "storage.type.function.formattedstring.commonlisp" } }, "match": "(?xi)\n\n(~)\n(\n(\n(([+-]?[0-9]+)|('.)|V|\\#)*?\n(,)?\n)\n*?)\n(\n(:@|@:|:|@)\n?)\n(\\(|\\)|\\[|\\]|;|{|}|<|>|\\^)" }, { "captures": { "1": { "name": "entity.name.variable.commonlisp" }, "2": { "name": "variable.other.constant.formattedstring.commonlisp" }, "8": { "name": "entity.name.variable.commonlisp" }, "10": { "name": "entity.name.variable.commonlisp" } }, "match": "(?xi)\n\n(~)\n(\n(\n(([+-]?[0-9]+)|('.)|V|\\#)*?\n(,)?\n)\n*?)\n(\n(:@|@:|:|@)\n?)\n(A|S|D|B|O|X|R|P|C|F|E|G|\\$|%|\\&|\\||~|T|\\*|\\?|_|W|I)" }, { "captures": { "1": { "name": "entity.name.variable.commonlisp" }, "2": { "name": "variable.other.constant.formattedstring.commonlisp" }, "8": { "name": "entity.name.variable.commonlisp" }, "10": { "name": "entity.name.variable.commonlisp" }, "11": { "name": "entity.name.variable.commonlisp" }, "12": { "name": "entity.name.variable.commonlisp" } }, "match": "(?xi)\n\n(~)\n(\n(\n(([+-]?[0-9]+)|('.)|V|\\#)*?\n(,)?\n)\n*?)\n(\n(:@|@:|:|@)\n?)\n(\\/)\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(\\/)" }, { "match": "(~\\n)", "name": "variable.other.constant.formattedstring.commonlisp" }] }, "style-guide": { "patterns": [{ "captures": { "3": { "name": "source.commonlisp" } }, "match": "(?xi)\n(?<=^'|\\s'|\\('|,@'|,\\.'|,')\n(\\S+?)\n(\\:\\:|\\:)\n((\\+[^\\s\\+]+\\+)|(\\*[^\\s\\*]+\\*))\n(?=(\\s|\\(|\\)))" }, { "match": "(?xi)\n(?<=\\S:|^|\\s|\\()\n(\\+[^\\s\\+]+\\+)\n(?=(\\s|\\(|\\)))", "name": "variable.other.constant.earmuffsplus.commonlisp" }, { "match": "(?xi)\n(?<=\\S:|^|\\s|\\()\n(\\*[^\\s\\*]+\\*)\n(?=(\\s|\\(|\\)))", "name": "string.regexp.earmuffsasterisk.commonlisp" }] }, "symbol": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:method-combination|declare)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.symbol.commonlisp" }, "type": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:unsigned-byte|standard-char|standard|single-float|simple-vector|simple-string|simple-bit-vector|simple-base-string|simple-array|\nsigned-byte|short-float|long-float|keyword|fixnum|extended-char|double-float|compiled-function|boolean|bignum|base-string|base-char)\n(?=(\\s|\\(|\\)))", "name": "support.type.t.commonlisp" }, "variable": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\()\n(?:\\*trace-output\\*|\\*terminal-io\\*|\\*standard-output\\*|\\*standard-input\\*|\\*readtable\\*|\\*read-suppress\\*|\\*read-eval\\*|\n\\*read-default-float-format\\*|\\*read-base\\*|\\*random-state\\*|\\*query-io\\*|\\*print-right-margin\\*|\\*print-readably\\*|\\*print-radix\\*|\\*print-pretty\\*|\n\\*print-pprint-dispatch\\*|\\*print-miser-width\\*|\\*print-lines\\*|\\*print-level\\*|\\*print-length\\*|\\*print-gensym\\*|\\*print-escape\\*|\\*print-circle\\*|\n\\*print-case\\*|\\*print-base\\*|\\*print-array\\*|\\*package\\*|\\*modules\\*|\\*macroexpand-hook\\*|\\*load-verbose\\*|\\*load-truename\\*|\\*load-print\\*|\n\\*load-pathname\\*|\\*gensym-counter\\*|\\*features\\*|\\*error-output\\*|\\*default-pathname-defaults\\*|\\*debugger-hook\\*|\\*debug-io\\*|\\*compile-verbose\\*|\n\\*compile-print\\*|\\*compile-file-truename\\*|\\*compile-file-pathname\\*|\\*break-on-signals\\*)\n(?=(\\s|\\(|\\)))", "name": "string.regexp.earmuffsasterisk.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:\\*\\*\\*|\\*\\*|\\+\\+\\+|\\+\\+|\\/\\/\\/|\\/\\/)\n(?=(\\s|\\(|\\)))", "name": "variable.other.repl.commonlisp" }] } }, "scopeName": "source.commonlisp", "aliases": ["lisp"] });
|
|
1
|
+
const lang = Object.freeze({ "displayName": "Common Lisp", "fileTypes": ["lisp", "lsp", "l", "cl", "asd", "asdf"], "foldingStartMarker": "\\(", "foldingStopMarker": "\\)", "name": "common-lisp", "patterns": [{ "include": "#comment" }, { "include": "#block-comment" }, { "include": "#string" }, { "include": "#escape" }, { "include": "#constant" }, { "include": "#lambda-list" }, { "include": "#function" }, { "include": "#style-guide" }, { "include": "#def-name" }, { "include": "#macro" }, { "include": "#symbol" }, { "include": "#special-operator" }, { "include": "#declaration" }, { "include": "#type" }, { "include": "#class" }, { "include": "#condition-type" }, { "include": "#package" }, { "include": "#variable" }, { "include": "#punctuation" }], "repository": { "block-comment": { "begin": "\\#\\|", "contentName": "comment.block.commonlisp", "end": "\\|\\#", "name": "comment", "patterns": [{ "include": "#block-comment", "name": "comment" }] }, "class": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:two-way-stream|synonym-stream|symbol|structure-object|structure-class|string-stream|stream|standard-object|standard-method|\nstandard-generic-function|standard-class|sequence|restart|real|readtable|ratio|random-state|package|number|method|integer|hash-table|\ngeneric-function|file-stream|echo-stream|concatenated-stream|class|built-in-class|broadcast-stream|bit-vector|array)\n(?=(\\s|\\(|\\)))", "name": "support.class.commonlisp" }, "comment": { "begin": "(^[ \\t]+)?(?=;)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.commonlisp" } }, "end": "(?!\\G)", "patterns": [{ "begin": ";", "beginCaptures": { "0": { "name": "punctuation.definition.comment.commonlisp" } }, "end": "\\n", "name": "comment.line.semicolon.commonlisp" }] }, "condition-type": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:warning|undefined-function|unbound-variable|unbound-slot|type-error|style-warning|stream-error|storage-condition|simple-warning|\nsimple-type-error|simple-error|simple-condition|serious-condition|reader-error|program-error|print-not-readable|parse-error|package-error|\nfloating-point-underflow|floating-point-overflow|floating-point-invalid-operation|floating-point-inexact|file-error|error|end-of-file|\ndivision-by-zero|control-error|condition|cell-error|arithmetic-error)\n(?=(\\s|\\(|\\)))", "name": "support.type.exception.commonlisp" }, "constant": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(?:t|single-float-negative-epsilon|single-float-epsilon|short-float-negative-epsilon|short-float-epsilon|pi|\nnil|multiple-values-limit|most-positive-single-float|most-positive-short-float|most-positive-long-float|\nmost-positive-fixnum|most-positive-double-float|most-negative-single-float|most-negative-short-float|\nmost-negative-long-float|most-negative-fixnum|most-negative-double-float|long-float-negative-epsilon|\nlong-float-epsilon|least-positive-single-float|least-positive-short-float|least-positive-normalized-single-float|\nleast-positive-normalized-short-float|least-positive-normalized-long-float|least-positive-normalized-double-float|\nleast-positive-long-float|least-positive-double-float|least-negative-single-float|least-negative-short-float|\nleast-negative-normalized-single-float|least-negative-normalized-short-float|least-negative-normalized-long-float|\nleast-negative-normalized-double-float|least-negative-long-float|least-negative-double-float|lambda-parameters-limit|\nlambda-list-keywords|internal-time-units-per-second|double-float-negative-epsilon|double-float-epsilon|char-code-limit|\ncall-arguments-limit|boole-xor|boole-set|boole-orc2|boole-orc1|boole-nor|boole-nand|boole-ior|boole-eqv|boole-clr|\nboole-c2|boole-c1|boole-andc2|boole-andc1|boole-and|boole-2|boole-1|array-total-size-limit|array-rank-limit|array-dimension-limit)\n(?=(\\s|\\(|\\)))", "name": "constant.language.commonlisp" }, { "match": "(?x)\n(?<=^|\\s|\\(|,@|,\\.|,)\n([+-]?[0-9]+(?:\\/[0-9]+)*|\n[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?|\n(\\#b|\\#B)[01\\/+-]+|(\\#o|\\#O)[0-7\\/+-]+|(\\#x|\\#X)[0-9a-fA-F\\/+-]+|(\\#[0-9]+[rR]?)[0-9a-zA-Z\\/+-]+)\n(?=(\\s|\\)))", "name": "constant.numeric.commonlisp" }, { "match": "(?xi)\n(?<=\\s)\n(\\.)\n(?=\\s)", "name": "variable.other.constant.dot.commonlisp" }, { "match": "(?x)\n(?<=^|\\s|\\(|,@|,\\.|,)\n([+-]?[0-9]*\\.[0-9]*((e|s|f|d|l|E|S|F|D|L)[+-]?[0-9]+)?|\n[+-]?[0-9]+(\\.[0-9]*)?(e|s|f|d|l|E|S|F|D|L)[+-]?[0-9]+)\n(?=(\\s|\\)))", "name": "constant.numeric.commonlisp" }] }, "declaration": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:type|speed|special|space|safety|optimize|notinline|inline|ignore|ignorable|ftype|dynamic-extent|declaration|debug|compilation-speed)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.declaration.commonlisp" }, "def-name": { "patterns": [{ "captures": { "1": { "name": "storage.type.function.defname.commonlisp" }, "3": { "name": "storage.type.function.defname.commonlisp" }, "4": { "name": "variable.other.constant.defname.commonlisp" }, "6": { "patterns": [{ "include": "#package" }, { "match": "\\S+?", "name": "entity.name.function.commonlisp" }] }, "7": { "name": "variable.other.constant.defname.commonlisp" }, "9": { "patterns": [{ "include": "#package" }, { "match": "\\S+?", "name": "entity.name.function.commonlisp" }] } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(defun|defsetf|defmethod|defmacro|define-symbol-macro|define-setf-expander|\ndefine-modify-macro|define-method-combination|define-compiler-macro|defgeneric)\n\\s+\n( \\(\\s*\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+)\n\\s*\n((,@|,\\.|,)?)\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n|\n((,@|,\\.|,)?)\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n)\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "storage.type.function.defname.commonlisp" }, "2": { "name": "entity.name.type.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(deftype|defpackage|define-condition|defclass)\n\\s+\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "storage.type.function.defname.commonlisp" }, "2": { "patterns": [{ "include": "#package" }, { "match": "\\S+?", "name": "variable.other.constant.defname.commonlisp" }] } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(defconstant)\n\\s+\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "storage.type.function.defname.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(defvar|defparameter)\n\\s+\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "storage.type.function.defname.commonlisp" }, "2": { "name": "entity.name.type.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(defstruct)\n\\s+\\(?\\s*\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))" }, { "captures": { "1": { "name": "keyword.control.commonlisp" }, "2": { "patterns": [{ "include": "#package" }, { "match": "\\S+?", "name": "entity.name.function.commonlisp" }] } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(macrolet|labels|flet)\n\\s+\\(\\s*\\(\\s*\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))" }] }, "escape": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:\\#\\\\\\S+?)\n(?=(\\s|\\(|\\)))", "name": "constant.character.escape.commonlisp" }, "function": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:values|third|tenth|symbol-value|symbol-plist|symbol-function|svref|subseq|sixth|seventh|second|schar|sbit|row-major-aref|\nrest|readtable-case|nth|ninth|mask-field|macro-function|logical-pathname-translations|ldb|gethash|getf|get|fourth|first|\nfind-class|fill-pointer|fifth|fdefinition|elt|eighth|compiler-macro-function|char|cdr|cddr|cdddr|cddddr|cdddar|cddar|cddadr|\ncddaar|cdar|cdadr|cdaddr|cdadar|cdaar|cdaadr|cdaaar|car|cadr|caddr|cadddr|caddar|cadar|cadadr|cadaar|caar|caadr|caaddr|caadar|\ncaaar|caaadr|caaaar|bit|aref)\n(?=(\\s|\\(|\\)))", "name": "support.function.accessor.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:yes-or-no-p|y-or-n-p|write-sequence|write-char|write-byte|warn|vector-pop|use-value|use-package|unuse-package|union|unintern|\nunexport|terpri|tailp|substitute-if-not|substitute-if|substitute|subst-if-not|subst-if|subst|sublis|string-upcase|string-downcase|\nstring-capitalize|store-value|sleep|signal|shadowing-import|shadow|set-syntax-from-char|set-macro-character|set-exclusive-or|\nset-dispatch-macro-character|set-difference|set|rplacd|rplaca|room|reverse|revappend|require|replace|remprop|remove-if-not|remove-if|\nremove-duplicates|remove|remhash|read-sequence|read-byte|random|provide|pprint-tabular|pprint-newline|pprint-linear|pprint-fill|\nnunion|nsubstitute-if-not|nsubstitute-if|nsubstitute|nsubst-if-not|nsubst-if|nsubst|nsublis|nstring-upcase|nstring-downcase|nstring-capitalize|\nnset-exclusive-or|nset-difference|nreverse|nreconc|nintersection|nconc|muffle-warning|method-combination-error|maphash|makunbound|ldiff|\ninvoke-restart-interactively|invoke-restart|invoke-debugger|invalid-method-error|intersection|inspect|import|get-output-stream-string|\nget-macro-character|get-dispatch-macro-character|gentemp|gensym|fresh-line|fill|file-position|export|describe|delete-if-not|delete-if|\ndelete-duplicates|delete|continue|clrhash|close|clear-input|break|abort)\n(?=(\\s|\\(|\\)))", "name": "support.function.f.sideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:zerop|write-to-string|write-string|write-line|write|wild-pathname-p|vectorp|vector-push-extend|vector-push|vector|values-list|\nuser-homedir-pathname|upper-case-p|upgraded-complex-part-type|upgraded-array-element-type|unread-char|unbound-slot-instance|typep|type-of|\ntype-error-expected-type|type-error-datum|two-way-stream-output-stream|two-way-stream-input-stream|truncate|truename|tree-equal|translate-pathname|\ntranslate-logical-pathname|tanh|tan|synonym-stream-symbol|symbolp|symbol-package|symbol-name|sxhash|subtypep|subsetp|stringp|string>=|string>|\nstring=|string<=|string<|string\\/=|string-trim|string-right-trim|string-not-lessp|string-not-greaterp|string-not-equal|string-lessp|\nstring-left-trim|string-greaterp|string-equal|string|streamp|stream-external-format|stream-error-stream|stream-element-type|standard-char-p|\nstable-sort|sqrt|special-operator-p|sort|some|software-version|software-type|slot-value|slot-makunbound|slot-exists-p|slot-boundp|sinh|sin|\nsimple-vector-p|simple-string-p|simple-condition-format-control|simple-condition-format-arguments|simple-bit-vector-p|signum|short-site-name|\nset-pprint-dispatch|search|scale-float|round|restart-name|rename-package|rename-file|rem|reduce|realpart|realp|readtablep|\nread-preserving-whitespace|read-line|read-from-string|read-delimited-list|read-char-no-hang|read-char|read|rationalp|rationalize|\nrational|rassoc-if-not|rassoc-if|rassoc|random-state-p|proclaim|probe-file|print-not-readable-object|print|princ-to-string|princ|\nprin1-to-string|prin1|pprint-tab|pprint-indent|pprint-dispatch|pprint|position-if-not|position-if|position|plusp|phase|peek-char|pathnamep|\npathname-version|pathname-type|pathname-name|pathname-match-p|pathname-host|pathname-directory|pathname-device|pathname|parse-namestring|\nparse-integer|pairlis|packagep|package-used-by-list|package-use-list|package-shadowing-symbols|package-nicknames|package-name|package-error-package|\noutput-stream-p|open-stream-p|open|oddp|numerator|numberp|null|nthcdr|notevery|notany|not|next-method-p|nbutlast|namestring|name-char|mod|mismatch|\nminusp|min|merge-pathnames|merge|member-if-not|member-if|member|max|maplist|mapl|mapcon|mapcar|mapcan|mapc|map-into|map|make-two-way-stream|\nmake-synonym-stream|make-symbol|make-string-output-stream|make-string-input-stream|make-string|make-sequence|make-random-state|make-pathname|\nmake-package|make-load-form-saving-slots|make-list|make-hash-table|make-echo-stream|make-dispatch-macro-character|make-condition|\nmake-concatenated-stream|make-broadcast-stream|make-array|macroexpand-1|macroexpand|machine-version|machine-type|machine-instance|lower-case-p|\nlong-site-name|logxor|logtest|logorc2|logorc1|lognot|lognor|lognand|logior|logical-pathname|logeqv|logcount|logbitp|logandc2|logandc1|logand|\nlog|load-logical-pathname-translations|load|listp|listen|list-length|list-all-packages|list\\*|list|lisp-implementation-version|\nlisp-implementation-type|length|ldb-test|lcm|last|keywordp|isqrt|intern|interactive-stream-p|integerp|integer-length|integer-decode-float|\ninput-stream-p|imagpart|identity|host-namestring|hash-table-test|hash-table-size|hash-table-rehash-threshold|hash-table-rehash-size|hash-table-p|\nhash-table-count|graphic-char-p|get-universal-time|get-setf-expansion|get-properties|get-internal-run-time|get-internal-real-time|\nget-decoded-time|gcd|functionp|function-lambda-expression|funcall|ftruncate|fround|format|force-output|fmakunbound|floor|floatp|float-sign|\nfloat-radix|float-precision|float-digits|float|finish-output|find-symbol|find-restart|find-package|find-if-not|find-if|find-all-symbols|find|\nfile-write-date|file-string-length|file-namestring|file-length|file-error-pathname|file-author|ffloor|fceiling|fboundp|expt|exp|every|evenp|\neval|equalp|equal|eql|eq|ensure-generic-function|ensure-directories-exist|enough-namestring|endp|encode-universal-time|ed|echo-stream-output-stream|\necho-stream-input-stream|dribble|dpb|disassemble|directory-namestring|directory|digit-char-p|digit-char|deposit-field|denominator|delete-package|\ndelete-file|decode-universal-time|decode-float|count-if-not|count-if|count|cosh|cos|copy-tree|copy-symbol|copy-structure|copy-seq|copy-readtable|\ncopy-pprint-dispatch|copy-list|copy-alist|constantp|constantly|consp|cons|conjugate|concatenated-stream-streams|concatenate|compute-restarts|\ncomplexp|complex|complement|compiled-function-p|compile-file-pathname|compile-file|compile|coerce|code-char|clear-output|class-of|cis|characterp|\ncharacter|char>=|char>|char=|char<=|char<|char\\/=|char-upcase|char-not-lessp|char-not-greaterp|char-not-equal|char-name|char-lessp|char-int|\nchar-greaterp|char-equal|char-downcase|char-code|cerror|cell-error-name|ceiling|call-next-method|byte-size|byte-position|byte|butlast|\nbroadcast-stream-streams|boundp|both-case-p|boole|bit-xor|bit-vector-p|bit-orc2|bit-orc1|bit-not|bit-nor|bit-nand|bit-ior|bit-eqv|bit-andc2|\nbit-andc1|bit-and|atom|atanh|atan|assoc-if-not|assoc-if|assoc|asinh|asin|ash|arrayp|array-total-size|array-row-major-index|array-rank|\narray-in-bounds-p|array-has-fill-pointer-p|array-element-type|array-displacement|array-dimensions|array-dimension|arithmetic-error-operation|\narithmetic-error-operands|apropos-list|apropos|apply|append|alphanumericp|alpha-char-p|adjustable-array-p|adjust-array|adjoin|acosh|acos|acons|\nabs|>=|>|=|<=|<|1-|1\\+|\\/=|\\/|-|\\+|\\*)\n(?=(\\s|\\(|\\)))", "name": "support.function.f.sideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:variable|update-instance-for-redefined-class|update-instance-for-different-class|structure|slot-unbound|slot-missing|shared-initialize|\nremove-method|print-object|no-next-method|no-applicable-method|method-qualifiers|make-load-form|make-instances-obsolete|make-instance|\ninitialize-instance|function-keywords|find-method|documentation|describe-object|compute-applicable-methods|compiler-macro|class-name|\nchange-class|allocate-instance|add-method)\n(?=(\\s|\\(|\\)))", "name": "support.function.sgf.nosideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:reinitialize-instance)\n(?=(\\s|\\(|\\)))", "name": "support.function.sgf.sideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|\\#')\n(?:satisfies)\n(?=(\\s|\\(|\\)))", "name": "support.function.typespecifier.commonlisp" }] }, "lambda-list": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:&[#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?|&whole|&rest|&optional|&key|&environment|&body|&aux|&allow-other-keys)\n(?=(\\s|\\(|\\)))", "name": "keyword.other.lambdalist.commonlisp" }, "macro": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\()\n(?:with-standard-io-syntax|with-slots|with-simple-restart|with-package-iterator|with-hash-table-iterator|with-condition-restarts|\nwith-compilation-unit|with-accessors|when|unless|typecase|time|step|shiftf|setf|rotatef|return|restart-case|restart-bind|psetf|prog2|prog1|\nprog\\*|prog|print-unreadable-object|pprint-logical-block|pprint-exit-if-list-exhausted|or|nth-value|multiple-value-setq|multiple-value-list|\nmultiple-value-bind|make-method|loop|lambda|ignore-errors|handler-case|handler-bind|formatter|etypecase|dotimes|dolist|do-symbols|do-external-symbols|\ndo-all-symbols|do\\*|do|destructuring-bind|defun|deftype|defstruct|defsetf|defpackage|defmethod|defmacro|define-symbol-macro|define-setf-expander|\ndefine-condition|define-compiler-macro|defgeneric|defconstant|defclass|declaim|ctypecase|cond|call-method|assert|and)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.m.nosideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:with-output-to-string|with-open-stream|with-open-file|with-input-from-string|untrace|trace|remf|pushnew|push|psetq|pprint-pop|pop|\notherwise|loop-finish|incf|in-package|ecase|defvar|defparameter|define-modify-macro|define-method-combination|decf|check-type|ccase|case)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.m.sideeffects.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:setq)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.specialform.commonlisp" }] }, "package": { "patterns": [{ "captures": { "2": { "name": "support.type.package.commonlisp" }, "3": { "name": "support.type.package.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\n([A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n|\n(\\#)\n)\n(?=\\:\\:|\\:)" }] }, "punctuation": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n('|`)\n(?=\\S)", "name": "variable.other.constant.singlequote.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(?:\\:[#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(?=(\\s|\\(|\\)))", "name": "entity.name.variable.commonlisp" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)([0-9]*)\n(?=\\()" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" }, "3": { "name": "variable.other.constant.sharpsign.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n([0-9]*)\n(\\*)\n(?=0|1)" }, { "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#\\*|\\#0\\*)\n(?=(\\s|\\(|\\)))", "name": "variable.other.constant.sharpsign.commonlisp" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" }, "3": { "name": "variable.other.constant.sharpsign.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n([0-9]+)\n(a|A)\n(?=.)" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" }, "3": { "name": "variable.other.constant.sharpsign.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n([0-9]+)\n(=)\n(?=.)" }, { "captures": { "1": { "name": "variable.other.constant.sharpsign.commonlisp" }, "2": { "name": "constant.numeric.commonlisp" }, "3": { "name": "variable.other.constant.sharpsign.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n([0-9]+)\n(\\#)\n(?=.)" }, { "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#(\\+|-))\n(?=\\S)", "name": "variable.other.constant.sharpsign.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#('|,|\\.|c|C|s|S|p|P))\n(?=\\S)", "name": "variable.other.constant.sharpsign.commonlisp" }, { "captures": { "1": { "name": "support.type.package.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(\\#)\n(:)\n(?=\\S)" }, { "captures": { "2": { "name": "variable.other.constant.backquote.commonlisp" }, "3": { "name": "variable.other.constant.backquote.commonlisp" }, "4": { "name": "variable.other.constant.backquote.commonlisp" }, "5": { "name": "variable.other.constant.backquote.commonlisp" } }, "match": "(?xi)\n(?<=^|\\s|\\()\n(\n(`\\#)\n|\n(`)(,@|,\\.|,)?\n|\n(,@|,\\.|,)\n)\n(?=\\S)" }] }, "special-operator": { "captures": { "2": { "name": "keyword.control.commonlisp" } }, "match": "(?xi)\n(\\(\\s*)\n(unwind-protect|throw|the|tagbody|symbol-macrolet|return-from|quote|progv|progn|multiple-value-prog1|multiple-value-call|\nmacrolet|locally|load-time-value|let\\*|let|labels|if|go|function|flet|eval-when|catch|block)\n(?=(\\s|\\(|\\)))" }, "string": { "begin": '(")', "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.commonlisp" } }, "end": '(")', "endCaptures": { "1": { "name": "punctuation.definition.string.end.commonlisp" } }, "name": "string.quoted.double.commonlisp", "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.commonlisp" }, { "captures": { "1": { "name": "storage.type.function.formattedstring.commonlisp" }, "2": { "name": "variable.other.constant.formattedstring.commonlisp" }, "8": { "name": "storage.type.function.formattedstring.commonlisp" }, "10": { "name": "storage.type.function.formattedstring.commonlisp" } }, "match": "(?xi)\n\n(~)\n(\n(\n(([+-]?[0-9]+)|('.)|V|\\#)*?\n(,)?\n)\n*?)\n(\n(:@|@:|:|@)\n?)\n(\\(|\\)|\\[|\\]|;|{|}|<|>|\\^)" }, { "captures": { "1": { "name": "entity.name.variable.commonlisp" }, "2": { "name": "variable.other.constant.formattedstring.commonlisp" }, "8": { "name": "entity.name.variable.commonlisp" }, "10": { "name": "entity.name.variable.commonlisp" } }, "match": "(?xi)\n\n(~)\n(\n(\n(([+-]?[0-9]+)|('.)|V|\\#)*?\n(,)?\n)\n*?)\n(\n(:@|@:|:|@)\n?)\n(A|S|D|B|O|X|R|P|C|F|E|G|\\$|%|\\&|\\||~|T|\\*|\\?|_|W|I)" }, { "captures": { "1": { "name": "entity.name.variable.commonlisp" }, "2": { "name": "variable.other.constant.formattedstring.commonlisp" }, "8": { "name": "entity.name.variable.commonlisp" }, "10": { "name": "entity.name.variable.commonlisp" }, "11": { "name": "entity.name.variable.commonlisp" }, "12": { "name": "entity.name.variable.commonlisp" } }, "match": "(?xi)\n\n(~)\n(\n(\n(([+-]?[0-9]+)|('.)|V|\\#)*?\n(,)?\n)\n*?)\n(\n(:@|@:|:|@)\n?)\n(\\/)\n([#:A-Za-z0-9\\+\\-\\*\\/\\@\\$\\%\\^\\&\\_\\=\\<\\>\\~\\!\\?\\[\\]\\{\\}\\.]+?)\n(\\/)" }, { "match": "(~\\n)", "name": "variable.other.constant.formattedstring.commonlisp" }] }, "style-guide": { "patterns": [{ "captures": { "3": { "name": "source.commonlisp" } }, "match": "(?xi)\n(?<=^'|\\s'|\\('|,@'|,\\.'|,')\n(\\S+?)\n(\\:\\:|\\:)\n((\\+[^\\s\\+]+\\+)|(\\*[^\\s\\*]+\\*))\n(?=(\\s|\\(|\\)))" }, { "match": "(?xi)\n(?<=\\S:|^|\\s|\\(|,@|,\\.|,)\n(\\+[^\\s\\+]+\\+)\n(?=(\\s|\\(|\\)))", "name": "variable.other.constant.earmuffsplus.commonlisp" }, { "match": "(?xi)\n(?<=\\S:|^|\\s|\\(|,@|,\\.|,)\n(\\*[^\\s\\*]+\\*)\n(?=(\\s|\\(|\\)))", "name": "string.regexp.earmuffsasterisk.commonlisp" }] }, "symbol": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:method-combination|declare)\n(?=(\\s|\\(|\\)))", "name": "storage.type.function.symbol.commonlisp" }, "type": { "match": "(?xi)\n(?<=^|\\s|\\()\n(?:unsigned-byte|standard-char|standard|single-float|simple-vector|simple-string|simple-bit-vector|simple-base-string|simple-array|\nsigned-byte|short-float|long-float|keyword|fixnum|extended-char|double-float|compiled-function|boolean|bignum|base-string|base-char)\n(?=(\\s|\\(|\\)))", "name": "support.type.t.commonlisp" }, "variable": { "patterns": [{ "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(?:\\*trace-output\\*|\\*terminal-io\\*|\\*standard-output\\*|\\*standard-input\\*|\\*readtable\\*|\\*read-suppress\\*|\\*read-eval\\*|\n\\*read-default-float-format\\*|\\*read-base\\*|\\*random-state\\*|\\*query-io\\*|\\*print-right-margin\\*|\\*print-readably\\*|\\*print-radix\\*|\\*print-pretty\\*|\n\\*print-pprint-dispatch\\*|\\*print-miser-width\\*|\\*print-lines\\*|\\*print-level\\*|\\*print-length\\*|\\*print-gensym\\*|\\*print-escape\\*|\\*print-circle\\*|\n\\*print-case\\*|\\*print-base\\*|\\*print-array\\*|\\*package\\*|\\*modules\\*|\\*macroexpand-hook\\*|\\*load-verbose\\*|\\*load-truename\\*|\\*load-print\\*|\n\\*load-pathname\\*|\\*gensym-counter\\*|\\*features\\*|\\*error-output\\*|\\*default-pathname-defaults\\*|\\*debugger-hook\\*|\\*debug-io\\*|\\*compile-verbose\\*|\n\\*compile-print\\*|\\*compile-file-truename\\*|\\*compile-file-pathname\\*|\\*break-on-signals\\*)\n(?=(\\s|\\(|\\)))", "name": "string.regexp.earmuffsasterisk.commonlisp" }, { "match": "(?xi)\n(?<=^|\\s|\\(|,@|,\\.|,)\n(?:\\*\\*\\*|\\*\\*|\\+\\+\\+|\\+\\+|\\/\\/\\/|\\/\\/)\n(?=(\\s|\\(|\\)))", "name": "variable.other.repl.commonlisp" }] } }, "scopeName": "source.commonlisp", "aliases": ["lisp"] });
|
|
2
2
|
var commonLisp = [
|
|
3
3
|
lang
|
|
4
4
|
];
|
package/dist/langs/kusto.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({ "displayName": "Kusto", "fileTypes": ["csl", "kusto", "kql"], "name": "kusto", "patterns": [{ "comment": "Tabular operators: common helper operators", "match": "\\b(by|from|of|to|step|with)\\b", "name": "keyword.other.operator.kusto" }, { "comment": "Query statements: https://docs.microsoft.com/en-us/azure/kusto/query/statements", "match": "\\b(let|set|alias|declare|pattern|query_parameters|restrict|access|set)\\b", "name": "keyword.control.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators", "match": "\\b(and|or|has_all|has_any|matches|regex)\\b", "name": "keyword.other.operator.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#Strings" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/clusterfunction", "match": "\\b(cluster|database)(?:\\s*\\(\\s*(.+?)\\s*\\))?(?!\\w)", "name": "meta.special.database.kusto" }, { "comment": "Special functions: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tablefunction", "match": "\\b(external_table|materialized_view|materialize|table|toscalar)\\b", "name": "support.function.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/betweenoperator", "match": "(?<!\\w)(!?between)\\b", "name": "keyword.other.operator.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] }, "3": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binoperators", "match": "\\b(binary_and|binary_or|binary_shift_left|binary_shift_right|binary_xor)(?:\\s*\\(\\s*(\\w+)\\s*,\\s*(\\w+)\\s*\\))?(?!\\w)", "name": "meta.scalar.bitwise.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binary-notfunction", "match": "\\b(binary_not|bitset_count_ones)(?:\\s*\\(\\s*(\\w+)\\s*\\))?(?!\\w)", "name": "meta.scalar.bitwise.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/in-cs-operator", "match": "(?<!\\w)(!?in~?)(?!\\w)", "name": "keyword.other.operator.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators", "match": "(?<!\\w)(!?(?:contains|endswith|hasprefix|hassuffix|has|startswith)(?:_cs)?)(?!\\w)", "name": "keyword.other.operator.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "3": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "4": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangefunction", "match": "\\b(range)\\s*\\((?:\\s*(\\w+(?:\\(.*?\\))?)\\s*,\\s*(\\w+(?:\\(.*?\\))?)\\s*,?(?:\\s*)?(\\w+(?:\\(.*?\\))?)?\\s*\\))?(?!\\w)", "name": "meta.scalar.function.range.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalarfunctions", "match": "\\b(abs|acos|around|array_concat|array_iff|array_index_of|array_length|array_reverse|array_rotate_left|array_rotate_right|array_shift_left|array_shift_right|array_slice|array_sort_asc|array_sort_desc|array_split|array_sum|asin|assert|atan2|atan|bag_has_key|bag_keys|bag_merge|bag_remove_keys|base64_decode_toarray|base64_decode_tostring|base64_decode_toguid|base64_encode_fromarray|base64_encode_tostring|base64_encode_fromguid|beta_cdf|beta_inv|beta_pdf|bin_at|bin_auto|case|ceiling|coalesce|column_ifexists|convert_angle|convert_energy|convert_force|convert_length|convert_mass|convert_speed|convert_temperature|convert_volume|cos|cot|countof|current_cluster_endpoint|current_database|current_principal_details|current_principal_is_member_of|current_principal|cursor_after|cursor_before_or_at|cursor_current|current_cursor|dcount_hll|degrees|dynamic_to_json|estimate_data_size|exp10|exp2|exp|extent_id|extent_tags|extract_all|extract_json|extractjson|extract|floor|format_bytes|format_ipv4_mask|format_ipv4|gamma|gettype|gzip_compress_to_base64_string|gzip_decompress_from_base64_string|has_any_index|has_any_ipv4_prefix|has_any_ipv4|has_ipv4_prefix|has_ipv4|hash_combine|hash_many|hash_md5|hash_sha1|hash_sha256|hash_xxhash64|hash|iff|iif|indexof_regex|indexof|ingestion_time|ipv4_compare|ipv4_is_in_range|ipv4_is_in_any_range|ipv4_is_match|ipv4_is_private|ipv4_netmask_suffix|ipv6_compare|ipv6_is_match|isascii|isempty|isfinite|isinf|isnan|isnotempty|notempty|isnotnull|notnull|isnull|isutf8|jaccard_index|log10|log2|loggamma|log|make_string|max_of|min_of|new_guid|not|bag_pack|pack_all|pack_array|pack_dictionary|pack|parse_command_line|parse_csv|parse_ipv4_mask|parse_ipv4|parse_ipv6_mask|parse_ipv6|parse_path|parse_urlquery|parse_url|parse_user_agent|parse_version|parse_xml|percentile_tdigest|percentile_array_tdigest|percentrank_tdigest|pi|pow|radians|rand|rank_tdigest|regex_quote|repeat|replace_regex|replace_string|reverse|round|set_difference|set_has_element|set_intersect|set_union|sign|sin|split|sqrt|strcat_array|strcat_delim|strcmp|strcat|string_size|strlen|strrep|substring|tan|to_utf8|tobool|todecimal|todouble|toreal|toguid|tohex|toint|tolong|tolower|tostring|toupper|translate|treepath|trim_end|trim_start|trim|unixtime_microseconds_todatetime|unixtime_milliseconds_todatetime|unixtime_nanoseconds_todatetime|unixtime_seconds_todatetime|url_decode|url_encode_component|url_encode|welch_test|zip|zlib_compress_to_base64_string|zlib_decompress_from_base64_string)\\b", "name": "support.function.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "3": { "patterns": [{ "include": "#TimeSpanLiterals" }, { "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binfunction", "match": "\\b(bin)(?:\\s*\\(\\s*(.+?)\\s*,\\s*(.+?)\\s*\\))?(?!\\w)", "name": "meta.scalar.function.bin.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/count-aggfunction", "match": "\\b(count)\\s*\\(\\s*\\)(?!\\w)", "name": "support.function.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/aggregation-functions", "match": "\\b(arg_max|arg_min|avgif|avg|binary_all_and|binary_all_or|binary_all_xor|buildschema|countif|dcount|dcountif|hll|hll_merge|make_bag_if|make_bag|make_list_with_nulls|make_list_if|make_list|make_set_if|make_set|maxif|max|minif|min|percentilesw_array|percentiles_array|percentilesw|percentilew|percentiles|percentile|stdevif|stdevp|stdev|sumif|sum|take_anyif|take_any|tdigest_merge|merge_tdigest|tdigest|varianceif|variancep|variance)\\b", "name": "support.function.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/geospatial-grid-systems", "match": "\\b(geo_distance_2points|geo_distance_point_to_line|geo_distance_point_to_polygon|geo_intersects_2lines|geo_intersects_2polygons|geo_intersects_line_with_polygon|geo_intersection_2lines|geo_intersection_2polygons|geo_intersection_line_with_polygon|geo_line_centroid|geo_line_densify|geo_line_length|geo_line_simplify|geo_polygon_area|geo_polygon_centroid|geo_polygon_densify|geo_polygon_perimeter|geo_polygon_simplify|geo_polygon_to_s2cells|geo_point_in_circle|geo_point_in_polygon|geo_point_to_geohash|geo_point_to_h3cell|geo_point_to_s2cell|geo_geohash_to_central_point|geo_geohash_neighbors|geo_geohash_to_polygon|geo_s2cell_to_central_point|geo_s2cell_neighbors|geo_s2cell_to_polygon|geo_h3cell_to_central_point|geo_h3cell_neighbors|geo_h3cell_to_polygon|geo_h3cell_parent|geo_h3cell_children|geo_h3cell_level|geo_h3cell_rings|geo_simplify_polygons_array|geo_union_lines_array|geo_union_polygons_array)\\b", "name": "support.function.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/windowsfunctions", "match": "\\b(next|prev|row_cumsum|row_number|row_rank|row_window_session)\\b", "name": "support.function.kusto" }, { "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions", "match": "\\.(create-or-alter|replace)", "name": "keyword.control.kusto" }, { "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions", "match": "(?<=let ).+(?=\\W*=)", "name": "entity.function.name.lambda.kusto" }, { "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions", "match": "\\b(folder|docstring|skipvalidation)\\b", "name": "keyword.other.operator.kusto" }, { "match": "\\b(function)\\b", "name": "storage.type.kusto" }, { "comment": "Data types: https://docs.microsoft.com/en-us/azure/kusto/query/scalar-data-types", "match": "\\b(bool|decimal|dynamic|guid|int|long|real|string)\\b", "name": "storage.type.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "variable.other.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/asoperator", "match": "\\b(as)\\s+(\\w+)\\b", "name": "meta.query.as.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatableoperator", "match": "\\b(datatable)(?=\\W*\\()", "name": "keyword.other.query.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "keyword.other.operator.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/facetoperator", "match": "\\b(facet)(?:\\s+(by))?\\b", "name": "meta.query.facet.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "entity.name.function.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/invokeoperator", "match": "\\b(invoke)(?:\\s+(\\w+))?\\b", "name": "meta.query.invoke.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "keyword.other.operator.kusto" }, "3": { "name": "variable.other.column.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/orderoperator", "match": "\\b(order)(?:\\s+(by)\\s+(\\w+))?\\b", "name": "meta.query.order.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "variable.other.column.kusto" }, "3": { "name": "keyword.other.operator.kusto" }, "4": { "patterns": [{ "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "5": { "name": "keyword.other.operator.kusto" }, "6": { "patterns": [{ "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "7": { "name": "keyword.other.operator.kusto" }, "8": { "patterns": [{ "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangeoperator", "match": "\\b(range)\\s+(\\w+)\\s+(from)\\s+(\\w+(?:\\(\\w*\\))?)\\s+(to)\\s+(\\w+(?:\\(\\w*\\))?)\\s+(step)\\s+(\\w+(?:\\(\\w*\\))?)\\b", "name": "meta.query.range.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sampleoperator", "match": "\\b(sample)(?:\\s+(\\d+))?(?![\\w-])", "name": "meta.query.sample.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] }, "3": { "name": "keyword.other.operator.kusto" }, "4": { "name": "variable.other.column.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sampledistinctoperator", "match": "\\b(sample-distinct)(?:\\s+(\\d+)\\s+(of)\\s+(\\w+))?\\b", "name": "meta.query.sample-distinct.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "keyword.other.operator.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sortoperator", "match": "\\b(sort)(?:\\s+(by))?\\b", "name": "meta.query.sort.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/takeoperator", "match": "\\b(take|limit)(?:\\s+(\\d+))\\b", "name": "meta.query.take.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] }, "3": { "name": "keyword.other.operator.kusto" }, "4": { "name": "variable.other.column.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/topoperator", "match": "\\b(top)(?:\\s+(\\d+)\\s+(by)\\s+(\\w+))?(?![\\w-])\\b", "name": "meta.query.top.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] }, "3": { "name": "keyword.other.operator.kusto" }, "4": { "name": "variable.other.column.kusto" }, "5": { "name": "keyword.other.operator.kusto" }, "6": { "name": "variable.other.column.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tophittersoperator", "match": "\\b(top-hitters)(?:\\s+(\\d+)\\s+(of)\\s+(\\w+)(?:\\s+(by)\\s+(\\w+))?)?\\b", "name": "meta.query.top-hitters.kusto" }, { "comment": "Tabular operators: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/queries", "match": "\\b(consume|count|distinct|evaluate|extend|externaldata|find|fork|getschema|join|lookup|make-series|mv-apply|mv-expand|project-away|project-keep|project-rename|project-reorder|project|parse|parse-where|parse-kv|partition|print|reduce|render|scan|search|serialize|shuffle|summarize|top-nested|union|where)\\b", "name": "keyword.other.query.kusto" }, { "comment": "Tabular operators: evalute (plugins): https://docs.microsoft.com/en-us/azure/kusto/query/evaluateoperator", "match": "\\b(active_users_count|activity_counts_metrics|activity_engagement|new_activity_metrics|activity_metrics|autocluster|azure_digital_twins_query_request|bag_unpack|basket|cosmosdb_sql_request|dcount_intersect|diffpatterns|funnel_sequence_completion|funnel_sequence|http_request_post|http_request|infer_storage_schema|ipv4_lookup|mysql_request|narrow|pivot|preview|rolling_percentile|rows_near|schema_merge|session_count|sequence_detect|sliding_window_counts|sql_request)\\b", "name": "support.function.kusto" }, { "comment": "Tabular operators: join: https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator", "match": "\\b(on|kind|hint\\.remote|hint\\.strategy)\\b", "name": "keyword.other.operator.kusto" }, { "comment": "Tabular operators: join ($left, $right): https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator", "match": "(\\$left|\\$right)\\b", "name": "keyword.other.kusto" }, { "comment": "Tabular operators: join (kinds, strategies): https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator", "match": "\\b(innerunique|inner|leftouter|rightouter|fullouter|leftanti|anti|leftantisemi|rightanti|rightantisemi|leftsemi|rightsemi|broadcast)\\b", "name": "keyword.other.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/machine-learning-and-tsa", "match": "\\b(series_abs|series_acos|series_add|series_asin|series_atan|series_cos|series_decompose|series_decompose_anomalies|series_decompose_forecast|series_divide|series_equals|series_exp|series_fft|series_fill_backward|series_fill_const|series_fill_forward|series_fill_linear|series_fir|series_fit_2lines_dynamic|series_fit_2lines|series_fit_line_dynamic|series_fit_line|series_fit_poly|series_greater_equals|series_greater|series_ifft|series_iir|series_less_equals|series_less|series_multiply|series_not_equals|series_outliers|series_pearson_correlation|series_periods_detect|series_periods_validate|series_pow|series_seasonal|series_sign|series_sin|series_stats|series_stats_dynamic|series_subtract|series_tan)\\b", "name": "support.function.kusto" }, { "comment": "Tabular operators: mv-expand (bagexpand options): https://docs.microsoft.com/en-us/azure/kusto/query/mvexpandoperator", "match": "\\b(bag|array)\\b", "name": "keyword.other.operator.kusto" }, { "comment": "Tabular operators: order: https://docs.microsoft.com/en-us/azure/kusto/query/orderoperator", "match": "\\b(asc|desc|nulls first|nulls last)\\b", "name": "keyword.other.kusto" }, { "comment": "Tabular operators: parse: https://docs.microsoft.com/en-us/azure/kusto/query/parseoperator", "match": "\\b(regex|simple|relaxed)\\b", "name": "keyword.other.kusto" }, { "match": "\\b(anomalychart|areachart|barchart|card|columnchart|ladderchart|linechart|piechart|pivotchart|scatterchart|stackedareachart|timechart|timepivot)\\b", "name": "support.function.kusto" }, { "include": "#Strings" }, { "match": "\\{.*?\\}", "name": "string.other.kusto" }, { "comment": "Comments", "match": "//.*", "name": "comment.line.kusto" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#Numeric" }, { "match": "\\b(true|false|null)\\b", "name": "constant.language.kusto" }, { "comment": "Deprecated functions", "match": "\\b(anyif|any|array_strcat|base64_decodestring|base64_encodestring|make_dictionary|makelist|makeset|mvexpand|todynamic|parse_json|replace|weekofyear)(?=\\W*\\(|\\b)", "name": "invalid.deprecated.kusto" }], "repository": { "DateTimeTimeSpanDataTypes": { "patterns": [{ "match": "\\b(datetime|timespan|time)\\b", "name": "storage.type.kusto" }] }, "DateTimeTimeSpanFunctions": { "patterns": [{ "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }] }, "3": { "patterns": [{ "include": "#Strings" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/format-datetimefunction", "match": `\\b(format_datetime)(?:\\s*\\(\\s*(.+?)\\s*,\\s*(['"].*?['"])\\s*\\))?(?!\\w)`, "name": "meta.scalar.function.format_datetime.kusto" }, { "comment": "Scalar function: DateTime/Timespan Functions: https://docs.microsoft.com/en-us/azure/kusto/query/scalarfunctions#datetimetimespan-functions", "match": "\\b(ago|datetime_add|datetime_diff|datetime_local_to_utc|datetime_part|datetime_utc_to_local|dayofmonth|dayofweek|dayofyear|endofday|endofmonth|endofweek|endofyear|format_timespan|getmonth|getyear|hourofday|make_datetime|make_timespan|monthofyear|now|startofday|startofmonth|startofweek|startofyear|todatetime|totimespan|week_of_year)(?=\\W*\\()", "name": "support.function.kusto" }] }, "Escapes": { "patterns": [{ "match": `\\\\['"]`, "name": "constant.character.escape.kusto" }] }, "Numeric": { "patterns": [{ "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*+)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?(?=\\b|\\w)", "name": "constant.numeric.kusto" }] }, "Strings": { "patterns": [{ "begin": '([@h]?")', "beginCaptures": { "1": { "name": "punctuation.definition.string.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string", "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.kusto" } }, "name": "string.quoted.double.kusto", "patterns": [{ "include": "#Escapes" }] }, { "begin": "([@h]?')", "beginCaptures": { "1": { "name": "punctuation.definition.string.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string", "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.kusto" } }, "name": "string.quoted.single.kusto", "patterns": [{ "include": "#Escapes" }] }] }, "TimeSpanLiterals": { "patterns": [{ "comment": "timespan literals: https://docs.microsoft.com/en-us/azure/kusto/query/scalar-data-types/timespan#timespan-literals", "match": "[+-]?(?:\\d*\\.)?\\d+(?:microseconds?|ticks?|seconds?|ms|d|h|m|s)\\b", "name": "constant.numeric.kusto" }] } }, "scopeName": "source.kusto", "aliases": ["kql"] });
|
|
1
|
+
const lang = Object.freeze({ "displayName": "Kusto", "fileTypes": ["csl", "kusto", "kql"], "name": "kusto", "patterns": [{ "comment": "Tabular operators: common helper operators", "match": "\\b(by|from|of|to|step|with)\\b", "name": "keyword.other.operator.kusto" }, { "comment": "Query statements: https://docs.microsoft.com/en-us/azure/kusto/query/statements", "match": "\\b(let|set|alias|declare|pattern|query_parameters|restrict|access|set)\\b", "name": "keyword.control.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators", "match": "\\b(and|or|has_all|has_any|matches|regex)\\b", "name": "keyword.other.operator.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#Strings" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/clusterfunction", "match": "\\b(cluster|database)(?:\\s*\\(\\s*(.+?)\\s*\\))?(?!\\w)", "name": "meta.special.database.kusto" }, { "comment": "Special functions: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tablefunction", "match": "\\b(external_table|materialized_view|materialize|table|toscalar)\\b", "name": "support.function.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/betweenoperator", "match": "(?<!\\w)(!?between)\\b", "name": "keyword.other.operator.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] }, "3": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binoperators", "match": "\\b(binary_and|binary_or|binary_shift_left|binary_shift_right|binary_xor)(?:\\s*\\(\\s*(\\w+)\\s*,\\s*(\\w+)\\s*\\))?(?!\\w)", "name": "meta.scalar.bitwise.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binary-notfunction", "match": "\\b(binary_not|bitset_count_ones)(?:\\s*\\(\\s*(\\w+)\\s*\\))?(?!\\w)", "name": "meta.scalar.bitwise.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/in-cs-operator", "match": "(?<!\\w)(!?in~?)(?!\\w)", "name": "keyword.other.operator.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators", "match": "(?<!\\w)(!?(?:contains|endswith|hasprefix|hassuffix|has|startswith)(?:_cs)?)(?!\\w)", "name": "keyword.other.operator.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "3": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "4": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangefunction", "match": "\\b(range)\\s*\\((?:\\s*(\\w+(?:\\(.*?\\))?)\\s*,\\s*(\\w+(?:\\(.*?\\))?)\\s*,?(?:\\s*)?(\\w+(?:\\(.*?\\))?)?\\s*\\))?(?!\\w)", "name": "meta.scalar.function.range.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalarfunctions", "match": "\\b(abs|acos|around|array_concat|array_iff|array_index_of|array_length|array_reverse|array_rotate_left|array_rotate_right|array_shift_left|array_shift_right|array_slice|array_sort_asc|array_sort_desc|array_split|array_sum|asin|assert|atan2|atan|bag_has_key|bag_keys|bag_merge|bag_remove_keys|base64_decode_toarray|base64_decode_tostring|base64_decode_toguid|base64_encode_fromarray|base64_encode_tostring|base64_encode_fromguid|beta_cdf|beta_inv|beta_pdf|bin_at|bin_auto|case|ceiling|coalesce|column_ifexists|convert_angle|convert_energy|convert_force|convert_length|convert_mass|convert_speed|convert_temperature|convert_volume|cos|cot|countof|current_cluster_endpoint|current_database|current_principal_details|current_principal_is_member_of|current_principal|cursor_after|cursor_before_or_at|cursor_current|current_cursor|dcount_hll|degrees|dynamic_to_json|estimate_data_size|exp10|exp2|exp|extent_id|extent_tags|extract_all|extract_json|extractjson|extract|floor|format_bytes|format_ipv4_mask|format_ipv4|gamma|gettype|gzip_compress_to_base64_string|gzip_decompress_from_base64_string|has_any_index|has_any_ipv4_prefix|has_any_ipv4|has_ipv4_prefix|has_ipv4|hash_combine|hash_many|hash_md5|hash_sha1|hash_sha256|hash_xxhash64|hash|iff|iif|indexof_regex|indexof|ingestion_time|ipv4_compare|ipv4_is_in_range|ipv4_is_in_any_range|ipv4_is_match|ipv4_is_private|ipv4_netmask_suffix|ipv6_compare|ipv6_is_match|isascii|isempty|isfinite|isinf|isnan|isnotempty|notempty|isnotnull|notnull|isnull|isutf8|jaccard_index|log10|log2|loggamma|log|make_string|max_of|min_of|new_guid|not|bag_pack|pack_all|pack_array|pack_dictionary|pack|parse_command_line|parse_csv|parse_ipv4_mask|parse_ipv4|parse_ipv6_mask|parse_ipv6|parse_path|parse_urlquery|parse_url|parse_user_agent|parse_version|parse_xml|percentile_tdigest|percentile_array_tdigest|percentrank_tdigest|pi|pow|radians|rand|rank_tdigest|regex_quote|repeat|replace_regex|replace_string|reverse|round|set_difference|set_has_element|set_intersect|set_union|sign|sin|split|sqrt|strcat_array|strcat_delim|strcmp|strcat|string_size|strlen|strrep|substring|tan|to_utf8|tobool|todecimal|todouble|toreal|toguid|tohex|toint|tolong|tolower|tostring|toupper|translate|treepath|trim_end|trim_start|trim|unixtime_microseconds_todatetime|unixtime_milliseconds_todatetime|unixtime_nanoseconds_todatetime|unixtime_seconds_todatetime|url_decode|url_encode_component|url_encode|welch_test|zip|zlib_compress_to_base64_string|zlib_decompress_from_base64_string)\\b", "name": "support.function.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "3": { "patterns": [{ "include": "#TimeSpanLiterals" }, { "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binfunction", "match": "\\b(bin)(?:\\s*\\(\\s*(.+?)\\s*,\\s*(.+?)\\s*\\))?(?!\\w)", "name": "meta.scalar.function.bin.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/count-aggfunction", "match": "\\b(count)\\s*\\(\\s*\\)(?!\\w)", "name": "support.function.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/aggregation-functions", "match": "\\b(arg_max|arg_min|avgif|avg|binary_all_and|binary_all_or|binary_all_xor|buildschema|countif|dcount|dcountif|hll|hll_merge|make_bag_if|make_bag|make_list_with_nulls|make_list_if|make_list|make_set_if|make_set|maxif|max|minif|min|percentilesw_array|percentiles_array|percentilesw|percentilew|percentiles|percentile|stdevif|stdevp|stdev|sumif|sum|take_anyif|take_any|tdigest_merge|merge_tdigest|tdigest|varianceif|variancep|variance)\\b", "name": "support.function.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/geospatial-grid-systems", "match": "\\b(geo_distance_2points|geo_distance_point_to_line|geo_distance_point_to_polygon|geo_intersects_2lines|geo_intersects_2polygons|geo_intersects_line_with_polygon|geo_intersection_2lines|geo_intersection_2polygons|geo_intersection_line_with_polygon|geo_line_centroid|geo_line_densify|geo_line_length|geo_line_simplify|geo_polygon_area|geo_polygon_centroid|geo_polygon_densify|geo_polygon_perimeter|geo_polygon_simplify|geo_polygon_to_s2cells|geo_point_in_circle|geo_point_in_polygon|geo_point_to_geohash|geo_point_to_h3cell|geo_point_to_s2cell|geo_geohash_to_central_point|geo_geohash_neighbors|geo_geohash_to_polygon|geo_s2cell_to_central_point|geo_s2cell_neighbors|geo_s2cell_to_polygon|geo_h3cell_to_central_point|geo_h3cell_neighbors|geo_h3cell_to_polygon|geo_h3cell_parent|geo_h3cell_children|geo_h3cell_level|geo_h3cell_rings|geo_simplify_polygons_array|geo_union_lines_array|geo_union_polygons_array)\\b", "name": "support.function.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/windowsfunctions", "match": "\\b(next|prev|row_cumsum|row_number|row_rank|row_window_session)\\b", "name": "support.function.kusto" }, { "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions", "match": "\\.(create-or-alter|replace)", "name": "keyword.control.kusto" }, { "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions", "match": "(?<=let ).+(?=\\W*=)", "name": "entity.function.name.lambda.kusto" }, { "comment": "User-defined functions: https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions", "match": "\\b(folder|docstring|skipvalidation)\\b", "name": "keyword.other.operator.kusto" }, { "match": "\\b(function)\\b", "name": "storage.type.kusto" }, { "comment": "Data types: https://docs.microsoft.com/en-us/azure/kusto/query/scalar-data-types", "match": "\\b(bool|decimal|dynamic|guid|int|long|real|string)\\b", "name": "storage.type.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "variable.other.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/asoperator", "match": "\\b(as)\\s+(\\w+)\\b", "name": "meta.query.as.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatableoperator", "match": "\\b(datatable)(?=\\W*\\()", "name": "keyword.other.query.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "keyword.other.operator.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/facetoperator", "match": "\\b(facet)(?:\\s+(by))?\\b", "name": "meta.query.facet.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "entity.name.function.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/invokeoperator", "match": "\\b(invoke)(?:\\s+(\\w+))?\\b", "name": "meta.query.invoke.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "keyword.other.operator.kusto" }, "3": { "name": "variable.other.column.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/orderoperator", "match": "\\b(order)(?:\\s+(by)\\s+(\\w+))?\\b", "name": "meta.query.order.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "variable.other.column.kusto" }, "3": { "name": "keyword.other.operator.kusto" }, "4": { "patterns": [{ "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "5": { "name": "keyword.other.operator.kusto" }, "6": { "patterns": [{ "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "7": { "name": "keyword.other.operator.kusto" }, "8": { "patterns": [{ "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangeoperator", "match": "\\b(range)\\s+(\\w+)\\s+(from)\\s+(\\w+(?:\\(\\w*\\))?)\\s+(to)\\s+(\\w+(?:\\(\\w*\\))?)\\s+(step)\\s+(\\w+(?:\\(\\w*\\))?)\\b", "name": "meta.query.range.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sampleoperator", "match": "\\b(sample)(?:\\s+(\\d+))?(?![\\w-])", "name": "meta.query.sample.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] }, "3": { "name": "keyword.other.operator.kusto" }, "4": { "name": "variable.other.column.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sampledistinctoperator", "match": "\\b(sample-distinct)(?:\\s+(\\d+)\\s+(of)\\s+(\\w+))?\\b", "name": "meta.query.sample-distinct.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "name": "keyword.other.operator.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/sortoperator", "match": "\\b(sort)(?:\\s+(by))?\\b", "name": "meta.query.sort.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/takeoperator", "match": "\\b(take|limit)(?:\\s+(\\d+))\\b", "name": "meta.query.take.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] }, "3": { "name": "keyword.other.operator.kusto" }, "4": { "name": "variable.other.column.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/topoperator", "match": "\\b(top)(?:\\s+(\\d+)\\s+(by)\\s+(\\w+))?(?![\\w-])\\b", "name": "meta.query.top.kusto" }, { "captures": { "1": { "name": "keyword.other.query.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] }, "3": { "name": "keyword.other.operator.kusto" }, "4": { "name": "variable.other.column.kusto" }, "5": { "name": "keyword.other.operator.kusto" }, "6": { "name": "variable.other.column.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tophittersoperator", "match": "\\b(top-hitters)(?:\\s+(\\d+)\\s+(of)\\s+(\\w+)(?:\\s+(by)\\s+(\\w+))?)?\\b", "name": "meta.query.top-hitters.kusto" }, { "comment": "Tabular operators: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/queries", "match": "\\b(consume|count|distinct|evaluate|extend|externaldata|find|fork|getschema|join|lookup|make-series|mv-apply|mv-expand|project-away|project-keep|project-rename|project-reorder|project|parse|parse-where|parse-kv|partition|print|reduce|render|scan|search|serialize|shuffle|summarize|top-nested|union|where)\\b", "name": "keyword.other.query.kusto" }, { "comment": "Tabular operators: evalute (plugins): https://docs.microsoft.com/en-us/azure/kusto/query/evaluateoperator", "match": "\\b(active_users_count|activity_counts_metrics|activity_engagement|new_activity_metrics|activity_metrics|autocluster|azure_digital_twins_query_request|bag_unpack|basket|cosmosdb_sql_request|dcount_intersect|diffpatterns|funnel_sequence_completion|funnel_sequence|http_request_post|http_request|infer_storage_schema|ipv4_lookup|mysql_request|narrow|pivot|preview|rolling_percentile|rows_near|schema_merge|session_count|sequence_detect|sliding_window_counts|sql_request)\\b", "name": "support.function.kusto" }, { "comment": "Tabular operators: join: https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator", "match": "\\b(on|kind|hint\\.remote|hint\\.strategy)\\b", "name": "keyword.other.operator.kusto" }, { "comment": "Tabular operators: join ($left, $right): https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator", "match": "(\\$left|\\$right)\\b", "name": "keyword.other.kusto" }, { "comment": "Tabular operators: join (kinds, strategies): https://docs.microsoft.com/en-us/azure/kusto/query/joinoperator", "match": "\\b(innerunique|inner|leftouter|rightouter|fullouter|leftanti|anti|leftantisemi|rightanti|rightantisemi|leftsemi|rightsemi|broadcast)\\b", "name": "keyword.other.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/machine-learning-and-tsa", "match": "\\b(series_abs|series_acos|series_add|series_asin|series_atan|series_cos|series_decompose|series_decompose_anomalies|series_decompose_forecast|series_divide|series_equals|series_exp|series_fft|series_fill_backward|series_fill_const|series_fill_forward|series_fill_linear|series_fir|series_fit_2lines_dynamic|series_fit_2lines|series_fit_line_dynamic|series_fit_line|series_fit_poly|series_greater_equals|series_greater|series_ifft|series_iir|series_less_equals|series_less|series_multiply|series_not_equals|series_outliers|series_pearson_correlation|series_periods_detect|series_periods_validate|series_pow|series_seasonal|series_sign|series_sin|series_stats|series_stats_dynamic|series_subtract|series_tan)\\b", "name": "support.function.kusto" }, { "comment": "Tabular operators: mv-expand (bagexpand options): https://docs.microsoft.com/en-us/azure/kusto/query/mvexpandoperator", "match": "\\b(bag|array)\\b", "name": "keyword.other.operator.kusto" }, { "comment": "Tabular operators: order: https://docs.microsoft.com/en-us/azure/kusto/query/orderoperator", "match": "\\b(asc|desc|nulls first|nulls last)\\b", "name": "keyword.other.kusto" }, { "comment": "Tabular operators: parse: https://docs.microsoft.com/en-us/azure/kusto/query/parseoperator", "match": "\\b(regex|simple|relaxed)\\b", "name": "keyword.other.kusto" }, { "match": "\\b(anomalychart|areachart|barchart|card|columnchart|ladderchart|linechart|piechart|pivotchart|scatterchart|stackedareachart|timechart|timepivot)\\b", "name": "support.function.kusto" }, { "include": "#Strings" }, { "match": "\\{.*?\\}", "name": "string.other.kusto" }, { "comment": "Comments", "match": "//.*", "name": "comment.line.kusto" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#Numeric" }, { "match": "\\b(true|false|null)\\b", "name": "constant.language.kusto" }, { "comment": "Deprecated functions", "match": "\\b(anyif|any|array_strcat|base64_decodestring|base64_encodestring|make_dictionary|makelist|makeset|mvexpand|todynamic|parse_json|replace|weekofyear)(?=\\W*\\(|\\b)", "name": "invalid.deprecated.kusto" }], "repository": { "DateTimeTimeSpanDataTypes": { "patterns": [{ "match": "\\b(datetime|timespan|time)\\b", "name": "storage.type.kusto" }] }, "DateTimeTimeSpanFunctions": { "patterns": [{ "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }] }, "3": { "patterns": [{ "include": "#Strings" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/format-datetimefunction", "match": `\\b(format_datetime)(?:\\s*\\(\\s*(.+?)\\s*,\\s*(['"].*?['"])\\s*\\))?(?!\\w)`, "name": "meta.scalar.function.format_datetime.kusto" }, { "comment": "Scalar function: DateTime/Timespan Functions: https://docs.microsoft.com/en-us/azure/kusto/query/scalarfunctions#datetimetimespan-functions", "match": "\\b(ago|datetime_add|datetime_diff|datetime_local_to_utc|datetime_part|datetime_utc_to_local|dayofmonth|dayofweek|dayofyear|endofday|endofmonth|endofweek|endofyear|format_timespan|getmonth|getyear|hourofday|make_datetime|make_timespan|monthofyear|now|startofday|startofmonth|startofweek|startofyear|todatetime|totimespan|week_of_year)(?=\\W*\\()", "name": "support.function.kusto" }] }, "Escapes": { "patterns": [{ "match": `(\\\\['"]|\\\\\\\\)`, "name": "constant.character.escape.kusto" }] }, "Numeric": { "patterns": [{ "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*+)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?(?=\\b|\\w)", "name": "constant.numeric.kusto" }] }, "Strings": { "patterns": [{ "begin": '([@h]?")', "beginCaptures": { "1": { "name": "punctuation.definition.string.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string", "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.kusto" } }, "name": "string.quoted.double.kusto", "patterns": [{ "include": "#Escapes" }] }, { "begin": "([@h]?')", "beginCaptures": { "1": { "name": "punctuation.definition.string.kusto" } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalar-data-types/string", "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.kusto" } }, "name": "string.quoted.single.kusto", "patterns": [{ "include": "#Escapes" }] }] }, "TimeSpanLiterals": { "patterns": [{ "comment": "timespan literals: https://docs.microsoft.com/en-us/azure/kusto/query/scalar-data-types/timespan#timespan-literals", "match": "[+-]?(?:\\d*\\.)?\\d+(?:microseconds?|ticks?|seconds?|ms|d|h|m|s)\\b", "name": "constant.numeric.kusto" }] } }, "scopeName": "source.kusto", "aliases": ["kql"] });
|
|
2
2
|
var kusto = [
|
|
3
3
|
lang
|
|
4
4
|
];
|
package/dist/langs/nix.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({ "displayName": "Nix", "fileTypes": ["nix"], "name": "nix", "patterns": [{ "include": "#expression" }], "repository": { "attribute-bind": { "patterns": [{ "include": "#attribute-name" }, { "include": "#attribute-bind-from-equals" }] }, "attribute-bind-from-equals": { "begin": "\\=", "beginCaptures": { "0": { "name": "keyword.operator.bind.nix" } }, "end": "\\;", "endCaptures": { "0": { "name": "punctuation.terminator.bind.nix" } }, "patterns": [{ "include": "#expression" }] }, "attribute-inherit": { "begin": "\\binherit\\b", "beginCaptures": { "0": { "name": "keyword.other.inherit.nix" } }, "end": "\\;", "endCaptures": { "0": { "name": "punctuation.terminator.inherit.nix" } }, "patterns": [{ "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.function.arguments.nix" } }, "end": "(?=\\;)", "patterns": [{ "begin": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.function.arguments.nix" } }, "end": "(?=\\;)", "patterns": [{ "include": "#bad-reserved" }, { "include": "#attribute-name-single" }, { "include": "#others" }] }, { "include": "#expression" }] }, { "begin": "(?=[a-zA-Z\\_])", "end": "(?=\\;)", "patterns": [{ "include": "#bad-reserved" }, { "include": "#attribute-name-single" }, { "include": "#others" }] }, { "include": "#others" }] }, "attribute-name": { "patterns": [{ "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "name": "entity.other.attribute-name.multipart.nix" }, { "match": "\\." }, { "include": "#string-quoted" }, { "include": "#interpolation" }] }, "attribute-name-single": { "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "name": "entity.other.attribute-name.single.nix" }, "attrset-contents": { "patterns": [{ "include": "#attribute-inherit" }, { "include": "#bad-reserved" }, { "include": "#attribute-bind" }, { "include": "#others" }] }, "attrset-definition": { "begin": "(?=\\{)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "(\\{)", "beginCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "end": "(\\})", "endCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "patterns": [{ "include": "#attrset-contents" }] }, { "begin": "(?<=\\})", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }] }, "attrset-definition-brace-opened": { "patterns": [{ "begin": "(?<=\\})", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "(?=.?)", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "patterns": [{ "include": "#attrset-contents" }] }] }, "attrset-for-sure": { "patterns": [{ "begin": "(?=\\brec\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\brec\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=\\{)", "patterns": [{ "include": "#others" }] }, { "include": "#attrset-definition" }, { "include": "#others" }] }, { "begin": "(?=\\{\\s*(\\}|[^,?]*(=|;)))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attrset-definition" }, { "include": "#others" }] }] }, "attrset-or-function": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.attrset-or-function.nix" } }, "end": "(?=([\\])};]|\\b(else|then)\\b))", "patterns": [{ "begin": `(?=(\\s*\\}|\\"|\\binherit\\b|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*(\\s*\\.|\\s*=[^=])))`, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attrset-definition-brace-opened" }] }, { "begin": "(?=(\\.\\.\\.|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*\\s*[,?]))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-definition-brace-opened" }] }, { "include": "#bad-reserved" }, { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.function.maybe.nix" } }, "end": "(?=([\\])};]|\\b(else|then)\\b))", "patterns": [{ "begin": "(?=\\.)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attrset-definition-brace-opened" }] }, { "begin": "\\s*(\\,)", "beginCaptures": { "1": { "name": "keyword.operator.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-definition-brace-opened" }] }, { "begin": "(?=\\=)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attribute-bind-from-equals" }, { "include": "#attrset-definition-brace-opened" }] }, { "begin": "(?=\\?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-parameter-default" }, { "begin": "\\,", "beginCaptures": { "0": { "name": "keyword.operator.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-definition-brace-opened" }] }] }, { "include": "#others" }] }, { "include": "#others" }] }, "bad-reserved": { "match": "\\b(if|then|else|assert|with|let|in|rec|inherit)\\b", "name": "invalid.illegal.reserved.nix" }, "comment": { "patterns": [{ "begin": "/\\*([^*]|\\*[^\\/])*", "end": "\\*\\/", "name": "comment.block.nix", "patterns": [{ "include": "#comment-remark" }] }, { "begin": "\\#", "end": "$", "name": "comment.line.number-sign.nix", "patterns": [{ "include": "#comment-remark" }] }] }, "comment-remark": { "captures": { "1": { "name": "markup.bold.comment.nix" } }, "match": "(TODO|FIXME|BUG|\\!\\!\\!):?" }, "constants": { "patterns": [{ "begin": "\\b(builtins|true|false|null)\\b", "beginCaptures": { "0": { "name": "constant.language.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "\\b(scopedImport|import|isNull|abort|throw|baseNameOf|dirOf|removeAttrs|map|toString|derivationStrict|derivation)\\b", "beginCaptures": { "0": { "name": "support.function.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "\\b[0-9]+\\b", "beginCaptures": { "0": { "name": "constant.numeric.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }] }, "expression": { "patterns": [{ "include": "#parens-and-cont" }, { "include": "#list-and-cont" }, { "include": "#string" }, { "include": "#interpolation" }, { "include": "#with-assert" }, { "include": "#function-for-sure" }, { "include": "#attrset-for-sure" }, { "include": "#attrset-or-function" }, { "include": "#let" }, { "include": "#if" }, { "include": "#operator-unary" }, { "include": "#constants" }, { "include": "#bad-reserved" }, { "include": "#parameter-name-and-cont" }, { "include": "#others" }] }, "expression-cont": { "begin": "(?=.?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#parens" }, { "include": "#list" }, { "include": "#string" }, { "include": "#interpolation" }, { "include": "#function-for-sure" }, { "include": "#attrset-for-sure" }, { "include": "#attrset-or-function" }, { "match": "(\\bor\\b|\\.|==|!=|!|\\<\\=|\\<|\\>\\=|\\>|&&|\\|\\||-\\>|//|\\?|\\+\\+|-|\\*|/(?=([^*]|$))|\\+)", "name": "keyword.operator.nix" }, { "include": "#constants" }, { "include": "#bad-reserved" }, { "include": "#parameter-name" }, { "include": "#others" }] }, "function-body": { "begin": "(@\\s*([a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)\\s*)?(\\:)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression" }] }, "function-body-from-colon": { "begin": "(\\:)", "beginCaptures": { "0": { "name": "punctuation.definition.function.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression" }] }, "function-contents": { "patterns": [{ "include": "#bad-reserved" }, { "include": "#function-parameter" }, { "include": "#others" }] }, "function-definition": { "begin": "(?=.?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-body-from-colon" }, { "begin": "(?=.?)", "end": "(?=\\:)", "patterns": [{ "begin": "(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)", "beginCaptures": { "0": { "name": "variable.parameter.function.4.nix" } }, "end": "(?=\\:)", "patterns": [{ "begin": "\\@", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-until-colon-no-arg" }, { "include": "#others" }] }, { "include": "#others" }] }, { "begin": "(?=\\{)", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-until-colon-with-arg" }] }] }, { "include": "#others" }] }, "function-definition-brace-opened": { "begin": "(?=.?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-body-from-colon" }, { "begin": "(?=.?)", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-close-brace-with-arg" }, { "begin": "(?=.?)", "end": "(?=\\})", "patterns": [{ "include": "#function-contents" }] }] }, { "include": "#others" }] }, "function-for-sure": { "patterns": [{ "begin": `(?=(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*\\s*[:@]|\\{[^}]*\\}\\s*:|\\{[^#}"'/=]*[,\\?]))`, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-definition" }] }] }, "function-header-close-brace-no-arg": { "begin": "\\}", "beginCaptures": { "0": { "name": "punctuation.definition.entity.function.nix" } }, "end": "(?=\\:)", "patterns": [{ "include": "#others" }] }, "function-header-close-brace-with-arg": { "begin": "\\}", "beginCaptures": { "0": { "name": "punctuation.definition.entity.function.nix" } }, "end": "(?=\\:)", "patterns": [{ "include": "#function-header-terminal-arg" }, { "include": "#others" }] }, "function-header-open-brace": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.entity.function.2.nix" } }, "end": "(?=\\})", "patterns": [{ "include": "#function-contents" }] }, "function-header-terminal-arg": { "begin": "(?=@)", "end": "(?=\\:)", "patterns": [{ "begin": "\\@", "end": "(?=\\:)", "patterns": [{ "begin": "(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)", "end": "(?=\\:)", "name": "variable.parameter.function.3.nix" }, { "include": "#others" }] }, { "include": "#others" }] }, "function-header-until-colon-no-arg": { "begin": "(?=\\{)", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-open-brace" }, { "include": "#function-header-close-brace-no-arg" }] }, "function-header-until-colon-with-arg": { "begin": "(?=\\{)", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-open-brace" }, { "include": "#function-header-close-brace-with-arg" }] }, "function-parameter": { "patterns": [{ "begin": "(\\.\\.\\.)", "end": "(,|(?=\\}))", "name": "keyword.operator.nix", "patterns": [{ "include": "#others" }] }, { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.function.1.nix" } }, "end": "(,|(?=\\}))", "endCaptures": { "0": { "name": "keyword.operator.nix" } }, "patterns": [{ "include": "#whitespace" }, { "include": "#comment" }, { "include": "#function-parameter-default" }, { "include": "#expression" }] }, { "include": "#others" }] }, "function-parameter-default": { "begin": "\\?", "beginCaptures": { "0": { "name": "keyword.operator.nix" } }, "end": "(?=[,}])", "patterns": [{ "include": "#expression" }] }, "if": { "begin": "(?=\\bif\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\bif\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "\\bth(?=en\\b)", "endCaptures": { "0": { "name": "keyword.other.nix" } }, "patterns": [{ "include": "#expression" }] }, { "begin": "(?<=th)en\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "\\bel(?=se\\b)", "endCaptures": { "0": { "name": "keyword.other.nix" } }, "patterns": [{ "include": "#expression" }] }, { "begin": "(?<=el)se\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "endCaptures": { "0": { "name": "keyword.other.nix" } }, "patterns": [{ "include": "#expression" }] }] }, "illegal": { "match": ".", "name": "invalid.illegal" }, "interpolation": { "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.nix" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nix" } }, "name": "markup.italic", "patterns": [{ "include": "#expression" }] }, "let": { "begin": "(?=\\blet\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\blet\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=([\\])};,]|\\b(in|else|then)\\b))", "patterns": [{ "begin": "(?=\\{)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\{", "end": "\\}", "patterns": [{ "include": "#attrset-contents" }] }, { "begin": "(^|(?<=\\}))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "include": "#others" }] }, { "include": "#attrset-contents" }, { "include": "#others" }] }, { "begin": "\\bin\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression" }] }] }, "list": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.list.nix" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.list.nix" } }, "patterns": [{ "include": "#expression" }] }, "list-and-cont": { "begin": "(?=\\[)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#list" }, { "include": "#expression-cont" }] }, "operator-unary": { "match": "(!|-)", "name": "keyword.operator.unary.nix" }, "others": { "patterns": [{ "include": "#whitespace" }, { "include": "#comment" }, { "include": "#illegal" }] }, "parameter-name": { "captures": { "0": { "name": "variable.parameter.name.nix" } }, "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*" }, "parameter-name-and-cont": { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.name.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, "parens": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.expression.nix" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.expression.nix" } }, "patterns": [{ "include": "#expression" }] }, "parens-and-cont": { "begin": "(?=\\()", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#parens" }, { "include": "#expression-cont" }] }, "string": { "patterns": [{ "begin": "(?=\\'\\')", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\'\\'", "beginCaptures": { "0": { "name": "punctuation.definition.string.other.start.nix" } }, "end": "\\'\\'(?!\\$|\\'|\\\\.)", "endCaptures": { "0": { "name": "punctuation.definition.string.other.end.nix" } }, "name": "string.quoted.other.nix", "patterns": [{ "match": "\\'\\'(\\$|\\'|\\\\.)", "name": "constant.character.escape.nix" }, { "include": "#interpolation" }] }, { "include": "#expression-cont" }] }, { "begin": '(?=\\")', "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#string-quoted" }, { "include": "#expression-cont" }] }, { "begin": "([a-zA-Z0-9\\.\\_\\-\\+]*(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)+)", "beginCaptures": { "0": { "name": "string.unquoted.path.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "(\\<[a-zA-Z0-9\\.\\_\\-\\+]+(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)*\\>)", "beginCaptures": { "0": { "name": "string.unquoted.spath.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "([a-zA-Z][a-zA-Z0-9\\+\\-\\.]*\\:[a-zA-Z0-9\\%\\/\\?\\:\\@\\&\\=\\+\\$\\,\\-\\_\\.\\!\\~\\*\\']+)", "beginCaptures": { "0": { "name": "string.unquoted.url.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }] }, "string-quoted": { "begin": '\\"', "beginCaptures": { "0": { "name": "punctuation.definition.string.double.start.nix" } }, "end": '\\"', "endCaptures": { "0": { "name": "punctuation.definition.string.double.end.nix" } }, "name": "string.quoted.double.nix", "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.nix" }, { "include": "#interpolation" }] }, "whitespace": { "match": "\\s+" }, "with-assert": { "begin": "\\b(with|assert)\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "\\;", "patterns": [{ "include": "#expression" }] } }, "scopeName": "source.nix" });
|
|
1
|
+
const lang = Object.freeze({ "displayName": "Nix", "fileTypes": ["nix"], "name": "nix", "patterns": [{ "include": "#expression" }], "repository": { "attribute-bind": { "patterns": [{ "include": "#attribute-name" }, { "include": "#attribute-bind-from-equals" }] }, "attribute-bind-from-equals": { "begin": "\\=", "beginCaptures": { "0": { "name": "keyword.operator.bind.nix" } }, "end": "\\;", "endCaptures": { "0": { "name": "punctuation.terminator.bind.nix" } }, "patterns": [{ "include": "#expression" }] }, "attribute-inherit": { "begin": "\\binherit\\b", "beginCaptures": { "0": { "name": "keyword.other.inherit.nix" } }, "end": "\\;", "endCaptures": { "0": { "name": "punctuation.terminator.inherit.nix" } }, "patterns": [{ "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.function.arguments.nix" } }, "end": "(?=\\;)", "patterns": [{ "begin": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.function.arguments.nix" } }, "end": "(?=\\;)", "patterns": [{ "include": "#bad-reserved" }, { "include": "#attribute-name-single" }, { "include": "#others" }] }, { "include": "#expression" }] }, { "begin": "(?=[a-zA-Z\\_])", "end": "(?=\\;)", "patterns": [{ "include": "#bad-reserved" }, { "include": "#attribute-name-single" }, { "include": "#others" }] }, { "include": "#others" }] }, "attribute-name": { "patterns": [{ "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "name": "entity.other.attribute-name.multipart.nix" }, { "match": "\\." }, { "include": "#string-quoted" }, { "include": "#interpolation" }] }, "attribute-name-single": { "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "name": "entity.other.attribute-name.single.nix" }, "attrset-contents": { "patterns": [{ "include": "#attribute-inherit" }, { "include": "#bad-reserved" }, { "include": "#attribute-bind" }, { "include": "#others" }] }, "attrset-definition": { "begin": "(?=\\{)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "(\\{)", "beginCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "end": "(\\})", "endCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "patterns": [{ "include": "#attrset-contents" }] }, { "begin": "(?<=\\})", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }] }, "attrset-definition-brace-opened": { "patterns": [{ "begin": "(?<=\\})", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "(?=.?)", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "patterns": [{ "include": "#attrset-contents" }] }] }, "attrset-for-sure": { "patterns": [{ "begin": "(?=\\brec\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\brec\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=\\{)", "patterns": [{ "include": "#others" }] }, { "include": "#attrset-definition" }, { "include": "#others" }] }, { "begin": "(?=\\{\\s*(\\}|[^,?]*(=|;)))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attrset-definition" }, { "include": "#others" }] }] }, "attrset-or-function": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.attrset-or-function.nix" } }, "end": "(?=([\\])};]|\\b(else|then)\\b))", "patterns": [{ "begin": `(?=(\\s*\\}|\\"|\\binherit\\b|\\$\\{|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*(\\s*\\.|\\s*=[^=])))`, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attrset-definition-brace-opened" }] }, { "begin": "(?=(\\.\\.\\.|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*\\s*[,?]))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-definition-brace-opened" }] }, { "include": "#bad-reserved" }, { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.function.maybe.nix" } }, "end": "(?=([\\])};]|\\b(else|then)\\b))", "patterns": [{ "begin": "(?=\\.)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attrset-definition-brace-opened" }] }, { "begin": "\\s*(\\,)", "beginCaptures": { "1": { "name": "keyword.operator.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-definition-brace-opened" }] }, { "begin": "(?=\\=)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attribute-bind-from-equals" }, { "include": "#attrset-definition-brace-opened" }] }, { "begin": "(?=\\?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-parameter-default" }, { "begin": "\\,", "beginCaptures": { "0": { "name": "keyword.operator.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-definition-brace-opened" }] }] }, { "include": "#others" }] }, { "include": "#others" }] }, "bad-reserved": { "match": "(?<![\\w'-])(if|then|else|assert|with|let|in|rec|inherit)(?![\\w'-])", "name": "invalid.illegal.reserved.nix" }, "comment": { "patterns": [{ "begin": "/\\*([^*]|\\*[^\\/])*", "end": "\\*\\/", "name": "comment.block.nix", "patterns": [{ "include": "#comment-remark" }] }, { "begin": "\\#", "end": "$", "name": "comment.line.number-sign.nix", "patterns": [{ "include": "#comment-remark" }] }] }, "comment-remark": { "captures": { "1": { "name": "markup.bold.comment.nix" } }, "match": "(TODO|FIXME|BUG|\\!\\!\\!):?" }, "constants": { "patterns": [{ "begin": "\\b(builtins|true|false|null)\\b", "beginCaptures": { "0": { "name": "constant.language.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "\\b(scopedImport|import|isNull|abort|throw|baseNameOf|dirOf|removeAttrs|map|toString|derivationStrict|derivation)\\b", "beginCaptures": { "0": { "name": "support.function.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "\\b[0-9]+\\b", "beginCaptures": { "0": { "name": "constant.numeric.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }] }, "expression": { "patterns": [{ "include": "#parens-and-cont" }, { "include": "#list-and-cont" }, { "include": "#string" }, { "include": "#interpolation" }, { "include": "#with-assert" }, { "include": "#function-for-sure" }, { "include": "#attrset-for-sure" }, { "include": "#attrset-or-function" }, { "include": "#let" }, { "include": "#if" }, { "include": "#operator-unary" }, { "include": "#constants" }, { "include": "#bad-reserved" }, { "include": "#parameter-name-and-cont" }, { "include": "#others" }] }, "expression-cont": { "begin": "(?=.?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#parens" }, { "include": "#list" }, { "include": "#string" }, { "include": "#interpolation" }, { "include": "#function-for-sure" }, { "include": "#attrset-for-sure" }, { "include": "#attrset-or-function" }, { "match": "(\\bor\\b|\\.|==|!=|!|\\<\\=|\\<|\\>\\=|\\>|&&|\\|\\||-\\>|//|\\?|\\+\\+|-|\\*|/(?=([^*]|$))|\\+)", "name": "keyword.operator.nix" }, { "include": "#constants" }, { "include": "#bad-reserved" }, { "include": "#parameter-name" }, { "include": "#others" }] }, "function-body": { "begin": "(@\\s*([a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)\\s*)?(\\:)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression" }] }, "function-body-from-colon": { "begin": "(\\:)", "beginCaptures": { "0": { "name": "punctuation.definition.function.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression" }] }, "function-contents": { "patterns": [{ "include": "#bad-reserved" }, { "include": "#function-parameter" }, { "include": "#others" }] }, "function-definition": { "begin": "(?=.?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-body-from-colon" }, { "begin": "(?=.?)", "end": "(?=\\:)", "patterns": [{ "begin": "(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)", "beginCaptures": { "0": { "name": "variable.parameter.function.4.nix" } }, "end": "(?=\\:)", "patterns": [{ "begin": "\\@", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-until-colon-no-arg" }, { "include": "#others" }] }, { "include": "#others" }] }, { "begin": "(?=\\{)", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-until-colon-with-arg" }] }] }, { "include": "#others" }] }, "function-definition-brace-opened": { "begin": "(?=.?)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-body-from-colon" }, { "begin": "(?=.?)", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-close-brace-with-arg" }, { "begin": "(?=.?)", "end": "(?=\\})", "patterns": [{ "include": "#function-contents" }] }] }, { "include": "#others" }] }, "function-for-sure": { "patterns": [{ "begin": `(?=(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*\\s*[:@]|\\{[^}]*\\}\\s*:|\\{[^#}"'/=]*[,\\?]))`, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-definition" }] }] }, "function-header-close-brace-no-arg": { "begin": "\\}", "beginCaptures": { "0": { "name": "punctuation.definition.entity.function.nix" } }, "end": "(?=\\:)", "patterns": [{ "include": "#others" }] }, "function-header-close-brace-with-arg": { "begin": "\\}", "beginCaptures": { "0": { "name": "punctuation.definition.entity.function.nix" } }, "end": "(?=\\:)", "patterns": [{ "include": "#function-header-terminal-arg" }, { "include": "#others" }] }, "function-header-open-brace": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.entity.function.2.nix" } }, "end": "(?=\\})", "patterns": [{ "include": "#function-contents" }] }, "function-header-terminal-arg": { "begin": "(?=@)", "end": "(?=\\:)", "patterns": [{ "begin": "\\@", "end": "(?=\\:)", "patterns": [{ "begin": "(\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*)", "end": "(?=\\:)", "name": "variable.parameter.function.3.nix" }, { "include": "#others" }] }, { "include": "#others" }] }, "function-header-until-colon-no-arg": { "begin": "(?=\\{)", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-open-brace" }, { "include": "#function-header-close-brace-no-arg" }] }, "function-header-until-colon-with-arg": { "begin": "(?=\\{)", "end": "(?=\\:)", "patterns": [{ "include": "#function-header-open-brace" }, { "include": "#function-header-close-brace-with-arg" }] }, "function-parameter": { "patterns": [{ "begin": "(\\.\\.\\.)", "end": "(,|(?=\\}))", "name": "keyword.operator.nix", "patterns": [{ "include": "#others" }] }, { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.function.1.nix" } }, "end": "(,|(?=\\}))", "endCaptures": { "0": { "name": "keyword.operator.nix" } }, "patterns": [{ "include": "#whitespace" }, { "include": "#comment" }, { "include": "#function-parameter-default" }, { "include": "#expression" }] }, { "include": "#others" }] }, "function-parameter-default": { "begin": "\\?", "beginCaptures": { "0": { "name": "keyword.operator.nix" } }, "end": "(?=[,}])", "patterns": [{ "include": "#expression" }] }, "if": { "begin": "(?=\\bif\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\bif\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "\\bth(?=en\\b)", "endCaptures": { "0": { "name": "keyword.other.nix" } }, "patterns": [{ "include": "#expression" }] }, { "begin": "(?<=th)en\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "\\bel(?=se\\b)", "endCaptures": { "0": { "name": "keyword.other.nix" } }, "patterns": [{ "include": "#expression" }] }, { "begin": "(?<=el)se\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "endCaptures": { "0": { "name": "keyword.other.nix" } }, "patterns": [{ "include": "#expression" }] }] }, "illegal": { "match": ".", "name": "invalid.illegal" }, "interpolation": { "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.section.embedded.begin.nix" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.embedded.end.nix" } }, "name": "meta.embedded", "patterns": [{ "include": "#expression" }] }, "let": { "begin": "(?=\\blet\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\blet\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=([\\])};,]|\\b(in|else|then)\\b))", "patterns": [{ "begin": "(?=\\{)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\{", "end": "\\}", "patterns": [{ "include": "#attrset-contents" }] }, { "begin": "(^|(?<=\\}))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "include": "#others" }] }, { "include": "#attrset-contents" }, { "include": "#others" }] }, { "begin": "\\bin\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression" }] }] }, "list": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.list.nix" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.list.nix" } }, "patterns": [{ "include": "#expression" }] }, "list-and-cont": { "begin": "(?=\\[)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#list" }, { "include": "#expression-cont" }] }, "operator-unary": { "match": "(!|-)", "name": "keyword.operator.unary.nix" }, "others": { "patterns": [{ "include": "#whitespace" }, { "include": "#comment" }, { "include": "#illegal" }] }, "parameter-name": { "captures": { "0": { "name": "variable.parameter.name.nix" } }, "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*" }, "parameter-name-and-cont": { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.name.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, "parens": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.expression.nix" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.expression.nix" } }, "patterns": [{ "include": "#expression" }] }, "parens-and-cont": { "begin": "(?=\\()", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#parens" }, { "include": "#expression-cont" }] }, "string": { "patterns": [{ "begin": "(?=\\'\\')", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\'\\'", "beginCaptures": { "0": { "name": "punctuation.definition.string.other.start.nix" } }, "end": "\\'\\'(?!\\$|\\'|\\\\.)", "endCaptures": { "0": { "name": "punctuation.definition.string.other.end.nix" } }, "name": "string.quoted.other.nix", "patterns": [{ "match": "\\'\\'(\\$|\\'|\\\\.)", "name": "constant.character.escape.nix" }, { "include": "#interpolation" }] }, { "include": "#expression-cont" }] }, { "begin": '(?=\\")', "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#string-quoted" }, { "include": "#expression-cont" }] }, { "begin": "(~?[a-zA-Z0-9\\.\\_\\-\\+]*(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)+)", "beginCaptures": { "0": { "name": "string.unquoted.path.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "(\\<[a-zA-Z0-9\\.\\_\\-\\+]+(\\/[a-zA-Z0-9\\.\\_\\-\\+]+)*\\>)", "beginCaptures": { "0": { "name": "string.unquoted.spath.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "([a-zA-Z][a-zA-Z0-9\\+\\-\\.]*\\:[a-zA-Z0-9\\%\\/\\?\\:\\@\\&\\=\\+\\$\\,\\-\\_\\.\\!\\~\\*\\']+)", "beginCaptures": { "0": { "name": "string.unquoted.url.nix" } }, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }] }, "string-quoted": { "begin": '\\"', "beginCaptures": { "0": { "name": "punctuation.definition.string.double.start.nix" } }, "end": '\\"', "endCaptures": { "0": { "name": "punctuation.definition.string.double.end.nix" } }, "name": "string.quoted.double.nix", "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.nix" }, { "include": "#interpolation" }] }, "whitespace": { "match": "\\s+" }, "with-assert": { "begin": "(?<![\\w'-])(with|assert)(?![\\w'-])", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "\\;", "patterns": [{ "include": "#expression" }] } }, "scopeName": "source.nix" });
|
|
2
2
|
var nix = [
|
|
3
3
|
lang
|
|
4
4
|
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { LanguageRegistration } from '@shikijs/core';declare const reg: LanguageRegistration[];export default reg
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './regexp.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { LanguageRegistration } from '@shikijs/core';declare const reg: LanguageRegistration[];export default reg
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const lang = Object.freeze({ "displayName": "RegExp", "fileTypes": ["re"], "name": "regexp", "patterns": [{ "include": "#regexp-expression" }], "repository": { "codetags": { "captures": { "1": { "name": "keyword.codetag.notation.python" } }, "match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)" }, "fregexp-base-expression": { "patterns": [{ "include": "#fregexp-quantifier" }, { "include": "#fstring-formatting-braces" }, { "match": "\\{.*?\\}" }, { "include": "#regexp-base-common" }] }, "fregexp-quantifier": { "match": "(?x)\n\\{\\{(\n\\d+ | \\d+,(\\d+)? | ,\\d+\n)\\}\\}\n", "name": "keyword.operator.quantifier.regexp" }, "fstring-formatting-braces": { "patterns": [{ "captures": { "1": { "name": "constant.character.format.placeholder.other.python" }, "2": { "name": "invalid.illegal.brace.python" }, "3": { "name": "constant.character.format.placeholder.other.python" } }, "comment": "empty braces are illegal", "match": "({)(\\s*?)(})" }, { "match": "({{|}})", "name": "constant.character.escape.python" }] }, "regexp-backreference": { "captures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.backreference.regexp" }, "3": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp" } }, "match": "(?x)\n(\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n", "name": "meta.backreference.named.regexp" }, "regexp-backreference-number": { "captures": { "1": { "name": "entity.name.tag.backreference.regexp" } }, "match": "(\\\\[1-9]\\d?)", "name": "meta.backreference.regexp" }, "regexp-base-common": { "patterns": [{ "match": "\\.", "name": "support.other.match.any.regexp" }, { "match": "\\^", "name": "support.other.match.begin.regexp" }, { "match": "\\$", "name": "support.other.match.end.regexp" }, { "match": "[+*?]\\??", "name": "keyword.operator.quantifier.regexp" }, { "match": "\\|", "name": "keyword.operator.disjunction.regexp" }, { "include": "#regexp-escape-sequence" }] }, "regexp-base-expression": { "patterns": [{ "include": "#regexp-quantifier" }, { "include": "#regexp-base-common" }] }, "regexp-character-set": { "patterns": [{ "match": "(?x)\n\\[ \\^? \\] (?! .*?\\])\n" }, { "begin": "(\\[)(\\^)?(\\])?", "beginCaptures": { "1": { "name": "punctuation.character.set.begin.regexp constant.other.set.regexp" }, "2": { "name": "keyword.operator.negation.regexp" }, "3": { "name": "constant.character.set.regexp" } }, "end": "(\\])", "endCaptures": { "1": { "name": "punctuation.character.set.end.regexp constant.other.set.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "meta.character.set.regexp", "patterns": [{ "include": "#regexp-charecter-set-escapes" }, { "match": "[^\\n]", "name": "constant.character.set.regexp" }] }] }, "regexp-charecter-set-escapes": { "patterns": [{ "match": "\\\\[abfnrtv\\\\]", "name": "constant.character.escape.regexp" }, { "include": "#regexp-escape-special" }, { "match": "\\\\([0-7]{1,3})", "name": "constant.character.escape.regexp" }, { "include": "#regexp-escape-character" }, { "include": "#regexp-escape-unicode" }, { "include": "#regexp-escape-catchall" }] }, "regexp-comments": { "begin": "\\(\\?#", "beginCaptures": { "0": { "name": "punctuation.comment.begin.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.comment.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "comment.regexp", "patterns": [{ "include": "#codetags" }] }, "regexp-conditional": { "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)", "beginCaptures": { "0": { "name": "keyword.operator.conditional.regexp" }, "1": { "name": "punctuation.parenthesis.conditional.begin.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [{ "include": "#regexp-expression" }] }, "regexp-escape-catchall": { "match": "\\\\(.|\\n)", "name": "constant.character.escape.regexp" }, "regexp-escape-character": { "match": "(?x)\n\\\\ (\nx[0-9A-Fa-f]{2}\n| 0[0-7]{1,2}\n| [0-7]{3}\n)\n", "name": "constant.character.escape.regexp" }, "regexp-escape-sequence": { "patterns": [{ "include": "#regexp-escape-special" }, { "include": "#regexp-escape-character" }, { "include": "#regexp-escape-unicode" }, { "include": "#regexp-backreference-number" }, { "include": "#regexp-escape-catchall" }] }, "regexp-escape-special": { "match": "\\\\([AbBdDsSwWZ])", "name": "support.other.escape.special.regexp" }, "regexp-escape-unicode": { "match": "(?x)\n\\\\ (\nu[0-9A-Fa-f]{4}\n| U[0-9A-Fa-f]{8}\n)\n", "name": "constant.character.unicode.regexp" }, "regexp-expression": { "patterns": [{ "include": "#regexp-base-expression" }, { "include": "#regexp-character-set" }, { "include": "#regexp-comments" }, { "include": "#regexp-flags" }, { "include": "#regexp-named-group" }, { "include": "#regexp-backreference" }, { "include": "#regexp-lookahead" }, { "include": "#regexp-lookahead-negative" }, { "include": "#regexp-lookbehind" }, { "include": "#regexp-lookbehind-negative" }, { "include": "#regexp-conditional" }, { "include": "#regexp-parentheses-non-capturing" }, { "include": "#regexp-parentheses" }] }, "regexp-flags": { "match": "\\(\\?[aiLmsux]+\\)", "name": "storage.modifier.flag.regexp" }, "regexp-lookahead": { "begin": "(\\()\\?=", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [{ "include": "#regexp-expression" }] }, "regexp-lookahead-negative": { "begin": "(\\()\\?!", "beginCaptures": { "0": { "name": "keyword.operator.lookahead.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookahead.begin.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [{ "include": "#regexp-expression" }] }, "regexp-lookbehind": { "begin": "(\\()\\?<=", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [{ "include": "#regexp-expression" }] }, "regexp-lookbehind-negative": { "begin": "(\\()\\?<!", "beginCaptures": { "0": { "name": "keyword.operator.lookbehind.negative.regexp" }, "1": { "name": "punctuation.parenthesis.lookbehind.begin.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [{ "include": "#regexp-expression" }] }, "regexp-named-group": { "begin": "(?x)\n(\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n", "beginCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp" }, "2": { "name": "entity.name.tag.named.group.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "name": "meta.named.regexp", "patterns": [{ "include": "#regexp-expression" }] }, "regexp-parentheses": { "begin": "\\(", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [{ "include": "#regexp-expression" }] }, "regexp-parentheses-non-capturing": { "begin": "\\(\\?:", "beginCaptures": { "0": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp" } }, "end": "(\\))", "endCaptures": { "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, "patterns": [{ "include": "#regexp-expression" }] }, "regexp-quantifier": { "match": "(?x)\n\\{(\n\\d+ | \\d+,(\\d+)? | ,\\d+\n)\\}\n", "name": "keyword.operator.quantifier.regexp" } }, "scopeName": "source.regexp.python", "aliases": ["regex"] });
|
|
2
|
+
var regexp = [
|
|
3
|
+
lang
|
|
4
|
+
];
|
|
5
|
+
|
|
6
|
+
export { regexp as default };
|
package/dist/langs/typespec.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({ "displayName": "TypeSpec", "fileTypes": ["tsp"], "name": "typespec", "patterns": [{ "include": "#statement" }], "repository": { "alias-statement": { "begin": "\\b(alias)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.alias-statement.typespec", "patterns": [{ "include": "#type-parameters" }, { "include": "#operator-assignment" }, { "include": "#expression" }] }, "augment-decorator-statement": { "begin": "((@@)\\b[_$[:alpha:]]([_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)", "beginCaptures": { "1": { "name": "entity.name.tag.tsp" }, "2": { "name": "entity.name.tag.tsp" } }, "end": "(?=[_$[:alpha:]])|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.augment-decorator-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#parenthesized-expression" }] }, "block-comment": { "begin": "/\\*", "end": "\\*/", "name": "comment.block.tsp" }, "boolean-literal": { "match": "\\b(true|false)\\b", "name": "constant.language.tsp" }, "decorator": { "begin": "((@)\\b[_$[:alpha:]]([_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)", "beginCaptures": { "1": { "name": "entity.name.tag.tsp" }, "2": { "name": "entity.name.tag.tsp" } }, "end": "(?=[_$[:alpha:]])|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.decorator.typespec", "patterns": [{ "include": "#token" }, { "include": "#parenthesized-expression" }] }, "decorator-declaration-statement": { "begin": "(?:(extern)\\s+)?\\b(dec)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "keyword.other.tsp" }, "3": { "name": "entity.name.function.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.decorator-declaration-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#operation-parameters" }] }, "directive": { "begin": "\\s*(#\\b[_$[:alpha:]][_$[:alnum:]]*\\b)", "beginCaptures": { "1": { "name": "keyword.directive.name.tsp" } }, "end": "$|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.directive.typespec", "patterns": [{ "include": "#string-literal" }, { "include": "#identifier-expression" }] }, "doc-comment": { "begin": "/\\*\\*", "beginCaptures": { "0": { "name": "comment.block.tsp" } }, "end": "\\*/", "endCaptures": { "0": { "name": "comment.block.tsp" } }, "name": "comment.block.tsp", "patterns": [{ "include": "#doc-comment-block" }] }, "doc-comment-block": { "patterns": [{ "include": "#doc-comment-param" }, { "include": "#doc-comment-return-tag" }, { "include": "#doc-comment-unknown-tag" }] }, "doc-comment-param": { "captures": { "1": { "name": "keyword.tag.tspdoc" }, "2": { "name": "keyword.tag.tspdoc" }, "3": { "name": "variable.name.tsp" } }, "match": "(?x)((@)(?:param|template))\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\b", "name": "comment.block.tsp" }, "doc-comment-return-tag": { "captures": { "1": { "name": "keyword.tag.tspdoc" }, "2": { "name": "keyword.tag.tspdoc" } }, "match": "(?x)((@)(?:returns))\\b", "name": "comment.block.tsp" }, "doc-comment-unknown-tag": { "captures": { "1": { "name": "entity.name.tag.tsp" }, "2": { "name": "entity.name.tag.tsp" } }, "match": "(?x)((@)(?:\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`))\\b", "name": "comment.block.tsp" }, "else-expression": { "begin": "\\b(else)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.else-expression.typespec", "patterns": [{ "include": "#projection-expression" }, { "include": "#projection-body" }] }, "else-if-expression": { "begin": "\\b(else)\\s+(if)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.else-if-expression.typespec", "patterns": [{ "include": "#projection-expression" }, { "include": "#projection-body" }] }, "enum-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.enum-body.typespec", "patterns": [{ "include": "#enum-member" }, { "include": "#token" }, { "include": "#directive" }, { "include": "#decorator" }, { "include": "#punctuation-comma" }] }, "enum-member": { "begin": "(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:?))", "beginCaptures": { "1": { "name": "variable.name.tsp" }, "2": { "name": "keyword.operator.type.annotation.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.enum-member.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-annotation" }] }, "enum-statement": { "begin": "\\b(enum)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.type.tsp" } }, "end": "(?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.enum-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#enum-body" }] }, "escape-character": { "match": "\\\\.", "name": "constant.character.escape.tsp" }, "expression": { "patterns": [{ "include": "#token" }, { "include": "#directive" }, { "include": "#parenthesized-expression" }, { "include": "#valueof" }, { "include": "#type-arguments" }, { "include": "#tuple-expression" }, { "include": "#model-expression" }, { "include": "#identifier-expression" }] }, "function-call": { "begin": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.tsp" }, "2": { "name": "punctuation.parenthesis.open.tsp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.tsp" } }, "name": "meta.function-call.typespec", "patterns": [{ "include": "#expression" }] }, "function-declaration-statement": { "begin": "(?:(extern)\\s+)?\\b(fn)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "keyword.other.tsp" }, "3": { "name": "entity.name.function.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.function-declaration-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#operation-parameters" }, { "include": "#type-annotation" }] }, "identifier-expression": { "match": "\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`", "name": "entity.name.type.tsp" }, "if-expression": { "begin": "\\b(if)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.if-expression.typespec", "patterns": [{ "include": "#projection-expression" }, { "include": "#projection-body" }] }, "import-statement": { "begin": "\\b(import)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.import-statement.typespec", "patterns": [{ "include": "#token" }] }, "interface-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.interface-body.typespec", "patterns": [{ "include": "#token" }, { "include": "#directive" }, { "include": "#decorator" }, { "include": "#interface-member" }, { "include": "#punctuation-semicolon" }] }, "interface-heritage": { "begin": "\\b(extends)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?=\\{)|(?=;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.interface-heritage.typespec", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "interface-member": { "begin": "(?:\\b(op)\\b\\s+)?(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.function.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.interface-member.typespec", "patterns": [{ "include": "#token" }, { "include": "#operation-signature" }] }, "interface-statement": { "begin": "\\b(interface)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.interface-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-parameters" }, { "include": "#interface-heritage" }, { "include": "#interface-body" }, { "include": "#expression" }] }, "line-comment": { "match": "//.*$", "name": "comment.line.double-slash.tsp" }, "model-expression": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.model-expression.typespec", "patterns": [{ "include": "#model-property" }, { "include": "#token" }, { "include": "#directive" }, { "include": "#decorator" }, { "include": "#spread-operator" }, { "include": "#punctuation-semicolon" }] }, "model-heritage": { "begin": "\\b(extends|is)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?=\\{)|(?=;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.model-heritage.typespec", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "model-property": { "begin": '(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)|(\\"(?:[^\\"\\\\]|\\\\.)*\\"))', "beginCaptures": { "1": { "name": "variable.name.tsp" }, "2": { "name": "string.quoted.double.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.model-property.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-annotation" }, { "include": "#operator-assignment" }, { "include": "#expression" }] }, "model-statement": { "begin": "\\b(model)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.model-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-parameters" }, { "include": "#model-heritage" }, { "include": "#expression" }] }, "namespace-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.namespace-body.typespec", "patterns": [{ "include": "#statement" }] }, "namespace-name": { "begin": "(?=[_$[:alpha:]])", "end": "((?=\\{)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.namespace-name.typespec", "patterns": [{ "include": "#identifier-expression" }, { "include": "#punctuation-accessor" }] }, "namespace-statement": { "begin": "\\b(namespace)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.namespace-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#namespace-name" }, { "include": "#namespace-body" }] }, "numeric-literal": { "match": "(?:\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)|\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)|(?<!\\$)(?:(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)(n)?\\B)|(?:\\B(\\.)[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)))(?!\\$))", "name": "constant.numeric.tsp" }, "operation-heritage": { "begin": "\\b(is)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.operation-heritage.typespec", "patterns": [{ "include": "#expression" }] }, "operation-parameters": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.tsp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.tsp" } }, "name": "meta.operation-parameters.typespec", "patterns": [{ "include": "#token" }, { "include": "#decorator" }, { "include": "#model-property" }, { "include": "#spread-operator" }, { "include": "#punctuation-comma" }] }, "operation-signature": { "patterns": [{ "include": "#type-parameters" }, { "include": "#operation-heritage" }, { "include": "#operation-parameters" }, { "include": "#type-annotation" }] }, "operation-statement": { "begin": "\\b(op)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.function.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.operation-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#operation-signature" }] }, "operator-assignment": { "match": "=", "name": "keyword.operator.assignment.tsp" }, "parenthesized-expression": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.tsp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.tsp" } }, "name": "meta.parenthesized-expression.typespec", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "projection": { "begin": "(from|to)", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.projection.typespec", "patterns": [{ "include": "#projection-parameters" }, { "include": "#projection-body" }] }, "projection-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.projection-body.typespec", "patterns": [{ "include": "#projection-expression" }, { "include": "#punctuation-semicolon" }] }, "projection-expression": { "patterns": [{ "include": "#else-if-expression" }, { "include": "#if-expression" }, { "include": "#else-expression" }, { "include": "#function-call" }] }, "projection-parameter": { "begin": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "variable.name.tsp" } }, "end": "(?=\\))|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.projection-parameter.typespec", "patterns": [] }, "projection-parameters": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.tsp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.tsp" } }, "name": "meta.projection-parameters.typespec", "patterns": [{ "include": "#token" }, { "include": "#projection-parameter" }] }, "projection-statement": { "begin": "\\b(projection)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)(#)(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "keyword.other.tsp" }, "3": { "name": "keyword.operator.selector.tsp" }, "4": { "name": "variable.name.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.projection-statement.typespec", "patterns": [{ "include": "#projection-statement-body" }] }, "projection-statement-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.projection-statement-body.typespec", "patterns": [{ "include": "#projection" }] }, "punctuation-accessor": { "match": "\\.", "name": "punctuation.accessor.tsp" }, "punctuation-comma": { "match": ",", "name": "punctuation.comma.tsp" }, "punctuation-semicolon": { "match": ";", "name": "punctuation.terminator.statement.tsp" }, "scalar-extends": { "begin": "\\b(extends)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.scalar-extends.typespec", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "scalar-statement": { "begin": "\\b(scalar)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.scalar-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-parameters" }, { "include": "#scalar-extends" }, { "include": "#expression" }] }, "spread-operator": { "begin": "\\.\\.\\.", "beginCaptures": { "0": { "name": "keyword.operator.spread.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.spread-operator.typespec", "patterns": [{ "include": "#expression" }] }, "statement": { "patterns": [{ "include": "#token" }, { "include": "#directive" }, { "include": "#augment-decorator-statement" }, { "include": "#decorator" }, { "include": "#model-statement" }, { "include": "#scalar-statement" }, { "include": "#union-statement" }, { "include": "#interface-statement" }, { "include": "#enum-statement" }, { "include": "#alias-statement" }, { "include": "#namespace-statement" }, { "include": "#operation-statement" }, { "include": "#import-statement" }, { "include": "#using-statement" }, { "include": "#decorator-declaration-statement" }, { "include": "#function-declaration-statement" }, { "include": "#projection-statement" }, { "include": "#punctuation-semicolon" }] }, "string-literal": { "begin": '"', "end": '"|$', "name": "string.quoted.double.tsp", "patterns": [{ "include": "#template-expression" }, { "include": "#escape-character" }] }, "template-expression": { "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.definition.template-expression.begin.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.template-expression.end.tsp" } }, "name": "meta.template-expression.typespec", "patterns": [{ "include": "#expression" }] }, "token": { "patterns": [{ "include": "#doc-comment" }, { "include": "#line-comment" }, { "include": "#block-comment" }, { "include": "#triple-quoted-string-literal" }, { "include": "#string-literal" }, { "include": "#boolean-literal" }, { "include": "#numeric-literal" }] }, "triple-quoted-string-literal": { "begin": '"""', "end": '"""', "name": "string.quoted.triple.tsp", "patterns": [{ "include": "#template-expression" }, { "include": "#escape-character" }] }, "tuple-expression": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.squarebracket.open.tsp" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.squarebracket.close.tsp" } }, "name": "meta.tuple-expression.typespec", "patterns": [{ "include": "#expression" }] }, "type-annotation": { "begin": "\\s*(\\??)\\s*(:)", "beginCaptures": { "1": { "name": "keyword.operator.optional.tsp" }, "2": { "name": "keyword.operator.type.annotation.tsp" } }, "end": "(?=,|;|@|\\)|\\}|=|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.type-annotation.typespec", "patterns": [{ "include": "#expression" }] }, "type-arguments": { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.tsp" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.tsp" } }, "name": "meta.type-arguments.typespec", "patterns": [{ "include": "#identifier-expression" }, { "include": "#operator-assignment" }, { "include": "#expression" }, { "include": "#punctuation-comma" }] }, "type-parameter": { "begin": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "entity.name.type.tsp" } }, "end": "(?=>)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.type-parameter.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-parameter-constraint" }, { "include": "#type-parameter-default" }] }, "type-parameter-constraint": { "begin": "extends", "beginCaptures": { "0": { "name": "keyword.other.tsp" } }, "end": "(?=>)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.type-parameter-constraint.typespec", "patterns": [{ "include": "#expression" }] }, "type-parameter-default": { "begin": "=", "beginCaptures": { "0": { "name": "keyword.operator.assignment.tsp" } }, "end": "(?=>)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.type-parameter-default.typespec", "patterns": [{ "include": "#expression" }] }, "type-parameters": { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.tsp" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.tsp" } }, "name": "meta.type-parameters.typespec", "patterns": [{ "include": "#type-parameter" }, { "include": "#punctuation-comma" }] }, "union-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.union-body.typespec", "patterns": [{ "include": "#union-variant" }, { "include": "#token" }, { "include": "#directive" }, { "include": "#decorator" }, { "include": "#expression" }, { "include": "#punctuation-comma" }] }, "union-statement": { "begin": "\\b(union)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.type.tsp" } }, "end": "(?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.union-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#union-body" }] }, "union-variant": { "begin": "(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:))", "beginCaptures": { "1": { "name": "variable.name.tsp" }, "2": { "name": "keyword.operator.type.annotation.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.union-variant.typespec", "patterns": [{ "include": "#token" }, { "include": "#expression" }] }, "using-statement": { "begin": "\\b(using)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.using-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#identifier-expression" }] }, "valueof": { "begin": "\\b(valueof)", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=>)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.valueof.typespec", "patterns": [{ "include": "#expression" }] } }, "scopeName": "source.tsp", "aliases": ["tsp"] });
|
|
1
|
+
const lang = Object.freeze({ "displayName": "TypeSpec", "fileTypes": ["tsp"], "name": "typespec", "patterns": [{ "include": "#statement" }], "repository": { "alias-id": { "begin": "(=)\\s*", "beginCaptures": { "1": { "name": "keyword.operator.assignment.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.alias-id.typespec", "patterns": [{ "include": "#expression" }] }, "alias-statement": { "begin": "\\b(alias)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.type.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.alias-statement.typespec", "patterns": [{ "include": "#alias-id" }, { "include": "#type-parameters" }] }, "augment-decorator-statement": { "begin": "((@@)\\b[_$[:alpha:]](?:[_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)", "beginCaptures": { "1": { "name": "entity.name.tag.tsp" }, "2": { "name": "entity.name.tag.tsp" } }, "end": "(?=[_$[:alpha:]])|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.augment-decorator-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#parenthesized-expression" }] }, "block-comment": { "begin": "/\\*", "end": "\\*/", "name": "comment.block.tsp" }, "boolean-literal": { "match": "\\b(true|false)\\b", "name": "constant.language.tsp" }, "callExpression": { "begin": "(\\b[_$[:alpha:]](?:[_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.tsp" }, "2": { "name": "punctuation.parenthesis.open.tsp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.tsp" } }, "name": "meta.callExpression.typespec", "patterns": [{ "include": "#token" }, { "include": "#expression" }, { "include": "#punctuation-comma" }] }, "const-statement": { "begin": "\\b(const)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "variable.name.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.const-statement.typespec", "patterns": [{ "include": "#type-annotation" }, { "include": "#operator-assignment" }, { "include": "#expression" }] }, "decorator": { "begin": "((@)\\b[_$[:alpha:]](?:[_$[:alnum:]]|\\.[_$[:alpha:]])*\\b)", "beginCaptures": { "1": { "name": "entity.name.tag.tsp" }, "2": { "name": "entity.name.tag.tsp" } }, "end": "(?=[_$[:alpha:]])|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.decorator.typespec", "patterns": [{ "include": "#token" }, { "include": "#parenthesized-expression" }] }, "decorator-declaration-statement": { "begin": "(?:(extern)\\s+)?\\b(dec)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "keyword.other.tsp" }, "3": { "name": "entity.name.function.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.decorator-declaration-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#operation-parameters" }] }, "directive": { "begin": "\\s*(#\\b[_$[:alpha:]][_$[:alnum:]]*\\b)", "beginCaptures": { "1": { "name": "keyword.directive.name.tsp" } }, "end": "$|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.directive.typespec", "patterns": [{ "include": "#string-literal" }, { "include": "#identifier-expression" }] }, "doc-comment": { "begin": "/\\*\\*", "beginCaptures": { "0": { "name": "comment.block.tsp" } }, "end": "\\*/", "endCaptures": { "0": { "name": "comment.block.tsp" } }, "name": "comment.block.tsp", "patterns": [{ "include": "#doc-comment-block" }] }, "doc-comment-block": { "patterns": [{ "include": "#doc-comment-param" }, { "include": "#doc-comment-return-tag" }, { "include": "#doc-comment-unknown-tag" }] }, "doc-comment-param": { "captures": { "1": { "name": "keyword.tag.tspdoc" }, "2": { "name": "keyword.tag.tspdoc" }, "3": { "name": "variable.name.tsp" } }, "match": "(?x)((@)(?:param|template))\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\b", "name": "comment.block.tsp" }, "doc-comment-return-tag": { "captures": { "1": { "name": "keyword.tag.tspdoc" }, "2": { "name": "keyword.tag.tspdoc" } }, "match": "(?x)((@)(?:returns))\\b", "name": "comment.block.tsp" }, "doc-comment-unknown-tag": { "captures": { "1": { "name": "entity.name.tag.tsp" }, "2": { "name": "entity.name.tag.tsp" } }, "match": "(?x)((@)(?:\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`))\\b", "name": "comment.block.tsp" }, "else-expression": { "begin": "\\b(else)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.else-expression.typespec", "patterns": [{ "include": "#projection-expression" }, { "include": "#projection-body" }] }, "else-if-expression": { "begin": "\\b(else)\\s+(if)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.else-if-expression.typespec", "patterns": [{ "include": "#projection-expression" }, { "include": "#projection-body" }] }, "enum-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.enum-body.typespec", "patterns": [{ "include": "#enum-member" }, { "include": "#token" }, { "include": "#directive" }, { "include": "#decorator" }, { "include": "#punctuation-comma" }] }, "enum-member": { "begin": "(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:?))", "beginCaptures": { "1": { "name": "variable.name.tsp" }, "2": { "name": "keyword.operator.type.annotation.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.enum-member.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-annotation" }] }, "enum-statement": { "begin": "\\b(enum)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.type.tsp" } }, "end": "(?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.enum-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#enum-body" }] }, "escape-character": { "match": "\\\\.", "name": "constant.character.escape.tsp" }, "expression": { "patterns": [{ "include": "#token" }, { "include": "#directive" }, { "include": "#parenthesized-expression" }, { "include": "#valueof" }, { "include": "#typeof" }, { "include": "#type-arguments" }, { "include": "#object-literal" }, { "include": "#tuple-literal" }, { "include": "#tuple-expression" }, { "include": "#model-expression" }, { "include": "#callExpression" }, { "include": "#identifier-expression" }] }, "function-call": { "begin": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.tsp" }, "2": { "name": "punctuation.parenthesis.open.tsp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.tsp" } }, "name": "meta.function-call.typespec", "patterns": [{ "include": "#expression" }] }, "function-declaration-statement": { "begin": "(?:(extern)\\s+)?\\b(fn)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "keyword.other.tsp" }, "3": { "name": "entity.name.function.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.function-declaration-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#operation-parameters" }, { "include": "#type-annotation" }] }, "identifier-expression": { "match": "\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`", "name": "entity.name.type.tsp" }, "if-expression": { "begin": "\\b(if)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.if-expression.typespec", "patterns": [{ "include": "#projection-expression" }, { "include": "#projection-body" }] }, "import-statement": { "begin": "\\b(import)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.import-statement.typespec", "patterns": [{ "include": "#token" }] }, "interface-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.interface-body.typespec", "patterns": [{ "include": "#token" }, { "include": "#directive" }, { "include": "#decorator" }, { "include": "#interface-member" }, { "include": "#punctuation-semicolon" }] }, "interface-heritage": { "begin": "\\b(extends)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?=\\{)|(?=;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.interface-heritage.typespec", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "interface-member": { "begin": "(?:\\b(op)\\b\\s+)?(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.function.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.interface-member.typespec", "patterns": [{ "include": "#token" }, { "include": "#operation-signature" }] }, "interface-statement": { "begin": "\\b(interface)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.interface-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-parameters" }, { "include": "#interface-heritage" }, { "include": "#interface-body" }, { "include": "#expression" }] }, "line-comment": { "match": "//.*$", "name": "comment.line.double-slash.tsp" }, "model-expression": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.model-expression.typespec", "patterns": [{ "include": "#model-property" }, { "include": "#token" }, { "include": "#directive" }, { "include": "#decorator" }, { "include": "#spread-operator" }, { "include": "#punctuation-semicolon" }] }, "model-heritage": { "begin": "\\b(extends|is)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?=\\{)|(?=;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.model-heritage.typespec", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "model-property": { "begin": '(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)|(\\"(?:[^\\"\\\\]|\\\\.)*\\"))', "beginCaptures": { "1": { "name": "variable.name.tsp" }, "2": { "name": "string.quoted.double.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.model-property.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-annotation" }, { "include": "#operator-assignment" }, { "include": "#expression" }] }, "model-statement": { "begin": "\\b(model)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.model-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-parameters" }, { "include": "#model-heritage" }, { "include": "#expression" }] }, "namespace-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.namespace-body.typespec", "patterns": [{ "include": "#statement" }] }, "namespace-name": { "begin": "(?=[_$[:alpha:]])", "end": "((?=\\{)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.namespace-name.typespec", "patterns": [{ "include": "#identifier-expression" }, { "include": "#punctuation-accessor" }] }, "namespace-statement": { "begin": "\\b(namespace)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.namespace-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#namespace-name" }, { "include": "#namespace-body" }] }, "numeric-literal": { "match": "(?:\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)|\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)|(?<!\\$)(?:(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(\\.)(n)?\\B)|(?:\\B(\\.)[0-9][0-9_]*(n)?\\b)|(?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)))(?!\\$))", "name": "constant.numeric.tsp" }, "object-literal": { "begin": "#\\{", "beginCaptures": { "0": { "name": "punctuation.hashcurlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.object-literal.typespec", "patterns": [{ "include": "#token" }, { "include": "#object-literal-property" }, { "include": "#directive" }, { "include": "#spread-operator" }, { "include": "#punctuation-comma" }] }, "object-literal-property": { "begin": "(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:))", "beginCaptures": { "1": { "name": "variable.name.tsp" }, "2": { "name": "keyword.operator.type.annotation.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.object-literal-property.typespec", "patterns": [{ "include": "#token" }, { "include": "#expression" }] }, "operation-heritage": { "begin": "\\b(is)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.operation-heritage.typespec", "patterns": [{ "include": "#expression" }] }, "operation-parameters": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.tsp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.tsp" } }, "name": "meta.operation-parameters.typespec", "patterns": [{ "include": "#token" }, { "include": "#decorator" }, { "include": "#model-property" }, { "include": "#spread-operator" }, { "include": "#punctuation-comma" }] }, "operation-signature": { "patterns": [{ "include": "#type-parameters" }, { "include": "#operation-heritage" }, { "include": "#operation-parameters" }, { "include": "#type-annotation" }] }, "operation-statement": { "begin": "\\b(op)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.function.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.operation-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#operation-signature" }] }, "operator-assignment": { "match": "=", "name": "keyword.operator.assignment.tsp" }, "parenthesized-expression": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.tsp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.tsp" } }, "name": "meta.parenthesized-expression.typespec", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "projection": { "begin": "(from|to)", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.projection.typespec", "patterns": [{ "include": "#projection-parameters" }, { "include": "#projection-body" }] }, "projection-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.projection-body.typespec", "patterns": [{ "include": "#projection-expression" }, { "include": "#punctuation-semicolon" }] }, "projection-expression": { "patterns": [{ "include": "#else-if-expression" }, { "include": "#if-expression" }, { "include": "#else-expression" }, { "include": "#function-call" }] }, "projection-parameter": { "begin": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "variable.name.tsp" } }, "end": "(?=\\))|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.projection-parameter.typespec", "patterns": [] }, "projection-parameters": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.parenthesis.open.tsp" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.parenthesis.close.tsp" } }, "name": "meta.projection-parameters.typespec", "patterns": [{ "include": "#token" }, { "include": "#projection-parameter" }] }, "projection-statement": { "begin": "\\b(projection)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)(#)(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "keyword.other.tsp" }, "3": { "name": "keyword.operator.selector.tsp" }, "4": { "name": "variable.name.tsp" } }, "end": "((?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b))", "name": "meta.projection-statement.typespec", "patterns": [{ "include": "#projection-statement-body" }] }, "projection-statement-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.projection-statement-body.typespec", "patterns": [{ "include": "#projection" }] }, "punctuation-accessor": { "match": "\\.", "name": "punctuation.accessor.tsp" }, "punctuation-comma": { "match": ",", "name": "punctuation.comma.tsp" }, "punctuation-semicolon": { "match": ";", "name": "punctuation.terminator.statement.tsp" }, "scalar-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.scalar-body.typespec", "patterns": [{ "include": "#token" }, { "include": "#directive" }, { "include": "#scalar-constructor" }, { "include": "#punctuation-semicolon" }] }, "scalar-constructor": { "begin": "\\b(init)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.function.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.scalar-constructor.typespec", "patterns": [{ "include": "#token" }, { "include": "#operation-parameters" }] }, "scalar-extends": { "begin": "\\b(extends)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.scalar-extends.typespec", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "scalar-statement": { "begin": "\\b(scalar)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.type.tsp" } }, "end": "(?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.scalar-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-parameters" }, { "include": "#scalar-extends" }, { "include": "#scalar-body" }] }, "spread-operator": { "begin": "\\.\\.\\.", "beginCaptures": { "0": { "name": "keyword.operator.spread.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.spread-operator.typespec", "patterns": [{ "include": "#expression" }] }, "statement": { "patterns": [{ "include": "#token" }, { "include": "#directive" }, { "include": "#augment-decorator-statement" }, { "include": "#decorator" }, { "include": "#model-statement" }, { "include": "#scalar-statement" }, { "include": "#union-statement" }, { "include": "#interface-statement" }, { "include": "#enum-statement" }, { "include": "#alias-statement" }, { "include": "#const-statement" }, { "include": "#namespace-statement" }, { "include": "#operation-statement" }, { "include": "#import-statement" }, { "include": "#using-statement" }, { "include": "#decorator-declaration-statement" }, { "include": "#function-declaration-statement" }, { "include": "#projection-statement" }, { "include": "#punctuation-semicolon" }] }, "string-literal": { "begin": '"', "end": '"|$', "name": "string.quoted.double.tsp", "patterns": [{ "include": "#template-expression" }, { "include": "#escape-character" }] }, "template-expression": { "begin": "\\$\\{", "beginCaptures": { "0": { "name": "punctuation.definition.template-expression.begin.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.template-expression.end.tsp" } }, "name": "meta.template-expression.typespec", "patterns": [{ "include": "#expression" }] }, "token": { "patterns": [{ "include": "#doc-comment" }, { "include": "#line-comment" }, { "include": "#block-comment" }, { "include": "#triple-quoted-string-literal" }, { "include": "#string-literal" }, { "include": "#boolean-literal" }, { "include": "#numeric-literal" }] }, "triple-quoted-string-literal": { "begin": '"""', "end": '"""', "name": "string.quoted.triple.tsp", "patterns": [{ "include": "#template-expression" }, { "include": "#escape-character" }] }, "tuple-expression": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.squarebracket.open.tsp" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.squarebracket.close.tsp" } }, "name": "meta.tuple-expression.typespec", "patterns": [{ "include": "#expression" }] }, "tuple-literal": { "begin": "#\\[", "beginCaptures": { "0": { "name": "punctuation.hashsquarebracket.open.tsp" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.squarebracket.close.tsp" } }, "name": "meta.tuple-literal.typespec", "patterns": [{ "include": "#expression" }, { "include": "#punctuation-comma" }] }, "type-annotation": { "begin": "\\s*(\\??)\\s*(:)", "beginCaptures": { "1": { "name": "keyword.operator.optional.tsp" }, "2": { "name": "keyword.operator.type.annotation.tsp" } }, "end": "(?=,|;|@|\\)|\\}|=|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.type-annotation.typespec", "patterns": [{ "include": "#expression" }] }, "type-argument": { "begin": "(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(=))", "beginCaptures": { "1": { "name": "entity.name.type.tsp" }, "2": { "name": "keyword.operator.assignment.tsp" } }, "end": "=", "endCaptures": { "0": { "name": "keyword.operator.assignment.tsp" } }, "name": "meta.type-argument.typespec", "patterns": [{ "include": "#token" }, { "include": "#expression" }, { "include": "#punctuation-comma" }] }, "type-arguments": { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.tsp" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.tsp" } }, "name": "meta.type-arguments.typespec", "patterns": [{ "include": "#type-argument" }, { "include": "#expression" }, { "include": "#punctuation-comma" }] }, "type-parameter": { "begin": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "entity.name.type.tsp" } }, "end": "(?=>)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.type-parameter.typespec", "patterns": [{ "include": "#token" }, { "include": "#type-parameter-constraint" }, { "include": "#type-parameter-default" }] }, "type-parameter-constraint": { "begin": "extends", "beginCaptures": { "0": { "name": "keyword.other.tsp" } }, "end": "(?=>)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.type-parameter-constraint.typespec", "patterns": [{ "include": "#expression" }] }, "type-parameter-default": { "begin": "=", "beginCaptures": { "0": { "name": "keyword.operator.assignment.tsp" } }, "end": "(?=>)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.type-parameter-default.typespec", "patterns": [{ "include": "#expression" }] }, "type-parameters": { "begin": "<", "beginCaptures": { "0": { "name": "punctuation.definition.typeparameters.begin.tsp" } }, "end": ">", "endCaptures": { "0": { "name": "punctuation.definition.typeparameters.end.tsp" } }, "name": "meta.type-parameters.typespec", "patterns": [{ "include": "#type-parameter" }, { "include": "#punctuation-comma" }] }, "typeof": { "begin": "\\b(typeof)", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=>)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.typeof.typespec", "patterns": [{ "include": "#expression" }] }, "union-body": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.curlybrace.open.tsp" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.curlybrace.close.tsp" } }, "name": "meta.union-body.typespec", "patterns": [{ "include": "#union-variant" }, { "include": "#token" }, { "include": "#directive" }, { "include": "#decorator" }, { "include": "#expression" }, { "include": "#punctuation-comma" }] }, "union-statement": { "begin": "\\b(union)\\b\\s+(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)", "beginCaptures": { "1": { "name": "keyword.other.tsp" }, "2": { "name": "entity.name.type.tsp" } }, "end": "(?<=\\})|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.union-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#union-body" }] }, "union-variant": { "begin": "(?:(\\b[_$[:alpha:]][_$[:alnum:]]*\\b|`(?:[^`\\\\]|\\\\.)*`)\\s*(:))", "beginCaptures": { "1": { "name": "variable.name.tsp" }, "2": { "name": "keyword.operator.type.annotation.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.union-variant.typespec", "patterns": [{ "include": "#token" }, { "include": "#expression" }] }, "using-statement": { "begin": "\\b(using)\\b", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.using-statement.typespec", "patterns": [{ "include": "#token" }, { "include": "#identifier-expression" }] }, "valueof": { "begin": "\\b(valueof)", "beginCaptures": { "1": { "name": "keyword.other.tsp" } }, "end": "(?=>)|(?=,|;|@|\\)|\\}|\\b(?:extern)\\b|\\b(?:namespace|model|op|using|import|enum|alias|union|interface|dec|fn)\\b)", "name": "meta.valueof.typespec", "patterns": [{ "include": "#expression" }] } }, "scopeName": "source.tsp", "aliases": ["tsp"] });
|
|
2
2
|
var typespec = [
|
|
3
3
|
lang
|
|
4
4
|
];
|
package/dist/langs/vue.mjs
CHANGED
|
@@ -10,6 +10,7 @@ import javascript from './javascript.mjs';
|
|
|
10
10
|
import typescript from './typescript.mjs';
|
|
11
11
|
import jsx from './jsx.mjs';
|
|
12
12
|
import tsx from './tsx.mjs';
|
|
13
|
+
import coffee from './coffee.mjs';
|
|
13
14
|
import json from './json.mjs';
|
|
14
15
|
import jsonc from './jsonc.mjs';
|
|
15
16
|
import json5 from './json5.mjs';
|
|
@@ -21,9 +22,8 @@ import markdown_vue from './markdown-vue.mjs';
|
|
|
21
22
|
import vue_directives from './vue-directives.mjs';
|
|
22
23
|
import vue_interpolations from './vue-interpolations.mjs';
|
|
23
24
|
import vue_sfc_style_variable_injection from './vue-sfc-style-variable-injection.mjs';
|
|
24
|
-
import './coffee.mjs';
|
|
25
25
|
|
|
26
|
-
const lang = Object.freeze({ "displayName": "Vue", "name": "vue", "patterns": [{ "include": "text.html.basic#comment" }, { "include": "#self-closing-tag" }, { "begin": "(<)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "patterns": [{ "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)md\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "text.html.markdown", "patterns": [{ "include": "text.html.markdown" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)html\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "text.html.derivative", "patterns": [{ "include": "#html-stuff" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)pug\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "text.pug", "patterns": [{ "include": "text.pug" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)stylus\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.stylus", "patterns": [{ "include": "source.stylus" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)postcss\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.postcss", "patterns": [{ "include": "source.postcss" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)sass\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.sass", "patterns": [{ "include": "source.sass" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)css\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.css", "patterns": [{ "include": "source.css" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)scss\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.css.scss", "patterns": [{ "include": "source.css.scss" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)less\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.css.less", "patterns": [{ "include": "source.css.less" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)js\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.js", "patterns": [{ "include": "source.js" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)ts\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.ts", "patterns": [{ "include": "source.ts" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)jsx\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.js.jsx", "patterns": [{ "include": "source.js.jsx" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)tsx\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.tsx", "patterns": [{ "include": "source.tsx" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)json\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.json", "patterns": [{ "include": "source.json" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)jsonc\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.json.comments", "patterns": [{ "include": "source.json.comments" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)json5\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.json5", "patterns": [{ "include": "source.json5" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)yaml\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.yaml", "patterns": [{ "include": "source.yaml" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)toml\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.toml", "patterns": [{ "include": "source.toml" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)(gql|graphql)\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.graphql", "patterns": [{ "include": "source.graphql" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)vue\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.vue", "patterns": [{ "include": "source.vue" }] }] }, { "begin": "(template)\\b", "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/template\\b)", "name": "text.html.derivative", "patterns": [{ "include": "#html-stuff" }] }] }, { "begin": "(script)\\b", "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/script\\b)", "name": "source.js", "patterns": [{ "include": "source.js" }] }] }, { "begin": "(style)\\b", "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/style\\b)", "name": "source.css", "patterns": [{ "include": "source.css" }] }] }, { "begin": "([a-zA-Z0-9:-]+)", "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "text" }] }] }], "repository": { "html-stuff": { "patterns": [{ "include": "#template-tag" }, { "include": "text.html.derivative" }, { "include": "text.html.basic" }] }, "self-closing-tag": { "begin": "(<)([a-zA-Z0-9:-]+)(?=([^>]+/>))", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "end": "(/>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "name": "self-closing-tag", "patterns": [{ "include": "#tag-stuff" }] }, "tag-stuff": { "begin": "\\G", "end": "(?=/>)|(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "name": "meta.tag-stuff", "patterns": [{ "include": "#vue-directives" }, { "include": "text.html.basic#attribute" }] }, "template-tag": { "patterns": [{ "include": "#template-tag-1" }, { "include": "#template-tag-2" }] }, "template-tag-1": { "begin": "(<)(template)\\b(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" }, "3": { "name": "punctuation.definition.tag.end.html.vue" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "name": "meta.template-tag.start", "patterns": [{ "begin": "\\G", "end": "(?=/>)|((</)(template)\\b)", "endCaptures": { "2": { "name": "punctuation.definition.tag.begin.html.vue" }, "3": { "name": "entity.name.tag.$3.html.vue" } }, "name": "meta.template-tag.end", "patterns": [{ "include": "#html-stuff" }] }] }, "template-tag-2": { "begin": "(<)(template)\\b", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "name": "meta.template-tag.start", "patterns": [{ "begin": "\\G", "end": "(?=/>)|((</)(template)\\b)", "endCaptures": { "2": { "name": "punctuation.definition.tag.begin.html.vue" }, "3": { "name": "entity.name.tag.$3.html.vue" } }, "name": "meta.template-tag.end", "patterns": [{ "include": "#tag-stuff" }, { "include": "#html-stuff" }] }] }, "vue-directives": { "patterns": [{ "include": "#vue-directives-control" }, { "include": "#vue-directives-style-attr" }, { "include": "#vue-directives-original" }, { "include": "#vue-directives-generic-attr" }] }, "vue-directives-control": { "begin": "(v-for)|(v-if|v-else-if|v-else)", "captures": { "1": { "name": "keyword.control.loop.vue" }, "2": { "name": "keyword.control.conditional.vue" } }, "end": "(?=\\s*+[^=\\s])", "name": "meta.attribute.directive.control.vue", "patterns": [{ "include": "#vue-directives-expression" }] }, "vue-directives-expression": { "patterns": [{ "begin": "(=)\\s*('|\"|`)", "beginCaptures": { "1": { "name": "punctuation.separator.key-value.html.vue" }, "2": { "name": "punctuation.definition.string.begin.html.vue" } }, "end": "(\\2)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.html.vue" } }, "patterns": [{ "begin": "(?<=('|\"|`))", "end": "(?=\\1)", "name": "source.ts.embedded.html.vue", "patterns": [{ "include": "source.ts" }] }] }, { "begin": "(=)\\s*(?=[^'\"`])", "beginCaptures": { "1": { "name": "punctuation.separator.key-value.html.vue" } }, "end": "(?=(\\s|>|\\/>))", "patterns": [{ "begin": "(?=[^'\"`])", "end": "(?=(\\s|>|\\/>))", "name": "source.ts.embedded.html.vue", "patterns": [{ "include": "source.ts" }] }] }] }, "vue-directives-generic-attr": { "begin": "\\b(generic)\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.html.vue" }, "2": { "name": "punctuation.separator.key-value.html.vue" } }, "end": `(?<='|")`, "name": "meta.attribute.generic.vue", "patterns": [{ "begin": `('|")`, "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.html.vue" } }, "comment": "https://github.com/microsoft/vscode/blob/fd4346210f59135fad81a8b8c4cea7bf5a9ca6b4/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json#L4002-L4020", "end": "(\\1)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.html.vue" } }, "name": "meta.type.parameters.vue", "patterns": [{ "include": "source.ts#comment" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "name": "storage.modifier.ts" }, { "include": "source.ts#type" }, { "include": "source.ts#punctuation-comma" }, { "match": "(=)(?!>)", "name": "keyword.operator.assignment.ts" }] }] }, "vue-directives-original": { "begin": "(?:\\b(v-)|([:\\.])|(@)|(#))(\\[?)([\\w\\-]*)(\\]?)(?:\\.([\\w\\-]*))*", "beginCaptures": { "1": { "name": "entity.other.attribute-name.html.vue" }, "2": { "name": "punctuation.attribute-shorthand.bind.html.vue" }, "3": { "name": "punctuation.attribute-shorthand.event.html.vue" }, "4": { "name": "punctuation.attribute-shorthand.slot.html.vue" }, "5": { "name": "punctuation.separator.key-value.html.vue" }, "6": { "name": "entity.other.attribute-name.html.vue" }, "7": { "name": "punctuation.separator.key-value.html.vue" }, "8": { "name": "entity.other.attribute-name.html.vue" }, "9": { "name": "punctuation.separator.key-value.html.vue" } }, "end": "(?=\\s*+[^=\\s])", "endCaptures": { "1": { "name": "punctuation.definition.string.end.html.vue" } }, "name": "meta.attribute.directive.vue", "patterns": [{ "include": "#vue-directives-expression" }] }, "vue-directives-style-attr": { "begin": "\\b(style)\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.html.vue" }, "2": { "name": "punctuation.separator.key-value.html.vue" } }, "end": `(?<='|")`, "name": "meta.attribute.style.vue", "patterns": [{ "begin": `('|")`, "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.html.vue" } }, "comment": "Copy from source.css#rule-list-innards", "end": "(\\1)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.html.vue" } }, "name": "source.css.embedded.html.vue", "patterns": [{ "include": "source.css#comment-block" }, { "include": "source.css#escapes" }, { "include": "source.css#font-features" }, { "match": "(?x) (?<![\\w-])\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F])\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F]\n|\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*", "name": "variable.css" }, { "begin": "(?<![-a-zA-Z])(?=[-a-zA-Z])", "end": "$|(?![-a-zA-Z])", "name": "meta.property-name.css", "patterns": [{ "include": "source.css#property-names" }] }, { "begin": "(:)\\s*", "beginCaptures": { "1": { "name": "punctuation.separator.key-value.css" } }, "comment": "Modify end to fix #199. TODO: handle ' character.", "contentName": "meta.property-value.css", "end": `\\s*(;)|\\s*(?='|")`, "endCaptures": { "1": { "name": "punctuation.terminator.rule.css" } }, "patterns": [{ "include": "source.css#comment-block" }, { "include": "source.css#property-values" }] }, { "match": ";", "name": "punctuation.terminator.rule.css" }] }] }, "vue-interpolations": { "patterns": [{ "begin": "(\\{\\{)", "beginCaptures": { "1": { "name": "punctuation.definition.interpolation.begin.html.vue" } }, "end": "(\\}\\})", "endCaptures": { "1": { "name": "punctuation.definition.interpolation.end.html.vue" } }, "name": "expression.embedded.vue", "patterns": [{ "begin": "\\G", "end": "(?=\\}\\})", "name": "source.ts.embedded.html.vue", "patterns": [{ "include": "source.ts" }] }] }] } }, "scopeName": "source.vue", "embeddedLangs": ["html", "markdown", "pug", "stylus", "sass", "css", "scss", "less", "javascript", "typescript", "jsx", "tsx", "json", "jsonc", "json5", "yaml", "toml", "graphql", "html-derivative", "markdown-vue", "vue-directives", "vue-interpolations", "vue-sfc-style-variable-injection"] });
|
|
26
|
+
const lang = Object.freeze({ "displayName": "Vue", "name": "vue", "patterns": [{ "include": "text.html.basic#comment" }, { "include": "#self-closing-tag" }, { "begin": "(<)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" } }, "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "patterns": [{ "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)md\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "text.html.markdown", "patterns": [{ "include": "text.html.markdown" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)html\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "text.html.derivative", "patterns": [{ "include": "#html-stuff" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)pug\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "text.pug", "patterns": [{ "include": "text.pug" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)stylus\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.stylus", "patterns": [{ "include": "source.stylus" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)postcss\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.postcss", "patterns": [{ "include": "source.postcss" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)sass\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.sass", "patterns": [{ "include": "source.sass" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)css\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.css", "patterns": [{ "include": "source.css" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)scss\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.css.scss", "patterns": [{ "include": "source.css.scss" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)less\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.css.less", "patterns": [{ "include": "source.css.less" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)js\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.js", "patterns": [{ "include": "source.js" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)ts\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.ts", "patterns": [{ "include": "source.ts" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)jsx\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.js.jsx", "patterns": [{ "include": "source.js.jsx" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)tsx\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.tsx", "patterns": [{ "include": "source.tsx" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)coffee\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.coffee", "patterns": [{ "include": "source.coffee" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)json\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.json", "patterns": [{ "include": "source.json" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)jsonc\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.json.comments", "patterns": [{ "include": "source.json.comments" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)json5\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.json5", "patterns": [{ "include": "source.json5" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)yaml\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.yaml", "patterns": [{ "include": "source.yaml" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)toml\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.toml", "patterns": [{ "include": "source.toml" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)(gql|graphql)\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.graphql", "patterns": [{ "include": "source.graphql" }] }] }, { "begin": `([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['"]?)vue\\b\\2)`, "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "source.vue", "patterns": [{ "include": "source.vue" }] }] }, { "begin": "(template)\\b", "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/template\\b)", "name": "text.html.derivative", "patterns": [{ "include": "#html-stuff" }] }] }, { "begin": "(script)\\b", "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/script\\b)", "name": "source.js", "patterns": [{ "include": "source.js" }] }] }, { "begin": "(style)\\b", "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/style\\b)", "name": "source.css", "patterns": [{ "include": "source.css" }] }] }, { "begin": "([a-zA-Z0-9:-]+)", "beginCaptures": { "1": { "name": "entity.name.tag.$1.html.vue" } }, "end": "(</)(\\1)\\s*(?=>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "patterns": [{ "include": "#tag-stuff" }, { "begin": "(?<=>)", "end": "(?=<\\/)", "name": "text" }] }] }], "repository": { "html-stuff": { "patterns": [{ "include": "#template-tag" }, { "include": "text.html.derivative" }, { "include": "text.html.basic" }] }, "self-closing-tag": { "begin": "(<)([a-zA-Z0-9:-]+)(?=([^>]+/>))", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "end": "(/>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "name": "self-closing-tag", "patterns": [{ "include": "#tag-stuff" }] }, "tag-stuff": { "begin": "\\G", "end": "(?=/>)|(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "name": "meta.tag-stuff", "patterns": [{ "include": "#vue-directives" }, { "include": "text.html.basic#attribute" }] }, "template-tag": { "patterns": [{ "include": "#template-tag-1" }, { "include": "#template-tag-2" }] }, "template-tag-1": { "begin": "(<)(template)\\b(>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" }, "3": { "name": "punctuation.definition.tag.end.html.vue" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "name": "meta.template-tag.start", "patterns": [{ "begin": "\\G", "end": "(?=/>)|((</)(template)\\b)", "endCaptures": { "2": { "name": "punctuation.definition.tag.begin.html.vue" }, "3": { "name": "entity.name.tag.$3.html.vue" } }, "name": "meta.template-tag.end", "patterns": [{ "include": "#html-stuff" }] }] }, "template-tag-2": { "begin": "(<)(template)\\b", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html.vue" }, "2": { "name": "entity.name.tag.$2.html.vue" } }, "end": "(/?>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html.vue" } }, "name": "meta.template-tag.start", "patterns": [{ "begin": "\\G", "end": "(?=/>)|((</)(template)\\b)", "endCaptures": { "2": { "name": "punctuation.definition.tag.begin.html.vue" }, "3": { "name": "entity.name.tag.$3.html.vue" } }, "name": "meta.template-tag.end", "patterns": [{ "include": "#tag-stuff" }, { "include": "#html-stuff" }] }] }, "vue-directives": { "patterns": [{ "include": "#vue-directives-control" }, { "include": "#vue-directives-style-attr" }, { "include": "#vue-directives-original" }, { "include": "#vue-directives-generic-attr" }] }, "vue-directives-control": { "begin": "(v-for)|(v-if|v-else-if|v-else)", "captures": { "1": { "name": "keyword.control.loop.vue" }, "2": { "name": "keyword.control.conditional.vue" } }, "end": "(?=\\s*+[^=\\s])", "name": "meta.attribute.directive.control.vue", "patterns": [{ "include": "#vue-directives-expression" }] }, "vue-directives-expression": { "patterns": [{ "begin": "(=)\\s*('|\"|`)", "beginCaptures": { "1": { "name": "punctuation.separator.key-value.html.vue" }, "2": { "name": "punctuation.definition.string.begin.html.vue" } }, "end": "(\\2)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.html.vue" } }, "patterns": [{ "begin": "(?<=('|\"|`))", "end": "(?=\\1)", "name": "source.ts.embedded.html.vue", "patterns": [{ "include": "source.ts" }] }] }, { "begin": "(=)\\s*(?=[^'\"`])", "beginCaptures": { "1": { "name": "punctuation.separator.key-value.html.vue" } }, "end": "(?=(\\s|>|\\/>))", "patterns": [{ "begin": "(?=[^'\"`])", "end": "(?=(\\s|>|\\/>))", "name": "source.ts.embedded.html.vue", "patterns": [{ "include": "source.ts" }] }] }] }, "vue-directives-generic-attr": { "begin": "\\b(generic)\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.html.vue" }, "2": { "name": "punctuation.separator.key-value.html.vue" } }, "end": `(?<='|")`, "name": "meta.attribute.generic.vue", "patterns": [{ "begin": `('|")`, "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.html.vue" } }, "comment": "https://github.com/microsoft/vscode/blob/fd4346210f59135fad81a8b8c4cea7bf5a9ca6b4/extensions/typescript-basics/syntaxes/TypeScript.tmLanguage.json#L4002-L4020", "end": "(\\1)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.html.vue" } }, "name": "meta.type.parameters.vue", "patterns": [{ "include": "source.ts#comment" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "name": "storage.modifier.ts" }, { "include": "source.ts#type" }, { "include": "source.ts#punctuation-comma" }, { "match": "(=)(?!>)", "name": "keyword.operator.assignment.ts" }] }] }, "vue-directives-original": { "begin": "(?:\\b(v-)|([:\\.])|(@)|(#))(\\[?)([\\w\\-]*)(\\]?)(?:\\.([\\w\\-]*))*", "beginCaptures": { "1": { "name": "entity.other.attribute-name.html.vue" }, "2": { "name": "punctuation.attribute-shorthand.bind.html.vue" }, "3": { "name": "punctuation.attribute-shorthand.event.html.vue" }, "4": { "name": "punctuation.attribute-shorthand.slot.html.vue" }, "5": { "name": "punctuation.separator.key-value.html.vue" }, "6": { "name": "entity.other.attribute-name.html.vue" }, "7": { "name": "punctuation.separator.key-value.html.vue" }, "8": { "name": "entity.other.attribute-name.html.vue" }, "9": { "name": "punctuation.separator.key-value.html.vue" } }, "end": "(?=\\s*+[^=\\s])", "endCaptures": { "1": { "name": "punctuation.definition.string.end.html.vue" } }, "name": "meta.attribute.directive.vue", "patterns": [{ "include": "#vue-directives-expression" }] }, "vue-directives-style-attr": { "begin": "\\b(style)\\s*(=)", "captures": { "1": { "name": "entity.other.attribute-name.html.vue" }, "2": { "name": "punctuation.separator.key-value.html.vue" } }, "end": `(?<='|")`, "name": "meta.attribute.style.vue", "patterns": [{ "begin": `('|")`, "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.html.vue" } }, "comment": "Copy from source.css#rule-list-innards", "end": "(\\1)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.html.vue" } }, "name": "source.css.embedded.html.vue", "patterns": [{ "include": "source.css#comment-block" }, { "include": "source.css#escapes" }, { "include": "source.css#font-features" }, { "match": "(?x) (?<![\\w-])\n--\n(?:[-a-zA-Z_] | [^\\x00-\\x7F])\n(?:[-a-zA-Z0-9_] | [^\\x00-\\x7F]\n|\\\\(?:[0-9a-fA-F]{1,6}|.)\n)*", "name": "variable.css" }, { "begin": "(?<![-a-zA-Z])(?=[-a-zA-Z])", "end": "$|(?![-a-zA-Z])", "name": "meta.property-name.css", "patterns": [{ "include": "source.css#property-names" }] }, { "begin": "(:)\\s*", "beginCaptures": { "1": { "name": "punctuation.separator.key-value.css" } }, "comment": "Modify end to fix #199. TODO: handle ' character.", "contentName": "meta.property-value.css", "end": `\\s*(;)|\\s*(?='|")`, "endCaptures": { "1": { "name": "punctuation.terminator.rule.css" } }, "patterns": [{ "include": "source.css#comment-block" }, { "include": "source.css#property-values" }] }, { "match": ";", "name": "punctuation.terminator.rule.css" }] }] }, "vue-interpolations": { "patterns": [{ "begin": "(\\{\\{)", "beginCaptures": { "1": { "name": "punctuation.definition.interpolation.begin.html.vue" } }, "end": "(\\}\\})", "endCaptures": { "1": { "name": "punctuation.definition.interpolation.end.html.vue" } }, "name": "expression.embedded.vue", "patterns": [{ "begin": "\\G", "end": "(?=\\}\\})", "name": "source.ts.embedded.html.vue", "patterns": [{ "include": "source.ts" }] }] }] } }, "scopeName": "source.vue", "embeddedLangs": ["html", "markdown", "pug", "stylus", "sass", "css", "scss", "less", "javascript", "typescript", "jsx", "tsx", "coffee", "json", "jsonc", "json5", "yaml", "toml", "graphql", "html-derivative", "markdown-vue", "vue-directives", "vue-interpolations", "vue-sfc-style-variable-injection"] });
|
|
27
27
|
var vue = [
|
|
28
28
|
...html,
|
|
29
29
|
...markdown,
|
|
@@ -37,6 +37,7 @@ var vue = [
|
|
|
37
37
|
...typescript,
|
|
38
38
|
...jsx,
|
|
39
39
|
...tsx,
|
|
40
|
+
...coffee,
|
|
40
41
|
...json,
|
|
41
42
|
...jsonc,
|
|
42
43
|
...json5,
|
package/dist/langs.d.mts
CHANGED
|
@@ -7,7 +7,7 @@ declare const bundledLanguagesBase: {
|
|
|
7
7
|
declare const bundledLanguagesAlias: {
|
|
8
8
|
[k: string]: DynamicImportLanguageRegistration;
|
|
9
9
|
};
|
|
10
|
-
type BundledLanguage = 'abap' | 'actionscript-3' | 'ada' | 'adoc' | 'angular-html' | 'angular-ts' | 'apache' | 'apex' | 'apl' | 'applescript' | 'ara' | 'asciidoc' | 'asm' | 'astro' | 'awk' | 'ballerina' | 'bash' | 'bat' | 'batch' | 'be' | 'beancount' | 'berry' | 'bibtex' | 'bicep' | 'blade' | 'c' | 'c#' | 'c++' | 'cadence' | 'cdc' | 'clarity' | 'clj' | 'clojure' | 'closure-templates' | 'cmake' | 'cmd' | 'cobol' | 'codeowners' | 'codeql' | 'coffee' | 'coffeescript' | 'common-lisp' | 'console' | 'cpp' | 'cql' | 'crystal' | 'cs' | 'csharp' | 'css' | 'csv' | 'cue' | 'cypher' | 'd' | 'dart' | 'dax' | 'desktop' | 'diff' | 'docker' | 'dockerfile' | 'dream-maker' | 'elisp' | 'elixir' | 'elm' | 'emacs-lisp' | 'erb' | 'erl' | 'erlang' | 'f' | 'f#' | 'f03' | 'f08' | 'f18' | 'f77' | 'f90' | 'f95' | 'fennel' | 'fish' | 'fluent' | 'for' | 'fortran-fixed-form' | 'fortran-free-form' | 'fs' | 'fsharp' | 'fsl' | 'ftl' | 'gdresource' | 'gdscript' | 'gdshader' | 'genie' | 'gherkin' | 'git-commit' | 'git-rebase' | 'gjs' | 'gleam' | 'glimmer-js' | 'glimmer-ts' | 'glsl' | 'gnuplot' | 'go' | 'gql' | 'graphql' | 'groovy' | 'gts' | 'hack' | 'haml' | 'handlebars' | 'haskell' | 'haxe' | 'hbs' | 'hcl' | 'hjson' | 'hlsl' | 'hs' | 'html' | 'html-derivative' | 'http' | 'hxml' | 'hy' | 'imba' | 'ini' | 'jade' | 'java' | 'javascript' | 'jinja' | 'jison' | 'jl' | 'js' | 'json' | 'json5' | 'jsonc' | 'jsonl' | 'jsonnet' | 'jssm' | 'jsx' | 'julia' | 'kotlin' | 'kql' | 'kt' | 'kts' | 'kusto' | 'latex' | 'less' | 'liquid' | 'lisp' | 'log' | 'logo' | 'lua' | 'make' | 'makefile' | 'markdown' | 'marko' | 'matlab' | 'md' | 'mdc' | 'mdx' | 'mediawiki' | 'mermaid' | 'mojo' | 'move' | 'nar' | 'narrat' | 'nextflow' | 'nf' | 'nginx' | 'nim' | 'nix' | 'nu' | 'nushell' | 'objc' | 'objective-c' | 'objective-cpp' | 'ocaml' | 'pascal' | 'perl' | 'perl6' | 'php' | 'plsql' | 'po' | 'postcss' | 'pot' | 'potx' | 'powerquery' | 'powershell' | 'prisma' | 'prolog' | 'properties' | 'proto' | 'ps' | 'ps1' | 'pug' | 'puppet' | 'purescript' | 'py' | 'python' | 'ql' | 'qml' | 'qmldir' | 'qss' | 'r' | 'racket' | 'raku' | 'razor' | 'rb' | 'reg' | 'rel' | 'riscv' | 'rs' | 'rst' | 'ruby' | 'rust' | 'sas' | 'sass' | 'scala' | 'scheme' | 'scss' | 'sh' | 'shader' | 'shaderlab' | 'shell' | 'shellscript' | 'shellsession' | 'smalltalk' | 'solidity' | 'soy' | 'sparql' | 'spl' | 'splunk' | 'sql' | 'ssh-config' | 'stata' | 'styl' | 'stylus' | 'svelte' | 'swift' | 'system-verilog' | 'systemd' | 'tasl' | 'tcl' | 'terraform' | 'tex' | 'tf' | 'tfvars' | 'toml' | 'ts' | 'tsp' | 'tsv' | 'tsx' | 'turtle' | 'twig' | 'typ' | 'typescript' | 'typespec' | 'typst' | 'v' | 'vala' | 'vb' | 'verilog' | 'vhdl' | 'vim' | 'viml' | 'vimscript' | 'vue' | 'vue-html' | 'vy' | 'vyper' | 'wasm' | 'wenyan' | 'wgsl' | 'wiki' | 'wikitext' | 'wl' | 'wolfram' | 'xml' | 'xsl' | 'yaml' | 'yml' | 'zenscript' | 'zig' | 'zsh' | '文言';
|
|
10
|
+
type BundledLanguage = 'abap' | 'actionscript-3' | 'ada' | 'adoc' | 'angular-html' | 'angular-ts' | 'apache' | 'apex' | 'apl' | 'applescript' | 'ara' | 'asciidoc' | 'asm' | 'astro' | 'awk' | 'ballerina' | 'bash' | 'bat' | 'batch' | 'be' | 'beancount' | 'berry' | 'bibtex' | 'bicep' | 'blade' | 'c' | 'c#' | 'c++' | 'cadence' | 'cdc' | 'clarity' | 'clj' | 'clojure' | 'closure-templates' | 'cmake' | 'cmd' | 'cobol' | 'codeowners' | 'codeql' | 'coffee' | 'coffeescript' | 'common-lisp' | 'console' | 'cpp' | 'cql' | 'crystal' | 'cs' | 'csharp' | 'css' | 'csv' | 'cue' | 'cypher' | 'd' | 'dart' | 'dax' | 'desktop' | 'diff' | 'docker' | 'dockerfile' | 'dream-maker' | 'elisp' | 'elixir' | 'elm' | 'emacs-lisp' | 'erb' | 'erl' | 'erlang' | 'f' | 'f#' | 'f03' | 'f08' | 'f18' | 'f77' | 'f90' | 'f95' | 'fennel' | 'fish' | 'fluent' | 'for' | 'fortran-fixed-form' | 'fortran-free-form' | 'fs' | 'fsharp' | 'fsl' | 'ftl' | 'gdresource' | 'gdscript' | 'gdshader' | 'genie' | 'gherkin' | 'git-commit' | 'git-rebase' | 'gjs' | 'gleam' | 'glimmer-js' | 'glimmer-ts' | 'glsl' | 'gnuplot' | 'go' | 'gql' | 'graphql' | 'groovy' | 'gts' | 'hack' | 'haml' | 'handlebars' | 'haskell' | 'haxe' | 'hbs' | 'hcl' | 'hjson' | 'hlsl' | 'hs' | 'html' | 'html-derivative' | 'http' | 'hxml' | 'hy' | 'imba' | 'ini' | 'jade' | 'java' | 'javascript' | 'jinja' | 'jison' | 'jl' | 'js' | 'json' | 'json5' | 'jsonc' | 'jsonl' | 'jsonnet' | 'jssm' | 'jsx' | 'julia' | 'kotlin' | 'kql' | 'kt' | 'kts' | 'kusto' | 'latex' | 'less' | 'liquid' | 'lisp' | 'log' | 'logo' | 'lua' | 'make' | 'makefile' | 'markdown' | 'marko' | 'matlab' | 'md' | 'mdc' | 'mdx' | 'mediawiki' | 'mermaid' | 'mojo' | 'move' | 'nar' | 'narrat' | 'nextflow' | 'nf' | 'nginx' | 'nim' | 'nix' | 'nu' | 'nushell' | 'objc' | 'objective-c' | 'objective-cpp' | 'ocaml' | 'pascal' | 'perl' | 'perl6' | 'php' | 'plsql' | 'po' | 'postcss' | 'pot' | 'potx' | 'powerquery' | 'powershell' | 'prisma' | 'prolog' | 'properties' | 'proto' | 'ps' | 'ps1' | 'pug' | 'puppet' | 'purescript' | 'py' | 'python' | 'ql' | 'qml' | 'qmldir' | 'qss' | 'r' | 'racket' | 'raku' | 'razor' | 'rb' | 'reg' | 'regex' | 'regexp' | 'rel' | 'riscv' | 'rs' | 'rst' | 'ruby' | 'rust' | 'sas' | 'sass' | 'scala' | 'scheme' | 'scss' | 'sh' | 'shader' | 'shaderlab' | 'shell' | 'shellscript' | 'shellsession' | 'smalltalk' | 'solidity' | 'soy' | 'sparql' | 'spl' | 'splunk' | 'sql' | 'ssh-config' | 'stata' | 'styl' | 'stylus' | 'svelte' | 'swift' | 'system-verilog' | 'systemd' | 'tasl' | 'tcl' | 'terraform' | 'tex' | 'tf' | 'tfvars' | 'toml' | 'ts' | 'tsp' | 'tsv' | 'tsx' | 'turtle' | 'twig' | 'typ' | 'typescript' | 'typespec' | 'typst' | 'v' | 'vala' | 'vb' | 'verilog' | 'vhdl' | 'vim' | 'viml' | 'vimscript' | 'vue' | 'vue-html' | 'vy' | 'vyper' | 'wasm' | 'wenyan' | 'wgsl' | 'wiki' | 'wikitext' | 'wl' | 'wolfram' | 'xml' | 'xsl' | 'yaml' | 'yml' | 'zenscript' | 'zig' | 'zsh' | '文言';
|
|
11
11
|
declare const bundledLanguages: Record<BundledLanguage, DynamicImportLanguageRegistration>;
|
|
12
12
|
|
|
13
13
|
export { type BundledLanguage, bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo };
|
package/dist/langs.mjs
CHANGED
|
@@ -865,6 +865,14 @@ const bundledLanguagesInfo = [
|
|
|
865
865
|
"name": "Windows Registry Script",
|
|
866
866
|
"import": () => import('./langs/reg.mjs')
|
|
867
867
|
},
|
|
868
|
+
{
|
|
869
|
+
"id": "regexp",
|
|
870
|
+
"name": "RegExp",
|
|
871
|
+
"aliases": [
|
|
872
|
+
"regex"
|
|
873
|
+
],
|
|
874
|
+
"import": () => import('./langs/regexp.mjs')
|
|
875
|
+
},
|
|
868
876
|
{
|
|
869
877
|
"id": "rel",
|
|
870
878
|
"name": "Rel",
|
|
@@ -191,7 +191,7 @@ var vitesseBlack = Object.freeze({
|
|
|
191
191
|
"name": "vitesse-black",
|
|
192
192
|
"semanticHighlighting": true,
|
|
193
193
|
"semanticTokenColors": {
|
|
194
|
-
"class": "#
|
|
194
|
+
"class": "#6872ab",
|
|
195
195
|
"interface": "#5d99a9",
|
|
196
196
|
"namespace": "#db889a",
|
|
197
197
|
"property": "#b8a965",
|
|
@@ -218,6 +218,7 @@ var vitesseBlack = Object.freeze({
|
|
|
218
218
|
"keyword.operator.type.annotation",
|
|
219
219
|
"keyword.operator.relational",
|
|
220
220
|
"keyword.operator.assignment",
|
|
221
|
+
"keyword.operator.type",
|
|
221
222
|
"meta.brace",
|
|
222
223
|
"meta.tag.block.any.html",
|
|
223
224
|
"meta.tag.inline.any.html",
|
|
@@ -225,7 +226,6 @@ var vitesseBlack = Object.freeze({
|
|
|
225
226
|
"meta.type.annotation",
|
|
226
227
|
"meta.embedded.block.github-actions-expression",
|
|
227
228
|
"storage.type.function.arrow",
|
|
228
|
-
"keyword.operator.type",
|
|
229
229
|
"meta.objectliteral.ts",
|
|
230
230
|
"punctuation"
|
|
231
231
|
],
|
|
@@ -471,6 +471,7 @@ var vitesseBlack = Object.freeze({
|
|
|
471
471
|
},
|
|
472
472
|
{
|
|
473
473
|
"scope": [
|
|
474
|
+
"keyword.operator.quantifier.regexp",
|
|
474
475
|
"constant.numeric",
|
|
475
476
|
"number"
|
|
476
477
|
],
|
|
@@ -653,10 +654,11 @@ var vitesseBlack = Object.freeze({
|
|
|
653
654
|
},
|
|
654
655
|
{
|
|
655
656
|
"scope": [
|
|
656
|
-
"type.identifier"
|
|
657
|
+
"type.identifier",
|
|
658
|
+
"constant.other.character-class.regexp"
|
|
657
659
|
],
|
|
658
660
|
"settings": {
|
|
659
|
-
"foreground": "#
|
|
661
|
+
"foreground": "#6872ab"
|
|
660
662
|
}
|
|
661
663
|
},
|
|
662
664
|
{
|
|
@@ -191,7 +191,7 @@ var vitesseDark = Object.freeze({
|
|
|
191
191
|
"name": "vitesse-dark",
|
|
192
192
|
"semanticHighlighting": true,
|
|
193
193
|
"semanticTokenColors": {
|
|
194
|
-
"class": "#
|
|
194
|
+
"class": "#6872ab",
|
|
195
195
|
"interface": "#5d99a9",
|
|
196
196
|
"namespace": "#db889a",
|
|
197
197
|
"property": "#b8a965",
|
|
@@ -218,6 +218,7 @@ var vitesseDark = Object.freeze({
|
|
|
218
218
|
"keyword.operator.type.annotation",
|
|
219
219
|
"keyword.operator.relational",
|
|
220
220
|
"keyword.operator.assignment",
|
|
221
|
+
"keyword.operator.type",
|
|
221
222
|
"meta.brace",
|
|
222
223
|
"meta.tag.block.any.html",
|
|
223
224
|
"meta.tag.inline.any.html",
|
|
@@ -225,7 +226,6 @@ var vitesseDark = Object.freeze({
|
|
|
225
226
|
"meta.type.annotation",
|
|
226
227
|
"meta.embedded.block.github-actions-expression",
|
|
227
228
|
"storage.type.function.arrow",
|
|
228
|
-
"keyword.operator.type",
|
|
229
229
|
"meta.objectliteral.ts",
|
|
230
230
|
"punctuation"
|
|
231
231
|
],
|
|
@@ -471,6 +471,7 @@ var vitesseDark = Object.freeze({
|
|
|
471
471
|
},
|
|
472
472
|
{
|
|
473
473
|
"scope": [
|
|
474
|
+
"keyword.operator.quantifier.regexp",
|
|
474
475
|
"constant.numeric",
|
|
475
476
|
"number"
|
|
476
477
|
],
|
|
@@ -653,10 +654,11 @@ var vitesseDark = Object.freeze({
|
|
|
653
654
|
},
|
|
654
655
|
{
|
|
655
656
|
"scope": [
|
|
656
|
-
"type.identifier"
|
|
657
|
+
"type.identifier",
|
|
658
|
+
"constant.other.character-class.regexp"
|
|
657
659
|
],
|
|
658
660
|
"settings": {
|
|
659
|
-
"foreground": "#
|
|
661
|
+
"foreground": "#6872ab"
|
|
660
662
|
}
|
|
661
663
|
},
|
|
662
664
|
{
|
|
@@ -216,6 +216,7 @@ var vitesseLight = Object.freeze({
|
|
|
216
216
|
"keyword.operator.type.annotation",
|
|
217
217
|
"keyword.operator.relational",
|
|
218
218
|
"keyword.operator.assignment",
|
|
219
|
+
"keyword.operator.type",
|
|
219
220
|
"meta.brace",
|
|
220
221
|
"meta.tag.block.any.html",
|
|
221
222
|
"meta.tag.inline.any.html",
|
|
@@ -223,7 +224,6 @@ var vitesseLight = Object.freeze({
|
|
|
223
224
|
"meta.type.annotation",
|
|
224
225
|
"meta.embedded.block.github-actions-expression",
|
|
225
226
|
"storage.type.function.arrow",
|
|
226
|
-
"keyword.operator.type",
|
|
227
227
|
"meta.objectliteral.ts",
|
|
228
228
|
"punctuation"
|
|
229
229
|
],
|
|
@@ -469,6 +469,7 @@ var vitesseLight = Object.freeze({
|
|
|
469
469
|
},
|
|
470
470
|
{
|
|
471
471
|
"scope": [
|
|
472
|
+
"keyword.operator.quantifier.regexp",
|
|
472
473
|
"constant.numeric",
|
|
473
474
|
"number"
|
|
474
475
|
],
|
|
@@ -651,7 +652,8 @@ var vitesseLight = Object.freeze({
|
|
|
651
652
|
},
|
|
652
653
|
{
|
|
653
654
|
"scope": [
|
|
654
|
-
"type.identifier"
|
|
655
|
+
"type.identifier",
|
|
656
|
+
"constant.other.character-class.regexp"
|
|
655
657
|
],
|
|
656
658
|
"settings": {
|
|
657
659
|
"foreground": "#5a6aa6"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shiki",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.6.0",
|
|
5
5
|
"description": "A beautiful Syntax Highlighter.",
|
|
6
6
|
"author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
"dist"
|
|
93
93
|
],
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@shikijs/core": "1.
|
|
95
|
+
"@shikijs/core": "1.6.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"tm-grammars": "^1.
|
|
99
|
-
"tm-themes": "^1.4.
|
|
98
|
+
"tm-grammars": "^1.12.1",
|
|
99
|
+
"tm-themes": "^1.4.3",
|
|
100
100
|
"vscode-oniguruma": "^1.7.0"
|
|
101
101
|
},
|
|
102
102
|
"scripts": {
|