7 lines
50 KiB
JavaScript
7 lines
50 KiB
JavaScript
|
const lang = Object.freeze({ "displayName": "Go", "name": "go", "patterns": [{ "include": "#statements" }], "repository": { "after_control_variables": { "captures": { "1": { "patterns": [{ "include": "#type-declarations-without-brackets" }, { "match": "\\[", "name": "punctuation.definition.begin.bracket.square.go" }, { "match": "\\]", "name": "punctuation.definition.end.bracket.square.go" }, { "match": "(?:\\w+)", "name": "variable.other.go" }] } }, "comment": "After control variables, to not highlight as a struct/interface (before formatting with gofmt)", "match": "(?:(?<=\\brange\\b|\\bswitch\\b|\\;|\\bif\\b|\\bfor\\b|\\<|\\>|\\<\\=|\\>\\=|\\=\\=|\\!\\=|\\w(?:\\+|/|\\-|\\*|\\%)|\\w(?:\\+|/|\\-|\\*|\\%)\\=|\\|\\||\\&\\&)(?:\\s*)((?![\\[\\]]+)[[:alnum:]\\-\\_\\!\\.\\[\\]\\<\\>\\=\\*/\\+\\%\\:]+)(?:\\s*)(?=\\{))" }, "brackets": { "patterns": [{ "begin": "\\{", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.curly.go" } }, "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.curly.go" } }, "patterns": [{ "include": "$self" }] }, { "begin": "\\(", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.round.go" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.round.go" } }, "patterns": [{ "include": "$self" }] }, { "begin": "\\[", "beginCaptures": { "0": { "name": "punctuation.definition.begin.bracket.square.go" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.square.go" } }, "patterns": [{ "include": "$self" }] }] }, "built_in_functions": { "comment": "Built-in functions", "patterns": [{ "match": "\\b(append|cap|close|complex|copy|delete|imag|len|panic|print|println|real|recover|min|max|clear)\\b(?=\\()", "name": "entity.name.function.support.builtin.go" }, { "begin": "(?:(\\bnew\\b)(\\())", "beginCaptures": { "1": { "name": "entity.name.function.support.builtin.go" }, "2": { "name": "punctuation.definition.begin.bracket.round.go" } }, "comment": "new keyword", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.round.go" } }, "patterns": [{ "include": "#functions" }, { "include": "#struct_variables_types" }, { "include": "#type-declarations" }, { "include": "#generic_types" }, { "match": "(?:\\w+)", "name": "entity.name.type.go" }, { "include": "$self" }] }, { "begin": "(?:(\\bmake\\b)(?:(\\()((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?:[\\[\\]\\*]+)?(?:(?!\\bmap\\b)(?:[\\w\\.]+))?(\\[(?:(?:[\\S]+)(?:(?:\\,\\s*(?:[\\S]+))*))?\\])?(?:\\,)?)?))", "beginCaptures": { "1": { "name": "entity.name.function.support.builtin.go" }, "2": { "name": "punctuation.definition.begin.bracket.round.go" }, "3": { "patterns": [{ "include": "#type-declarations-without-brackets" }, { "include": "#parameter-variable-types" }, { "match": "\\w+", "name": "entity.name.type.go" }] } }, "comment": "make keyword", "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.end.bracket.round.go" } }, "patterns": [{ "include": "$self" }] }] }, "comments": { "patterns": [{ "begin": "(\\/\\*)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.go" } }, "end": "(\\*\\/)", "endCaptures": { "1": { "name": "punctuation.definition.comment.go" } }, "name": "comment.block.go" }, { "begin": "(\\/\\/)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.go" } }, "end": "(?:\\n|$)", "name": "comment.line.double-slash.go" }] }, "delimiters": { "patterns": [{ "match": "\\,", "name": "punctuation.other.comma.go" }, { "match": "\\.(?!\\.\\.)", "name": "punctuation.other.period.go" }, { "match": ":(?!=)", "name": "punctuation.other.colon.go" }] }, "double_parentheses_types": { "captures": { "1": { "patterns": [{ "include": "#type-declarations-without-brackets" }, { "match": "\\(", "name": "punctuation.definition.begin.bracket.round.go" }, { "match": "\\)", "name": "punctuation.definition.end.bracket.round.go" }, { "match": "\\[", "name": "punctuation.definition.begin.bracket.square.go" }, { "match": "\\]", "n
|
||
|
var go = [
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { go as default };
|