grammars/source.dart.json in github-linguist-7.8.0 vs grammars/source.dart.json in github-linguist-7.9.0

- old
+ new

@@ -13,10 +13,13 @@ "patterns": [ { "include": "#strings" }, { + "include": "#comments" + }, + { "name": "keyword.other.import.dart", "match": "\\b(as|show|hide)\\b" } ], "beginCaptures": { @@ -38,14 +41,14 @@ }, { "include": "#annotations" }, { - "include": "#constants-and-special-vars" + "include": "#keywords" }, { - "include": "#keywords" + "include": "#constants-and-special-vars" }, { "include": "#strings" } ], @@ -78,38 +81,35 @@ { "include": "#comments-inline" } ] }, - "comments-doc": { + "comments-block": { "patterns": [ { - "match": "(///) (.*?)$", - "captures": { - "1": { - "name": "comment.block.triple-slash.dart" - }, - "2": { - "name": "variable.other.source.dart" + "name": "comment.block.dart", + "begin": "/\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#comments-block" } - } - }, + ] + } + ] + }, + "comments-doc": { + "patterns": [ { - "match": "(///)(.*?)$", - "captures": { - "1": { - "name": "comment.block.triple-slash.dart" - }, - "2": { - "name": "comment.block.documentation.dart", - "patterns": [ - { - "include": "#dartdoc" - } - ] + "name": "comment.block.documentation.dart", + "begin": "///", + "while": "^\\s*///", + "patterns": [ + { + "include": "#dartdoc" } - } + ] } ] }, "comments-doc-oldschool": { "patterns": [ @@ -120,22 +120,23 @@ "patterns": [ { "include": "#comments-doc-oldschool" }, { + "include": "#comments-block" + }, + { "include": "#dartdoc" } ] } ] }, "comments-inline": { "patterns": [ { - "name": "comment.block.dart", - "begin": "/\\*", - "end": "\\*/" + "include": "#comments-block" }, { "match": "((//).*)$", "captures": { "1": { @@ -159,11 +160,11 @@ "name": "constant.numeric.dart", "match": "(?\u003c!\\$)\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b(?!\\$)" }, { "name": "support.class.dart", - "match": "(?\u003c![a-zA-Z0-9_$])[_$]*[A-Z][a-zA-Z0-9_$]*" + "match": "(?\u003c![a-zA-Z0-9_$])([_$]*[A-Z][a-zA-Z0-9_$]*|bool\\b|num\\b|int\\b|double\\b|dynamic\\b)" }, { "match": "([_$]*[a-z][a-zA-Z0-9_$]*)(\u003c|\\(|\\s+=\u003e)", "captures": { "1": { @@ -182,18 +183,39 @@ "name": "variable.name.source.dart" } } }, { + "match": "^ {4,}(?![ \\*]).*", + "captures": { + "0": { + "name": "variable.name.source.dart" + } + } + }, + { + "contentName": "variable.other.source.dart", + "begin": "```.*?$", + "end": "```" + }, + { "match": "(`.*?`)", "captures": { "0": { "name": "variable.other.source.dart" } } }, { + "match": "(`.*?`)", + "captures": { + "0": { + "name": "variable.other.source.dart" + } + } + }, + { "match": "(\\* (( ).*))$", "captures": { "2": { "name": "variable.other.source.dart" } @@ -249,10 +271,14 @@ { "name": "keyword.operator.assignment.bitwise.dart", "match": "((\u0026|\\^|\\||\u003c\u003c|\u003e\u003e\u003e?)=)" }, { + "name": "keyword.operator.closure.dart", + "match": "(=\u003e)" + }, + { "name": "keyword.operator.comparison.dart", "match": "(==|!=|\u003c=?|\u003e=?)" }, { "name": "keyword.operator.assignment.arithmetic.dart", @@ -274,14 +300,14 @@ "name": "keyword.operator.logical.dart", "match": "(!|\u0026\u0026|\\|\\|)" }, { "name": "storage.modifier.dart", - "match": "(?\u003c!\\$)\\b(static|final|const)\\b(?!\\$)" + "match": "(?\u003c!\\$)\\b(static|final|const|required|late)\\b(?!\\$)" }, { "name": "storage.type.primitive.dart", - "match": "(?\u003c!\\$)\\b(?:void|bool|num|int|double|dynamic|var)\\b(?!\\$)" + "match": "(?\u003c!\\$)\\b(?:void|var)\\b(?!\\$)" } ] }, "punctuation": { "patterns": [