Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
438 lines (438 sloc) 8.32 KB
{
"fileTypes": [
"dart"
],
"foldingStartMarker": "\\{\\s*$",
"foldingStopMarker": "^\\s*\\}",
"name": "Dart",
"patterns": [
{
"match": "^(#!.*)$",
"name": "meta.preprocessor.script.dart"
},
{
"begin": "^\\w*\\b(library|import|part of|part|export)\\b",
"beginCaptures": {
"0": {
"name": "keyword.other.import.dart"
}
},
"end": ";",
"endCaptures": {
"0": {
"name": "punctuation.terminator.dart"
}
},
"name": "meta.declaration.dart",
"patterns": [
{
"include": "#strings"
},
{
"include": "#comments"
},
{
"match": "\\b(as|show|hide)\\b",
"name": "keyword.other.import.dart"
}
]
},
{
"include": "#comments"
},
{
"include": "#punctuation"
},
{
"include": "#annotations"
},
{
"include": "#keywords"
},
{
"include": "#constants-and-special-vars"
},
{
"include": "#strings"
}
],
"repository": {
"dartdoc": {
"patterns": [
{
"match": "(\\[.*?\\])",
"captures": {
"0": {
"name": "variable.name.source.dart"
}
}
},
{
"match": "^ {4,}(?![ \\*]).*",
"captures": {
"0": {
"name": "variable.name.source.dart"
}
}
},
{
"begin": "```.*?$",
"end": "```",
"contentName": "variable.other.source.dart"
},
{
"match": "(`.*?`)",
"captures": {
"0": {
"name": "variable.other.source.dart"
}
}
},
{
"match": "(`.*?`)",
"captures": {
"0": {
"name": "variable.other.source.dart"
}
}
},
{
"match": "(\\* (( ).*))$",
"captures": {
"2": {
"name": "variable.other.source.dart"
}
}
},
{
"match": "(\\* .*)$"
}
]
},
"comments": {
"patterns": [
{
"captures": {
"0": {
"name": "punctuation.definition.comment.dart"
}
},
"match": "/\\*\\*/",
"name": "comment.block.empty.dart"
},
{
"include": "#comments-doc-oldschool"
},
{
"include": "#comments-doc"
},
{
"include": "#comments-inline"
}
]
},
"comments-doc-oldschool": {
"patterns": [
{
"begin": "/\\*\\*",
"end": "\\*/",
"name": "comment.block.documentation.dart",
"patterns": [
{
"include": "#comments-doc-oldschool"
},
{
"include": "#comments-block"
},
{
"include": "#dartdoc"
}
]
}
]
},
"comments-doc": {
"patterns": [
{
"begin": "///",
"while": "^\\s*///",
"patterns": [
{
"include": "#dartdoc"
}
],
"name": "comment.block.documentation.dart"
}
]
},
"comments-inline": {
"patterns": [
{
"include": "#comments-block"
},
{
"captures": {
"1": {
"name": "comment.line.double-slash.dart"
}
},
"match": "((//).*)$"
}
]
},
"comments-block": {
"patterns": [
{
"begin": "/\\*",
"end": "\\*/",
"name": "comment.block.dart",
"patterns": [
{
"include": "#comments-block"
}
]
}
]
},
"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"
},
{
"match": "(?<!\\$)\\b(this|super)\\b(?!\\$)",
"name": "variable.language.dart"
},
{
"match": "(?<!\\$)\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b(?!\\$)",
"name": "constant.numeric.dart"
},
{
"match": "(?<![a-zA-Z0-9_$])([_$]*[A-Z][a-zA-Z0-9_$]*|bool\\b|num\\b|int\\b|double\\b|dynamic\\b)",
"name": "support.class.dart"
},
{
"match": "([_$]*[a-z][a-zA-Z0-9_$]*)(<|\\(|\\s+=>)",
"captures": {
"1": {
"name": "entity.name.function.dart"
}
}
}
]
},
"keywords": {
"patterns": [
{
"match": "(?<!\\$)\\bas\\b(?!\\$)",
"name": "keyword.cast.dart"
},
{
"match": "(?<!\\$)\\b(try|on|catch|finally|throw|rethrow)\\b(?!\\$)",
"name": "keyword.control.catch-exception.dart"
},
{
"match": "(?<!\\$)\\b(break|case|continue|default|do|else|for|if|in|return|switch|while)\\b(?!\\$)",
"name": "keyword.control.dart"
},
{
"match": "(?<!\\$)\\b(sync(\\*)?|async(\\*)?|await|yield(\\*)?)\\b(?!\\$)",
"name": "keyword.control.dart"
},
{
"match": "(?<!\\$)\\bassert\\b(?!\\$)",
"name": "keyword.control.dart"
},
{
"match": "(?<!\\$)\\b(new)\\b(?!\\$)",
"name": "keyword.control.new.dart"
},
{
"match": "(?<!\\$)\\b(abstract|class|enum|extends|extension|external|factory|implements|get|mixin|native|operator|set|typedef|with|covariant)\\b(?!\\$)",
"name": "keyword.declaration.dart"
},
{
"match": "(?<!\\$)\\b(is\\!?)\\b(?!\\$)",
"name": "keyword.operator.dart"
},
{
"match": "\\?|:",
"name": "keyword.operator.ternary.dart"
},
{
"match": "(<<|>>>?|~|\\^|\\||&)",
"name": "keyword.operator.bitwise.dart"
},
{
"match": "((&|\\^|\\||<<|>>>?)=)",
"name": "keyword.operator.assignment.bitwise.dart"
},
{
"match": "(=>)",
"name": "keyword.operator.closure.dart"
},
{
"match": "(==|!=|<=?|>=?)",
"name": "keyword.operator.comparison.dart"
},
{
"match": "(([+*/%-]|\\~)=)",
"name": "keyword.operator.assignment.arithmetic.dart"
},
{
"match": "(=)",
"name": "keyword.operator.assignment.dart"
},
{
"match": "(\\-\\-|\\+\\+)",
"name": "keyword.operator.increment-decrement.dart"
},
{
"match": "(\\-|\\+|\\*|\\/|\\~\\/|%)",
"name": "keyword.operator.arithmetic.dart"
},
{
"match": "(!|&&|\\|\\|)",
"name": "keyword.operator.logical.dart"
},
{
"match": "(?<!\\$)\\b(static|final|const|required|late)\\b(?!\\$)",
"name": "storage.modifier.dart"
},
{
"match": "(?<!\\$)\\b(?:void|var)\\b(?!\\$)",
"name": "storage.type.primitive.dart"
}
]
},
"string-interp": {
"patterns": [
{
"captures": {
"2": {
"name": "variable.parameter.dart"
},
"3": {
"name": "variable.parameter.dart"
}
},
"match": "\\$((\\w+)|\\{([^{}]+)\\})"
},
{
"match": "\\\\.",
"name": "constant.character.escape.dart"
}
]
},
"strings": {
"patterns": [
{
"begin": "(?<!r)\"\"\"",
"end": "\"\"\"(?!\")",
"name": "string.interpolated.triple.double.dart",
"patterns": [
{
"include": "#string-interp"
}
]
},
{
"begin": "(?<!r)'''",
"end": "'''(?!')",
"name": "string.interpolated.triple.single.dart",
"patterns": [
{
"include": "#string-interp"
}
]
},
{
"begin": "r\"\"\"",
"end": "\"\"\"(?!\")",
"name": "string.quoted.triple.double.dart"
},
{
"begin": "r'''",
"end": "'''(?!')",
"name": "string.quoted.triple.single.dart"
},
{
"begin": "(?<!\\|r)\"",
"end": "\"",
"name": "string.interpolated.double.dart",
"patterns": [
{
"match": "\\n",
"name": "invalid.string.newline"
},
{
"include": "#string-interp"
}
]
},
{
"begin": "r\"",
"end": "\"",
"name": "string.quoted.double.dart",
"patterns": [
{
"match": "\\n",
"name": "invalid.string.newline"
}
]
},
{
"begin": "(?<!\\|r)'",
"end": "'",
"name": "string.interpolated.single.dart",
"patterns": [
{
"match": "\\n",
"name": "invalid.string.newline"
},
{
"include": "#string-interp"
}
]
},
{
"begin": "r'",
"end": "'",
"name": "string.quoted.single.dart",
"patterns": [
{
"match": "\\n",
"name": "invalid.string.newline"
}
]
}
]
},
"punctuation": {
"patterns": [
{
"match": ",",
"name": "punctuation.comma.dart"
},
{
"match": ";",
"name": "punctuation.terminator.dart"
},
{
"match": "\\.",
"name": "punctuation.dot.dart"
}
]
}
},
"scopeName": "source.dart"
}
You can’t perform that action at this time.