2 lines
8.3 KiB
JavaScript
2 lines
8.3 KiB
JavaScript
|
|
const t=Object.freeze(JSON.parse('{"displayName":"Typst","name":"typst","patterns":[{"include":"#markup"}],"repository":{"arguments":{"patterns":[{"match":"\\\\b[A-Za-z_][0-9A-Za-z_-]*(?=:)","name":"variable.parameter.typst"},{"include":"#code"}]},"code":{"patterns":[{"include":"#common"},{"begin":"{","captures":{"0":{"name":"punctuation.definition.block.code.typst"}},"end":"}","name":"meta.block.code.typst","patterns":[{"include":"#code"}]},{"begin":"\\\\[","captures":{"0":{"name":"punctuation.definition.block.content.typst"}},"end":"\\\\]","name":"meta.block.content.typst","patterns":[{"include":"#markup"}]},{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.typst"}},"end":"\\n","name":"comment.line.double-slash.typst"},{"match":":","name":"punctuation.separator.colon.typst"},{"match":",","name":"punctuation.separator.comma.typst"},{"match":"=>|\\\\.\\\\.","name":"keyword.operator.typst"},{"match":"==|!=|<=|<|>=|>","name":"keyword.operator.relational.typst"},{"match":"\\\\+=|-=|\\\\*=|/=|=","name":"keyword.operator.assignment.typst"},{"match":"\\\\+|\\\\*|/|(?<![A-Za-z_][0-9A-Za-z_-]*)-(?![0-9A-Za-z]_-]*[A-Za-z_])","name":"keyword.operator.arithmetic.typst"},{"match":"\\\\b(and|or|not)\\\\b","name":"keyword.operator.word.typst"},{"match":"\\\\b(let|as|in|set|show)\\\\b","name":"keyword.other.typst"},{"match":"\\\\b(if|else)\\\\b","name":"keyword.control.conditional.typst"},{"match":"\\\\b(for|while|break|continue)\\\\b","name":"keyword.control.loop.typst"},{"match":"\\\\b(import|include|export)\\\\b","name":"keyword.control.import.typst"},{"match":"\\\\b(return)\\\\b","name":"keyword.control.flow.typst"},{"include":"#constants"},{"comment":"Function name","match":"\\\\b[A-Za-z_][0-9A-Za-z_-]*!?(?=\\\\[|\\\\()","name":"entity.name.function.typst"},{"comment":"Function name","match":"(?<=\\\\bshow\\\\s*)\\\\b[A-Za-z_][0-9A-Za-z_-]*(?=\\\\s*[:.])","name":"entity.name.function.typst"},{"begin":"(?<=\\\\b[A-Za-z_][0-9A-Za-z_-]*!?)\\\\(","captures":{"0":{"name":"punctuation.definition.group.typst"}},"comment":"Function arguments","end":"\\\\)","patterns":[{"include":"#arguments"}]},{"match":"\\\\b[A-Za-z_][0-9A-Za-z_-]*\\\\b","name":"variable.other.typst"},{"begin":"\\\\(","captures":{"0":{"name":"punctuation.definition.group.typst"}},"end":"\\\\)|(?=;)","name":"meta.group.typst","patterns":[{"include":"#code"}]}]},"comments":{"patterns":[{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.typst"}},"end":"\\\\*/","name":"comment.block.typst","patterns":[{"include":"#comments"}]},{"begin":"(?<!:)//","beginCaptures":{"0":{"name":"punctuation.definition.comment.typst"}},"end":"\\n","name":"comment.line.double-slash.typst","patterns":[{"include":"#comments"}]}]},"common":{"patterns":[{"include":"#comments"}]},"constants":{"patterns":[{"match":"\\\\bnone\\\\b","name":"constant.language.none.typst"},{"match":"\\\\bauto\\\\b","name":"constant.language.auto.typst"},{"match":"\\\\b(true|false)\\\\b","name":"constant.language.boolean.typst"},{"match":"\\\\b(\\\\d*)?\\\\.?\\\\d+([eE][+-]?\\\\d+)?(mm|pt|cm|in|em)\\\\b","name":"constant.numeric.length.typst"},{"match":"\\\\b(\\\\d*)?\\\\.?\\\\d+([eE][+-]?\\\\d+)?(rad|deg)\\\\b","name":"constant.numeric.angle.typst"},{"match":"\\\\b(\\\\d*)?\\\\.?\\\\d+([eE][+-]?\\\\d+)?%","name":"constant.numeric.percentage.typst"},{"match":"\\\\b(\\\\d*)?\\\\.?\\\\d+([eE][+-]?\\\\d+)?fr","name":"constant.numeric.fr.typst"},{"match":"\\\\b\\\\d+\\\\b","name":"constant.numeric.integer.typst"},{"match":"\\\\b(\\\\d*)?\\\\.?\\\\d+([eE][+-]?\\\\d+)?\\\\b","name":"constant.numeric.float.typst"},{"begin":"\\"","captures":{"0":{"name":"punctuation.definition.string.typst"}},"end":"\\"","name":"string.quoted.double.typst","patterns":[{"match":"\\\\\\\\([\\\\\\\\\\"nrt]|u\\\\{?[0-9a-zA-Z]*\\\\}?)","name":"constant.character.escape.string.typst"}]},{"begin":"\\\\$","captures":{"0":{"name":"punctuation.definition.string.math.typst"}},"end":"\\\\$","name":"string.other.math.typst"}]},"markup":{"patterns":[{"include":"#common"},{"match":"\\\\\\\\([\\\\\\\\/\\\\[\\\\]{}#*
|