{ "name": "Standard ML", "scopeName": "source.ml", "patterns": [ { "include": "#comments" }, { "name": "keyword.other.ml", "match": "\\b(val|datatype|signature|type|op|sharing|struct|as|let|in|abstype|local|where|case|of|fn|raise|exception|handle|ref|infix|infixr|before|end|structure|withtype)\\b" }, { "name": "meta.exp.let.ml", "begin": "\\b(let)\\b", "end": "\\b(end)\\b", "patterns": [ { "include": "$self" } ], "captures": { "1": { "name": "keyword.other.ml" }, "2": { "name": "keyword.other.ml" } } }, { "name": "meta.module.sigdec.ml", "begin": "\\b(sig)\\b", "end": "\\b(end)\\b", "patterns": [ { "include": "#spec" } ], "captures": { "1": { "name": "keyword.other.delimiter.ml" }, "2": { "name": "keyword.other.delimiter.ml" } } }, { "name": "keyword.control.ml", "match": "\\b(if|then|else)\\b" }, { "name": "meta.definition.fun.ml", "begin": "\\b(fun|and)\\s+([\\w]+)\\b", "end": "(?=val|type|eqtype|datatype|structure|local)", "patterns": [ { "include": "source.ml" } ], "captures": { "1": { "name": "keyword.control.fun.ml" }, "2": { "name": "entity.name.function.ml" } } }, { "name": "string.quoted.double.ml", "begin": "\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.ml", "match": "\\\\." } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ml" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.ml" } } }, { "name": "constant.character.ml", "match": "(#\")(\\\\)?.(\")", "captures": { "1": { "name": "punctuation.definition.constant.ml" }, "3": { "name": "punctuation.definition.constant.ml" } } }, { "name": "constant.numeric.ml", "match": "\\b\\d*\\.?\\d+\\b" }, { "name": "keyword.operator.logical.ml", "match": "\\b(andalso|orelse|not)\\b" }, { "name": "meta.module.dec.ml", "begin": "(?x)\\b\n\t\t\t\t\t(functor|structure|signature|funsig)\\s+\n\t\t\t\t\t(\\w+)\\s* # identifier", "end": "(?==|:|\\()", "captures": { "1": { "name": "storage.type.module.binder.ml" }, "2": { "name": "entity.name.type.module.ml" } } }, { "name": "keyword.other.module.ml", "match": "\\b(open)\\b" }, { "name": "constant.language.ml", "match": "\\b(nil|true|false|NONE|SOME)\\b" }, { "name": "meta.typeabbrev.ml", "begin": "\\b(type|eqtype) .* =", "end": "$", "patterns": [ { "name": "meta.typeexp.ml", "match": "(([a-zA-Z0-9\\.\\* ]|(\\-\u003e))*)" } ], "captures": { "1": { "name": "keyword.other.typeabbrev.ml" }, "2": { "name": "variable.other.typename.ml" } } } ], "repository": { "comments": { "patterns": [ { "name": "comment.block.ml", "begin": "\\(\\*", "end": "\\*\\)", "patterns": [ { "include": "#comments" } ], "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.ml" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.end.ml" } } } ] }, "spec": { "patterns": [ { "name": "meta.spec.ml.type", "match": "\\b(exception|type)\\s+([a-zA-Z][a-zA-Z0-9'_]*)", "captures": { "1": { "name": "keyword.other.ml" }, "2": { "name": "entity.name.type.abbrev.ml" } } }, { "name": "meta.spec.ml.datatype", "begin": "\\b(datatype)\\s+([a-zA-Z][a-zA-Z0-9'_]*)\\s*(?==)", "end": "(?=val|type|eqtype|datatype|structure|include|exception)", "patterns": [ { "name": "meta.spec.ml.datatype", "match": "\\b(and)\\s+([a-zA-Z][a-zA-Z0-9'_]*)\\s*(?==)", "captures": { "1": { "name": "keyword.other.ml" }, "2": { "name": "entity.name.type.datatype.ml" } } }, { "name": "meta.datatype.rule.main.ml", "match": "(?x)\n\t\t\t\t\t\t\t=\\s*([a-zA-Z][a-zA-Z0-9'_]*)(\\s+of)?", "captures": { "1": { "name": "variable.other.dcon.ml" }, "2": { "name": "keyword.other.ml" } } }, { "name": "meta.datatype.rule.other.ml", "match": "\\|\\s*([a-zA-Z][a-zA-Z0-9'_]*)(\\s+of)?", "captures": { "1": { "name": "variable.other.dcon.ml" }, "2": { "name": "keyword.other.ml" } } } ], "captures": { "1": { "name": "keyword.other.ml" }, "2": { "name": "entity.name.type.datatype.ml" } } }, { "name": "meta.spec.ml.val", "match": "\\b(val)\\s*([^:]+)\\s*:", "captures": { "1": { "name": "keyword.other.ml" } } }, { "name": "meta.spec.ml.structure", "begin": "\\b(structure)\\s*(\\w+)\\s*:", "end": "(?=val|type|eqtype|datatype|structure|include)", "patterns": [ { "name": "keyword.other.ml", "match": "\\b(sharing)\\b" } ], "captures": { "1": { "name": "keyword.other.ml" }, "2": { "name": "entity.name.type.module.ml" } } }, { "name": "meta.spec.ml.include", "match": "\\b(include)\\b", "captures": { "1": { "name": "keyword.other.ml" } } }, { "include": "#comments" } ] } } }