site/node_modules/shiki/dist/langs/dart.mjs

7 lines
7.7 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Dart", "name": "dart", "patterns": [{ "match": "^(#!.*)$", "name": "meta.preprocessor.script.dart" }, { "begin": "^\\w*\\b(augment\\s+library|library|import\\s+augment|import|part\\s+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" }, { "match": "\\b(if)\\b", "name": "keyword.control.dart" }] }, { "include": "#comments" }, { "include": "#punctuation" }, { "include": "#annotations" }, { "include": "#keywords" }, { "include": "#constants-and-special-vars" }, { "include": "#operators" }, { "include": "#strings" }], "repository": { "annotations": { "patterns": [{ "match": "@[a-zA-Z]+", "name": "storage.type.annotation.dart" }] }, "class-identifier": { "patterns": [{ "match": "(?<!\\$)\\b(bool|num|int|double|dynamic)\\b(?!\\$)", "name": "support.class.dart" }, { "match": "(?<!\\$)\\bvoid\\b(?!\\$)", "name": "storage.type.primitive.dart" }, { "begin": "(?<![a-zA-Z0-9_$])([_$]*[A-Z][a-zA-Z0-9_$]*)\\b", "beginCaptures": { "1": { "name": "support.class.dart" } }, "end": "(?!<)", "patterns": [{ "include": "#type-args" }] }] }, "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-block": { "patterns": [{ "begin": "/\\*", "end": "\\*/", "name": "comment.block.dart", "patterns": [{ "include": "#comments-block" }] }] }, "comments-doc": { "patterns": [{ "begin": "///", "name": "comment.block.documentation.dart", "patterns": [{ "include": "#dartdoc" }], "while": "^\\s*///" }] }, "comments-doc-oldschool": { "patterns": [{ "begin": "/\\*\\*", "end": "\\*/", "name": "comment.block.documentation.dart", "patterns": [{ "include": "#comments-doc-oldschool" }, { "include": "#comments-block" }, { "include": "#dartdoc" }] }] }, "comments-inline": { "patterns": [{ "include": "#comments-block" }, { "captures": { "1": { "name": "comment.line.double-slash.dart" } }, "match": "((//).*)$" }] }, "constants-and-special-vars": { "patterns": [{ "match": "(?<!\\$)\\b(true|false|null)\\b(?!\\$)", "name": "constant.language.dart" }, { "match": "(?<!\\$)\\b(this|super|augmented)\\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" }, { "include": "#class-identifier" }, { "include": "#function-identifier" }] }, "dartdoc": { "patterns": [{ "captures": { "0": { "name": "variable.name.source.dart" } }, "match": "(\\[.*?\\])" }, { "captures": { "0": { "name": "variable.name.source.dart" } }, "match": "^ {4,}(?![ \\*]).*" }, { "begin": "```.*?$", "contentName": "variable.other.source.dart", "end": "```" }, { "captures": { "0": { "name": "variable.other.source.dart" } }, "match": "(`[^`]+?`)" }, { "captures": { "2": { "name": "variable.other.source.dart" } }, "match": "(\\* (( ).*))$" }] }, "expression": { "patterns": [{ "include": "#constants-and-special-vars" }, { "include": "#strings" }, { "match": "[a-zA-Z0-9_]+", "name": "variable.parameter.dart" }, { "begin": "\\{", "end": "\\}", "patterns": [{ "include": "#expression" }] }] }, "function-identifier": { "patterns": [{ "captures": { "1": { "name": "entity.name.function.dart" }, "2": { "patterns": [{ "include": "#type-args" }] } }, "match": "([_$]*[a-z][a-zA-Z0-9_$]*)(<(?:[a-zA-Z0-9_$<>?]|,\\s*|\\s+extends\\s+)+>)?[!?]?\\(" }] }, "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|switch|
var dart = [
lang
];
export { dart as default };