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

- old
+ new

@@ -1,40 +1,36 @@ { - "fileTypes": [ - "dart" - ], - "foldingStartMarker": "\\{\\s*$", - "foldingStopMarker": "^\\s*\\}", "name": "Dart", + "scopeName": "source.dart", "patterns": [ { - "match": "^(#!.*)$", - "name": "meta.preprocessor.script.dart" + "name": "meta.preprocessor.script.dart", + "match": "^(#!.*)$" }, { + "name": "meta.declaration.dart", "begin": "^\\w*\\b(library|import|part of|part|export)\\b", + "end": ";", + "patterns": [ + { + "include": "#strings" + }, + { + "name": "keyword.other.import.dart", + "match": "\\b(as|show|hide)\\b" + } + ], "beginCaptures": { "0": { "name": "keyword.other.import.dart" } }, - "end": ";", "endCaptures": { "0": { "name": "punctuation.terminator.dart" } - }, - "name": "meta.declaration.dart", - "patterns": [ - { - "include": "#strings" - }, - { - "match": "\\b(as|show|hide)\\b", - "name": "keyword.other.import.dart" - } - ] + } }, { "include": "#comments" }, { @@ -52,51 +48,28 @@ { "include": "#strings" } ], "repository": { - "dartdoc": { + "annotations": { "patterns": [ { - "match": "(\\[.*?\\])", - "captures": { - "0": { - "name": "variable.name.source.dart" - } - } - }, - { - "match": "(`.*?`)", - "captures": { - "0": { - "name": "variable.other.source.dart" - } - } - }, - { - "match": "(\\* (( ).*))$", - "captures": { - "2": { - "name": "variable.other.source.dart" - } - } - }, - { - "match": "(\\* .*)$" + "name": "storage.type.annotation.dart", + "match": "@[a-zA-Z]+" } ] }, "comments": { "patterns": [ { + "name": "comment.block.empty.dart", + "match": "/\\*\\*/", "captures": { "0": { "name": "punctuation.definition.comment.dart" } - }, - "match": "/\\*\\*/", - "name": "comment.block.empty.dart" + } }, { "include": "#comments-doc-oldschool" }, { @@ -105,24 +78,10 @@ { "include": "#comments-inline" } ] }, - "comments-doc-oldschool": { - "patterns": [ - { - "begin": "/\\*\\*", - "end": "\\*/", - "name": "comment.block.documentation.dart", - "patterns": [ - { - "include": "#dartdoc" - } - ] - } - ] - }, "comments-doc": { "patterns": [ { "match": "(///) (.*?)$", "captures": { @@ -150,260 +109,296 @@ } } } ] }, + "comments-doc-oldschool": { + "patterns": [ + { + "name": "comment.block.documentation.dart", + "begin": "/\\*\\*", + "end": "\\*/", + "patterns": [ + { + "include": "#dartdoc" + } + ] + } + ] + }, "comments-inline": { "patterns": [ { + "name": "comment.block.dart", "begin": "/\\*", - "end": "\\*/", - "name": "comment.block.dart" + "end": "\\*/" }, { + "match": "((//).*)$", "captures": { "1": { "name": "comment.line.double-slash.dart" } - }, - "match": "((//).*)$" + } } ] }, - "annotations": { - "patterns": [ - { - "match": "@[a-zA-Z]+", - "name": "storage.type.annotation.dart" - } - ] - }, "constants-and-special-vars": { "patterns": [ { - "match": "(?<!\\$)\\b(true|false|null)\\b(?!\\$)", - "name": "constant.language.dart" + "name": "constant.language.dart", + "match": "(?\u003c!\\$)\\b(true|false|null)\\b(?!\\$)" }, { - "match": "(?<!\\$)\\b(this|super)\\b(?!\\$)", - "name": "variable.language.dart" + "name": "variable.language.dart", + "match": "(?\u003c!\\$)\\b(this|super)\\b(?!\\$)" }, { - "match": "(?<!\\$)\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b(?!\\$)", - "name": "constant.numeric.dart" + "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(?!\\$)" }, { - "match": "(?<![a-zA-Z0-9_$])[_$]*[A-Z][a-zA-Z0-9_$]*", - "name": "support.class.dart" + "name": "support.class.dart", + "match": "(?\u003c![a-zA-Z0-9_$])[_$]*[A-Z][a-zA-Z0-9_$]*" }, { - "match": "([_$]*[a-z][a-zA-Z0-9_$]*)(\\(|\\s+=>)", + "match": "([_$]*[a-z][a-zA-Z0-9_$]*)(\\(|\\s+=\u003e)", "captures": { "1": { "name": "entity.name.function.dart" } } } ] }, + "dartdoc": { + "patterns": [ + { + "match": "(\\[.*?\\])", + "captures": { + "0": { + "name": "variable.name.source.dart" + } + } + }, + { + "match": "(`.*?`)", + "captures": { + "0": { + "name": "variable.other.source.dart" + } + } + }, + { + "match": "(\\* (( ).*))$", + "captures": { + "2": { + "name": "variable.other.source.dart" + } + } + }, + { + "match": "(\\* .*)$" + } + ] + }, "keywords": { "patterns": [ { - "match": "(?<!\\$)\\bas\\b(?!\\$)", - "name": "keyword.cast.dart" + "name": "keyword.cast.dart", + "match": "(?\u003c!\\$)\\bas\\b(?!\\$)" }, { - "match": "(?<!\\$)\\b(try|on|catch|finally|throw|rethrow)\\b(?!\\$)", - "name": "keyword.control.catch-exception.dart" + "name": "keyword.control.catch-exception.dart", + "match": "(?\u003c!\\$)\\b(try|on|catch|finally|throw|rethrow)\\b(?!\\$)" }, { - "match": "(?<!\\$)\\b(break|case|continue|default|do|else|for|if|in|return|switch|while)\\b(?!\\$)", - "name": "keyword.control.dart" + "name": "keyword.control.dart", + "match": "(?\u003c!\\$)\\b(break|case|continue|default|do|else|for|if|in|return|switch|while)\\b(?!\\$)" }, { - "match": "(?<!\\$)\\b(sync(\\*)?|async(\\*)?|await|yield(\\*)?)\\b(?!\\$)", - "name": "keyword.control.dart" + "name": "keyword.control.dart", + "match": "(?\u003c!\\$)\\b(sync(\\*)?|async(\\*)?|await|yield(\\*)?)\\b(?!\\$)" }, { - "match": "(?<!\\$)\\bassert\\b(?!\\$)", - "name": "keyword.control.dart" + "name": "keyword.control.dart", + "match": "(?\u003c!\\$)\\bassert\\b(?!\\$)" }, { - "match": "(?<!\\$)\\b(new)\\b(?!\\$)", - "name": "keyword.control.new.dart" + "name": "keyword.control.new.dart", + "match": "(?\u003c!\\$)\\b(new)\\b(?!\\$)" }, { - "match": "(?<!\\$)\\b(abstract|class|enum|extends|external|factory|implements|get|native|operator|set|typedef|with)\\b(?!\\$)", - "name": "keyword.declaration.dart" + "name": "keyword.declaration.dart", + "match": "(?\u003c!\\$)\\b(abstract|class|enum|extends|external|factory|implements|get|native|operator|set|typedef|with)\\b(?!\\$)" }, { - "match": "(?<!\\$)\\b(is\\!?)\\b(?!\\$)", - "name": "keyword.operator.dart" + "name": "keyword.operator.dart", + "match": "(?\u003c!\\$)\\b(is\\!?)\\b(?!\\$)" }, { - "match": "\\?|:", - "name": "keyword.operator.ternary.dart" + "name": "keyword.operator.ternary.dart", + "match": "\\?|:" }, { - "match": "(<<|>>>?|~|\\^|\\||&)", - "name": "keyword.operator.bitwise.dart" + "name": "keyword.operator.bitwise.dart", + "match": "(\u003c\u003c|\u003e\u003e\u003e?|~|\\^|\\||\u0026)" }, { - "match": "((&|\\^|\\||<<|>>>?)=)", - "name": "keyword.operator.assignment.bitwise.dart" + "name": "keyword.operator.assignment.bitwise.dart", + "match": "((\u0026|\\^|\\||\u003c\u003c|\u003e\u003e\u003e?)=)" }, { - "match": "(==|!=|<=?|>=?)", - "name": "keyword.operator.comparison.dart" + "name": "keyword.operator.comparison.dart", + "match": "(==|!=|\u003c=?|\u003e=?)" }, { - "match": "(([+*/%-]|\\~)=)", - "name": "keyword.operator.assignment.arithmetic.dart" + "name": "keyword.operator.assignment.arithmetic.dart", + "match": "(([+*/%-]|\\~)=)" }, { - "match": "(=)", - "name": "keyword.operator.assignment.dart" + "name": "keyword.operator.assignment.dart", + "match": "(=)" }, { - "match": "(\\-\\-|\\+\\+)", - "name": "keyword.operator.increment-decrement.dart" + "name": "keyword.operator.increment-decrement.dart", + "match": "(\\-\\-|\\+\\+)" }, { - "match": "(\\-|\\+|\\*|\\/|\\~\\/|%)", - "name": "keyword.operator.arithmetic.dart" + "name": "keyword.operator.arithmetic.dart", + "match": "(\\-|\\+|\\*|\\/|\\~\\/|%)" }, { - "match": "(!|&&|\\|\\|)", - "name": "keyword.operator.logical.dart" + "name": "keyword.operator.logical.dart", + "match": "(!|\u0026\u0026|\\|\\|)" }, { - "match": "(?<!\\$)\\b(static|final|const)\\b(?!\\$)", - "name": "storage.modifier.dart" + "name": "storage.modifier.dart", + "match": "(?\u003c!\\$)\\b(static|final|const)\\b(?!\\$)" }, { - "match": "(?<!\\$)\\b(?:void|bool|num|int|double|dynamic|var)\\b(?!\\$)", - "name": "storage.type.primitive.dart" + "name": "storage.type.primitive.dart", + "match": "(?\u003c!\\$)\\b(?:void|bool|num|int|double|dynamic|var)\\b(?!\\$)" } ] }, + "punctuation": { + "patterns": [ + { + "name": "punctuation.comma.dart", + "match": "," + }, + { + "name": "punctuation.terminator.dart", + "match": ";" + }, + { + "name": "punctuation.dot.dart", + "match": "\\." + } + ] + }, "string-interp": { "patterns": [ { + "match": "\\$((\\w+)|\\{([^{}]+)\\})", "captures": { "2": { "name": "variable.parameter.dart" }, "3": { "name": "variable.parameter.dart" } - }, - "match": "\\$((\\w+)|\\{([^{}]+)\\})" + } }, { - "match": "\\\\.", - "name": "constant.character.escape.dart" + "name": "constant.character.escape.dart", + "match": "\\\\." } ] }, "strings": { "patterns": [ { - "begin": "(?<!r)\"\"\"", - "end": "\"\"\"(?!\")", "name": "string.interpolated.triple.double.dart", + "begin": "(?\u003c!r)\"\"\"", + "end": "\"\"\"(?!\")", "patterns": [ { "include": "#string-interp" } ] }, { - "begin": "(?<!r)'''", - "end": "'''(?!')", "name": "string.interpolated.triple.single.dart", + "begin": "(?\u003c!r)'''", + "end": "'''(?!')", "patterns": [ { "include": "#string-interp" } ] }, { + "name": "string.quoted.triple.double.dart", "begin": "r\"\"\"", - "end": "\"\"\"(?!\")", - "name": "string.quoted.triple.double.dart" + "end": "\"\"\"(?!\")" }, { + "name": "string.quoted.triple.single.dart", "begin": "r'''", - "end": "'''(?!')", - "name": "string.quoted.triple.single.dart" + "end": "'''(?!')" }, { - "begin": "(?<!\\|r)\"", - "end": "\"", "name": "string.interpolated.double.dart", + "begin": "(?\u003c!\\|r)\"", + "end": "\"", "patterns": [ { - "match": "\\n", - "name": "invalid.string.newline" + "name": "invalid.string.newline", + "match": "\\n" }, { "include": "#string-interp" } ] }, { + "name": "string.quoted.double.dart", "begin": "r\"", "end": "\"", - "name": "string.quoted.double.dart", "patterns": [ { - "match": "\\n", - "name": "invalid.string.newline" + "name": "invalid.string.newline", + "match": "\\n" } ] }, { - "begin": "(?<!\\|r)'", - "end": "'", "name": "string.interpolated.single.dart", + "begin": "(?\u003c!\\|r)'", + "end": "'", "patterns": [ { - "match": "\\n", - "name": "invalid.string.newline" + "name": "invalid.string.newline", + "match": "\\n" }, { "include": "#string-interp" } ] }, { + "name": "string.quoted.single.dart", "begin": "r'", "end": "'", - "name": "string.quoted.single.dart", "patterns": [ { - "match": "\\n", - "name": "invalid.string.newline" + "name": "invalid.string.newline", + "match": "\\n" } ] } ] - }, - "punctuation": { - "patterns": [ - { - "match": ",", - "name": "punctuation.comma.dart" - }, - { - "match": ";", - "name": "punctuation.terminator.dart" - }, - { - "match": "\\.", - "name": "punctuation.dot.dart" - } - ] } - }, - "scopeName": "source.dart" -} \ No newline at end of file + } +}