10 lines
9.4 KiB
JavaScript
10 lines
9.4 KiB
JavaScript
|
import r from './r.mjs';
|
||
|
|
||
|
const lang = Object.freeze({ "displayName": "TeX", "name": "tex", "patterns": [{ "begin": "(?<=^\\s*)((\\\\)iffalse)", "beginCaptures": { "1": { "name": "keyword.control.tex" }, "2": { "name": "punctuation.definition.keyword.tex" } }, "contentName": "comment.line.percentage.tex", "end": "(?<=^\\s*)((\\\\)(?:else|fi))", "endCaptures": { "1": { "name": "keyword.control.tex" }, "2": { "name": "punctuation.definition.keyword.tex" } }, "patterns": [{ "include": "#comment" }, { "include": "#conditionals" }] }, { "captures": { "1": { "name": "punctuation.definition.keyword.tex" } }, "match": "(\\\\)(backmatter|csname|else|endcsname|fi|frontmatter|mainmatter|unless|if(case|cat|csname|defined|dim|eof|false|fontchar|hbox|hmode|inner|mmode|num|odd|true|vbox|vmode|void|x)?)(?![a-zA-Z@])", "name": "keyword.control.tex" }, { "captures": { "1": { "name": "keyword.control.catcode.tex" }, "2": { "name": "punctuation.definition.keyword.tex" }, "3": { "name": "punctuation.separator.key-value.tex" }, "4": { "name": "constant.numeric.category.tex" } }, "match": "((\\\\)catcode)`(?:\\\\)?.(=)(\\d+)", "name": "meta.catcode.tex" }, { "include": "#comment" }, { "match": "[\\[\\]]", "name": "punctuation.definition.brackets.tex" }, { "begin": "(\\$\\$|\\$)", "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.tex" } }, "end": "(\\1)", "endCaptures": { "1": { "name": "punctuation.definition.string.end.tex" } }, "name": "meta.math.block.tex support.class.math.block.tex", "patterns": [{ "match": "\\\\\\$", "name": "constant.character.escape.tex" }, { "include": "#math" }, { "include": "$self" }] }, { "match": "\\\\\\\\", "name": "keyword.control.newline.tex" }, { "captures": { "1": { "name": "punctuation.definition.function.tex" } }, "match": "(\\\\)_*[\\p{Alphabetic}@]+(?:_[\\p{Alphabetic}@]+)*:[NncVvoxefTFpwD]*", "name": "support.class.general.latex3.tex" }, { "captures": { "1": { "name": "punctuation.definition.function.tex" } }, "match": "(\\.)[\\p{Alphabetic}@]+(?:_[\\p{Alphabetic}@]+)*:[NncVvoxefTFpwD]*", "name": "support.class.general.latex3.tex" }, { "captures": { "1": { "name": "punctuation.definition.function.tex" } }, "match": "(\\\\)(?:[,;]|(?:[\\p{Alphabetic}@]+))", "name": "support.function.general.tex" }, { "captures": { "1": { "name": "punctuation.definition.keyword.tex" } }, "match": "(\\\\)[^a-zA-Z@]", "name": "constant.character.escape.tex" }], "repository": { "braces": { "begin": "(?<!\\\\)\\{", "beginCaptures": { "0": { "name": "punctuation.group.begin.tex" } }, "end": "(?<!\\\\)\\}", "endCaptures": { "0": { "name": "punctuation.group.end.tex" } }, "name": "meta.group.braces.tex", "patterns": [{ "include": "#braces" }] }, "comment": { "begin": "(^[ \\t]+)?(?=%)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.tex" } }, "end": "(?!\\G)", "patterns": [{ "begin": "%:?", "beginCaptures": { "0": { "name": "punctuation.definition.comment.tex" } }, "end": "$\\n?", "name": "comment.line.percentage.tex" }, { "begin": "^(%!TEX) (\\S*) =", "beginCaptures": { "1": { "name": "punctuation.definition.comment.tex" } }, "end": "$\\n?", "name": "comment.line.percentage.directive.tex" }] }, "conditionals": { "begin": "(?<=^\\s*)\\\\if[a-z]*", "end": "(?<=^\\s*)\\\\fi", "patterns": [{ "include": "#comment" }, { "include": "#conditionals" }] }, "math": { "patterns": [{ "begin": "((\\\\)(?:text|mbox))(\\{)", "beginCaptures": { "1": { "name": "constant.other.math.tex" }, "2": { "name": "punctuation.definition.function.tex" }, "3": { "name": "punctuation.definition.arguments.begin.tex meta.text.normal.tex" } }, "contentName": "meta.text.normal.tex", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.tex meta.text.normal.tex" } }, "patterns": [{ "include": "#math" }, { "include": "$self" }] }, { "match": "\\\\{|\\\\}", "name": "punctuation.math.bracket.pair.tex" }, { "match": "\\\\(left|right|((big|bigg|Big|Bigg)[lr]?))([\\(\\[\\<\\>\\]\\)\\.\\|]|\\\\[{}|]|\\\\[lr]?[Vv]ert|\\\\[lr]angle)", "name": "punctuation.math.bracket.pair.big.tex" }, { "captures": { "1": { "name": "punc
|
||
|
var tex = [
|
||
|
...r,
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { tex as default };
|