6 lines
6.4 KiB
JavaScript
6 lines
6.4 KiB
JavaScript
|
|
const lang = Object.freeze(JSON.parse("{\"displayName\":\"MoonBit\",\"fileTypes\":[\"mbt\"],\"name\":\"moonbit\",\"patterns\":[{\"include\":\"#strings\"},{\"include\":\"#comments\"},{\"include\":\"#constants\"},{\"include\":\"#keywords\"},{\"include\":\"#functions\"},{\"include\":\"#support\"},{\"include\":\"#attribute\"},{\"include\":\"#types\"},{\"include\":\"#modules\"},{\"include\":\"#variables\"}],\"repository\":{\"attribute\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.directive\"},\"2\":{\"patterns\":[{\"include\":\"#strings\"},{\"match\":\"[ .0-9A-Z_a-z]+\",\"name\":\"entity.name.tag\"},{\"match\":\"=\",\"name\":\"keyword.operator.attribute.moonbit\"}]}},\"match\":\"(#[a-z][ .0-9A-Z_a-z]*)(.*)\"}]},\"comments\":{\"patterns\":[{\"match\":\"//[^/].*\",\"name\":\"comment.line\"},{\"begin\":\"///\",\"name\":\"comment.block.documentation.moonbit\",\"patterns\":[{\"begin\":\"(^|\\\\G)(\\\\s*)(`{3,}|~{3,})\\\\s*(?i:(mbt\\\\s+test|mbt\\\\s+test(async)|mbt|moonbit\\\\s+test|moonbit\\\\s+test(async)|moonbit|)(\\\\s+[^`~]*)?$)\",\"beginCaptures\":{\"3\":{\"name\":\"punctuation.definition.markdown\"},\"5\":{\"name\":\"fenced_code.block.language\"},\"6\":{\"name\":\"fenced_code.block.language.attributes\"}},\"end\":\"(^|\\\\G)(\\\\2|\\\\s{0,3})(\\\\3)\\\\s*$\",\"endCaptures\":{\"3\":{\"name\":\"punctuation.definition.markdown\"}},\"name\":\"markup.fenced_code.block.markdown\",\"patterns\":[{\"begin\":\"(^|\\\\G)(\\\\s*)(.*)\",\"contentName\":\"meta.embedded.block.moonbit\",\"patterns\":[{\"include\":\"$self\"}],\"while\":\"(^|\\\\G)(?!\\\\s*([`~]{3,})\\\\s*$)\"}]}],\"while\":\"///\"}]},\"constants\":{\"patterns\":[{\"match\":\"\\\\b\\\\d([_\\\\d])*(?!\\\\.)((U)?(L)?|N?)\\\\b\",\"name\":\"constant.numeric.moonbit\"},{\"match\":\"(?<=\\\\.)\\\\d((?=\\\\.)|\\\\b)\",\"name\":\"constant.numeric.moonbit\"},{\"match\":\"\\\\b\\\\d+(?=\\\\.\\\\.)\",\"name\":\"constant.numeric.moonbit\"},{\"match\":\"\\\\b\\\\d[_\\\\d]*\\\\.[_\\\\d]*([Ee][-+]?\\\\d[_\\\\d]*\\\\b)?\",\"name\":\"constant.numeric.moonbit\"},{\"match\":\"\\\\b0[Oo][0-7][0-7]*((U)?(L)?|N?)\\\\b\",\"name\":\"constant.numeric.moonbit\"},{\"match\":\"\\\\b0[Xx][A-Fa-f\\\\d][A-F_a-f\\\\d]*(([LU]|UL|N)\\\\b|\\\\.[A-F_a-f\\\\d]*([Pp][-+]?[A-F_a-f\\\\d]+\\\\b)?)?\",\"name\":\"constant.numeric.moonbit\"},{\"match\":\"\\\\b(true|false)\\\\b\",\"name\":\"constant.language.moonbit\"}]},\"escape\":{\"patterns\":[{\"match\":\"\\\\\\\\[\\\"'0\\\\\\\\bnrt]\",\"name\":\"constant.character.escape.moonbit\"},{\"match\":\"\\\\\\\\x\\\\h{2}\",\"name\":\"constant.character.escape.moonbit\"},{\"match\":\"\\\\\\\\o[0-3][0-7]{2}\",\"name\":\"constant.character.escape.moonbit\"},{\"match\":\"\\\\\\\\u\\\\h{4}\",\"name\":\"constant.character.escape.unicode.moonbit\"},{\"match\":\"\\\\\\\\u\\\\{\\\\h*}\",\"name\":\"constant.character.escape.unicode.moonbit\"}]},\"functions\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.moonbit\"},\"2\":{\"name\":\"entity.name.type.moonbit\"},\"3\":{\"name\":\"entity.name.function.moonbit\"}},\"match\":\"\\\\b(fn)\\\\b\\\\s*(?:([A-Z][0-9A-Z_a-z]*)::)?([0-9_a-z][0-9A-Z_a-z]*)?\\\\b\"},{\"begin\":\"(?!\\\\bfn\\\\s+)(?:\\\\.|::)?([0-9_a-z][0-9A-Z_a-z]*([!?]|!!)?)\\\\s*(\\\\()\",\"beginCaptures\":{\"1\":{\"name\":\"entity.name.function.moonbit\"},\"2\":{\"name\":\"punctuation.brackets.round.moonbit\"}},\"end\":\"\\\\)\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.brackets.round.moonbit\"}},\"name\":\"meta.function.call.moonbit\",\"patterns\":[{\"include\":\"#comments\"},{\"include\":\"#constants\"},{\"include\":\"#keywords\"},{\"include\":\"#functions\"},{\"include\":\"#support\"},{\"include\":\"#types\"},{\"include\":\"#modules\"},{\"include\":\"#strings\"},{\"include\":\"#variables\"}]}]},\"interpolation\":{\"patterns\":[{\"begin\":\"\\\\\\\\\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.begin.moonbit\"}},\"contentName\":\"source.moonbit\",\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.end.moonbit\"}},\"name\":\"meta.embedded.line.moonbit\",\"patterns\":[{\"include\":\"$self\"}
|
||
|
|
|
||
|
|
export default [
|
||
|
|
lang
|
||
|
|
]
|