grammars/source.clean.json in github-linguist-5.3.3 vs grammars/source.clean.json in github-linguist-6.0.0

- old
+ new

@@ -1,13 +1,8 @@ { "name": "Clean", "scopeName": "source.clean", - "fileTypes": [ - "icl", - "dcl" - ], - "firstLineMatch": "^((definition|implementation|system) )?module", "patterns": [ { "include": "#marks" }, { @@ -25,79 +20,49 @@ { "include": "#delimiters" } ], "repository": { - "marks": { + "commentBlock": { + "name": "comment.block.clean", + "begin": "/\\*", + "end": "\\*/", "patterns": [ { - "include": "#mark" + "include": "#comment" } - ] - }, - "mark": { - "name": "markup.heading.clean", - "begin": "/// #+ ", - "end": "$", + ], "beginCaptures": { "0": { - "name": "punctuation.definition.comment.clean" + "name": "punctuation.definition.comment.begin.clean" } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.clean" + } } }, - "comments": { - "patterns": [ - { - "include": "#commentDoc" - }, - { - "include": "#commentBlock" - }, - { - "include": "#commentLine" - } - ] - }, "commentDoc": { "name": "comment.block.documentation", "begin": "/\\*\\*", "end": "\\*/", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.documentation.begin.clean" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.documentation.begin.clean" - } - }, "patterns": [ { - "include": "text.md" + "include": "source.gfm" } - ] - }, - "commentBlock": { - "name": "comment.block.clean", - "begin": "/\\*", - "end": "\\*/", + ], "beginCaptures": { "0": { - "name": "punctuation.definition.comment.begin.clean" + "name": "punctuation.definition.comment.documentation.begin.clean" } }, "endCaptures": { "0": { - "name": "punctuation.definition.comment.end.clean" + "name": "punctuation.definition.comment.documentation.begin.clean" } - }, - "patterns": [ - { - "include": "#comment" - } - ] + } }, "commentLine": { "name": "comment.line.double-slash.clean", "begin": "//", "end": "$", @@ -105,23 +70,27 @@ "0": { "name": "punctuation.definition.comment.clean" } } }, - "keywords": { + "comments": { "patterns": [ { - "include": "#keywordGeneral" + "include": "#commentDoc" }, { - "include": "#keywordImport" + "include": "#commentBlock" }, { - "include": "#keywordReserved" + "include": "#commentLine" } ] }, + "delimiters": { + "name": "punctuation.separator", + "match": "[,;(){}]" + }, "keywordGeneral": { "name": "keyword.control.clean", "match": "\\b(if|let|in|with|where|case|of|class|instance)\\b" }, "keywordImport": { @@ -130,98 +99,124 @@ }, "keywordReserved": { "name": "keyword.reserved.clean", "match": "\\b(special|code|inline|foreign|export|ccall|stdcall|generic|derive|infix(l|r)?|otherwise|dynamic)\\b" }, - "literals": { + "keywords": { "patterns": [ { - "include": "#literalChar" + "include": "#keywordGeneral" }, { - "include": "#literalInt" + "include": "#keywordImport" }, { - "include": "#literalOct" - }, - { - "include": "#literalHex" - }, - { - "include": "#literalReal" - }, - { - "include": "#literalBool" - }, - { - "include": "#literalString" + "include": "#keywordReserved" } ] }, + "literalBool": { + "name": "constant.language.boolean.clean", + "match": "\\b(True|False)\\b" + }, "literalChar": { "name": "constant.character.clean", "match": "'([^'\\\\]|\\\\(x[0-9a-fA-F]+|\\d+|.))'" }, + "literalHex": { + "name": "constant.numeric.integer.hexadecimal.clean", + "match": "\\b[+~-]?0x[0-9A-Fa-f]+\\b" + }, "literalInt": { "name": "constant.numeric.integer.decimal.clean", "match": "\\b[+~-]?[0-9]+\\b" }, "literalOct": { "name": "constant.numeric.integer.octal.clean", "match": "\\b[+~-]?0[0-7]+\\b" }, - "literalHex": { - "name": "constant.numeric.integer.hexadecimal.clean", - "match": "\\b[+~-]?0x[0-9A-Fa-f]+\\b" - }, "literalReal": { "name": "constant.numeric.float.clean", "match": "\\b[+~-]?[0-9]+\\.[0-9]+(E[+-]?[0-9]+)?\\b" }, - "literalBool": { - "name": "constant.language.boolean.clean", - "match": "\\b(True|False)\\b" - }, "literalString": { "name": "string.quoted.double.clean", "begin": "\"", "end": "\"", + "patterns": [ + { + "include": "#escaped_character" + } + ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.clean" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.clean" } - }, + } + }, + "literals": { "patterns": [ { - "include": "#escaped_character" + "include": "#literalChar" + }, + { + "include": "#literalInt" + }, + { + "include": "#literalOct" + }, + { + "include": "#literalHex" + }, + { + "include": "#literalReal" + }, + { + "include": "#literalBool" + }, + { + "include": "#literalString" } ] }, - "operators": { + "mark": { + "name": "markup.heading.clean", + "begin": "/// #+ ", + "end": "$", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.clean" + } + } + }, + "marks": { "patterns": [ { - "include": "#operatorGeneral" - }, - { - "include": "#operatorComposition" + "include": "#mark" } ] }, - "operatorGeneral": { - "name": "keyword.operator.clean", - "match": "[-~@#$%^?!+*<>\\\\/|&=:.]+" - }, "operatorComposition": { "name": "keyword.operator.composition.clean", "match": "\\s+o\\s+" }, - "delimiters": { - "name": "punctuation.separator", - "match": "[,;(){}]" + "operatorGeneral": { + "name": "keyword.operator.clean", + "match": "[-~@#$%^?!+*\u003c\u003e\\\\/|\u0026=:.]+" + }, + "operators": { + "patterns": [ + { + "include": "#operatorGeneral" + }, + { + "include": "#operatorComposition" + } + ] } } -} \ No newline at end of file +}