shiki 1.2.0 → 1.2.2
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/astro.mjs +1 -1
- package/dist/langs/bicep.mjs +1 -1
- package/dist/langs/gleam.mjs +1 -1
- package/dist/langs/glimmer-js.mjs +1 -1
- package/dist/langs/glimmer-ts.mjs +1 -1
- package/dist/langs/hcl.mjs +1 -1
- package/dist/langs/mojo.mjs +3 -3
- package/dist/langs/move.mjs +1 -1
- package/dist/langs/shellscript.mjs +1 -1
- package/dist/langs/terraform.mjs +1 -1
- package/dist/langs/tsv.d.mts +1 -0
- package/dist/langs/tsv.mjs +6 -0
- package/dist/langs/zig.mjs +1 -1
- package/dist/langs.d.mts +1 -1
- package/dist/langs.mjs +5 -0
- package/package.json +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({ "displayName": "Shell", "name": "shellscript", "patterns": [{ "include": "#initial_context" }], "repository": { "alias_statement": { "begin": "(alias)[ \\t]*+[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))", "beginCaptures": { "1": { "name": "storage.type.alias.shell" }, "2": { "name": "storage.modifier.$2.shell" }, "3": { "name": "variable.other.assignment.shell" }, "4": { "name": "punctuation.definition.array.access.shell" }, "5": { "name": "variable.other.assignment.shell" }, "6": { "name": "punctuation.definition.array.access.shell" }, "7": { "name": "keyword.operator.assignment.shell" }, "8": { "name": "keyword.operator.assignment.compound.shell" }, "9": { "name": "keyword.operator.assignment.compound.shell" } }, "end": "(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.semicolon.shell" }, "2": { "name": "punctuation.separator.statement.and.shell" }, "3": { "name": "punctuation.separator.statement.or.shell" }, "4": { "name": "punctuation.separator.statement.background.shell" } }, "name": "meta.expression.assignment.shell", "patterns": [{ "include": "#normal_statement_context" }] }, "argument": { "begin": "[ \\t]++(?!(?:&|\\||\\(|\\[|#|\\n|$|;))", "beginCaptures": {}, "end": "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)", "endCaptures": {}, "name": "meta.argument.shell", "patterns": [{ "include": "#argument_context" }, { "include": "#line_continuation" }] }, "argument_context": { "patterns": [{ "captures": { "1": { "name": "string.unquoted.argument.shell", "patterns": [{ "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "captures": { "1": { "name": "constant.language.$1.shell" } }, "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)" }] } }, "match": "[ \\t]*+([^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>))" }, { "include": "#normal_statement_context" }] }, "assignment": { "patterns": [{ "begin": "[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))[ \\t]*+(\\()", "beginCaptures": { "1": { "name": "storage.modifier.$1.shell" }, "2": { "name": "variable.other.assignment.shell" }, "3": { "name": "punctuation.definition.array.access.shell" }, "4": { "name": "variable.other.assignment.shell" }, "5": { "name": "punctuation.definition.array.access.shell" }, "6": { "name": "keyword.operator.assignment.shell" }, "7": { "name": "keyword.operator.assignment.compound.shell" }, "8": { "name": "keyword.operator.assignment.compound.shell" }, "9": { "name": "punctuation.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.shell" } }, "name": "meta.expression.assignment.shell", "patterns": [{ "include": "#comment" }, { "include": "#argument_context" }] }, { "begin": "[ \\t]*+(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))[ \\t]*+)?((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?:(\\[)((?:(?:(?:\\$)?(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)|@)|\\*))(\\]))?(?:(?:(\\=)|(\\+\\=))|(\\-\\=))", "beginCaptures": { "1": { "name": "storage.modifier.$1.shell" }, "2": { "name": "variable.other.assignment.shell" }, "3": { "name": "punctuation.definition.array.access.shell" }, "4": { "name": "variable.other.assignment.shell" }, "5": { "name": "punctuation.definition.array.access.shell" }, "6": { "name": "keyword.operator.assignment.shell" }, "7": { "name": "keyword.operator.assignment.compound.shell" }, "8": { "name": "keyword.operator.assignment.compound.shell" } }, "end": "(?:(?= |\\t|$)|(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.semicolon.shell" }, "2": { "name": "punctuation.separator.statement.and.shell" }, "3": { "name": "punctuation.separator.statement.or.shell" }, "4": { "name": "punctuation.separator.statement.background.shell" } }, "name": "meta.expression.assignment.shell", "patterns": [{ "include": "#comment" }, { "include": "#argument_context" }] }] }, "basic_command_name": { "captures": { "1": { "name": "storage.modifier.$1.shell" }, "2": { "name": "entity.name.function.call.shell entity.name.command.shell", "patterns": [{ "match": "(?<!\\w)(?:continue|return|break)(?!\\w)", "name": "keyword.control.$0.shell" }, { "match": "(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)", "name": "support.function.builtin.shell" }, { "include": "#variable" }] } }, "match": `(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))|((?!"|'|\\\\\\n?$)[^!'" \\t\\n\\r]+?))(?:(?= |\\t)|(?=;|\\||&|\\n|\\)|\\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))`, "name": "meta.statement.command.name.basic.shell" }, "block_comment": { "begin": "\\s*+(\\/\\*)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.shell" } }, "end": "\\*\\/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.shell" } }, "name": "comment.block.shell" }, "boolean": { "match": "\\b(?:true|false)\\b", "name": "constant.language.$0.shell" }, "case-clause": { "patterns": [{ "begin": "(?=\\S)", "end": ";;&?|;&", "endCaptures": { "0": { "name": "punctuation.terminator.case-clause.shell" } }, "name": "meta.scope.case-clause.shell", "patterns": [{ "begin": "\\(|(?=\\S)", "beginCaptures": { "0": { "name": "punctuation.definition.case-pattern.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.case-pattern.shell" } }, "name": "meta.scope.case-pattern.shell", "patterns": [{ "match": "\\|", "name": "punctuation.separator.pipe-sign.shell" }, { "include": "#string" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#pathname" }] }, { "begin": "(?<=\\))", "end": "(?=;;&?|;&)", "name": "meta.scope.case-clause-body.shell", "patterns": [{ "include": "#initial_context" }] }] }] }, "comment": { "captures": { "1": { "name": "comment.line.number-sign.shell meta.shebang.shell" }, "2": { "name": "punctuation.definition.comment.shebang.shell" }, "3": { "name": "comment.line.number-sign.shell" }, "4": { "name": "punctuation.definition.comment.shell" } }, "match": "(?:^|[ \\t]++)(?:((#!).*)|((#).*))" }, "comments": { "patterns": [{ "include": "#block_comment" }, { "include": "#line_comment" }] }, "compound-command": { "patterns": [{ "begin": "\\[{1,2}", "beginCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "end": "\\]{1,2}", "endCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "name": "meta.scope.logical-expression.shell", "patterns": [{ "include": "#logical-expression" }, { "include": "#initial_context" }] }, { "begin": "\\({2}", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "\\){2}", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.other.math.shell", "patterns": [{ "include": "#math" }] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.subshell.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.subshell.shell" } }, "name": "meta.scope.subshell.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=\\s|^){(?=\\s|$)", "beginCaptures": { "0": { "name": "punctuation.definition.group.shell" } }, "end": "(?<=^|;)\\s*(})", "endCaptures": { "1": { "name": "punctuation.definition.group.shell" } }, "name": "meta.scope.group.shell", "patterns": [{ "include": "#initial_context" }] }] }, "continuation_of_double_quoted_command_name": { "begin": '\\G(?<=")', "beginCaptures": {}, "contentName": "meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command", "end": '"', "endCaptures": { "0": { "name": "string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell" } }, "patterns": [{ "match": '\\\\[\\$\\n`"\\\\]', "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" }] }, "continuation_of_single_quoted_command_name": { "begin": "\\G(?<=')", "beginCaptures": {}, "contentName": "meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command", "end": "'", "endCaptures": { "0": { "name": "string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell" } } }, "custom_command_names": { "patterns": [] }, "custom_commands": { "patterns": [] }, "double_quote_context": { "patterns": [{ "match": '\\\\[\\$`"\\\\\\n]', "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" }] }, "double_quote_escape_char": { "match": '\\\\[\\$`"\\\\\\n]', "name": "constant.character.escape.shell" }, "function_definition": { "applyEndPatternLast": 1, "begin": "[ \\t]*+(?:(\\bfunction\\b)[ \\t]*+([^ \\t\\n\\r\\(\\)=]+)(?:(\\()[ \\t]*+(\\)))?|([^ \\t\\n\\r\\(\\)=]+)[ \\t]*+(\\()[ \\t]*+(\\)))", "beginCaptures": { "1": { "name": "storage.type.function.shell" }, "2": { "name": "entity.name.function.shell" }, "3": { "name": "punctuation.definition.arguments.shell" }, "4": { "name": "punctuation.definition.arguments.shell" }, "5": { "name": "entity.name.function.shell" }, "6": { "name": "punctuation.definition.arguments.shell" }, "7": { "name": "punctuation.definition.arguments.shell" } }, "end": "(?<=\\}|\\))", "endCaptures": {}, "name": "meta.function.shell", "patterns": [{ "match": "\\G(?:\\t| |\\n)" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, "name": "meta.function.body.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, "name": "meta.function.body.shell", "patterns": [{ "include": "#initial_context" }] }] }, "heredoc": { "patterns": [{ "begin": `((?<!<)<<-)[ \\t]*+("|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(?:\\2)(.*)`, "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": {}, "3": { "name": "punctuation.definition.string.heredoc.shell" }, "4": { "patterns": [{ "include": "#normal_statement_context" }] } }, "contentName": "string.quoted.heredoc.indent", "end": "^\\t*(?:\\3)(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "punctuation.definition.string.heredoc.shell" } }, "patterns": [] }, { "begin": `((?<!<)<<(?!<))[ \\t]*+("|')[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(?:\\2)(.*)`, "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": {}, "3": { "name": "punctuation.definition.string.heredoc.shell" }, "4": { "patterns": [{ "include": "#normal_statement_context" }] } }, "contentName": "string.quoted.heredoc.no-indent", "end": "^(?:\\3)(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "punctuation.definition.string.heredoc.shell" } }, "patterns": [] }, { "begin": `((?<!<)<<-)[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(.*)`, "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": { "name": "punctuation.definition.string.heredoc.shell" }, "3": { "patterns": [{ "include": "#normal_statement_context" }] } }, "contentName": "string.unquoted.heredoc.indent", "end": "^\\t*(?:\\2)(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "punctuation.definition.string.heredoc.shell" } }, "patterns": [{ "include": "#double_quote_escape_char" }, { "include": "#variable" }, { "include": "#interpolation" }] }, { "begin": `((?<!<)<<(?!<))[ \\t]*+((?<!\\w)[a-zA-Z_0-9-]+(?!\\w))(?=\\s|;|&|<|"|')(.*)`, "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": { "name": "punctuation.definition.string.heredoc.shell" }, "3": { "patterns": [{ "include": "#normal_statement_context" }] } }, "contentName": "string.unquoted.heredoc.no-indent", "end": "^(?:\\2)(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "punctuation.definition.string.heredoc.shell" } }, "patterns": [{ "include": "#double_quote_escape_char" }, { "include": "#variable" }, { "include": "#interpolation" }] }] }, "herestring": { "patterns": [{ "begin": "(<<<)\\s*(('))", "beginCaptures": { "1": { "name": "keyword.operator.herestring.shell" }, "2": { "name": "string.quoted.single.shell" }, "3": { "name": "punctuation.definition.string.begin.shell" } }, "contentName": "string.quoted.single.shell", "end": "(')", "endCaptures": { "0": { "name": "string.quoted.single.shell" }, "1": { "name": "punctuation.definition.string.end.shell" } }, "name": "meta.herestring.shell" }, { "begin": '(<<<)\\s*(("))', "beginCaptures": { "1": { "name": "keyword.operator.herestring.shell" }, "2": { "name": "string.quoted.double.shell" }, "3": { "name": "punctuation.definition.string.begin.shell" } }, "contentName": "string.quoted.double.shell", "end": '(")', "endCaptures": { "0": { "name": "string.quoted.double.shell" }, "1": { "name": "punctuation.definition.string.end.shell" } }, "name": "meta.herestring.shell", "patterns": [{ "include": "#double_quote_context" }] }, { "captures": { "1": { "name": "keyword.operator.herestring.shell" }, "2": { "name": "string.unquoted.herestring.shell", "patterns": [{ "include": "#initial_context" }] } }, "match": "(<<<)\\s*(([^\\s)\\\\]|\\\\.)+)", "name": "meta.herestring.shell" }] }, "initial_context": { "patterns": [{ "include": "#comment" }, { "include": "#pipeline" }, { "include": "#normal_statement_seperator" }, { "include": "#logical_expression_double" }, { "include": "#logical_expression_single" }, { "include": "#misc_ranges" }, { "include": "#loop" }, { "include": "#function_definition" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#heredoc" }, { "include": "#herestring" }, { "include": "#redirection" }, { "include": "#pathname" }, { "include": "#keyword" }, { "include": "#alias_statement" }, { "include": "#normal_statement" }, { "include": "#string" }, { "include": "#support" }] }, "inline_comment": { "captures": { "1": { "name": "comment.block.shell punctuation.definition.comment.begin.shell" }, "2": { "name": "comment.block.shell" }, "3": { "patterns": [{ "match": "\\*\\/", "name": "comment.block.shell punctuation.definition.comment.end.shell" }, { "match": "\\*", "name": "comment.block.shell" }] } }, "match": "(\\/\\*)((?:[^\\*]|(?:\\*)++[^\\/])*+((?:\\*)++\\/))" }, "interpolation": { "patterns": [{ "begin": "\\$\\({2}", "beginCaptures": { "0": { "name": "punctuation.definition.evaluation.arithmetic.begin.shell" } }, "end": "\\)\\s*\\)", "endCaptures": { "0": { "name": "punctuation.definition.evaluation.arithmetic.end.shell" } }, "name": "string.other.math.shell", "patterns": [{ "include": "#math" }] }, { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.evaluation.backticks.shell" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.evaluation.backticks.shell" } }, "name": "string.interpolated.backtick.shell", "patterns": [{ "match": "\\\\[`\\\\$]", "name": "constant.character.escape.shell" }, { "begin": "(?<=\\W)(?=#)(?!#{)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.shell" } }, "end": "(?!\\G)", "patterns": [{ "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.shell" } }, "end": "(?=`)", "name": "comment.line.number-sign.shell" }] }, { "include": "#initial_context" }] }, { "begin": "\\$\\(", "beginCaptures": { "0": { "name": "punctuation.definition.evaluation.parens.begin.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.evaluation.parens.end.shell" } }, "name": "string.interpolated.dollar.shell", "patterns": [{ "include": "#initial_context" }] }] }, "keyword": { "patterns": [{ "match": "(?<=^|;|&| |\\t)(?:continue|foreach|return|select|repeat|break|until|while|case|done|elif|else|esac|then|for|end|do|if|fi|in)(?= |\\t|;|&|$)", "name": "keyword.control.$0.shell" }] }, "line_comment": { "begin": "\\s*+(\\/\\/)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.shell" } }, "end": "(?<=\\n)(?<!\\\\\\n)", "endCaptures": {}, "name": "comment.line.double-slash.shell", "patterns": [{ "include": "#line_continuation_character" }] }, "line_continuation": { "match": "\\\\(?=\\n)", "name": "constant.character.escape.line-continuation.shell" }, "logical-expression": { "patterns": [{ "comment": "do we want a special rule for ( expr )?", "match": "=[=~]?|!=?|<|>|&&|\\|\\|", "name": "keyword.operator.logical.shell" }, { "match": "(?<!\\S)-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])\\b", "name": "keyword.operator.logical.shell" }] }, "logical_expression_context": { "patterns": [{ "include": "#regex_comparison" }, { "include": "#logical-expression" }, { "include": "#logical_expression_single" }, { "include": "#logical_expression_double" }, { "include": "#comment" }, { "include": "#boolean" }, { "include": "#redirect_number" }, { "include": "#numeric_literal" }, { "include": "#pipeline" }, { "include": "#normal_statement_seperator" }, { "include": "#string" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#heredoc" }, { "include": "#herestring" }, { "include": "#pathname" }, { "include": "#keyword" }, { "include": "#support" }] }, "logical_expression_double": { "begin": "\\[\\[", "beginCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "end": "\\]\\]", "endCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "name": "meta.scope.logical-expression.shell", "patterns": [{ "include": "#logical_expression_context" }] }, "logical_expression_single": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "name": "meta.scope.logical-expression.shell", "patterns": [{ "include": "#logical_expression_context" }] }, "loop": { "patterns": [{ "begin": "(?<=^|;|&|\\s)(for)\\s+(?=\\({2})", "beginCaptures": { "1": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.for-loop.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=^|;|&|\\s)(for)\\s+(.+?)\\s+(in)(?=\\s|;|&|$)", "beginCaptures": { "1": { "name": "keyword.control.shell" }, "2": { "name": "variable.other.loop.shell", "patterns": [{ "include": "#string" }] }, "3": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.for-in-loop.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=^|;|&|\\s)(while|until)(?=\\s|;|&|$)", "beginCaptures": { "1": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.while-loop.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=^|;|&|\\s)(select)\\s+((?:[^\\s\\\\]|\\\\.)+)(?=\\s|;|&|$)", "beginCaptures": { "1": { "name": "keyword.control.shell" }, "2": { "name": "variable.other.loop.shell" } }, "end": "(?<=^|;|&|\\s)(done)(?=\\s|;|&|$|\\))", "endCaptures": { "1": { "name": "keyword.control.shell" } }, "name": "meta.scope.select-block.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=^|;|&|\\s)case(?=\\s|;|&|$)", "beginCaptures": { "0": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)esac(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.case-block.shell", "patterns": [{ "begin": "(?<=^|;|&|\\s)in(?=\\s|;|&|$)", "beginCaptures": { "0": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)(?=esac(\\s|;|&|$))", "name": "meta.scope.case-body.shell", "patterns": [{ "include": "#comment" }, { "include": "#case-clause" }] }, { "include": "#initial_context" }] }, { "begin": "(?<=^|;|&|\\s)if(?=\\s|;|&|$)", "beginCaptures": { "0": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)fi(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.if-block.shell", "patterns": [{ "include": "#initial_context" }] }] }, "math": { "patterns": [{ "include": "#variable" }, { "match": "\\+{1,2}|-{1,2}|!|~|\\*{1,2}|/|%|<[<=]?|>[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=", "name": "keyword.operator.arithmetic.shell" }, { "match": "0[xX][0-9A-Fa-f]+", "name": "constant.numeric.hex.shell" }, { "match": "0\\d+", "name": "constant.numeric.octal.shell" }, { "match": "\\d{1,2}#[0-9a-zA-Z@_]+", "name": "constant.numeric.other.shell" }, { "match": "\\d+", "name": "constant.numeric.integer.shell" }] }, "misc_ranges": { "patterns": [{ "include": "#logical_expression_single" }, { "include": "#logical_expression_double" }, { "begin": "\\(\\(", "beginCaptures": { "0": { "name": "punctuation.section.arithmetic.shell" } }, "end": "\\)\\)", "endCaptures": { "0": { "name": "punctuation.section.arithmetic.shell" } }, "name": "meta.arithmetic.shell", "patterns": [{ "include": "#math" }] }, { "begin": "(?<!=)\\(", "beginCaptures": { "0": { "name": "punctuation.definition.subshell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.subshell" } }, "name": "meta.scope.subshell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<![^ \\t])({)", "beginCaptures": { "1": { "name": "punctuation.definition.group.shell" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.group.shell" } }, "name": "meta.scope.group.shell", "patterns": [{ "include": "#initial_context" }] }] }, "modifiers": { "match": "(?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$)", "name": "storage.modifier.$0.shell" }, "normal_statement": { "begin": "(?!^[ \\t]*+$)(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=(?:^|;|\\||&|!|\\(|\\{|\\`)))[ \\t]*+(?!nocorrect\\W|nocorrect\\$|function\\W|function\\$|foreach\\W|foreach\\$|repeat\\W|repeat\\$|logout\\W|logout\\$|coproc\\W|coproc\\$|select\\W|select\\$|while\\W|while\\$|pushd\\W|pushd\\$|until\\W|until\\$|case\\W|case\\$|done\\W|done\\$|elif\\W|elif\\$|else\\W|else\\$|esac\\W|esac\\$|popd\\W|popd\\$|then\\W|then\\$|time\\W|time\\$|for\\W|for\\$|end\\W|end\\$|fi\\W|fi\\$|do\\W|do\\$|in\\W|in\\$|if\\W|if\\$)", "beginCaptures": {}, "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)", "endCaptures": {}, "name": "meta.statement.shell", "patterns": [{ "include": "#function_definition" }, { "include": "#assignment" }, { "begin": "[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)", "beginCaptures": {}, "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)", "endCaptures": {}, "name": "meta.statement.command.shell", "patterns": [{ "begin": "\\G", "beginCaptures": {}, "end": "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)", "endCaptures": {}, "name": "meta.statement.command.name.shell", "patterns": [{ "include": "#modifiers" }, { "match": "(?<!\\w)(?:continue|return|break)(?!\\w)", "name": "entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell" }, { "match": "(?<!\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/)(?!\\w)", "name": "entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell" }, { "include": "#variable" }, { "captures": { "1": { "name": "entity.name.function.call.shell entity.name.command.shell" } }, "match": `(?<=\\G|'|"|\\}|\\))([^ \\n\\t\\r"'=;&\\|\`\\)\\{]+)` }, { "begin": `(?:\\G|(?<! |\\t|;|\\||&|\\n|\\{|#))((?:\\$)?)((?:(")|(')))`, "beginCaptures": { "1": { "name": "meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell" }, "2": {}, "3": { "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, "4": { "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" } }, "end": "(?<!\\G)(?<=(?:\\2))", "endCaptures": {}, "patterns": [{ "include": "#continuation_of_single_quoted_command_name" }, { "include": "#continuation_of_double_quoted_command_name" }] }, { "include": "#line_continuation" }] }, { "include": "#line_continuation" }, { "include": "#option" }, { "include": "#argument" }, { "include": "#statement_context" }, { "include": "#string" }] }, { "include": "#line_continuation" }, { "include": "#normal_statement_context" }] }, "normal_statement_context": { "patterns": [{ "include": "#comment" }, { "include": "#pipeline" }, { "include": "#normal_statement_seperator" }, { "include": "#misc_ranges" }, { "include": "#boolean" }, { "include": "#redirect_number" }, { "include": "#numeric_literal" }, { "include": "#string" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#heredoc" }, { "include": "#herestring" }, { "include": "#redirection" }, { "include": "#pathname" }, { "include": "#keyword" }, { "include": "#support" }] }, "normal_statement_seperator": { "captures": { "1": { "name": "punctuation.terminator.statement.semicolon.shell" }, "2": { "name": "punctuation.separator.statement.and.shell" }, "3": { "name": "punctuation.separator.statement.or.shell" }, "4": { "name": "punctuation.separator.statement.background.shell" } }, "match": "(?:(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))|\\n)" }, "numeric_literal": { "captures": { "1": { "name": "constant.numeric.shell constant.numeric.hex.shell" }, "2": { "name": "constant.numeric.shell constant.numeric.octal.shell" }, "3": { "name": "constant.numeric.shell constant.numeric.other.shell" }, "4": { "name": "constant.numeric.shell constant.numeric.integer.shell" }, "5": { "name": "constant.numeric.shell constant.numeric.integer.shell" } }, "match": "[ \\t]*+(?<==| |\\t|^|\\{|\\(|\\[)(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(0\\d+))|(\\d{1,2}#[0-9a-zA-Z@_]+))|(-?\\d+\\.\\d+))|(-?\\d+))(?!>)" }, "option": { "begin": "[ \\t]++(-)((?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t])))", "beginCaptures": { "1": { "name": "string.unquoted.argument.shell constant.other.option.dash.shell" }, "2": { "name": "string.unquoted.argument.shell constant.other.option.shell" } }, "contentName": "string.unquoted.argument constant.other.option", "end": "(?:(?=[ \\t])|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))", "endCaptures": {}, "patterns": [{ "include": "#option_context" }] }, "option_context": { "patterns": [{ "include": "#misc_ranges" }, { "include": "#string" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#heredoc" }, { "include": "#herestring" }, { "include": "#redirection" }, { "include": "#pathname" }, { "include": "#keyword" }, { "include": "#support" }] }, "pathname": { "patterns": [{ "match": "(?<=\\s|:|=|^)~", "name": "keyword.operator.tilde.shell" }, { "match": "\\*|\\?", "name": "keyword.operator.glob.shell" }, { "begin": "([?*+@!])(\\()", "beginCaptures": { "1": { "name": "keyword.operator.extglob.shell" }, "2": { "name": "punctuation.definition.extglob.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.extglob.shell" } }, "name": "meta.structure.extglob.shell", "patterns": [{ "include": "#initial_context" }] }] }, "pipeline": { "patterns": [{ "match": "(?<=^|;|&|\\s)(time)(?=\\s|;|&|$)", "name": "keyword.other.shell" }, { "match": "[|!]", "name": "keyword.operator.pipe.shell" }] }, "redirect_number": { "captures": { "1": { "name": "keyword.operator.redirect.stdout.shell" }, "2": { "name": "keyword.operator.redirect.stderr.shell" }, "3": { "name": "keyword.operator.redirect.$3.shell" } }, "match": "(?<=[ \\t])(?:(1)|(2)|(\\d+))(?=>)" }, "redirection": { "patterns": [{ "begin": "[><]\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.interpolated.process-substitution.shell", "patterns": [{ "include": "#initial_context" }] }, { "match": "(?<![<>])(&>|\\d*>&\\d*|\\d*(>>|>|<)|\\d*<&|\\d*<>)(?![<>])", "name": "keyword.operator.redirect.shell" }] }, "regex_comparison": { "match": "\\=~", "name": "keyword.operator.logical.regex.shell" }, "regexp": { "patterns": [{ "match": ".+" }] }, "simple_options": { "captures": { "0": { "patterns": [{ "captures": { "1": { "name": "string.unquoted.argument.shell constant.other.option.dash.shell" }, "2": { "name": "string.unquoted.argument.shell constant.other.option.shell" } }, "match": "[ \\t]++(\\-)(\\w+)" }] } }, "match": "(?:[ \\t]++\\-\\w+)*" }, "start_of_command": { "match": "[ \\t]*+(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)" }, "start_of_double_quoted_command_name": { "captures": { "1": { "name": "entity.name.function.call.shell entity.name.command.shell", "patterns": [{ "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "captures": { "1": { "name": "constant.language.$1.shell" } }, "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)" }] } }, "match": '(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^ \\t\\n\'&;<>\\(\\)\\$`\\\\"\\|]+(?!>)))?(?:(?:\\$")|")', "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, "start_of_single_quoted_command_name": { "captures": { "1": { "name": "entity.name.function.call.shell entity.name.command.shell", "patterns": [{ "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "captures": { "1": { "name": "constant.language.$1.shell" } }, "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)" }] } }, "match": "(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:[ \\t]*+([^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$')|')", "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, "string": { "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.shell" }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.single.shell" }, { "begin": '\\$?"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.double.shell", "patterns": [{ "match": '\\\\[\\$\\n`"\\\\]', "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" }] }, { "begin": "\\$'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.single.dollar.shell", "patterns": [{ "match": "\\\\(?:a|b|e|f|n|r|t|v|\\\\|')", "name": "constant.character.escape.ansi-c.shell" }, { "match": '\\\\[0-9]{3}"', "name": "constant.character.escape.octal.shell" }, { "match": '\\\\x[0-9a-fA-F]{2}"', "name": "constant.character.escape.hex.shell" }, { "match": '\\\\c."', "name": "constant.character.escape.control-char.shell" }] }] }, "support": { "patterns": [{ "match": "(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)", "name": "support.function.builtin.shell" }] }, "variable": { "patterns": [{ "captures": { "1": { "name": "punctuation.definition.variable.shell variable.parameter.positional.all.shell" }, "2": { "name": "variable.parameter.positional.all.shell" } }, "match": "(\\$)(\\@(?!\\w))" }, { "captures": { "1": { "name": "punctuation.definition.variable.shell variable.parameter.positional.shell" }, "2": { "name": "variable.parameter.positional.shell" } }, "match": "(\\$)([0-9](?!\\w))" }, { "captures": { "1": { "name": "punctuation.definition.variable.shell variable.language.special.shell" }, "2": { "name": "variable.language.special.shell" } }, "match": "(\\$)([-*#?$!0_](?!\\w))" }, { "begin": "(\\$)(\\{)[ \\t]*+(?=\\d)", "beginCaptures": { "1": { "name": "punctuation.definition.variable.shell variable.parameter.positional.shell" }, "2": { "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell" } }, "contentName": "meta.parameter-expansion", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell" } }, "patterns": [{ "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", "name": "keyword.operator.expansion.shell" }, { "captures": { "1": { "name": "punctuation.section.array.shell" }, "2": { "name": "punctuation.section.array.shell" } }, "match": "(\\[)[^\\]]+(\\])" }, { "match": "[0-9]+", "name": "variable.parameter.positional.shell" }, { "match": "(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)", "name": "variable.other.normal.shell" }, { "include": "#variable" }, { "include": "#string" }] }, { "begin": "(\\$)(\\{)", "beginCaptures": { "1": { "name": "punctuation.definition.variable.shell" }, "2": { "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell" } }, "contentName": "meta.parameter-expansion", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell" } }, "patterns": [{ "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", "name": "keyword.operator.expansion.shell" }, { "captures": { "1": { "name": "punctuation.section.array.shell" }, "2": { "name": "punctuation.section.array.shell" } }, "match": "(\\[)[^\\]]+(\\])" }, { "match": "(?<!\\w)[a-zA-Z_0-9-]+(?!\\w)", "name": "variable.other.normal.shell" }, { "include": "#variable" }, { "include": "#string" }] }, { "captures": { "1": { "name": "punctuation.definition.variable.shell variable.other.normal.shell" }, "2": { "name": "variable.other.normal.shell" } }, "match": "(\\$)(\\w+(?!\\w))" }] } }, "scopeName": "source.shell", "aliases": ["bash", "sh", "shell", "zsh"] });
|
|
1
|
+
const lang = Object.freeze({ "displayName": "Shell", "name": "shellscript", "patterns": [{ "include": "#initial_context" }], "repository": { "alias_statement": { "begin": "(?:(alias)(?:[ \\t]*+)((?:(?:((?<!\\w)-\\w+\\b)(?:[ \\t]*+))*))(?:(?:[ \\t]*+)(?:(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))(?:[ \\t]*+)((?:(?:((?<!\\w)-\\w+\\b)(?:[ \\t]*+))*)))?)(?:((?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))(?:(?:(\\[)((?:(?:(?:(?:\\$?)(?:(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))|@)|\\*)|(-?\\d+)))(\\]))?))(?:(?:(\\=)|(\\+\\=))|(\\-\\=))))", "beginCaptures": { "1": { "name": "storage.type.alias.shell" }, "2": { "patterns": [{ "match": "(?<!\\w)-\\w+\\b", "name": "string.unquoted.argument.shell constant.other.option.shell" }] }, "3": { "name": "string.unquoted.argument.shell constant.other.option.shell" }, "4": { "name": "storage.modifier.$4.shell" }, "5": { "patterns": [{ "match": "(?<!\\w)-\\w+\\b", "name": "string.unquoted.argument.shell constant.other.option.shell" }] }, "6": { "name": "string.unquoted.argument.shell constant.other.option.shell" }, "7": { "name": "variable.other.assignment.shell" }, "8": { "name": "punctuation.definition.array.access.shell" }, "9": { "name": "variable.other.assignment.shell" }, "10": { "name": "constant.numeric.shell constant.numeric.integer.shell" }, "11": { "name": "punctuation.definition.array.access.shell" }, "12": { "name": "keyword.operator.assignment.shell" }, "13": { "name": "keyword.operator.assignment.compound.shell" }, "14": { "name": "keyword.operator.assignment.compound.shell" } }, "end": "(?:(?= |\\t|$)|(?:(?:(?:(;)|(&&))|(\\|\\|))|(&)))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.semicolon.shell" }, "2": { "name": "punctuation.separator.statement.and.shell" }, "3": { "name": "punctuation.separator.statement.or.shell" }, "4": { "name": "punctuation.separator.statement.background.shell" } }, "name": "meta.expression.assignment.shell", "patterns": [{ "include": "#normal_statement_context" }] }, "argument": { "begin": "(?:[ \\t]++)(?!(?:&|\\||\\(|\\[|#|\\n|$|;))", "beginCaptures": {}, "end": "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)", "endCaptures": {}, "name": "meta.argument.shell", "patterns": [{ "include": "#argument_context" }, { "include": "#line_continuation" }] }, "argument_context": { "patterns": [{ "captures": { "1": { "name": "string.unquoted.argument.shell", "patterns": [{ "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "captures": { "1": { "name": "constant.language.$1.shell" } }, "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)" }] } }, "match": "(?:[ \\t]*+)((?:[^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+)(?!>))" }, { "include": "#normal_statement_context" }] }, "array_value": { "begin": "(?:[ \\t]*+)(?:(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))(?:[ \\t]*+)((?:(?:((?<!\\w)-\\w+\\b)(?:[ \\t]*+))*)))?)(?:((?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))(?:(?:(\\[)((?:(?:(?:(?:\\$?)(?:(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))|@)|\\*)|(-?\\d+)))(\\]))?))(?:(?:(\\=)|(\\+\\=))|(\\-\\=))(?:[ \\t]*+)(\\()", "beginCaptures": { "1": { "name": "storage.modifier.$1.shell" }, "2": { "patterns": [{ "match": "(?<!\\w)-\\w+\\b", "name": "string.unquoted.argument.shell constant.other.option.shell" }] }, "3": { "name": "string.unquoted.argument.shell constant.other.option.shell" }, "4": { "name": "variable.other.assignment.shell" }, "5": { "name": "punctuation.definition.array.access.shell" }, "6": { "name": "variable.other.assignment.shell" }, "7": { "name": "constant.numeric.shell constant.numeric.integer.shell" }, "8": { "name": "punctuation.definition.array.access.shell" }, "9": { "name": "keyword.operator.assignment.shell" }, "10": { "name": "keyword.operator.assignment.compound.shell" }, "11": { "name": "keyword.operator.assignment.compound.shell" }, "12": { "name": "punctuation.definition.array.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.array.shell" } }, "patterns": [{ "include": "#comment" }, { "captures": { "1": { "name": "punctuation.definition.bracket.shell" }, "2": { "name": "string.unquoted.shell entity.other.attribute-name.shell" }, "3": { "name": "punctuation.definition.bracket.shell" }, "4": { "name": "punctuation.definition.assignment.shell" } }, "match": "(?:(\\[)(.+?)(\\])(\\=))" }, { "include": "#normal_statement_context" }, { "include": "#simple_unquoted" }] }, "assignment": { "patterns": [{ "include": "#array_value" }, { "begin": "(?:[ \\t]*+)(?:(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))(?:[ \\t]*+)((?:(?:((?<!\\w)-\\w+\\b)(?:[ \\t]*+))*)))?)(?:((?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))(?:(?:(\\[)((?:(?:(?:(?:\\$?)(?:(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))|@)|\\*)|(-?\\d+)))(\\]))?))(?:(?:(\\=)|(\\+\\=))|(\\-\\=))", "beginCaptures": { "1": { "name": "storage.modifier.$1.shell" }, "2": { "patterns": [{ "match": "(?<!\\w)-\\w+\\b", "name": "string.unquoted.argument.shell constant.other.option.shell" }] }, "3": { "name": "string.unquoted.argument.shell constant.other.option.shell" }, "4": { "name": "variable.other.assignment.shell" }, "5": { "name": "punctuation.definition.array.access.shell" }, "6": { "name": "variable.other.assignment.shell" }, "7": { "name": "constant.numeric.shell constant.numeric.integer.shell" }, "8": { "name": "punctuation.definition.array.access.shell" }, "9": { "name": "keyword.operator.assignment.shell" }, "10": { "name": "keyword.operator.assignment.compound.shell" }, "11": { "name": "keyword.operator.assignment.compound.shell" } }, "end": "(?:(?= |\\t|$)|(?:(?:(?:(;)|(&&))|(\\|\\|))|(&)))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.semicolon.shell" }, "2": { "name": "punctuation.separator.statement.and.shell" }, "3": { "name": "punctuation.separator.statement.or.shell" }, "4": { "name": "punctuation.separator.statement.background.shell" } }, "name": "meta.expression.assignment.shell", "patterns": [{ "include": "#comment" }, { "include": "#argument_context" }] }] }, "basic_command_name": { "captures": { "1": { "name": "storage.modifier.$1.shell" }, "2": { "name": "entity.name.function.call.shell entity.name.command.shell", "patterns": [{ "match": "(?<!\\w)(?:continue|return|break)(?!\\w)", "name": "keyword.control.$0.shell" }, { "match": "(?<!\\w)(?:(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/))(?!\\w)", "name": "support.function.builtin.shell" }, { "include": "#variable" }] } }, "match": `(?:(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/)))(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))|((?!"|'|\\\\\\n?$)(?:[^!'" \\t\\n\\r]+?)))(?:(?= |\\t)|(?:(?=;|\\||&|\\n|\\)|\\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\))))`, "name": "meta.statement.command.name.basic.shell" }, "block_comment": { "begin": "(?:(?:\\s*+)(\\/\\*))", "beginCaptures": { "1": { "name": "punctuation.definition.comment.begin.shell" } }, "end": "\\*\\/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.shell" } }, "name": "comment.block.shell" }, "boolean": { "match": "\\b(?:true|false)\\b", "name": "constant.language.$0.shell" }, "case_statement": { "begin": "(?:(\\bcase\\b)(?:[ \\t]*+)(.+)(?:[ \\t]*+)(\\bin\\b))", "beginCaptures": { "1": { "name": "keyword.control.case.shell" }, "2": { "patterns": [{ "include": "#initial_context" }] }, "3": { "name": "keyword.control.in.shell" } }, "end": "\\besac\\b", "endCaptures": { "0": { "name": "keyword.control.esac.shell" } }, "name": "meta.case.shell", "patterns": [{ "include": "#comment" }, { "captures": { "1": { "name": "keyword.operator.pattern.case.default.shell" } }, "match": "(?:[ \\t]*+)(\\* *\\))" }, { "begin": "(?<!\\))(?!(?:[ \\t]*+)(?:esac\\b|$))", "beginCaptures": {}, "end": "(?:(?=\\besac\\b)|(\\)))", "endCaptures": { "1": { "name": "keyword.operator.pattern.case.shell" } }, "name": "meta.case.entry.pattern.shell", "patterns": [{ "include": "#case_statement_context" }] }, { "begin": "(?<=\\))", "beginCaptures": {}, "end": "(?:(;;)|(?=\\besac\\b))", "endCaptures": { "1": { "name": "punctuation.terminator.statement.case.shell" } }, "name": "meta.case.entry.body.shell", "patterns": [{ "include": "#normal_statement_inner" }, { "include": "#initial_context" }] }] }, "case_statement_context": { "patterns": [{ "match": "\\*", "name": "variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell" }, { "match": "\\+", "name": "variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell" }, { "match": "\\?", "name": "variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell" }, { "match": "@", "name": "variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell" }, { "match": "\\|", "name": "keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.definition.regex.group.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.definition.regex.group.shell" } }, "name": "meta.parenthese.shell", "patterns": [{ "include": "#case_statement_context" }] }, { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.character-class.shell" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.character-class.shell" } }, "name": "string.regexp.character-class.shell", "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.shell" }] }, { "include": "#string" }, { "match": "[^) \\t\\n\\[\\?\\*\\|\\@]", "name": "string.unquoted.pattern.shell string.regexp.unquoted.shell" }] }, "comment": { "captures": { "1": { "name": "comment.line.number-sign.shell meta.shebang.shell" }, "2": { "name": "punctuation.definition.comment.shebang.shell" }, "3": { "name": "comment.line.number-sign.shell" }, "4": { "name": "punctuation.definition.comment.shell" } }, "match": "(?:(?:^|(?:[ \\t]++))(?:((?:(#!)(?:.*)))|((?:(#)(?:.*)))))" }, "comments": { "patterns": [{ "include": "#block_comment" }, { "include": "#line_comment" }] }, "compound-command": { "patterns": [{ "begin": "\\[{1,2}", "beginCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "end": "\\]{1,2}", "endCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "name": "meta.scope.logical-expression.shell", "patterns": [{ "include": "#logical-expression" }, { "include": "#initial_context" }] }, { "captures": { "1": { "name": "punctuation.definition.evaluation.arithmetic.begin.shell" }, "2": { "name": "string.other.math.shell", "patterns": [{ "include": "#math" }] }, "3": { "name": "punctuation.definition.evaluation.arithmetic.end.shell" } }, "match": "(\\$\\({2})(.+)(\\)\\s*\\))" }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.subshell.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.subshell.shell" } }, "name": "meta.scope.subshell.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=\\s|^){(?=\\s|$)", "beginCaptures": { "0": { "name": "punctuation.definition.group.shell" } }, "end": "(?<=^|;)\\s*(})", "endCaptures": { "1": { "name": "punctuation.definition.group.shell" } }, "name": "meta.scope.group.shell", "patterns": [{ "include": "#initial_context" }] }] }, "continuation_of_double_quoted_command_name": { "begin": '(?:\\G(?<="))', "beginCaptures": {}, "contentName": "meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command", "end": '"', "endCaptures": { "0": { "name": "string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell" } }, "patterns": [{ "match": '\\\\[\\$\\n`"\\\\]', "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" }] }, "continuation_of_single_quoted_command_name": { "begin": "(?:\\G(?<='))", "beginCaptures": {}, "contentName": "meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command", "end": "'", "endCaptures": { "0": { "name": "string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell" } } }, "custom_command_names": { "patterns": [] }, "custom_commands": { "patterns": [] }, "double_quote_context": { "patterns": [{ "match": '\\\\[\\$`"\\\\\\n]', "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" }] }, "double_quote_escape_char": { "match": '\\\\[\\$`"\\\\\\n]', "name": "constant.character.escape.shell" }, "function_definition": { "applyEndPatternLast": 1, "begin": `(?:[ \\t]*+)(?:(?:(\\bfunction\\b)(?:[ \\t]*+)([^ \\t\\n\\r\\(\\)="']+)(?:(?:(\\()(?:[ \\t]*+)(\\)))?))|(?:([^ \\t\\n\\r\\(\\)="']+)(?:[ \\t]*+)(\\()(?:[ \\t]*+)(\\))))`, "beginCaptures": { "1": { "name": "storage.type.function.shell" }, "2": { "name": "entity.name.function.shell" }, "3": { "name": "punctuation.definition.arguments.shell" }, "4": { "name": "punctuation.definition.arguments.shell" }, "5": { "name": "entity.name.function.shell" }, "6": { "name": "punctuation.definition.arguments.shell" }, "7": { "name": "punctuation.definition.arguments.shell" } }, "end": "(?<=\\}|\\))", "endCaptures": {}, "name": "meta.function.shell", "patterns": [{ "match": "(?:\\G(?:\\t| |\\n))" }, { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, "name": "meta.function.body.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.group.shell punctuation.section.function.definition.shell" } }, "name": "meta.function.body.shell", "patterns": [{ "include": "#initial_context" }] }, { "include": "#initial_context" }] }, "heredoc": { "patterns": [{ "begin": `(?:((?<!<)(?:<<-))(?:[ \\t]*+)("|')(?:[ \\t]*+)([^"']+?)(?=\\s|;|&|<|"|')(?:\\2)(.*))`, "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": {}, "3": { "name": "punctuation.definition.string.heredoc.shell" }, "4": { "patterns": [{ "include": "#redirect_fix" }, { "include": "#normal_statement_inner" }] } }, "contentName": "string.quoted.heredoc.indent", "end": "(?:(?:^\\t*)(?:\\3)(?=\\s|;|&|$))", "endCaptures": { "0": { "name": "punctuation.definition.string.heredoc.shell" } }, "patterns": [] }, { "begin": `(?:((?<!<)(?:<<)(?!<))(?:[ \\t]*+)("|')(?:[ \\t]*+)([^"']+?)(?=\\s|;|&|<|"|')(?:\\2)(.*))`, "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": {}, "3": { "name": "punctuation.definition.string.heredoc.shell" }, "4": { "patterns": [{ "include": "#redirect_fix" }, { "include": "#normal_statement_inner" }] } }, "contentName": "string.quoted.heredoc.no-indent", "end": "(?:^(?:\\3)(?=\\s|;|&|$))", "endCaptures": { "0": { "name": "punctuation.definition.string.heredoc.shell" } }, "patterns": [] }, { "begin": `(?:((?<!<)(?:<<-))(?:[ \\t]*+)([^"' \\t]+)(?=\\s|;|&|<|"|')(.*))`, "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": { "name": "punctuation.definition.string.heredoc.shell" }, "3": { "patterns": [{ "include": "#redirect_fix" }, { "include": "#normal_statement_inner" }] } }, "contentName": "string.unquoted.heredoc.indent", "end": "(?:(?:^\\t*)(?:\\2)(?=\\s|;|&|$))", "endCaptures": { "0": { "name": "punctuation.definition.string.heredoc.shell" } }, "patterns": [{ "include": "#double_quote_escape_char" }, { "include": "#variable" }, { "include": "#interpolation" }] }, { "begin": `(?:((?<!<)(?:<<)(?!<))(?:[ \\t]*+)([^"' \\t]+)(?=\\s|;|&|<|"|')(.*))`, "beginCaptures": { "1": { "name": "keyword.operator.heredoc.shell" }, "2": { "name": "punctuation.definition.string.heredoc.shell" }, "3": { "patterns": [{ "include": "#redirect_fix" }, { "include": "#normal_statement_inner" }] } }, "contentName": "string.unquoted.heredoc.no-indent", "end": "(?:^(?:\\2)(?=\\s|;|&|$))", "endCaptures": { "0": { "name": "punctuation.definition.string.heredoc.shell" } }, "patterns": [{ "include": "#double_quote_escape_char" }, { "include": "#variable" }, { "include": "#interpolation" }] }] }, "herestring": { "patterns": [{ "begin": "(<<<)\\s*(('))", "beginCaptures": { "1": { "name": "keyword.operator.herestring.shell" }, "2": { "name": "string.quoted.single.shell" }, "3": { "name": "punctuation.definition.string.begin.shell" } }, "contentName": "string.quoted.single.shell", "end": "(')", "endCaptures": { "0": { "name": "string.quoted.single.shell" }, "1": { "name": "punctuation.definition.string.end.shell" } }, "name": "meta.herestring.shell" }, { "begin": '(<<<)\\s*(("))', "beginCaptures": { "1": { "name": "keyword.operator.herestring.shell" }, "2": { "name": "string.quoted.double.shell" }, "3": { "name": "punctuation.definition.string.begin.shell" } }, "contentName": "string.quoted.double.shell", "end": '(")', "endCaptures": { "0": { "name": "string.quoted.double.shell" }, "1": { "name": "punctuation.definition.string.end.shell" } }, "name": "meta.herestring.shell", "patterns": [{ "include": "#double_quote_context" }] }, { "captures": { "1": { "name": "keyword.operator.herestring.shell" }, "2": { "name": "string.unquoted.herestring.shell", "patterns": [{ "include": "#initial_context" }] } }, "match": "(<<<)\\s*(([^\\s)\\\\]|\\\\.)+)", "name": "meta.herestring.shell" }] }, "initial_context": { "patterns": [{ "include": "#comment" }, { "include": "#pipeline" }, { "include": "#normal_statement_seperator" }, { "include": "#logical_expression_double" }, { "include": "#logical_expression_single" }, { "include": "#keyword_var_statement" }, { "include": "#case_statement" }, { "include": "#misc_ranges" }, { "include": "#loop" }, { "include": "#function_definition" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#heredoc" }, { "include": "#herestring" }, { "include": "#redirection" }, { "include": "#pathname" }, { "include": "#keyword" }, { "include": "#alias_statement" }, { "include": "#normal_statement" }, { "include": "#string" }, { "include": "#support" }] }, "inline_comment": { "captures": { "1": { "name": "comment.block.shell punctuation.definition.comment.begin.shell" }, "2": { "name": "comment.block.shell" }, "3": { "patterns": [{ "match": "\\*\\/", "name": "comment.block.shell punctuation.definition.comment.end.shell" }, { "match": "\\*", "name": "comment.block.shell" }] } }, "match": "(\\/\\*)((?:(?:[^\\*]|(?:(?:\\*++)[^\\/]))*+)((?:(?:\\*++)\\/)))" }, "interpolation": { "patterns": [{ "captures": { "1": { "name": "punctuation.definition.evaluation.arithmetic.begin.shell" }, "2": { "name": "string.other.math.shell", "patterns": [{ "include": "#math" }] }, "3": { "name": "punctuation.definition.evaluation.arithmetic.end.shell" } }, "match": "(\\$\\({2})(.+)(\\)\\s*\\))" }, { "begin": "`", "beginCaptures": { "0": { "name": "punctuation.definition.evaluation.backticks.shell" } }, "end": "`", "endCaptures": { "0": { "name": "punctuation.definition.evaluation.backticks.shell" } }, "name": "string.interpolated.backtick.shell", "patterns": [{ "match": "\\\\[`\\\\$]", "name": "constant.character.escape.shell" }, { "begin": "(?<=\\W)(?=#)(?!#{)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.shell" } }, "end": "(?!\\G)", "patterns": [{ "begin": "#", "beginCaptures": { "0": { "name": "punctuation.definition.comment.shell" } }, "end": "(?=`)", "name": "comment.line.number-sign.shell" }] }, { "include": "#initial_context" }] }, { "begin": "\\$\\(", "beginCaptures": { "0": { "name": "punctuation.definition.evaluation.parens.begin.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.evaluation.parens.end.shell" } }, "name": "string.interpolated.dollar.shell", "patterns": [{ "include": "#initial_context" }] }] }, "keyword": { "patterns": [{ "match": "(?<=^|;|&| |\\t)(?:continue|foreach|return|select|repeat|break|until|while|case|done|elif|else|esac|then|for|end|do|if|fi|in)(?= |\\t|;|&|$)", "name": "keyword.control.$0.shell" }] }, "keyword_var_statement": { "begin": "(?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$)", "beginCaptures": { "0": { "name": "storage.modifier.$0.shell" } }, "end": "\\n", "endCaptures": {}, "name": "meta.statement.shell meta.expression.assignment.shell", "patterns": [{ "match": "(?<!\\w)-\\w+\\b", "name": "string.unquoted.argument.shell constant.other.option.shell" }, { "include": "#array_value" }, { "captures": { "1": { "name": "variable.other.assignment.shell" }, "2": { "name": "punctuation.definition.array.access.shell" }, "3": { "name": "variable.other.assignment.shell" }, "4": { "name": "constant.numeric.shell constant.numeric.integer.shell" }, "5": { "name": "punctuation.definition.array.access.shell" }, "6": { "name": "keyword.operator.assignment.shell" }, "7": { "name": "keyword.operator.assignment.compound.shell" }, "8": { "name": "keyword.operator.assignment.compound.shell" }, "9": { "name": "constant.numeric.shell constant.numeric.hex.shell" }, "10": { "name": "constant.numeric.shell constant.numeric.octal.shell" }, "11": { "name": "constant.numeric.shell constant.numeric.other.shell" }, "12": { "name": "constant.numeric.shell constant.numeric.decimal.shell" }, "13": { "name": "constant.numeric.shell constant.numeric.version.shell" }, "14": { "name": "constant.numeric.shell constant.numeric.integer.shell" } }, "match": "(?:((?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))(?:(?:(\\[)((?:(?:(?:(?:\\$?)(?:(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w))|@)|\\*)|(-?\\d+)))(\\]))?)(?:(?:(?:(\\=)|(\\+\\=))|(\\-\\=))?)(?:(?:(?<==| |\\t|^|\\{|\\(|\\[)(?:(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(0\\d+))|(\\d{1,2}#[0-9a-zA-Z@_]+))|(-?\\d+(?:\\.\\d+)))|(-?\\d+(?:\\.\\d+)+))|(-?\\d+))(?= |\\t|$|\\}|\\)|;))?))" }, { "include": "#normal_statement_context" }] }, "line_comment": { "begin": "(?:\\s*+)(\\/\\/)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.shell" } }, "end": "(?<=\\n)(?<!\\\\\\n)", "endCaptures": {}, "name": "comment.line.double-slash.shell", "patterns": [{ "include": "#line_continuation_character" }] }, "line_continuation": { "match": "\\\\(?=\\n)", "name": "constant.character.escape.line-continuation.shell" }, "logical-expression": { "patterns": [{ "comment": "do we want a special rule for ( expr )?", "match": "=[=~]?|!=?|<|>|&&|\\|\\|", "name": "keyword.operator.logical.shell" }, { "match": "(?<!\\S)-(nt|ot|ef|eq|ne|l[te]|g[te]|[a-hknoprstuwxzOGLSN])\\b", "name": "keyword.operator.logical.shell" }] }, "logical_expression_context": { "patterns": [{ "include": "#regex_comparison" }, { "include": "#logical-expression" }, { "include": "#logical_expression_single" }, { "include": "#logical_expression_double" }, { "include": "#comment" }, { "include": "#boolean" }, { "include": "#redirect_number" }, { "include": "#numeric_literal" }, { "include": "#pipeline" }, { "include": "#normal_statement_seperator" }, { "include": "#string" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#heredoc" }, { "include": "#herestring" }, { "include": "#pathname" }, { "include": "#keyword" }, { "include": "#support" }] }, "logical_expression_double": { "begin": "\\[\\[", "beginCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "end": "\\]\\]", "endCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "name": "meta.scope.logical-expression.shell", "patterns": [{ "include": "#logical_expression_context" }] }, "logical_expression_single": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.logical-expression.shell" } }, "name": "meta.scope.logical-expression.shell", "patterns": [{ "include": "#logical_expression_context" }] }, "loop": { "patterns": [{ "begin": "(?<=^|;|&|\\s)(for)\\s+(?=\\({2})", "beginCaptures": { "1": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)(?:done|(?=\\)))(?=\\s|;|&|$|\\))", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.for-loop.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=^|;|&|\\s)(for)\\s+(.+?)\\s+(in)(?=\\s|;|&|$)", "beginCaptures": { "1": { "name": "keyword.control.shell" }, "2": { "name": "variable.other.loop.shell", "patterns": [{ "include": "#string" }] }, "3": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.for-in-loop.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=^|;|&|\\s)(while|until)(?=\\s|;|&|$)", "beginCaptures": { "1": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)done(?=\\s|;|&|$|\\))", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.while-loop.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=^|;|&|\\s)(select)\\s+((?:[^\\s\\\\]|\\\\.)+)(?=\\s|;|&|$)", "beginCaptures": { "1": { "name": "keyword.control.shell" }, "2": { "name": "variable.other.loop.shell" } }, "end": "(?<=^|;|&|\\s)(done)(?=\\s|;|&|$|\\))", "endCaptures": { "1": { "name": "keyword.control.shell" } }, "name": "meta.scope.select-block.shell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<=^|;|&|\\s)if(?=\\s|;|&|$)", "beginCaptures": { "0": { "name": "keyword.control.shell" } }, "end": "(?<=^|;|&|\\s)fi(?=\\s|;|&|$)", "endCaptures": { "0": { "name": "keyword.control.shell" } }, "name": "meta.scope.if-block.shell", "patterns": [{ "include": "#initial_context" }] }] }, "math": { "patterns": [{ "include": "#variable" }, { "match": "\\+{1,2}|-{1,2}|!|~|\\*{1,2}|/|%|<[<=]?|>[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=", "name": "keyword.operator.arithmetic.shell" }, { "match": "0[xX][0-9A-Fa-f]+", "name": "constant.numeric.hex.shell" }, { "match": "0\\d+", "name": "constant.numeric.octal.shell" }, { "match": "\\d{1,2}#[0-9a-zA-Z@_]+", "name": "constant.numeric.other.shell" }, { "match": "\\d+", "name": "constant.numeric.integer.shell" }, { "match": "(?<!\\w)(?:[a-zA-Z_0-9]+)(?!\\w)", "name": "variable.other.normal.shell" }] }, "misc_ranges": { "patterns": [{ "include": "#logical_expression_single" }, { "include": "#logical_expression_double" }, { "begin": "\\(\\(", "beginCaptures": { "0": { "name": "punctuation.section.arithmetic.shell" } }, "end": "\\)\\)", "endCaptures": { "0": { "name": "punctuation.section.arithmetic.shell" } }, "name": "meta.arithmetic.shell", "patterns": [{ "include": "#math" }] }, { "begin": "(?<!=)\\(", "beginCaptures": { "0": { "name": "punctuation.definition.subshell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.subshell" } }, "name": "meta.scope.subshell", "patterns": [{ "include": "#initial_context" }] }, { "begin": "(?<![^ \\t])({)", "beginCaptures": { "1": { "name": "punctuation.definition.group.shell" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.group.shell" } }, "name": "meta.scope.group.shell", "patterns": [{ "include": "#initial_context" }] }] }, "modifiers": { "match": "(?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$)", "name": "storage.modifier.$0.shell" }, "normal_statement": { "begin": "(?:(?!^[ \\t]*+$)(?:(?<=^until | until |\\tuntil |^while | while |\\twhile |^elif | elif |\\telif |^else | else |\\telse |^then | then |\\tthen |^do | do |\\tdo |^if | if |\\tif )|(?<=(?:^|;|\\||&|!|\\(|\\{|\\`)))(?:[ \\t]*+)(?!nocorrect\\W|nocorrect\\$|function\\W|function\\$|foreach\\W|foreach\\$|repeat\\W|repeat\\$|logout\\W|logout\\$|coproc\\W|coproc\\$|select\\W|select\\$|while\\W|while\\$|pushd\\W|pushd\\$|until\\W|until\\$|case\\W|case\\$|done\\W|done\\$|elif\\W|elif\\$|else\\W|else\\$|esac\\W|esac\\$|popd\\W|popd\\$|then\\W|then\\$|time\\W|time\\$|for\\W|for\\$|end\\W|end\\$|fi\\W|fi\\$|do\\W|do\\$|in\\W|in\\$|if\\W|if\\$))", "beginCaptures": {}, "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)", "endCaptures": {}, "name": "meta.statement.shell", "patterns": [{ "include": "#normal_statement_inner" }] }, "normal_statement_context": { "patterns": [{ "include": "#comment" }, { "include": "#pipeline" }, { "include": "#normal_statement_seperator" }, { "include": "#misc_ranges" }, { "include": "#boolean" }, { "include": "#redirect_number" }, { "include": "#numeric_literal" }, { "include": "#string" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#heredoc" }, { "include": "#herestring" }, { "include": "#redirection" }, { "include": "#pathname" }, { "include": "#keyword" }, { "include": "#support" }] }, "normal_statement_inner": { "patterns": [{ "include": "#keyword_var_statement" }, { "include": "#case_statement" }, { "include": "#function_definition" }, { "include": "#assignment" }, { "begin": "(?:(?:[ \\t]*+)(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)))", "beginCaptures": {}, "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)", "endCaptures": {}, "name": "meta.statement.command.shell", "patterns": [{ "begin": "\\G", "beginCaptures": {}, "end": "(?= |\\t|;|\\||&|$|\\n|\\)|\\`)", "endCaptures": {}, "name": "meta.statement.command.name.shell", "patterns": [{ "include": "#modifiers" }, { "match": "(?<!\\w)(?:continue|return|break)(?!\\w)", "name": "entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell" }, { "match": "(?<!\\w)(?:(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|:|\\.)(?!\\/))(?!\\w)", "name": "entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell" }, { "include": "#variable" }, { "captures": { "1": { "name": "entity.name.function.call.shell entity.name.command.shell" } }, "match": `(?:(?<=\\G|'|"|\\}|\\))([^ \\n\\t\\r"'=;&\\|\`\\)\\{]+))` }, { "begin": `(?:(?:\\G|(?<! |\\t|;|\\||&|\\n|\\{|#))(?:(\\$?)((?:(")|(')))))`, "beginCaptures": { "1": { "name": "meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell" }, "2": {}, "3": { "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, "4": { "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" } }, "end": "(?<!\\G)(?<=(?:\\2))", "endCaptures": {}, "patterns": [{ "include": "#continuation_of_single_quoted_command_name" }, { "include": "#continuation_of_double_quoted_command_name" }] }, { "include": "#line_continuation" }] }, { "include": "#line_continuation" }, { "include": "#option" }, { "include": "#argument" }, { "include": "#string" }] }, { "include": "#line_continuation" }, { "include": "#normal_statement_context" }] }, "normal_statement_seperator": { "captures": { "1": { "name": "punctuation.terminator.statement.semicolon.shell" }, "2": { "name": "punctuation.separator.statement.and.shell" }, "3": { "name": "punctuation.separator.statement.or.shell" }, "4": { "name": "punctuation.separator.statement.background.shell" } }, "match": "(?:(?:(?:(;)|(&&))|(\\|\\|))|(&))" }, "numeric_literal": { "captures": { "1": { "name": "constant.numeric.shell constant.numeric.hex.shell" }, "2": { "name": "constant.numeric.shell constant.numeric.octal.shell" }, "3": { "name": "constant.numeric.shell constant.numeric.other.shell" }, "4": { "name": "constant.numeric.shell constant.numeric.decimal.shell" }, "5": { "name": "constant.numeric.shell constant.numeric.version.shell" }, "6": { "name": "constant.numeric.shell constant.numeric.integer.shell" } }, "match": "(?<==| |\\t|^|\\{|\\(|\\[)(?:(?:(?:(?:(?:(0[xX][0-9A-Fa-f]+)|(0\\d+))|(\\d{1,2}#[0-9a-zA-Z@_]+))|(-?\\d+(?:\\.\\d+)))|(-?\\d+(?:\\.\\d+)+))|(-?\\d+))(?= |\\t|$|\\}|\\)|;)" }, "option": { "begin": "(?:(?:[ \\t]++)(-)((?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))))", "beginCaptures": { "1": { "name": "string.unquoted.argument.shell constant.other.option.dash.shell" }, "2": { "name": "string.unquoted.argument.shell constant.other.option.shell" } }, "contentName": "string.unquoted.argument constant.other.option", "end": "(?:(?=[ \\t])|(?:(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?<!\\\\)))", "endCaptures": {}, "patterns": [{ "include": "#option_context" }] }, "option_context": { "patterns": [{ "include": "#misc_ranges" }, { "include": "#string" }, { "include": "#variable" }, { "include": "#interpolation" }, { "include": "#heredoc" }, { "include": "#herestring" }, { "include": "#redirection" }, { "include": "#pathname" }, { "include": "#keyword" }, { "include": "#support" }] }, "pathname": { "patterns": [{ "match": "(?<=\\s|:|=|^)~", "name": "keyword.operator.tilde.shell" }, { "match": "\\*|\\?", "name": "keyword.operator.glob.shell" }, { "begin": "([?*+@!])(\\()", "beginCaptures": { "1": { "name": "keyword.operator.extglob.shell" }, "2": { "name": "punctuation.definition.extglob.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.extglob.shell" } }, "name": "meta.structure.extglob.shell", "patterns": [{ "include": "#initial_context" }] }] }, "pipeline": { "patterns": [{ "match": "(?<=^|;|&|\\s)(time)(?=\\s|;|&|$)", "name": "keyword.other.shell" }, { "match": "[|!]", "name": "keyword.operator.pipe.shell" }] }, "redirect_fix": { "captures": { "1": { "name": "keyword.operator.redirect.shell" }, "2": { "name": "string.unquoted.argument.shell" } }, "match": "(?:(>>?)(?:[ \\t]*+)([^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+))" }, "redirect_number": { "captures": { "1": { "name": "keyword.operator.redirect.stdout.shell" }, "2": { "name": "keyword.operator.redirect.stderr.shell" }, "3": { "name": "keyword.operator.redirect.$3.shell" } }, "match": "(?<=[ \\t])(?:(?:(1)|(2)|(\\d+))(?=>))" }, "redirection": { "patterns": [{ "begin": "[><]\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.interpolated.process-substitution.shell", "patterns": [{ "include": "#initial_context" }] }, { "match": "(?<![<>])(&>|\\d*>&\\d*|\\d*(>>|>|<)|\\d*<&|\\d*<>)(?![<>])", "name": "keyword.operator.redirect.shell" }] }, "regex_comparison": { "match": "\\=~", "name": "keyword.operator.logical.regex.shell" }, "regexp": { "patterns": [{ "match": "(?:.+)" }] }, "simple_options": { "captures": { "0": { "patterns": [{ "captures": { "1": { "name": "string.unquoted.argument.shell constant.other.option.dash.shell" }, "2": { "name": "string.unquoted.argument.shell constant.other.option.shell" } }, "match": "(?:[ \\t]++)(\\-)(\\w+)" }] } }, "match": "(?:(?:[ \\t]++)\\-(?:\\w+))*" }, "simple_unquoted": { "match": "[^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]", "name": "string.unquoted.shell" }, "start_of_command": { "match": "(?:(?:[ \\t]*+)(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)))" }, "start_of_double_quoted_command_name": { "captures": { "1": { "name": "entity.name.function.call.shell entity.name.command.shell", "patterns": [{ "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "captures": { "1": { "name": "constant.language.$1.shell" } }, "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)" }] } }, "match": '(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:(?:(?:[ \\t]*+)((?:[^ \\t\\n\'&;<>\\(\\)\\$`\\\\"\\|]+)(?!>)))?)(?:(?:\\$")|"))', "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, "start_of_single_quoted_command_name": { "captures": { "1": { "name": "entity.name.function.call.shell entity.name.command.shell", "patterns": [{ "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "captures": { "1": { "name": "constant.language.$1.shell" } }, "match": "(?<!\\w)(\\b(?:true|false)\\b)(?!\\w)" }] } }, "match": "(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:(?:(?:[ \\t]*+)((?:[^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+)(?!>)))?)(?:(?:\\$')|'))", "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, "string": { "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.shell" }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.single.shell" }, { "begin": '\\$?"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.double.shell", "patterns": [{ "match": '\\\\[\\$\\n`"\\\\]', "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" }] }, { "begin": "\\$'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.single.dollar.shell", "patterns": [{ "match": "\\\\(?:a|b|e|f|n|r|t|v|\\\\|')", "name": "constant.character.escape.ansi-c.shell" }, { "match": '\\\\[0-9]{3}"', "name": "constant.character.escape.octal.shell" }, { "match": '\\\\x[0-9a-fA-F]{2}"', "name": "constant.character.escape.hex.shell" }, { "match": '\\\\c."', "name": "constant.character.escape.control-char.shell" }] }] }, "support": { "patterns": [{ "match": "(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)", "name": "support.function.builtin.shell" }] }, "variable": { "patterns": [{ "captures": { "1": { "name": "punctuation.definition.variable.shell variable.parameter.positional.all.shell" }, "2": { "name": "variable.parameter.positional.all.shell" } }, "match": "(?:(\\$)(\\@(?!\\w)))" }, { "captures": { "1": { "name": "punctuation.definition.variable.shell variable.parameter.positional.shell" }, "2": { "name": "variable.parameter.positional.shell" } }, "match": "(?:(\\$)([0-9](?!\\w)))" }, { "captures": { "1": { "name": "punctuation.definition.variable.shell variable.language.special.shell" }, "2": { "name": "variable.language.special.shell" } }, "match": "(?:(\\$)([-*#?$!0_](?!\\w)))" }, { "begin": "(?:(\\$)(\\{)(?:[ \\t]*+)(?=\\d))", "beginCaptures": { "1": { "name": "punctuation.definition.variable.shell variable.parameter.positional.shell" }, "2": { "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell" } }, "contentName": "meta.parameter-expansion", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell" } }, "patterns": [{ "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", "name": "keyword.operator.expansion.shell" }, { "captures": { "1": { "name": "punctuation.section.array.shell" }, "2": { "name": "punctuation.section.array.shell" } }, "match": "(?:(\\[)(?:[^\\]]+)(\\]))" }, { "match": "[0-9]+", "name": "variable.parameter.positional.shell" }, { "match": "(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w)", "name": "variable.other.normal.shell" }, { "include": "#variable" }, { "include": "#string" }] }, { "begin": "(?:(\\$)(\\{))", "beginCaptures": { "1": { "name": "punctuation.definition.variable.shell" }, "2": { "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell" } }, "contentName": "meta.parameter-expansion", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell" } }, "patterns": [{ "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", "name": "keyword.operator.expansion.shell" }, { "captures": { "1": { "name": "punctuation.section.array.shell" }, "2": { "name": "punctuation.section.array.shell" } }, "match": "(?:(\\[)(?:[^\\]]+)(\\]))" }, { "match": "(?<!\\w)(?:[a-zA-Z_0-9-]+)(?!\\w)", "name": "variable.other.normal.shell" }, { "include": "#variable" }, { "include": "#string" }] }, { "captures": { "1": { "name": "punctuation.definition.variable.shell variable.other.normal.shell" }, "2": { "name": "variable.other.normal.shell" } }, "match": "(?:(\\$)((?:\\w+)(?!\\w)))" }] } }, "scopeName": "source.shell", "aliases": ["bash", "sh", "shell", "zsh"] });
|
|
2
2
|
var shellscript = [
|
|
3
3
|
lang
|
|
4
4
|
];
|
package/dist/langs/terraform.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({ "displayName": "Terraform", "fileTypes": ["tf", "tfvars"], "name": "terraform", "patterns": [{ "include": "#comments" }, { "include": "#attribute_definition" }, { "include": "#block" }, { "include": "#expressions" }], "repository": { "attribute_access": { "begin": "\\.(?!\\*)", "beginCaptures": { "0": { "name": "keyword.operator.accessor.hcl" } }, "comment": "Matches traversal attribute access such as .attr", "end": "[[:alpha:]][\\w-]*|\\d*", "endCaptures": { "0": { "patterns": [{ "comment": "Attribute name", "match": "(?!null|false|true)[[:alpha:]][\\w-]*", "name": "variable.other.member.hcl" }, { "comment": "Optional attribute index", "match": "\\d+", "name": "constant.numeric.integer.hcl" }] } } }, "attribute_definition": { "captures": { "1": { "name": "punctuation.section.parens.begin.hcl" }, "2": { "name": "variable.other.readwrite.hcl" }, "3": { "name": "punctuation.section.parens.end.hcl" }, "4": { "name": "keyword.operator.assignment.hcl" } }, "comment": 'Identifier "=" with optional parens', "match": "(\\()?(\\b(?!null\\b|false\\b|true\\b)[[:alpha:]][[:alnum:]_-]*)(\\))?\\s*(\\=(?!\\=|\\>))\\s*", "name": "variable.declaration.hcl" }, "attribute_splat": { "begin": "\\.", "beginCaptures": { "0": { "name": "keyword.operator.accessor.hcl" } }, "comment": "Legacy attribute-only splat", "end": "\\*", "endCaptures": { "0": { "name": "keyword.operator.splat.hcl" } } }, "block": { "begin": '([\\w][\\-\\w]*)([\\s\\"\\-\\w]*)(\\{)', "beginCaptures": { "1": { "patterns": [{ "comment": "Known block type", "match": "\\bdata|check|import|locals|module|output|provider|resource|terraform|variable\\b", "name": "entity.name.type.terraform" }, { "comment": "Unknown block type", "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b", "name": "entity.name.type.hcl" }] }, "2": { "patterns": [{ "comment": "Block label", "match": '[\\"\\-\\w]+', "name": "variable.other.enummember.hcl" }] }, "3": { "name": "punctuation.section.block.begin.hcl" } }, "comment": 'This will match Terraform blocks like `resource "aws_instance" "web" {` or `module {`', "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.block.end.hcl" } }, "name": "meta.block.hcl", "patterns": [{ "include": "#comments" }, { "include": "#attribute_definition" }, { "include": "#block" }, { "include": "#expressions" }] }, "block_inline_comments": { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.hcl" } }, "comment": "Inline comments start with the /* sequence and end with the */ sequence, and may have any characters within except the ending sequence. An inline comment is considered equivalent to a whitespace sequence", "end": "\\*/", "name": "comment.block.hcl" }, "brackets": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.brackets.begin.hcl" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.brackets.end.hcl" } }, "patterns": [{ "comment": "Splat operator", "match": "\\*", "name": "keyword.operator.splat.hcl" }, { "include": "#comma" }, { "include": "#comments" }, { "include": "#inline_for_expression" }, { "include": "#inline_if_expression" }, { "include": "#expressions" }, { "include": "#local_identifiers" }] }, "char_escapes": { "comment": "Character Escapes", "match": '\\\\[nrt"\\\\]|\\\\u(\\h{8}|\\h{4})', "name": "constant.character.escape.hcl" }, "comma": { "comment": "Commas - used in certain expressions", "match": "\\,", "name": "punctuation.separator.hcl" }, "comments": { "patterns": [{ "include": "#hash_line_comments" }, { "include": "#double_slash_line_comments" }, { "include": "#block_inline_comments" }] }, "double_slash_line_comments": { "begin": "//", "captures": { "0": { "name": "punctuation.definition.comment.hcl" } }, "comment": "Line comments start with // sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence", "end": "$\\n?", "name": "comment.line.double-slash.hcl" }, "expressions": { "patterns": [{ "include": "#literal_values" }, { "include": "#operators" }, { "include": "#tuple_for_expression" }, { "include": "#object_for_expression" }, { "include": "#brackets" }, { "include": "#objects" }, { "include": "#attribute_access" }, { "include": "#attribute_splat" }, { "include": "#functions" }, { "include": "#parens" }] }, "for_expression_body": { "patterns": [{ "comment": "in keyword", "match": "\\bin\\b", "name": "keyword.operator.word.hcl" }, { "comment": "if keyword", "match": "\\bif\\b", "name": "keyword.control.conditional.hcl" }, { "match": "\\:", "name": "keyword.operator.hcl" }, { "include": "#expressions" }, { "include": "#comments" }, { "include": "#comma" }, { "include": "#local_identifiers" }] }, "functions": { "begin": "([:\\-\\w]+)(\\()", "beginCaptures": { "1": { "patterns": [{ "match": "\\b(core::)?(abs|abspath|alltrue|anytrue|base64decode|base64encode|base64gzip|base64sha256|base64sha512|basename|bcrypt|can|ceil|chomp|chunklist|cidrhost|cidrnetmask|cidrsubnet|cidrsubnets|coalesce|coalescelist|compact|concat|contains|csvdecode|dirname|distinct|element|endswith|file|filebase64|filebase64sha256|filebase64sha512|fileexists|filemd5|fileset|filesha1|filesha256|filesha512|flatten|floor|format|formatdate|formatlist|indent|index|join|jsondecode|jsonencode|keys|length|log|lookup|lower|matchkeys|max|md5|merge|min|nonsensitive|one|parseint|pathexpand|plantimestamp|pow|range|regex|regexall|replace|reverse|rsadecrypt|sensitive|setintersection|setproduct|setsubtract|setunion|sha1|sha256|sha512|signum|slice|sort|split|startswith|strcontains|strrev|substr|sum|templatefile|textdecodebase64|textencodebase64|timeadd|timecmp|timestamp|title|tobool|tolist|tomap|tonumber|toset|tostring|transpose|trim|trimprefix|trimspace|trimsuffix|try|upper|urlencode|uuid|uuidv5|values|yamldecode|yamlencode|zipmap)\\b", "name": "support.function.builtin.terraform" }, { "match": "\\bprovider::[[:alpha:]][\\w_-]*::[[:alpha:]][\\w_-]*\\b", "name": "support.function.provider.terraform" }] }, "2": { "name": "punctuation.section.parens.begin.hcl" } }, "comment": "Built-in function calls", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.hcl" } }, "name": "meta.function-call.hcl", "patterns": [{ "include": "#comments" }, { "include": "#expressions" }, { "include": "#comma" }] }, "hash_line_comments": { "begin": "#", "captures": { "0": { "name": "punctuation.definition.comment.hcl" } }, "comment": "Line comments start with # sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence", "end": "$\\n?", "name": "comment.line.number-sign.hcl" }, "hcl_type_keywords": { "comment": "Type keywords known to HCL.", "match": "\\b(any|string|number|bool|list|set|map|tuple|object)\\b", "name": "storage.type.hcl" }, "heredoc": { "begin": "(\\<\\<\\-?)\\s*(\\w+)\\s*$", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.hcl" }, "2": { "name": "keyword.control.heredoc.hcl" } }, "comment": "String Heredoc", "end": "^\\s*\\2\\s*$", "endCaptures": { "0": { "name": "keyword.control.heredoc.hcl" } }, "name": "string.unquoted.heredoc.hcl", "patterns": [{ "include": "#string_interpolation" }] }, "inline_for_expression": { "begin": "(for)\\b", "beginCaptures": { "1": { "name": "keyword.control.hcl" } }, "end": "\\n", "patterns": [{ "match": "\\=\\>", "name": "storage.type.function.hcl" }, { "include": "#for_expression_body" }] }, "inline_if_expression": { "begin": "(if)\\b", "beginCaptures": { "1": { "name": "keyword.control.conditional.hcl" } }, "end": "\\n", "patterns": [{ "include": "#expressions" }, { "include": "#comments" }, { "include": "#comma" }, { "include": "#local_identifiers" }] }, "language_constants": { "comment": "Language Constants", "match": "\\b(true|false|null)\\b", "name": "constant.language.hcl" }, "literal_values": { "patterns": [{ "include": "#numeric_literals" }, { "include": "#language_constants" }, { "include": "#string_literals" }, { "include": "#heredoc" }, { "include": "#hcl_type_keywords" }, { "include": "#named_value_references" }] }, "local_identifiers": { "comment": "Local Identifiers", "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b", "name": "variable.other.readwrite.hcl" }, "named_value_references": { "comment": "Constant values available only to Terraform.", "match": "\\b(var|local|module|data|path|terraform)\\b", "name": "variable.other.readwrite.terraform" }, "numeric_literals": { "patterns": [{ "captures": { "1": { "name": "punctuation.separator.exponent.hcl" } }, "comment": "Integer, no fraction, optional exponent", "match": "\\b\\d+([Ee][+-]?)\\d+\\b", "name": "constant.numeric.float.hcl" }, { "captures": { "1": { "name": "punctuation.separator.decimal.hcl" }, "2": { "name": "punctuation.separator.exponent.hcl" } }, "comment": "Integer, fraction, optional exponent", "match": "\\b\\d+(\\.)\\d+(?:([Ee][+-]?)\\d+)?\\b", "name": "constant.numeric.float.hcl" }, { "comment": "Integers", "match": "\\b\\d+\\b", "name": "constant.numeric.integer.hcl" }] }, "object_for_expression": { "begin": "(\\{)\\s?(for)\\b", "beginCaptures": { "1": { "name": "punctuation.section.braces.begin.hcl" }, "2": { "name": "keyword.control.hcl" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.braces.end.hcl" } }, "patterns": [{ "match": "\\=\\>", "name": "storage.type.function.hcl" }, { "include": "#for_expression_body" }] }, "object_key_values": { "patterns": [{ "include": "#comments" }, { "include": "#literal_values" }, { "include": "#operators" }, { "include": "#tuple_for_expression" }, { "include": "#object_for_expression" }, { "include": "#heredoc" }, { "include": "#functions" }] }, "objects": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.braces.begin.hcl" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.braces.end.hcl" } }, "name": "meta.braces.hcl", "patterns": [{ "include": "#comments" }, { "include": "#objects" }, { "include": "#inline_for_expression" }, { "include": "#inline_if_expression" }, { "captures": { "1": { "name": "meta.mapping.key.hcl variable.other.readwrite.hcl" }, "2": { "name": "keyword.operator.assignment.hcl", "patterns": [{ "match": "\\=\\>", "name": "storage.type.function.hcl" }] } }, "comment": "Literal, named object key", "match": "\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*)\\s*(\\=\\>?)\\s*" }, { "captures": { "0": { "patterns": [{ "include": "#named_value_references" }] }, "1": { "name": "meta.mapping.key.hcl string.quoted.double.hcl" }, "2": { "name": "punctuation.definition.string.begin.hcl" }, "3": { "name": "punctuation.definition.string.end.hcl" }, "4": { "name": "keyword.operator.hcl" } }, "comment": "String object key", "match": '\\b((").*("))\\s*(\\=)\\s*' }, { "begin": "^\\s*\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.hcl" } }, "comment": "Computed object key (any expression between parens)", "end": "(\\))\\s*(=|:)\\s*", "endCaptures": { "1": { "name": "punctuation.section.parens.end.hcl" }, "2": { "name": "keyword.operator.hcl" } }, "name": "meta.mapping.key.hcl", "patterns": [{ "include": "#named_value_references" }, { "include": "#attribute_access" }] }, { "include": "#object_key_values" }] }, "operators": { "patterns": [{ "match": "\\>\\=", "name": "keyword.operator.hcl" }, { "match": "\\<\\=", "name": "keyword.operator.hcl" }, { "match": "\\=\\=", "name": "keyword.operator.hcl" }, { "match": "\\!\\=", "name": "keyword.operator.hcl" }, { "match": "\\+", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\-", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\*", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\/", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\%", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\&\\&", "name": "keyword.operator.logical.hcl" }, { "match": "\\|\\|", "name": "keyword.operator.logical.hcl" }, { "match": "\\!", "name": "keyword.operator.logical.hcl" }, { "match": "\\>", "name": "keyword.operator.hcl" }, { "match": "\\<", "name": "keyword.operator.hcl" }, { "match": "\\?", "name": "keyword.operator.hcl" }, { "match": "\\.\\.\\.", "name": "keyword.operator.hcl" }, { "match": "\\:" }] }, "parens": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.hcl" } }, "comment": "Parens - matched *after* function syntax", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.hcl" } }, "patterns": [{ "include": "#comments" }, { "include": "#expressions" }] }, "string_interpolation": { "begin": "(?<![%$])([%$]{)", "beginCaptures": { "1": { "name": "keyword.other.interpolation.begin.hcl" } }, "comment": "String interpolation", "end": "\\}", "endCaptures": { "0": { "name": "keyword.other.interpolation.end.hcl" } }, "name": "meta.interpolation.hcl", "patterns": [{ "comment": "Trim left whitespace", "match": "\\~\\s", "name": "keyword.operator.template.left.trim.hcl" }, { "comment": "Trim right whitespace", "match": "\\s\\~", "name": "keyword.operator.template.right.trim.hcl" }, { "comment": "if/else/endif and for/in/endfor directives", "match": "\\b(if|else|endif|for|in|endfor)\\b", "name": "keyword.control.hcl" }, { "include": "#expressions" }, { "include": "#local_identifiers" }] }, "string_literals": { "begin": '"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.hcl" } }, "comment": "Strings", "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.hcl" } }, "name": "string.quoted.double.hcl", "patterns": [{ "include": "#string_interpolation" }, { "include": "#char_escapes" }] }, "tuple_for_expression": { "begin": "(\\[)\\s?(for)\\b", "beginCaptures": { "1": { "name": "punctuation.section.brackets.begin.hcl" }, "2": { "name": "keyword.control.hcl" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.brackets.end.hcl" } }, "patterns": [{ "include": "#for_expression_body" }] } }, "scopeName": "source.hcl.terraform", "aliases": ["tf", "tfvars"] });
|
|
1
|
+
const lang = Object.freeze({ "displayName": "Terraform", "fileTypes": ["tf", "tfvars"], "name": "terraform", "patterns": [{ "include": "#comments" }, { "include": "#attribute_definition" }, { "include": "#block" }, { "include": "#expressions" }], "repository": { "attribute_access": { "begin": "\\.(?!\\*)", "beginCaptures": { "0": { "name": "keyword.operator.accessor.hcl" } }, "comment": "Matches traversal attribute access such as .attr", "end": "[[:alpha:]][\\w-]*|\\d*", "endCaptures": { "0": { "patterns": [{ "comment": "Attribute name", "match": "(?!null|false|true)[[:alpha:]][\\w-]*", "name": "variable.other.member.hcl" }, { "comment": "Optional attribute index", "match": "\\d+", "name": "constant.numeric.integer.hcl" }] } } }, "attribute_definition": { "captures": { "1": { "name": "punctuation.section.parens.begin.hcl" }, "2": { "name": "variable.other.readwrite.hcl" }, "3": { "name": "punctuation.section.parens.end.hcl" }, "4": { "name": "keyword.operator.assignment.hcl" } }, "comment": 'Identifier "=" with optional parens', "match": "(\\()?(\\b(?!null\\b|false\\b|true\\b)[[:alpha:]][[:alnum:]_-]*)(\\))?\\s*(\\=(?!\\=|\\>))\\s*", "name": "variable.declaration.hcl" }, "attribute_splat": { "begin": "\\.", "beginCaptures": { "0": { "name": "keyword.operator.accessor.hcl" } }, "comment": "Legacy attribute-only splat", "end": "\\*", "endCaptures": { "0": { "name": "keyword.operator.splat.hcl" } } }, "block": { "begin": '([\\w][\\-\\w]*)([\\s\\"\\-\\w]*)(\\{)', "beginCaptures": { "1": { "patterns": [{ "comment": "Known block type", "match": "\\bdata|check|import|locals|module|output|provider|resource|terraform|variable\\b", "name": "entity.name.type.terraform" }, { "comment": "Unknown block type", "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b", "name": "entity.name.type.hcl" }] }, "2": { "patterns": [{ "comment": "Block label", "match": '[\\"\\-\\w]+', "name": "variable.other.enummember.hcl" }] }, "3": { "name": "punctuation.section.block.begin.hcl" } }, "comment": 'This will match Terraform blocks like `resource "aws_instance" "web" {` or `module {`', "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.block.end.hcl" } }, "name": "meta.block.hcl", "patterns": [{ "include": "#comments" }, { "include": "#attribute_definition" }, { "include": "#block" }, { "include": "#expressions" }] }, "block_inline_comments": { "begin": "/\\*", "captures": { "0": { "name": "punctuation.definition.comment.hcl" } }, "comment": "Inline comments start with the /* sequence and end with the */ sequence, and may have any characters within except the ending sequence. An inline comment is considered equivalent to a whitespace sequence", "end": "\\*/", "name": "comment.block.hcl" }, "brackets": { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.section.brackets.begin.hcl" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.brackets.end.hcl" } }, "patterns": [{ "comment": "Splat operator", "match": "\\*", "name": "keyword.operator.splat.hcl" }, { "include": "#comma" }, { "include": "#comments" }, { "include": "#inline_for_expression" }, { "include": "#inline_if_expression" }, { "include": "#expressions" }, { "include": "#local_identifiers" }] }, "char_escapes": { "comment": "Character Escapes", "match": '\\\\[nrt"\\\\]|\\\\u(\\h{8}|\\h{4})', "name": "constant.character.escape.hcl" }, "comma": { "comment": "Commas - used in certain expressions", "match": "\\,", "name": "punctuation.separator.hcl" }, "comments": { "patterns": [{ "include": "#hash_line_comments" }, { "include": "#double_slash_line_comments" }, { "include": "#block_inline_comments" }] }, "double_slash_line_comments": { "begin": "//", "captures": { "0": { "name": "punctuation.definition.comment.hcl" } }, "comment": "Line comments start with // sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence", "end": "$\\n?", "name": "comment.line.double-slash.hcl" }, "expressions": { "patterns": [{ "include": "#literal_values" }, { "include": "#operators" }, { "include": "#tuple_for_expression" }, { "include": "#object_for_expression" }, { "include": "#brackets" }, { "include": "#objects" }, { "include": "#attribute_access" }, { "include": "#attribute_splat" }, { "include": "#functions" }, { "include": "#parens" }] }, "for_expression_body": { "patterns": [{ "comment": "in keyword", "match": "\\bin\\b", "name": "keyword.operator.word.hcl" }, { "comment": "if keyword", "match": "\\bif\\b", "name": "keyword.control.conditional.hcl" }, { "match": "\\:", "name": "keyword.operator.hcl" }, { "include": "#expressions" }, { "include": "#comments" }, { "include": "#comma" }, { "include": "#local_identifiers" }] }, "functions": { "begin": "([:\\-\\w]+)(\\()", "beginCaptures": { "1": { "patterns": [{ "match": "\\b(core::)?(abs|abspath|alltrue|anytrue|base64decode|base64encode|base64gzip|base64sha256|base64sha512|basename|bcrypt|can|ceil|chomp|chunklist|cidrhost|cidrnetmask|cidrsubnet|cidrsubnets|coalesce|coalescelist|compact|concat|contains|csvdecode|dirname|distinct|element|endswith|file|filebase64|filebase64sha256|filebase64sha512|fileexists|filemd5|fileset|filesha1|filesha256|filesha512|flatten|floor|format|formatdate|formatlist|indent|index|join|jsondecode|jsonencode|keys|length|log|lookup|lower|matchkeys|max|md5|merge|min|nonsensitive|one|parseint|pathexpand|plantimestamp|pow|range|regex|regexall|replace|reverse|rsadecrypt|sensitive|setintersection|setproduct|setsubtract|setunion|sha1|sha256|sha512|signum|slice|sort|split|startswith|strcontains|strrev|substr|sum|templatefile|textdecodebase64|textencodebase64|timeadd|timecmp|timestamp|title|tobool|tolist|tomap|tonumber|toset|tostring|transpose|trim|trimprefix|trimspace|trimsuffix|try|upper|urlencode|uuid|uuidv5|values|yamldecode|yamlencode|zipmap)\\b", "name": "support.function.builtin.terraform" }, { "match": "\\bprovider::[[:alpha:]][\\w_-]*::[[:alpha:]][\\w_-]*\\b", "name": "support.function.provider.terraform" }] }, "2": { "name": "punctuation.section.parens.begin.hcl" } }, "comment": "Built-in function calls", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.hcl" } }, "name": "meta.function-call.hcl", "patterns": [{ "include": "#comments" }, { "include": "#expressions" }, { "include": "#comma" }] }, "hash_line_comments": { "begin": "#", "captures": { "0": { "name": "punctuation.definition.comment.hcl" } }, "comment": "Line comments start with # sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence", "end": "$\\n?", "name": "comment.line.number-sign.hcl" }, "hcl_type_keywords": { "comment": "Type keywords known to HCL.", "match": "\\b(any|string|number|bool|list|set|map|tuple|object)\\b", "name": "storage.type.hcl" }, "heredoc": { "begin": "(\\<\\<\\-?)\\s*(\\w+)\\s*$", "beginCaptures": { "1": { "name": "keyword.operator.heredoc.hcl" }, "2": { "name": "keyword.control.heredoc.hcl" } }, "comment": "String Heredoc", "end": "^\\s*\\2\\s*$", "endCaptures": { "0": { "name": "keyword.control.heredoc.hcl" } }, "name": "string.unquoted.heredoc.hcl", "patterns": [{ "include": "#string_interpolation" }] }, "inline_for_expression": { "begin": "(for)\\b", "beginCaptures": { "1": { "name": "keyword.control.hcl" } }, "end": "\\n", "patterns": [{ "match": "\\=\\>", "name": "storage.type.function.hcl" }, { "include": "#for_expression_body" }] }, "inline_if_expression": { "begin": "(if)\\b", "beginCaptures": { "1": { "name": "keyword.control.conditional.hcl" } }, "end": "\\n", "patterns": [{ "include": "#expressions" }, { "include": "#comments" }, { "include": "#comma" }, { "include": "#local_identifiers" }] }, "language_constants": { "comment": "Language Constants", "match": "\\b(true|false|null)\\b", "name": "constant.language.hcl" }, "literal_values": { "patterns": [{ "include": "#numeric_literals" }, { "include": "#language_constants" }, { "include": "#string_literals" }, { "include": "#heredoc" }, { "include": "#hcl_type_keywords" }, { "include": "#named_value_references" }] }, "local_identifiers": { "comment": "Local Identifiers", "match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b", "name": "variable.other.readwrite.hcl" }, "named_value_references": { "comment": "Constant values available only to Terraform.", "match": "\\b(var|local|module|data|path|terraform)\\b", "name": "variable.other.readwrite.terraform" }, "numeric_literals": { "patterns": [{ "captures": { "1": { "name": "punctuation.separator.exponent.hcl" } }, "comment": "Integer, no fraction, optional exponent", "match": "\\b\\d+([Ee][+-]?)\\d+\\b", "name": "constant.numeric.float.hcl" }, { "captures": { "1": { "name": "punctuation.separator.decimal.hcl" }, "2": { "name": "punctuation.separator.exponent.hcl" } }, "comment": "Integer, fraction, optional exponent", "match": "\\b\\d+(\\.)\\d+(?:([Ee][+-]?)\\d+)?\\b", "name": "constant.numeric.float.hcl" }, { "comment": "Integers", "match": "\\b\\d+\\b", "name": "constant.numeric.integer.hcl" }] }, "object_for_expression": { "begin": "(\\{)\\s?(for)\\b", "beginCaptures": { "1": { "name": "punctuation.section.braces.begin.hcl" }, "2": { "name": "keyword.control.hcl" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.braces.end.hcl" } }, "patterns": [{ "match": "\\=\\>", "name": "storage.type.function.hcl" }, { "include": "#for_expression_body" }] }, "object_key_values": { "patterns": [{ "include": "#comments" }, { "include": "#literal_values" }, { "include": "#operators" }, { "include": "#tuple_for_expression" }, { "include": "#object_for_expression" }, { "include": "#heredoc" }, { "include": "#functions" }] }, "objects": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.braces.begin.hcl" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.braces.end.hcl" } }, "name": "meta.braces.hcl", "patterns": [{ "include": "#comments" }, { "include": "#objects" }, { "include": "#inline_for_expression" }, { "include": "#inline_if_expression" }, { "captures": { "1": { "name": "meta.mapping.key.hcl variable.other.readwrite.hcl" }, "2": { "name": "keyword.operator.assignment.hcl", "patterns": [{ "match": "\\=\\>", "name": "storage.type.function.hcl" }] } }, "comment": "Literal, named object key", "match": "\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*)\\s*(\\=\\>?)\\s*" }, { "captures": { "0": { "patterns": [{ "include": "#named_value_references" }] }, "1": { "name": "meta.mapping.key.hcl string.quoted.double.hcl" }, "2": { "name": "punctuation.definition.string.begin.hcl" }, "3": { "name": "punctuation.definition.string.end.hcl" }, "4": { "name": "keyword.operator.hcl" } }, "comment": "String object key", "match": '\\b((").*("))\\s*(\\=)\\s*' }, { "begin": "^\\s*\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.hcl" } }, "comment": "Computed object key (any expression between parens)", "end": "(\\))\\s*(=|:)\\s*", "endCaptures": { "1": { "name": "punctuation.section.parens.end.hcl" }, "2": { "name": "keyword.operator.hcl" } }, "name": "meta.mapping.key.hcl", "patterns": [{ "include": "#named_value_references" }, { "include": "#attribute_access" }] }, { "include": "#object_key_values" }] }, "operators": { "patterns": [{ "match": "\\>\\=", "name": "keyword.operator.hcl" }, { "match": "\\<\\=", "name": "keyword.operator.hcl" }, { "match": "\\=\\=", "name": "keyword.operator.hcl" }, { "match": "\\!\\=", "name": "keyword.operator.hcl" }, { "match": "\\+", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\-", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\*", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\/", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\%", "name": "keyword.operator.arithmetic.hcl" }, { "match": "\\&\\&", "name": "keyword.operator.logical.hcl" }, { "match": "\\|\\|", "name": "keyword.operator.logical.hcl" }, { "match": "\\!", "name": "keyword.operator.logical.hcl" }, { "match": "\\>", "name": "keyword.operator.hcl" }, { "match": "\\<", "name": "keyword.operator.hcl" }, { "match": "\\?", "name": "keyword.operator.hcl" }, { "match": "\\.\\.\\.", "name": "keyword.operator.hcl" }, { "match": "\\:", "name": "keyword.operator.hcl" }, { "match": "\\=\\>", "name": "keyword.operator.hcl" }] }, "parens": { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.parens.begin.hcl" } }, "comment": "Parens - matched *after* function syntax", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.parens.end.hcl" } }, "patterns": [{ "include": "#comments" }, { "include": "#expressions" }] }, "string_interpolation": { "begin": "(?<![%$])([%$]{)", "beginCaptures": { "1": { "name": "keyword.other.interpolation.begin.hcl" } }, "comment": "String interpolation", "end": "\\}", "endCaptures": { "0": { "name": "keyword.other.interpolation.end.hcl" } }, "name": "meta.interpolation.hcl", "patterns": [{ "comment": "Trim left whitespace", "match": "\\~\\s", "name": "keyword.operator.template.left.trim.hcl" }, { "comment": "Trim right whitespace", "match": "\\s\\~", "name": "keyword.operator.template.right.trim.hcl" }, { "comment": "if/else/endif and for/in/endfor directives", "match": "\\b(if|else|endif|for|in|endfor)\\b", "name": "keyword.control.hcl" }, { "include": "#expressions" }, { "include": "#local_identifiers" }] }, "string_literals": { "begin": '"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.hcl" } }, "comment": "Strings", "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.hcl" } }, "name": "string.quoted.double.hcl", "patterns": [{ "include": "#string_interpolation" }, { "include": "#char_escapes" }] }, "tuple_for_expression": { "begin": "(\\[)\\s?(for)\\b", "beginCaptures": { "1": { "name": "punctuation.section.brackets.begin.hcl" }, "2": { "name": "keyword.control.hcl" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.brackets.end.hcl" } }, "patterns": [{ "include": "#for_expression_body" }] } }, "scopeName": "source.hcl.terraform", "aliases": ["tf", "tfvars"] });
|
|
2
2
|
var terraform = [
|
|
3
3
|
lang
|
|
4
4
|
];
|
|
@@ -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": "TSV", "fileTypes": ["tsv", "tab"], "name": "tsv", "patterns": [{ "captures": { "1": { "name": "rainbow1" }, "2": { "name": "keyword.rainbow2" }, "3": { "name": "entity.name.function.rainbow3" }, "4": { "name": "comment.rainbow4" }, "5": { "name": "string.rainbow5" }, "6": { "name": "variable.parameter.rainbow6" }, "7": { "name": "constant.numeric.rainbow7" }, "8": { "name": "entity.name.type.rainbow8" }, "9": { "name": "markup.bold.rainbow9" }, "10": { "name": "invalid.rainbow10" } }, "match": "([^\\t]*\\t?)([^\\t]*\\t?)([^\\t]*\\t?)([^\\t]*\\t?)([^\\t]*\\t?)([^\\t]*\\t?)([^\\t]*\\t?)([^\\t]*\\t?)([^\\t]*\\t?)([^\\t]*\\t?)", "name": "rainbowgroup" }], "scopeName": "text.tsv" });
|
|
2
|
+
var tsv = [
|
|
3
|
+
lang
|
|
4
|
+
];
|
|
5
|
+
|
|
6
|
+
export { tsv as default };
|
package/dist/langs/zig.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const lang = Object.freeze({ "displayName": "Zig", "fileTypes": ["zig", "zon"], "name": "zig", "patterns": [{ "include": "#comments" }, { "include": "#strings" }, { "include": "#keywords" }, { "include": "#operators" }, { "include": "#numbers" }, { "include": "#support" }, { "include": "#variables" }], "repository": { "commentContents": { "patterns": [{ "match": "\\b(TODO|FIXME|XXX|NOTE)\\b:?", "name": "keyword.todo.zig" }] }, "comments": { "patterns": [{ "begin": "//[!/](?=[^/])", "end": "$", "name": "comment.line.documentation.zig", "patterns": [{ "include": "#commentContents" }] }, { "begin": "//", "end": "$", "name": "comment.line.double-slash.zig", "patterns": [{ "include": "#commentContents" }] }] }, "keywords": { "patterns": [{ "match": "\\binline\\b(?!\\s*\\bfn\\b)", "name": "keyword.control.repeat.zig" }, { "match": "\\b(while|for)\\b", "name": "keyword.control.repeat.zig" }, { "match": "\\b(extern|packed|export|pub|noalias|inline|comptime|volatile|align|linksection|threadlocal|allowzero|noinline|callconv)\\b", "name": "keyword.storage.zig" }, { "match": "\\b(struct|enum|union|opaque)\\b", "name": "keyword.structure.zig" }, { "match": "\\b(asm|unreachable)\\b", "name": "keyword.statement.zig" }, { "match": "\\b(break|return|continue|defer|errdefer)\\b", "name": "keyword.control.flow.zig" }, { "match": "\\b(await|resume|suspend|async|nosuspend)\\b", "name": "keyword.control.async.zig" }, { "match": "\\b(try|catch)\\b", "name": "keyword.control.trycatch.zig" }, { "match": "\\b(if|else|switch|orelse)\\b", "name": "keyword.control.conditional.zig" }, { "match": "\\b(null|undefined)\\b", "name": "keyword.constant.default.zig" }, { "match": "\\b(true|false)\\b", "name": "keyword.constant.bool.zig" }, { "match": "\\b(usingnamespace|test|and|or)\\b", "name": "keyword.default.zig" }, { "match": "\\b(bool|void|noreturn|type|error|anyerror|anyframe|anytype|anyopaque)\\b", "name": "keyword.type.zig" }, { "match": "\\b(f16|f32|f64|f80|f128|u\\d+|i\\d+|isize|usize|comptime_int|comptime_float)\\b", "name": "keyword.type.integer.zig" }, { "match": "\\b(c_char|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble)\\b", "name": "keyword.type.c.zig" }] }, "numbers": { "patterns": [{ "match": "\\b0x[0-9a-fA-F][0-9a-fA-F_]*(\\.[0-9a-fA-F][0-9a-fA-F_]*)?([pP][+-]?[0-9a-fA-F_]+)?\\b", "name": "constant.numeric.hexfloat.zig" }, { "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?([eE][+-]?[0-9_]+)?\\b", "name": "constant.numeric.float.zig" }, { "match": "\\b[0-9][0-9_]*\\b", "name": "constant.numeric.decimal.zig" }, { "match": "\\b0x[a-fA-F0-9_]+\\b", "name": "constant.numeric.hexadecimal.zig" }, { "match": "\\b0o[0-7_]+\\b", "name": "constant.numeric.octal.zig" }, { "match": "\\b0b[01_]+\\b", "name": "constant.numeric.binary.zig" }, { "match": "\\b[0-9](([eEpP][+-])|[0-9a-zA-Z_])*(\\.(([eEpP][+-])|[0-9a-zA-Z_])*)?([eEpP][+-])?[0-9a-zA-Z_]*\\b", "name": "constant.numeric.invalid.zig" }] }, "operators": { "patterns": [{ "match": "(?<=\\[)\\*c(?=\\])", "name": "keyword.operator.c-pointer.zig" }, { "match": "(\\b(and|or)\\b)|(
|
|
1
|
+
const lang = Object.freeze({ "displayName": "Zig", "fileTypes": ["zig", "zon"], "name": "zig", "patterns": [{ "include": "#comments" }, { "include": "#strings" }, { "include": "#keywords" }, { "include": "#operators" }, { "include": "#numbers" }, { "include": "#support" }, { "include": "#variables" }], "repository": { "commentContents": { "patterns": [{ "match": "\\b(TODO|FIXME|XXX|NOTE)\\b:?", "name": "keyword.todo.zig" }] }, "comments": { "patterns": [{ "begin": "//[!/](?=[^/])", "end": "$", "name": "comment.line.documentation.zig", "patterns": [{ "include": "#commentContents" }] }, { "begin": "//", "end": "$", "name": "comment.line.double-slash.zig", "patterns": [{ "include": "#commentContents" }] }] }, "keywords": { "patterns": [{ "match": "\\binline\\b(?!\\s*\\bfn\\b)", "name": "keyword.control.repeat.zig" }, { "match": "\\b(while|for)\\b", "name": "keyword.control.repeat.zig" }, { "match": "\\b(extern|packed|export|pub|noalias|inline|comptime|volatile|align|linksection|threadlocal|allowzero|noinline|callconv)\\b", "name": "keyword.storage.zig" }, { "match": "\\b(struct|enum|union|opaque)\\b", "name": "keyword.structure.zig" }, { "match": "\\b(asm|unreachable)\\b", "name": "keyword.statement.zig" }, { "match": "\\b(break|return|continue|defer|errdefer)\\b", "name": "keyword.control.flow.zig" }, { "match": "\\b(await|resume|suspend|async|nosuspend)\\b", "name": "keyword.control.async.zig" }, { "match": "\\b(try|catch)\\b", "name": "keyword.control.trycatch.zig" }, { "match": "\\b(if|else|switch|orelse)\\b", "name": "keyword.control.conditional.zig" }, { "match": "\\b(null|undefined)\\b", "name": "keyword.constant.default.zig" }, { "match": "\\b(true|false)\\b", "name": "keyword.constant.bool.zig" }, { "match": "\\b(usingnamespace|test|and|or)\\b", "name": "keyword.default.zig" }, { "match": "\\b(bool|void|noreturn|type|error|anyerror|anyframe|anytype|anyopaque)\\b", "name": "keyword.type.zig" }, { "match": "\\b(f16|f32|f64|f80|f128|u\\d+|i\\d+|isize|usize|comptime_int|comptime_float)\\b", "name": "keyword.type.integer.zig" }, { "match": "\\b(c_char|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|c_longlong|c_ulonglong|c_longdouble)\\b", "name": "keyword.type.c.zig" }] }, "numbers": { "patterns": [{ "match": "\\b0x[0-9a-fA-F][0-9a-fA-F_]*(\\.[0-9a-fA-F][0-9a-fA-F_]*)?([pP][+-]?[0-9a-fA-F_]+)?\\b", "name": "constant.numeric.hexfloat.zig" }, { "match": "\\b[0-9][0-9_]*(\\.[0-9][0-9_]*)?([eE][+-]?[0-9_]+)?\\b", "name": "constant.numeric.float.zig" }, { "match": "\\b[0-9][0-9_]*\\b", "name": "constant.numeric.decimal.zig" }, { "match": "\\b0x[a-fA-F0-9_]+\\b", "name": "constant.numeric.hexadecimal.zig" }, { "match": "\\b0o[0-7_]+\\b", "name": "constant.numeric.octal.zig" }, { "match": "\\b0b[01_]+\\b", "name": "constant.numeric.binary.zig" }, { "match": "\\b[0-9](([eEpP][+-])|[0-9a-zA-Z_])*(\\.(([eEpP][+-])|[0-9a-zA-Z_])*)?([eEpP][+-])?[0-9a-zA-Z_]*\\b", "name": "constant.numeric.invalid.zig" }] }, "operators": { "patterns": [{ "match": "(?<=\\[)\\*c(?=\\])", "name": "keyword.operator.c-pointer.zig" }, { "match": "(\\b(and|or)\\b)|(==|!=|<=|>=|<|>)", "name": "keyword.operator.comparison.zig" }, { "match": "(-%?|\\+%?|\\*%?|/|%)=?", "name": "keyword.operator.arithmetic.zig" }, { "match": "(<<%?|>>|!|&|\\^|\\|)=?", "name": "keyword.operator.bitwise.zig" }, { "match": "(==|\\+\\+|\\*\\*|->)", "name": "keyword.operator.special.zig" }] }, "stringcontent": { "patterns": [{ "match": `\\\\([nrt'"\\\\]|(x[0-9a-fA-F]{2})|(u\\{[0-9a-fA-F]+\\}))`, "name": "constant.character.escape.zig" }, { "match": "\\\\.", "name": "invalid.illegal.unrecognized-string-escape.zig" }] }, "strings": { "patterns": [{ "begin": '"', "end": '"', "name": "string.quoted.double.zig", "patterns": [{ "include": "#stringcontent" }] }, { "begin": "\\\\\\\\", "end": "$", "name": "string.multiline.zig" }, { "match": "'([^'\\\\]|\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.))'", "name": "string.quoted.single.zig" }] }, "support": { "patterns": [{ "comment": "Built-in functions", "match": "@[_a-zA-Z][_a-zA-Z0-9]*", "name": "support.function.builtin.zig" }] }, "variables": { "patterns": [{ "name": "meta.function.declaration.zig", "patterns": [{ "captures": { "1": { "name": "storage.type.function.zig" }, "2": { "name": "entity.name.type.zig" } }, "match": "\\b(fn)\\s+([A-Z][a-zA-Z0-9]*)\\b" }, { "captures": { "1": { "name": "storage.type.function.zig" }, "2": { "name": "entity.name.function.zig" } }, "match": "\\b(fn)\\s+([_a-zA-Z][_a-zA-Z0-9]*)\\b" }, { "begin": '\\b(fn)\\s+@"', "beginCaptures": { "1": { "name": "storage.type.function.zig" } }, "end": '"', "name": "entity.name.function.string.zig", "patterns": [{ "include": "#stringcontent" }] }, { "match": "\\b(const|var|fn)\\b", "name": "keyword.default.zig" }] }, { "name": "meta.function.call.zig", "patterns": [{ "match": "([A-Z][a-zA-Z0-9]*)(?=\\s*\\()", "name": "entity.name.type.zig" }, { "match": "([_a-zA-Z][_a-zA-Z0-9]*)(?=\\s*\\()", "name": "entity.name.function.zig" }] }, { "name": "meta.variable.zig", "patterns": [{ "match": "\\b[_a-zA-Z][_a-zA-Z0-9]*\\b", "name": "variable.zig" }, { "begin": '@"', "end": '"', "name": "variable.string.zig", "patterns": [{ "include": "#stringcontent" }] }] }] } }, "scopeName": "source.zig" });
|
|
2
2
|
var zig = [
|
|
3
3
|
lang
|
|
4
4
|
];
|
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' | 'angular-html' | 'angular-ts' | 'apache' | 'apex' | 'apl' | 'applescript' | 'ara' | 'asm' | 'astro' | 'awk' | 'ballerina' | 'bash' | 'bat' | 'batch' | 'be' | 'beancount' | 'berry' | 'bibtex' | 'bicep' | 'blade' | 'c' | 'c#' | 'c++' | 'cadence' | 'cdc' | 'clarity' | 'clj' | 'clojure' | 'cmake' | 'cmd' | 'cobol' | 'codeql' | 'coffee' | 'coffeescript' | 'console' | 'cpp' | 'cql' | 'crystal' | 'cs' | 'csharp' | 'css' | 'csv' | 'cue' | 'cypher' | 'd' | 'dart' | 'dax' | 'diff' | 'docker' | 'dockerfile' | 'dream-maker' | 'elixir' | 'elm' | 'erb' | 'erl' | 'erlang' | 'f' | 'f#' | 'f03' | 'f08' | 'f18' | 'f77' | 'f90' | 'f95' | 'fish' | 'for' | 'fortran-fixed-form' | 'fortran-free-form' | 'fs' | 'fsharp' | 'fsl' | 'gdresource' | 'gdscript' | 'gdshader' | 'gherkin' | 'git-commit' | 'git-rebase' | 'gjs' | 'gleam' | 'glimmer-js' | 'glimmer-ts' | 'glsl' | 'gnuplot' | 'go' | 'gql' | 'graphql' | 'groovy' | 'gts' | 'hack' | 'haml' | 'handlebars' | 'haskell' | 'hbs' | 'hcl' | 'hjson' | 'hlsl' | 'hs' | 'html' | 'html-derivative' | 'http' | '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' | 'logo' | 'lua' | 'make' | 'makefile' | 'markdown' | 'marko' | 'matlab' | 'md' | 'mdc' | 'mdx' | 'mermaid' | 'mojo' | 'move' | 'nar' | 'narrat' | 'nextflow' | 'nf' | 'nginx' | 'nim' | 'nix' | 'nu' | 'nushell' | 'objc' | 'objective-c' | 'objective-cpp' | 'ocaml' | 'pascal' | 'perl' | 'perl6' | 'php' | 'plsql' | 'postcss' | 'powerquery' | 'powershell' | 'prisma' | 'prolog' | 'properties' | 'proto' | 'ps' | 'ps1' | 'pug' | 'puppet' | 'purescript' | 'py' | 'python' | 'ql' | 'r' | 'raku' | 'razor' | 'rb' | 'reg' | 'rel' | 'riscv' | 'rs' | 'rst' | 'ruby' | 'rust' | 'sas' | 'sass' | 'scala' | 'scheme' | 'scss' | 'sh' | 'shader' | 'shaderlab' | 'shell' | 'shellscript' | 'shellsession' | 'smalltalk' | 'solidity' | 'sparql' | 'spl' | 'splunk' | 'sql' | 'ssh-config' | 'stata' | 'styl' | 'stylus' | 'svelte' | 'swift' | 'system-verilog' | 'tasl' | 'tcl' | 'terraform' | 'tex' | 'tf' | 'tfvars' | 'toml' | 'ts' | 'tsx' | 'turtle' | 'twig' | 'typ' | 'typescript' | 'typst' | 'v' | 'vb' | 'verilog' | 'vhdl' | 'vim' | 'viml' | 'vimscript' | 'vue' | 'vue-html' | 'vy' | 'vyper' | 'wasm' | 'wenyan' | 'wgsl' | 'wl' | 'wolfram' | 'xml' | 'xsl' | 'yaml' | 'yml' | 'zenscript' | 'zig' | 'zsh' | '文言';
|
|
10
|
+
type BundledLanguage = 'abap' | 'actionscript-3' | 'ada' | 'angular-html' | 'angular-ts' | 'apache' | 'apex' | 'apl' | 'applescript' | 'ara' | 'asm' | 'astro' | 'awk' | 'ballerina' | 'bash' | 'bat' | 'batch' | 'be' | 'beancount' | 'berry' | 'bibtex' | 'bicep' | 'blade' | 'c' | 'c#' | 'c++' | 'cadence' | 'cdc' | 'clarity' | 'clj' | 'clojure' | 'cmake' | 'cmd' | 'cobol' | 'codeql' | 'coffee' | 'coffeescript' | 'console' | 'cpp' | 'cql' | 'crystal' | 'cs' | 'csharp' | 'css' | 'csv' | 'cue' | 'cypher' | 'd' | 'dart' | 'dax' | 'diff' | 'docker' | 'dockerfile' | 'dream-maker' | 'elixir' | 'elm' | 'erb' | 'erl' | 'erlang' | 'f' | 'f#' | 'f03' | 'f08' | 'f18' | 'f77' | 'f90' | 'f95' | 'fish' | 'for' | 'fortran-fixed-form' | 'fortran-free-form' | 'fs' | 'fsharp' | 'fsl' | 'gdresource' | 'gdscript' | 'gdshader' | 'gherkin' | 'git-commit' | 'git-rebase' | 'gjs' | 'gleam' | 'glimmer-js' | 'glimmer-ts' | 'glsl' | 'gnuplot' | 'go' | 'gql' | 'graphql' | 'groovy' | 'gts' | 'hack' | 'haml' | 'handlebars' | 'haskell' | 'hbs' | 'hcl' | 'hjson' | 'hlsl' | 'hs' | 'html' | 'html-derivative' | 'http' | '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' | 'logo' | 'lua' | 'make' | 'makefile' | 'markdown' | 'marko' | 'matlab' | 'md' | 'mdc' | 'mdx' | 'mermaid' | 'mojo' | 'move' | 'nar' | 'narrat' | 'nextflow' | 'nf' | 'nginx' | 'nim' | 'nix' | 'nu' | 'nushell' | 'objc' | 'objective-c' | 'objective-cpp' | 'ocaml' | 'pascal' | 'perl' | 'perl6' | 'php' | 'plsql' | 'postcss' | 'powerquery' | 'powershell' | 'prisma' | 'prolog' | 'properties' | 'proto' | 'ps' | 'ps1' | 'pug' | 'puppet' | 'purescript' | 'py' | 'python' | 'ql' | 'r' | 'raku' | 'razor' | 'rb' | 'reg' | 'rel' | 'riscv' | 'rs' | 'rst' | 'ruby' | 'rust' | 'sas' | 'sass' | 'scala' | 'scheme' | 'scss' | 'sh' | 'shader' | 'shaderlab' | 'shell' | 'shellscript' | 'shellsession' | 'smalltalk' | 'solidity' | 'sparql' | 'spl' | 'splunk' | 'sql' | 'ssh-config' | 'stata' | 'styl' | 'stylus' | 'svelte' | 'swift' | 'system-verilog' | 'tasl' | 'tcl' | 'terraform' | 'tex' | 'tf' | 'tfvars' | 'toml' | 'ts' | 'tsv' | 'tsx' | 'turtle' | 'twig' | 'typ' | 'typescript' | 'typst' | 'v' | 'vb' | 'verilog' | 'vhdl' | 'vim' | 'viml' | 'vimscript' | 'vue' | 'vue-html' | 'vy' | 'vyper' | 'wasm' | 'wenyan' | 'wgsl' | '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
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shiki",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"description": "A beautiful Syntax Highlighter.",
|
|
6
6
|
"author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"./onig.wasm": "./dist/onig.wasm",
|
|
55
55
|
"./dist/*": "./dist/*",
|
|
56
|
+
"./package.json": "./package.json",
|
|
56
57
|
"./*": "./dist/*"
|
|
57
58
|
},
|
|
58
59
|
"main": "./dist/index.mjs",
|
|
@@ -91,11 +92,11 @@
|
|
|
91
92
|
"dist"
|
|
92
93
|
],
|
|
93
94
|
"dependencies": {
|
|
94
|
-
"@shikijs/core": "1.2.
|
|
95
|
+
"@shikijs/core": "1.2.2"
|
|
95
96
|
},
|
|
96
97
|
"devDependencies": {
|
|
97
|
-
"tm-grammars": "^1.
|
|
98
|
-
"tm-themes": "^1.3.
|
|
98
|
+
"tm-grammars": "^1.6.0",
|
|
99
|
+
"tm-themes": "^1.3.2",
|
|
99
100
|
"vscode-oniguruma": "^1.7.0"
|
|
100
101
|
},
|
|
101
102
|
"scripts": {
|