const lang = Object.freeze({ "displayName": "Shell", "name": "shellscript", "patterns": [{ "include": "#initial_context" }], "repository": { "alias_statement": { "begin": "(?:(?:[ \\t]*+)(alias)(?:[ \\t]*+)((?:(?:((?&;<>\\(\\)\\$`\\\\\"'<\\|]+)(?!>))" }, { "include": "#normal_context" }] }, "arithmetic_double": { "patterns": [{ "begin": "\\(\\(", "beginCaptures": { "0": { "name": "punctuation.section.arithmetic.double.shell" } }, "end": "\\)(?:\\s*)\\)", "endCaptures": { "0": { "name": "punctuation.section.arithmetic.double.shell" } }, "name": "meta.arithmetic.shell", "patterns": [{ "include": "#math" }, { "include": "#string" }] }] }, "arithmetic_no_dollar": { "patterns": [{ "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.arithmetic.single.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.arithmetic.single.shell" } }, "name": "meta.arithmetic.shell", "patterns": [{ "include": "#math" }, { "include": "#string" }] }] }, "array_access_inline": { "captures": { "1": { "name": "punctuation.section.array.shell" }, "2": { "patterns": [{ "include": "#special_expansion" }, { "include": "#string" }, { "include": "#variable" }] }, "3": { "name": "punctuation.section.array.shell" } }, "match": "(?:(\\[)([^\\[\\]]+)(\\]))" }, "array_value": { "begin": "(?:[ \\t]*+)(?:((?|#|\\n|$|;|[ \\t]))(?!nocorrect |nocorrect |nocorrect$|readonly |readonly |readonly$|function |function |function$|foreach |foreach |foreach$|coproc |coproc |coproc$|logout |logout |logout$|export |export |export$|select |select |select$|repeat |repeat |repeat$|pushd |pushd |pushd$|until |until |until$|while |while |while$|local |local |local$|case |case |case$|done |done |done$|elif |elif |elif$|else |else |else$|esac |esac |esac$|popd |popd |popd$|then |then |then$|time |time |time$|for |for |for$|end |end |end$|fi |fi |fi$|do |do |do$|in |in |in$|if |if |if$))(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))|((?!"|'|\\\\\\n?$)(?:[^!'"<> \\t\\n\\r]+?)))(?:(?= |\\t)|(?:(?=;|\\||&|\\n|\\)|\\\`|\\{|\\}|[ \\t]*#|\\])(?]+))` }, { "begin": `(?:(?:\\G|(?|#|\\n|$|;|[ \\t]))(?!nocorrect |nocorrect |nocorrect$|readonly |readonly |readonly$|function |function |function$|foreach |foreach |foreach$|coproc |coproc |coproc$|logout |logout |logout$|export |export |export$|select |select |select$|repeat |repeat |repeat$|pushd |pushd |pushd$|until |until |until$|while |while |while$|local |local |local$|case |case |case$|done |done |done$|elif |elif |elif$|else |else |else$|esac |esac |esac$|popd |popd |popd$|then |then |then$|time |time |time$|for |for |for$|end |end |end$|fi |fi |fi$|do |do |do$|in |in |in$|if |if |if$)(?!\\\\\\n?$)))", "beginCaptures": {}, "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?|&&|\\|\\|", "name": "keyword.operator.logical.shell" }, { "match": "(?[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=", "name": "keyword.operator.arithmetic.shell" }, { "match": "0[xX][0-9A-Fa-f]+", "name": "constant.numeric.hex.shell" }, { "match": ";", "name": "punctuation.separator.semicolon.range" }, { "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": "(?[>=]?|==|!=|^|\\|{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" }, { "include": "#subshell_dollar" }, { "begin": "(?|#|\\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]*#|\\])(?>?)(?:[ \\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" }, "special_expansion": { "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", "name": "keyword.operator.expansion.shell" }, "start_of_command": { "match": "(?:(?:[ \\t]*+)(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!nocorrect |nocorrect |nocorrect$|readonly |readonly |readonly$|function |function |function$|foreach |foreach |foreach$|coproc |coproc |coproc$|logout |logout |logout$|export |export |export$|select |select |select$|repeat |repeat |repeat$|pushd |pushd |pushd$|until |until |until$|while |while |while$|local |local |local$|case |case |case$|done |done |done$|elif |elif |elif$|else |else |else$|esac |esac |esac$|popd |popd |popd$|then |then |then$|time |time |time$|for |for |for$|end |end |end$|fi |fi |fi$|do |do |do$|in |in |in$|if |if |if$)(?!\\\\\\n?$)))" }, "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" }] }] }, "subshell_dollar": { "patterns": [{ "begin": "(?:\\$\\()", "beginCaptures": { "0": { "name": "punctuation.definition.subshell.single.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.subshell.single.shell" } }, "name": "meta.scope.subshell", "patterns": [{ "include": "#parenthese" }, { "include": "#initial_context" }] }] }, "support": { "patterns": [{ "match": "(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)", "name": "support.function.builtin.shell" }] }, "typical_statements": { "patterns": [{ "include": "#assignment_statement" }, { "include": "#case_statement" }, { "include": "#for_statement" }, { "include": "#while_statement" }, { "include": "#function_definition" }, { "include": "#command_statement" }, { "include": "#line_continuation" }, { "include": "#arithmetic_double" }, { "include": "#normal_context" }] }, "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": [{ "include": "#special_expansion" }, { "include": "#array_access_inline" }, { "match": "[0-9]+", "name": "variable.parameter.positional.shell" }, { "match": "(?