32 lines
53 KiB
JavaScript
32 lines
53 KiB
JavaScript
|
import typescript from './typescript.mjs';
|
||
|
|
||
|
const lang = Object.freeze({ "displayName": "Imba", "fileTypes": ["imba", "imba2"], "name": "imba", "patterns": [{ "include": "#root" }, { "captures": { "1": { "name": "punctuation.definition.comment.imba" } }, "match": "\\A(#!).*(?=$)", "name": "comment.line.shebang.imba" }], "repository": { "array-literal": { "begin": "\\s*(\\[)", "beginCaptures": { "1": { "name": "meta.brace.square.imba" } }, "end": "\\]", "endCaptures": { "0": { "name": "meta.brace.square.imba" } }, "name": "meta.array.literal.imba", "patterns": [{ "include": "#expr" }, { "include": "#punctuation-comma" }] }, "block": { "patterns": [{ "include": "#style-declaration" }, { "include": "#mixin-declaration" }, { "include": "#object-keys" }, { "include": "#generics-literal" }, { "include": "#tag-literal" }, { "include": "#regex" }, { "include": "#keywords" }, { "include": "#comment" }, { "include": "#literal" }, { "include": "#plain-identifiers" }, { "include": "#plain-accessors" }, { "include": "#pairs" }, { "include": "#invalid-indentation" }] }, "boolean-literal": { "patterns": [{ "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(true|yes)(?![\\?_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "name": "constant.language.boolean.true.imba" }, { "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(false|no)(?![\\?_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))", "name": "constant.language.boolean.false.imba" }] }, "brackets": { "patterns": [{ "begin": "{", "end": "}|(?=\\*/)", "patterns": [{ "include": "#brackets" }] }, { "begin": "\\[", "end": "\\]|(?=\\*/)", "patterns": [{ "include": "#brackets" }] }] }, "comment": { "patterns": [{ "begin": "/\\*\\*(?!/)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.imba" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.imba" } }, "name": "comment.block.documentation.imba", "patterns": [{ "include": "#docblock" }] }, { "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?", "beginCaptures": { "1": { "name": "punctuation.definition.comment.imba" }, "2": { "name": "storage.type.internaldeclaration.imba" }, "3": { "name": "punctuation.decorator.internaldeclaration.imba" } }, "end": "\\*/", "endCaptures": { "0": { "name": "punctuation.definition.comment.imba" } }, "name": "comment.block.imba" }, { "begin": "(### \\@ts(?=\\s|$))", "beginCaptures": { "1": { "name": "punctuation.definition.comment.imba" } }, "contentName": "source.ts.embedded.imba", "end": "###", "endCaptures": { "0": { "name": "punctuation.definition.comment.imba" } }, "name": "ts.block.imba", "patterns": [{ "include": "source.ts" }] }, { "begin": "(###)", "beginCaptures": { "1": { "name": "punctuation.definition.comment.imba" } }, "end": "###(?:[ \\t]*\\n)", "endCaptures": { "0": { "name": "punctuation.definition.comment.imba" } }, "name": "comment.block.imba" }, { "begin": "(^[ \\t]+)?((//|\\#\\s)(?:\\s*((@)internal)(?=\\s|$))?)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.imba" }, "2": { "name": "comment.line.double-slash.imba" }, "3": { "name": "punctuation.definition.comment.imba" }, "4": { "name": "storage.type.internaldeclaration.imba" }, "5": { "name": "punctuation.decorator.internaldeclaration.imba" } }, "contentName": "comment.line.double-slash.imba", "end": "(?=$)" }] }, "css-color-keywords": { "patterns": [{ "match": "(?i)(?<![\\w-])(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)(?![\\w-])", "name": "support.constant.color.w3c-standard-color-name.css" }, { "match": "(?xi) (?<![\\w-])\n(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood\n|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan\n|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange\n|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise\n|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen\n|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|h
|
||
|
(\\[)\\s*
|
||
|
[\\w$]+
|
||
|
(?:
|
||
|
(?:\\[\\])?
|
||
|
\\.
|
||
|
[\\w$]+
|
||
|
)*
|
||
|
(?:
|
||
|
\\s*
|
||
|
(=)
|
||
|
\\s*
|
||
|
(
|
||
|
|
||
|
(?>
|
||
|
"(?:(?:\\*(?!/))|(?:\\\\(?!"))|[^*\\\\])*?" |
|
||
|
'(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' |
|
||
|
\\[ (?:(?:\\*(?!/))|[^*])*? \\] |
|
||
|
(?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])*
|
||
|
)*
|
||
|
)
|
||
|
)?
|
||
|
\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))`, "name": "variable.other.jsdoc" }] }, { "begin": "(?x)\n(\n(@)\n(?:define|enum|exception|export|extends|lends|implements|modifies\n|namespace|private|protected|returns?|suppress|this|throws|type\n|yields?)\n)\n\\s+(?={)", "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])", "patterns": [{ "include": "#jsdoctype" }] }, { "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "entity.name.type.instance.jsdoc" } }, "match": "(?x)\n(\n(@)\n(?:alias|augments|callback|constructs|emits|event|fires|exports?\n|extends|external|function|func|host|lends|listens|interface|memberof!?\n|method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n(?:\n[^{}@\\s*] | \\*[^/]\n)+\n)" }, { "begin": `((@)(?:default(?:value)?|license|version))\\s+(([''"]))`, "beginCaptures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" }, "4": { "name": "punctuation.definition.string.begin.jsdoc" } }, "contentName": "variable.other.jsdoc", "end": "(\\3)|(?=$|\\*/)", "endCaptures": { "0": { "name": "variable.other.jsdoc" }, "1": { "name": "punctuation.definition.string.end.jsdoc" } } }, { "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" }, "3": { "name": "variable.other.jsdoc" } }, "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)" }, { "captures": { "1": { "name": "punctuation.definition.block.tag.jsdoc" } }, "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b", "name": "storage.type.class.jsdoc" }, { "include": "#inline-tags" }, { "captures": { "1": { "name": "storage.type.class.jsdoc" }, "2": { "name": "punctuation.definition.block.tag.jsdoc" } }, "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?))(?=\\s+)" }] }, "expr": { "patterns": [{ "include": "#style-declaration" }, { "include": "#object-keys" }, { "include": "#generics-literal" }, { "include": "#tag-literal" }, { "include": "#regex" }, { "include": "#keywords" }, { "include": "#comment" }, { "include": "#literal" }, { "include": "#plain-identifiers" }, { "include": "#plain-accessors" }, { "include": "#pairs" }] }, "expression": { "patterns": [{ "begin": "\\(", "beginCaptures": { "0": { "name": "meta.brace.round.imba" } }, "end": "\\)", "endCaptures": { "0": { "name": "meta.brace.round.imba" } }, "patterns": [{ "include": "#expr" }] }, { "include": "#tag-literal" }, { "include": "#expressionWithoutIdentifiers" }, { "include": "#identifiers" }, { "include": "#expressionPunctuations" }] }, "expressionPunctuations": { "patterns": [{ "include": "#punctuation-comma" }, { "include": "#punctuation-accessor" }] }, "expressionWithoutIdentifiers": { "patterns": [{ "include": "#string" }, { "include": "#regex" }, { "include": "#comment" }, { "include": "#function-expression" }, { "include": "#class-expression" }, {
|
||
|
var imba = [
|
||
|
...typescript,
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { imba as default };
|