7 lines
14 KiB
JavaScript
7 lines
14 KiB
JavaScript
|
const lang = Object.freeze({ "displayName": "V", "fileTypes": [".v", ".vh", ".vsh", ".vv", "v.mod"], "name": "v", "patterns": [{ "include": "#comments" }, { "include": "#function-decl" }, { "include": "#as-is" }, { "include": "#attributes" }, { "include": "#assignment" }, { "include": "#module-decl" }, { "include": "#import-decl" }, { "include": "#hash-decl" }, { "include": "#brackets" }, { "include": "#builtin-fix" }, { "include": "#escaped-fix" }, { "include": "#operators" }, { "include": "#function-limited-overload-decl" }, { "include": "#function-extend-decl" }, { "include": "#function-exist" }, { "include": "#generic" }, { "include": "#constants" }, { "include": "#type" }, { "include": "#enum" }, { "include": "#interface" }, { "include": "#struct" }, { "include": "#keywords" }, { "include": "#storage" }, { "include": "#numbers" }, { "include": "#strings" }, { "include": "#types" }, { "include": "#punctuations" }, { "include": "#variable-assign" }, { "include": "#function-decl" }], "repository": { "as-is": { "begin": "\\s+(as|is)\\s+", "beginCaptures": { "1": { "name": "keyword.$1.v" } }, "end": "([\\w.]*)", "endCaptures": { "1": { "name": "entity.name.alias.v" } } }, "assignment": { "captures": { "1": { "patterns": [{ "include": "#operators" }] } }, "match": "\\s+((?:\\:|\\+|\\-|\\*|/|\\%|\\&|\\||\\^)?=)\\s+", "name": "meta.definition.variable.v" }, "attributes": { "captures": { "1": { "name": "meta.function.attribute.v" }, "2": { "name": "punctuation.definition.begin.bracket.square.v" }, "3": { "name": "storage.modifier.attribute.v" }, "4": { "name": "punctuation.definition.end.bracket.square.v" } }, "match": "^\\s*((\\[)(deprecated|unsafe|console|heap|manualfree|typedef|live|inline|flag|ref_only|direct_array_access|callconv)(\\]))", "name": "meta.definition.attribute.v" }, "brackets": { "patterns": [{ "begin": "{", "beginCaptures": { "0": { "name": "punctuation.definition.bracket.curly.begin.v" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.definition.bracket.curly.end.v" } }, "patterns": [{ "include": "$self" }] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.bracket.round.begin.v" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.bracket.round.end.v" } }, "patterns": [{ "include": "$self" }] }, { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.bracket.square.begin.v" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.bracket.square.end.v" } }, "patterns": [{ "include": "$self" }] }] }, "builtin-fix": { "patterns": [{ "patterns": [{ "match": "(const)(?=\\s*\\()", "name": "storage.modifier.v" }, { "match": "\\b(fn|type|enum|struct|union|interface|map|assert|sizeof|typeof|__offsetof)\\b(?=\\s*\\()", "name": "keyword.$1.v" }] }, { "patterns": [{ "match": "(\\$if|\\$else)(?=\\s*\\()", "name": "keyword.control.v" }, { "match": "\\b(as|in|is|or|break|continue|default|unsafe|match|if|else|for|go|spawn|goto|defer|return|shared|select|rlock|lock|atomic|asm)\\b(?=\\s*\\()", "name": "keyword.control.v" }] }, { "patterns": [{ "captures": { "1": { "name": "storage.type.numeric.v" } }, "match": "(?<!.)(i?(?:8|16|nt|64|128)|u?(?:16|32|64|128)|f?(?:32|64))(?=\\s*\\()", "name": "meta.expr.numeric.cast.v" }, { "captures": { "1": { "name": "storage.type.$1.v" } }, "match": "(bool|byte|byteptr|charptr|voidptr|string|rune|size_t|[ui]size)(?=\\s*\\()", "name": "meta.expr.bool.cast.v" }] }] }, "comments": { "patterns": [{ "begin": "/\\*", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.v" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.end.v" } }, "name": "comment.block.documentation.v", "patterns": [{ "include": "#comments" }] }, { "begin": "//", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.v" } }, "end": "$", "name": "comment.line.double-slash.v" }] }, "constants": { "match": "\\b(true|false|none)\\b", "name": "constant.language.v" }, "enum": { "captures": { "1": { "name": "storage.modifier.$1.v" }, "2": { "name": "storage.type.
|
||
|
var v = [
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { v as default };
|