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

7 lines
66 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "OCaml", "fileTypes": [".ml", ".mli"], "name": "ocaml", "patterns": [{ "include": "#comment" }, { "include": "#pragma" }, { "include": "#decl" }], "repository": { "attribute": { "begin": "(\\[)[[:space:]]*((?<![#\\-:!?.@*/&%^+<=>|~$])@{1,3}(?![#\\-:!?.@*/&%^+<=>|~$]))", "beginCaptures": { "1": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" }, "2": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "end": "\\]", "endCaptures": { "0": { "name": "constant.language constant.numeric entity.other.attribute-name.id.css strong" } }, "patterns": [{ "include": "#attributePayload" }] }, "attributeIdentifier": { "captures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "punctuation.definition.tag" } }, "match": `((?<![#\\-:!?.@*/&%^+<=>|~$])%(?![#\\-:!?.@*/&%^+<=>|~$]))((?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*))` }, "attributePayload": { "patterns": [{ "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]%|^%))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "((?<![#\\-:!?.@*/&%^+<=>|~$])[:\\?](?![#\\-:!?.@*/&%^+<=>|~$]))|(?<=[[:space:]])|(?=\\])", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp" } }, "patterns": [{ "include": "#pathModuleExtended" }, { "include": "#pathRecord" }] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]:|^:))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=\\])", "patterns": [{ "include": "#signature" }, { "include": "#type" }] }, { "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=\\])", "patterns": [{ "begin": "(?:(?<=(?:[^#\\-:!?.@*/&%^+<=>|~$]\\?|^\\?))(?![#\\-:!?.@*/&%^+<=>|~$]))", "end": "(?=\\])|\\bwhen\\b", "endCaptures": { "1": {} }, "patterns": [{ "include": "#pattern" }] }, { "begin": "(?:(?<=(?:[^[:word:]]when|^when))(?![[:word:]]))", "end": "(?=\\])", "patterns": [{ "include": "#term" }] }] }, { "include": "#term" }] }, "bindClassTerm": { "patterns": [{ "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", "end": "(?<![#\\-:!?.@*/&%^+<=>|~$])(:)|(=)(?![#\\-:!?.@*/&%^+<=>|~$])|(?=;;|\\}|\\)|\\]|\\b(?:end|and|class|exception|external|in|include|inherit|initializer|let|method|module|open|type|val)\\b)", "endCaptures": { "1": { "name": "variable.other.class.js message.error variable.interpolation string.regexp strong" }, "2": { "name": "support.type strong" } }, "patterns": [{ "begin": "(?:(?<=(?:[^[:word:]]and|^and|[^[:word:]]class|^class|[^[:word:]]type|^type))(?![[:word:]]))", "end": `(?=(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)[[:space:]]*,|[^[:space:][:lower:]%])|(?:(?!\\b(?:and|'|as|asr|assert|\\*|begin|class|:|,|@|constraint|do|done|downto|else|end|=|exception|external|false|for|\\.|fun|function|functor|>|-|if|in|include|inherit|initializer|land|lazy|\\{|\\(|\\[|<|let|lor|lsl|lsr|lxor|match|method|mod|module|mutable|new|nonrec|#|object|of|open|or|%|\\+|private|\\?|"|rec|\\\\|\\}|\\)|\\]|;|sig|/|struct|then|~|to|true|try|type|val|\\||virtual|when|while|with)\\b(?:[^']|$))\\b(?=[[:lower:]_])[[:alpha:]_][[:word:]']*)|(?=\\btype\\b)`, "endCapture
var ocaml = [
lang
];
export { ocaml as default };