7 lines
17 KiB
JavaScript
7 lines
17 KiB
JavaScript
|
const lang = Object.freeze({ "displayName": "PureScript", "fileTypes": ["purs"], "name": "purescript", "patterns": [{ "captures": { "1": { "name": "punctuation.definition.entity.purescript" }, "2": { "name": "punctuation.definition.entity.purescript" } }, "match": "(`)(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(`)", "name": "keyword.operator.function.infix.purescript" }, { "begin": "^\\s*\\b(module)(?!')\\b", "beginCaptures": { "1": { "name": "keyword.other.purescript" } }, "end": "(where)", "endCaptures": { "1": { "name": "keyword.other.purescript" } }, "name": "meta.declaration.module.purescript", "patterns": [{ "include": "#comments" }, { "include": "#module_name" }, { "include": "#module_exports" }, { "match": "[a-z]+", "name": "invalid.purescript" }] }, { "begin": "^\\s*\\b(class)(?!')\\b", "beginCaptures": { "1": { "name": "storage.type.class.purescript" } }, "end": "\\b(where)\\b|$", "endCaptures": { "1": { "name": "keyword.other.purescript" } }, "name": "meta.declaration.typeclass.purescript", "patterns": [{ "include": "#type_signature" }] }, { "begin": "^\\s*\\b(else\\s+)?(derive\\s+)?(newtype\\s+)?(instance)(?!')\\b", "beginCaptures": { "1": { "name": "keyword.other.purescript" }, "2": { "name": "keyword.other.purescript" }, "3": { "name": "keyword.other.purescript" }, "4": { "name": "keyword.other.purescript" } }, "contentName": "meta.type-signature.purescript", "end": "\\b(where)\\b|$", "endCaptures": { "1": { "name": "keyword.other.purescript" } }, "name": "meta.declaration.instance.purescript", "patterns": [{ "include": "#type_signature" }] }, { "begin": "^(\\s*)(foreign)\\s+(import)\\s+(data)\\s+([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)", "beginCaptures": { "2": { "name": "keyword.other.purescript" }, "3": { "name": "keyword.other.purescript" }, "4": { "name": "keyword.other.purescript" }, "5": { "name": "entity.name.type.purescript" }, "6": { "name": "keyword.other.double-colon.purescript" } }, "contentName": "meta.kind-signature.purescript", "end": "^(?!\\1[ \\t]|[ \\t]*$)", "name": "meta.foreign.data.purescript", "patterns": [{ "include": "#double_colon" }, { "include": "#kind_signature" }] }, { "begin": "^(\\s*)(foreign)\\s+(import)\\s+([\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)", "beginCaptures": { "2": { "name": "keyword.other.purescript" }, "3": { "name": "keyword.other.purescript" }, "4": { "name": "entity.name.function.purescript" } }, "contentName": "meta.type-signature.purescript", "end": "^(?!\\1[ \\t]|[ \\t]*$)", "name": "meta.foreign.purescript", "patterns": [{ "include": "#double_colon" }, { "include": "#type_signature" }] }, { "begin": "^\\s*\\b(import)(?!')\\b", "beginCaptures": { "1": { "name": "keyword.other.purescript" } }, "end": "($|(?=--))", "name": "meta.import.purescript", "patterns": [{ "include": "#module_name" }, { "include": "#module_exports" }, { "captures": { "1": { "name": "keyword.other.purescript" } }, "match": "\\b(as|hiding)\\b" }] }, { "begin": "^(\\s)*(data|newtype)\\s+(.+?)\\s*(?=\\=|$)", "beginCaptures": { "2": { "name": "storage.type.data.purescript" }, "3": { "name": "meta.type-signature.purescript", "patterns": [{ "include": "#type_signature" }] } }, "end": "^(?!\\1[ \\t]|[ \\t]*$)", "name": "meta.declaration.type.data.purescript", "patterns": [{ "include": "#comments" }, { "captures": { "0": { "name": "keyword.operator.assignment.purescript" } }, "match": "=" }, { "captures": { "1": { "patterns": [{ "include": "#data_ctor" }] }, "2": { "name": "meta.type-signature.purescript", "patterns": [{ "include": "#type_signature" }] } }, "match": "(?:(?:\\b([\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*)\\s+)(?:(?<ctorArgs>(?:(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*|(?:[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*(?:\\.[\\p{Lu}\\p{Lt}][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*)*\\.)?[\\p{Ll}_][\\p{Ll}_\\p{Lu}\\p{Lt}\\p{Nd}']*|
|
||
|
var purescript = [
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { purescript as default };
|