13 lines
103 KiB
JavaScript
13 lines
103 KiB
JavaScript
|
const lang = Object.freeze({ "displayName": "Racket", "name": "racket", "patterns": [{ "include": "#comment" }, { "include": "#not-atom" }, { "include": "#atom" }, { "include": "#quote" }, { "match": "^#lang", "name": "keyword.other.racket" }], "repository": { "args": { "patterns": [{ "include": "#keyword" }, { "include": "#comment" }, { "include": "#default-args" }, { "match": "[^(\\#)\\[\\]{}\",'`;\\s][^()\\[\\]{}\",'`;\\s]*", "name": "variable.parameter.racket" }] }, "argument": { "patterns": [{ "begin": "(?x) (?<=[(\\[{]) \\s* (\\|)", "beginCaptures": { "1": { "name": "punctuation.verbatim.begin.racket" } }, "contentName": "variable.parameter.racket", "end": "\\|", "endCaptures": { "0": "punctuation.verbatim.end.racket" } }, { "begin": "(?x) (?<=[(\\[{]) \\s*\n(\\#% | \\\\\\ | [^\\#()\\[\\]{}\",'`;\\s])\n", "beginCaptures": { "1": { "name": "variable.parameter.racket" } }, "contentName": "variable.parameter.racket", "end": "(?=[()\\[\\]{}\",'`;\\s])", "patterns": [{ "match": "\\\\ " }, { "begin": "\\|", "beginCaptures": { "0": "punctuation.verbatim.begin.racket" }, "end": "\\|", "endCaptures": { "0": "punctuation.verbatim.end.racket" } }] }] }, "argument-struct": { "patterns": [{ "begin": "(?x) (?<=[(\\[{]) \\s* (\\|)", "beginCaptures": { "1": { "name": "punctuation.verbatim.begin.racket" } }, "contentName": "variable.other.member.racket", "end": "\\|", "endCaptures": { "0": "punctuation.verbatim.end.racket" } }, { "begin": "(?x) (?<=[(\\[{]) \\s*\n(\\#% | \\\\\\ | [^\\#()\\[\\]{}\",'`;\\s])\n", "beginCaptures": { "1": { "name": "variable.other.member.racket" } }, "contentName": "variable.other.member.racket", "end": "(?=[()\\[\\]{}\",'`;\\s])", "patterns": [{ "match": "\\\\ " }, { "begin": "\\|", "beginCaptures": { "0": "punctuation.verbatim.begin.racket" }, "end": "\\|", "endCaptures": { "0": "punctuation.verbatim.end.racket" } }] }] }, "atom": { "patterns": [{ "include": "#bool" }, { "include": "#number" }, { "include": "#string" }, { "include": "#keyword" }, { "include": "#character" }, { "include": "#symbol" }, { "include": "#variable" }] }, "base-string": { "patterns": [{ "begin": '"', "beginCaptures": { "0": [{ "name": "punctuation.definition.string.begin.racket" }] }, "end": '"', "endCaptures": { "0": [{ "name": "punctuation.definition.string.end.racket" }] }, "name": "string.quoted.double.racket", "patterns": [{ "include": "#escape-char" }] }] }, "binding": { "patterns": [{ "begin": "(?x) (?<=[(\\[{]) \\s* (\\|)", "beginCaptures": { "1": { "name": "punctuation.verbatim.begin.racket" } }, "contentName": "entity.name.constant", "end": "\\|", "endCaptures": { "0": "punctuation.verbatim.end.racket" } }, { "begin": "(?x) (?<=[(\\[{]) \\s*\n(\\#% | \\\\\\ | [^\\#()\\[\\]{}\",'`;\\s])\n", "beginCaptures": { "1": { "name": "entity.name.constant" } }, "contentName": "entity.name.constant", "end": "(?=[()\\[\\]{}\",'`;\\s])", "patterns": [{ "match": "\\\\ " }, { "begin": "\\|", "beginCaptures": { "0": "punctuation.verbatim.begin.racket" }, "end": "\\|", "endCaptures": { "0": "punctuation.verbatim.end.racket" } }] }] }, "bool": { "patterns": [{ "match": "(?x)\n(?<=^|[()\\[\\]{}\",'`;\\s]) \\#\n(?: [tT](?: rue)?|[fF](?: alse)?)\n(?=[()\\[\\]{}\",'`;\\s])\n", "name": "constant.language.racket" }] }, "builtin-functions": { "patterns": [{ "include": "#format" }, { "include": "#define" }, { "include": "#lambda" }, { "include": "#struct" }, { "captures": { "1": { "name": "support.function.racket" } }, "match": "(?x) (?<=$|[()\\[\\]{}\",'`;\\s])\n(\n\\.\\.\\. | _ | syntax-id-rules | syntax-rules | \\#%app | \\#%datum | \\#%declare | \\#%expression | \\#%module-begin | \\#%plain-app | \\#%plain-lambda | \\#%plain-module-begin | \\#%printing-module-begin | \\#%provide | \\#%require | \\#%stratified-body | \\#%top | \\#%top-interaction | \\#%variable-reference | \\.\\.\\. | :do-in | => | _ | all-defined-out | all-from-out | and | apply | arity-at-least | begin | begin-for-syntax | begin0 | call-with-input-file | call-with-input-file\\* | call-with-output-file | call-with-output-file\\* | case | case-lambda | combine-in | com
|
||
|
(?:
|
||
|
(?: [abtnvfre"'\\\\]) |
|
||
|
(?: [0-7]{1,3}) |
|
||
|
(?: x[\\da-fA-F]{1,2})
|
||
|
)
|
||
|
`, "name": "constant.character.escape.racket" }] }, "escape-char-error": { "patterns": [{ "match": "\\\\.", "name": "invalid.illegal.escape.racket" }] }, "format": { "patterns": [{ "begin": '(?x) (?<=[(\\[{]) \\s*\n(e?printf | format) \\s*\n(")\n', "beginCaptures": { "1": { "name": "support.function.racket" }, "2": { "name": "string.quoted.double.racket" } }, "contentName": "string.quoted.double.racket", "end": '"', "endCaptures": { "0": { "name": "string.quoted.double.racket" } }, "patterns": [{ "include": "#format-string" }, { "include": "#escape-char" }] }] }, "format-string": { "patterns": [{ "match": "(?x) ~\n(?:\n(?: \\.?[n%aAsSvV]) |\n[cCbBoOxX~\\s]\n)\n", "name": "constant.other.placeholder.racket" }] }, "func-args": { "patterns": [{ "include": "#function-name" }, { "include": "#dot" }, { "include": "#comment" }, { "include": "#args" }] }, "function-name": { "patterns": [{ "begin": "(?x) (?<=[(\\[{]) \\s* (\\|)", "beginCaptures": { "1": { "name": "punctuation.verbatim.begin.racket" } }, "contentName": "entity.name.function.racket", "end": "\\|", "endCaptures": { "0": "punctuation.verbatim.end.racket" }, "name": "entity.name.function.racket" }, { "begin": "(?x) (?<=[(\\[{]) \\s*\n(\\#% | \\\\\\ | [^\\#()\\[\\]{}\",'`;\\s])\n", "beginCaptures": { "1": { "name": "entity.name.function.racket" } }, "contentName": "entity.name.function.racket", "end": "(?=[()\\[\\]{}\",'`;\\s])", "patterns": [{ "match": "\\\\ " }, { "begin": "\\|", "beginCaptures": { "0": "punctuation.verbatim.begin.racket" }, "end": "\\|", "endCaptures": { "0": "punctuation.verbatim.end.racket" } }] }] }, "hash": { "patterns": [{ "begin": "(?x) \\# hash(?: eq(?: v)?)? \\(", "beginCaptures": { "0": { "name": "punctuation.section.hash.begin.racket" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.hash.end.racket" } }, "name": "meta.hash.racket", "patterns": [{ "include": "#hash-content" }] }, { "begin": "(?x) \\# hash(?: eq(?: v)?)? \\[", "beginCaptures": { "0": { "name": "punctuation.section.hash.begin.racket" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.hash.end.racket" } }, "name": "meta.hash.racket", "patterns": [{ "include": "#hash-content" }] }, { "begin": "(?x) \\# hash(?: eq(?: v)?)? \\{", "beginCaptures": { "0": { "name": "punctuation.section.hash.begin.racket" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.hash.end.racket" } }, "name": "meta.hash.racket", "patterns": [{ "include": "#hash-content" }] }] }, "hash-content": { "patterns": [{ "include": "#comment" }, { "include": "#pairing" }] }, "here-string": { "patterns": [{ "begin": "#<<(.*)$", "end": "^\\1$", "name": "string.here.racket" }] }, "keyword": { "patterns": [{ "match": "(?x) (?<=^|[()\\[\\]{}\",'`;\\s]) \\#: [^()\\[\\]{}\",'`;\\s]+\n", "name": "keyword.other.racket" }] }, "lambda": { "patterns": [{ "include": "#lambda-onearg" }, { "include": "#lambda-args" }] }, "lambda-args": { "patterns": [{ "begin": "(?x) (?<=[(\\[{]) \\s*\n(lambda | \u03BB) \\s+\n(\\()\n", "beginCaptures": { "1": { "name": "storage.type.lambda.racket" }, "2": { "name": "punctuation.section.begin.racket" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.section.end.racket" } }, "name": "meta.lambda.racket", "patterns": [{ "include": "#args" }] }, { "begin": "(?x) (?<=[(\\[{]) \\s*\n(lambda | \u03BB) \\s+\n({)\n", "beginCaptures": { "1": { "name": "storage.type.lambda.racket" }, "2": { "name": "punctuation.section.begin.racket" } }, "end": "}", "endCaptures": { "0": { "name": "punctuation.section.end.racket" } }, "name": "meta.lambda.racket", "patterns": [{ "include": "#args" }] }, { "begin": "(?x) (?<=[(\\[{]) \\s*\n(lambda | \u03BB) \\s+\n(\\[)\n", "beginCaptures": { "1": { "name": "storage.type.lambda.racket" }, "2": { "name": "punctuation.section.begin.racket" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.section.end.racket" } }, "name": "meta.lambda.racket", "patterns": [{ "include": "#args" }] }] }, "lambda-onearg": [{ "captures": { "1": { "name": "storage.type.lambda.racket" }, "2": { "name": "variable
|
||
|
var racket = [
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { racket as default };
|