site/node_modules/shiki/dist/langs/nushell.mjs

7 lines
20 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "nushell", "name": "nushell", "patterns": [{ "include": "#define-variable" }, { "include": "#define-alias" }, { "include": "#function" }, { "include": "#extern" }, { "include": "#module" }, { "include": "#use-module" }, { "include": "#expression" }, { "include": "#comment" }], "repository": { "binary": { "begin": "\\b(0x)(\\[)", "beginCaptures": { "1": { "name": "constant.numeric.nushell" }, "2": { "name": "meta.brace.square.begin.nushell" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.begin.nushell" } }, "name": "constant.binary.nushell", "patterns": [{ "match": "[0-9a-fA-F]{2}", "name": "constant.numeric.nushell" }] }, "braced-expression": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.section.block.begin.bracket.curly.nushell" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.block.end.bracket.curly.nushell" } }, "name": "meta.expression.braced.nushell", "patterns": [{ "begin": "(?<=\\{)\\s*\\|", "end": "\\|", "name": "meta.closure.parameters.nushell", "patterns": [{ "include": "#function-parameter" }] }, { "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "keyword.control.nushell" } }, "match": "(\\w+)\\s*(:)\\s*" }, { "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "variable.other.nushell", "patterns": [{ "include": "#paren-expression" }] }, "3": { "name": "keyword.control.nushell" } }, "match": '(\\$"((?:[^"\\\\]|\\\\.)*)")\\s*(:)\\s*', "name": "meta.record-entry.nushell" }, { "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "keyword.control.nushell" } }, "match": '("(?:[^"\\\\]|\\\\.)*")\\s*(:)\\s*', "name": "meta.record-entry.nushell" }, { "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "variable.other.nushell", "patterns": [{ "include": "#paren-expression" }] }, "3": { "name": "keyword.control.nushell" } }, "match": "(\\$'([^']*)')\\s*(:)\\s*", "name": "meta.record-entry.nushell" }, { "captures": { "1": { "name": "variable.other.nushell" }, "2": { "name": "keyword.control.nushell" } }, "match": "('[^']*')\\s*(:)\\s*", "name": "meta.record-entry.nushell" }, { "include": "#spread" }, { "include": "source.nushell" }] }, "command": { "begin": `(?<!\\w)(?:(\\^)|(?![0-9]|\\$))([\\w.!]+(?:(?: (?!-)[\\w\\-.!]+(?:(?= |\\))|$)|[\\w\\-.!]+))*|(?<=\\^)\\$?(?:"[^"]+"|'[^']+'))`, "beginCaptures": { "1": { "name": "keyword.operator.nushell" }, "2": { "patterns": [{ "include": "#control-keywords" }, { "captures": { "0": { "name": "keyword.other.builtin.nushell" } }, "match": "(?:ansi|char) \\w+" }, { "captures": { "1": { "name": "keyword.other.builtin.nushell" }, "2": { "patterns": [{ "include": "#value" }] } }, "comment": "Regex generated with list-to-tree (https://github.com/glcraft/list-to-tree)", "match": "(a(?:l(?:ias|l)|n(?:si(?: (?:gradient|link|strip))?|y)|ppend|st)|b(?:g|its(?: (?:and|not|or|ro(?:l|r)|sh(?:l|r)|xor))?|reak|ytes(?: (?:a(?:dd|t)|build|collect|ends-with|index-of|length|re(?:move|place|verse)|starts-with))?)|c(?:al|d|har|l(?:ear|ipboard (?:copy|paste))|o(?:l(?:lect|umns)|m(?:mandline(?: (?:edit|get-cursor|set-cursor))?|p(?:act|lete))|n(?:fig(?: (?:env|nu|reset))?|st|tinue))|p|ustom-value (?:generate(?:2)?|update(?:-arg)?))|d(?:ate(?: (?:format|humanize|list-timezone|now|to-(?:record|t(?:able|imezone))))?|e(?:bug(?: info)?|code(?: (?:base64|hex))?|f(?:ault)?|scribe|tect columns)|fr(?: (?:a(?:gg(?:-groups)?|ll-(?:false|true)|ppend|rg-(?:m(?:ax|in)|sort|true|unique|where)|s(?:-date(?:time)?)?)|c(?:a(?:che|st)|o(?:l(?:lect|umns)?|n(?:cat(?:-str|enate)|tains)|unt(?:-null)?)|umulative)|d(?:atepart|rop(?:-(?:duplicates|nulls))?|types|ummies)|exp(?:lode|r-not)|f(?:etch|i(?:l(?:l-n(?:an|ull)|ter(?:-with)?)|rst)|latten)|g(?:et(?:-(?:day|hour|m(?:inute|onth)|nanosecond|ordinal|second|week(?:day)?|year))?|roup-by)|i(?:mplode|nto-(?:df|lazy|nu)|s-(?:duplicated|in|n(?:ot-null|ull)|unique))|join|l(?:ast|it|owercase|s)|m(?:ax|e(?:an|dian|lt)|in)|n(?:-unique|ot)|o(?:pen|therwise)|qu(?:antile|ery)|r(?:e(?:name|place(?:-all)?|v
var nushell = [
lang
];
export { nushell as default };