site/node_modules/shiki/dist/langs/matlab.mjs

7 lines
21 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "MATLAB", "fileTypes": ["m"], "name": "matlab", "patterns": [{ "comment": "This and #all_after_command_dual are split out so #command_dual can be excluded in things like (), {}, []", "include": "#all_before_command_dual" }, { "include": "#command_dual" }, { "include": "#all_after_command_dual" }], "repository": { "all_after_command_dual": { "patterns": [{ "include": "#string" }, { "include": "#line_continuation" }, { "include": "#comments" }, { "include": "#conjugate_transpose" }, { "include": "#transpose" }, { "include": "#constants" }, { "include": "#variables" }, { "include": "#numbers" }, { "include": "#operators" }] }, "all_before_command_dual": { "patterns": [{ "include": "#classdef" }, { "include": "#function" }, { "include": "#blocks" }, { "include": "#control_statements" }, { "include": "#global_persistent" }, { "include": "#parens" }, { "include": "#square_brackets" }, { "include": "#indexing_curly_brackets" }, { "include": "#curly_brackets" }] }, "blocks": { "patterns": [{ "begin": "\\s*(?:^|[\\s,;])(for)\\b", "beginCaptures": { "1": { "name": "keyword.control.for.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.for.matlab" } }, "name": "meta.for.matlab", "patterns": [{ "include": "$self" }] }, { "begin": "\\s*(?:^|[\\s,;])(if)\\b", "beginCaptures": { "1": { "name": "keyword.control.if.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.if.matlab" }, "2": { "patterns": [{ "include": "$self" }] } }, "name": "meta.if.matlab", "patterns": [{ "captures": { "2": { "name": "keyword.control.elseif.matlab" }, "3": { "patterns": [{ "include": "$self" }] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(elseif)\\b(.*)$\\n?", "name": "meta.elseif.matlab" }, { "captures": { "2": { "name": "keyword.control.else.matlab" }, "3": { "patterns": [{ "include": "$self" }] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(else)\\b(.*)?$\\n?", "name": "meta.else.matlab" }, { "include": "$self" }] }, { "begin": "\\s*(?:^|[\\s,;])(parfor)\\b", "beginCaptures": { "1": { "name": "keyword.control.for.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.for.matlab" } }, "name": "meta.parfor.matlab", "patterns": [{ "begin": "\\G(?!$)", "end": "$\\n?", "name": "meta.parfor-quantity.matlab", "patterns": [{ "include": "$self" }] }, { "include": "$self" }] }, { "begin": "\\s*(?:^|[\\s,;])(spmd)\\b", "beginCaptures": { "1": { "name": "keyword.control.spmd.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.spmd.matlab" } }, "name": "meta.spmd.matlab", "patterns": [{ "begin": "\\G(?!$)", "end": "$\\n?", "name": "meta.spmd-statement.matlab", "patterns": [{ "include": "$self" }] }, { "include": "$self" }] }, { "begin": "\\s*(?:^|[\\s,;])(switch)\\b", "beginCaptures": { "1": { "name": "keyword.control.switch.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.switch.matlab" } }, "name": "meta.switch.matlab", "patterns": [{ "captures": { "2": { "name": "keyword.control.case.matlab" }, "3": { "patterns": [{ "include": "$self" }] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(case)\\b(.*)$\\n?", "name": "meta.case.matlab" }, { "captures": { "2": { "name": "keyword.control.otherwise.matlab" }, "3": { "patterns": [{ "include": "$self" }] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(otherwise)\\b(.*)?$\\n?", "name": "meta.otherwise.matlab" }, { "include": "$self" }] }, { "begin": "\\s*(?:^|[\\s,;])(try)\\b", "beginCaptures": { "1": { "name": "keyword.control.try.matlab" } }, "end": "\\s*(?:^|[\\s,;])(end)\\b", "endCaptures": { "1": { "name": "keyword.control.end.try.matlab" } }, "name": "meta.try.matlab", "patterns": [{ "captures": { "2": { "name": "keyword.control.catch.matlab" }, "3": { "patterns": [{ "include": "$self" }] } }, "end": "^", "match": "(\\s*)(?:^|[\\s,;])(catch)\\b(.*)?$\\n?", "name": "meta.catch.matlab" }, { "include": "$self" }] }, { "begin": "\\s*
var matlab = [
lang
];
export { matlab as default };