--- name: Standard ML fileTypes: - sml - sig scopeName: source.ml repository: spec: patterns: - name: meta.spec.ml.type captures: '1': name: keyword.other.ml match: "\\b(type)\\b" - name: meta.spec.ml.datatype captures: '1': name: keyword.other.ml match: "\\b(datatype)\\b" - name: meta.spec.ml.val captures: '1': name: keyword.other.ml match: "\\b(val)\\s*\\w+:" - name: meta.spec.ml.structure captures: '1': name: keyword.other.ml match: "\\b(structure)\\s*\\w+:" - name: meta.spec.ml.include captures: '1': name: keyword.other.ml match: "\\b(include)\\b" uuid: 9B148AEA-F723-4EDE-8B7F-2F4FD730BC3A foldingStartMarker: "\\(\\*|\\b(struct|sig)\\b" patterns: - name: comment.block.ml captures: '0': name: punctuation.definition.comment.ml begin: "\\(\\*" end: "\\*\\)" - name: keyword.other.ml match: "\\b(val|datatype|struct|as|let|in|abstype|local|where|case|of|fn|raise|exception|handle|ref|infix)\\b" - name: meta.module.sigdec.ml captures: '1': name: keyword.other.delimiter.ml '2': name: keyword.other.delimiter.ml begin: "\\b(sig)\\b" end: "\\b(end)\\b" patterns: - include: "#spec" - name: keyword.control.ml match: "\\b(if|then|else)\\b" - name: meta.definition.fun.ml captures: '1': name: keyword.control.fun.ml '2': name: entity.name.function.ml match: "\\b(fun|and)\\s+([\\w']+)\\b" - name: string.quoted.double.ml endCaptures: '0': name: punctuation.definition.string.end.ml begin: "\"" beginCaptures: '0': name: punctuation.definition.string.begin.ml end: "\"" patterns: - name: constant.character.escape.ml match: "\\\\." - name: constant.character.ml captures: '1': name: punctuation.definition.constant.ml '3': name: punctuation.definition.constant.ml match: "(#\")(\\\\)?.(\")" - 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 captures: '1': name: storage.type.module.binder.ml '2': name: entity.name.type.module.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: "(?==|:)" - 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 captures: '1': name: keyword.other.typeabbrev.ml '2': name: variable.other.typename.ml begin: "^\\s*(type|eqtype) .* =" end: "$" patterns: - name: meta.typeexp.ml match: "(([a-zA-Z0-9\\.\\* ]|(\\->))*)" - name: meta.type.ascription.ml captures: '2': name: constant.other.type.ml match: "[^:](:)\\s*(([a-zA-Z0-9\\.\\*\\_ ]|(\\->))*)" comment: type annotation/ascription foldingStopMarker: "\\*\\)|\\bend\\b" keyEquivalent: "^~S"