astro-ghostcms/.pnpm-store/v3/files/61/535e7d57b44592ae13143fcbff8...

7 lines
16 KiB
Plaintext
Raw Permalink Normal View History

2024-02-14 14:10:47 +00:00
const lang = Object.freeze({ "displayName": "Nix", "fileTypes": ["nix"], "name": "nix", "patterns": [{ "include": "#expression" }], "repository": { "attribute-bind": { "patterns": [{ "include": "#attribute-name" }, { "include": "#attribute-bind-from-equals" }] }, "attribute-bind-from-equals": { "begin": "\\=", "beginCaptures": { "0": { "name": "keyword.operator.bind.nix" } }, "end": "\\;", "endCaptures": { "0": { "name": "punctuation.terminator.bind.nix" } }, "patterns": [{ "include": "#expression" }] }, "attribute-inherit": { "begin": "\\binherit\\b", "beginCaptures": { "0": { "name": "keyword.other.inherit.nix" } }, "end": "\\;", "endCaptures": { "0": { "name": "punctuation.terminator.inherit.nix" } }, "patterns": [{ "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.section.function.arguments.nix" } }, "end": "(?=\\;)", "patterns": [{ "begin": "\\)", "beginCaptures": { "0": { "name": "punctuation.section.function.arguments.nix" } }, "end": "(?=\\;)", "patterns": [{ "include": "#bad-reserved" }, { "include": "#attribute-name-single" }, { "include": "#others" }] }, { "include": "#expression" }] }, { "begin": "(?=[a-zA-Z\\_])", "end": "(?=\\;)", "patterns": [{ "include": "#bad-reserved" }, { "include": "#attribute-name-single" }, { "include": "#others" }] }, { "include": "#others" }] }, "attribute-name": { "patterns": [{ "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "name": "entity.other.attribute-name.multipart.nix" }, { "match": "\\." }, { "include": "#string-quoted" }, { "include": "#interpolation" }] }, "attribute-name-single": { "match": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "name": "entity.other.attribute-name.single.nix" }, "attrset-contents": { "patterns": [{ "include": "#attribute-inherit" }, { "include": "#bad-reserved" }, { "include": "#attribute-bind" }, { "include": "#others" }] }, "attrset-definition": { "begin": "(?=\\{)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "(\\{)", "beginCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "end": "(\\})", "endCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "patterns": [{ "include": "#attrset-contents" }] }, { "begin": "(?<=\\})", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }] }, "attrset-definition-brace-opened": { "patterns": [{ "begin": "(?<=\\})", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#expression-cont" }] }, { "begin": "(?=.?)", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.attrset.nix" } }, "patterns": [{ "include": "#attrset-contents" }] }] }, "attrset-for-sure": { "patterns": [{ "begin": "(?=\\brec\\b)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "begin": "\\brec\\b", "beginCaptures": { "0": { "name": "keyword.other.nix" } }, "end": "(?=\\{)", "patterns": [{ "include": "#others" }] }, { "include": "#attrset-definition" }, { "include": "#others" }] }, { "begin": "(?=\\{\\s*(\\}|[^,?]*(=|;)))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attrset-definition" }, { "include": "#others" }] }] }, "attrset-or-function": { "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.attrset-or-function.nix" } }, "end": "(?=([\\])};]|\\b(else|then)\\b))", "patterns": [{ "begin": `(?=(\\s*\\}|\\"|\\binherit\\b|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*(\\s*\\.|\\s*=[^=])))`, "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attrset-definition-brace-opened" }] }, { "begin": "(?=(\\.\\.\\.|\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*\\s*[,?]))", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#function-definition-brace-opened" }] }, { "include": "#bad-reserved" }, { "begin": "\\b[a-zA-Z\\_][a-zA-Z0-9\\_\\'\\-]*", "beginCaptures": { "0": { "name": "variable.parameter.function.maybe.nix" } }, "end": "(?=([\\])};]|\\b(else|then)\\b))", "patterns": [{ "begin": "(?=\\.)", "end": "(?=([\\])};,]|\\b(else|then)\\b))", "patterns": [{ "include": "#attrset-definition-brace-opened" }] }, { "begin": "\\s*(\\,)", "begi
var nix = [
lang
];
export { nix as default };