Skip to content

Commit

Permalink
🤖: update grammars
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Nov 19, 2024
1 parent 2200bc4 commit 05b04d4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 29 deletions.
47 changes: 29 additions & 18 deletions packages/shiki/languages/dart.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dart",
"version": "1.3.0",
"version": "1.4.1",
"fileTypes": ["dart"],
"scopeName": "source.dart",
"foldingStartMarker": "\\{\\s*$",
Expand Down Expand Up @@ -64,6 +64,16 @@
}
],
"repository": {
"dartdoc-codeblock-triple": {
"begin": "^\\s*///\\s*(?!\\s*```)",
"end": "\n",
"contentName": "variable.other.source.dart"
},
"dartdoc-codeblock-block": {
"begin": "^\\s*\\*\\s*(?!(\\s*```|/))",
"end": "\n",
"contentName": "variable.other.source.dart"
},
"dartdoc": {
"patterns": [
{
Expand All @@ -75,30 +85,31 @@
}
},
{
"match": "^ {4,}(?![ \\*]).*",
"captures": {
"0": {
"name": "variable.name.source.dart"
"begin": "^\\s*///\\s*(```)",
"end": "^\\s*///\\s*(```)|^(?!\\s*///)",
"patterns": [
{
"include": "#dartdoc-codeblock-triple"
}
}
]
},
{
"contentName": "variable.other.source.dart",
"begin": "```.*?$",
"end": "```"
"begin": "^\\s*\\*\\s*(```)",
"end": "^\\s*\\*\\s*(```)|^(?=\\s*\\*/)",
"patterns": [
{
"include": "#dartdoc-codeblock-block"
}
]
},
{
"match": "(`[^`]+?`)",
"captures": {
"0": {
"name": "variable.other.source.dart"
}
}
"match": "`[^`\n]+`",
"name": "variable.other.source.dart"
},
{
"match": "(\\* (( ).*))$",
"match": "(?:\\*|\\/\\/)\\s{4,}(.*?)(?=($|\\*\\/))",
"captures": {
"2": {
"1": {
"name": "variable.other.source.dart"
}
}
Expand Down Expand Up @@ -152,7 +163,7 @@
{
"name": "comment.block.documentation.dart",
"begin": "///",
"while": "^\\s*///",
"end": "^(?!\\s*///)",
"patterns": [
{
"include": "#dartdoc"
Expand Down
24 changes: 13 additions & 11 deletions packages/shiki/languages/gdscript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,15 @@
"match": "[-]?([0-9][0-9_]*e[\\-\\+]?\\[0-9_])",
"name": "constant.numeric.float.gdscript"
},
{
"name": "constant.numeric.float.gdscript",
"match": "(?x)\n (?<! \\w)(?:\n (?:\n \\.[0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\. [0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\.\n ) (?: [eE][+-]?[0-9](?: _?[0-9] )* )?\n |\n [0-9](?: _?[0-9] )* (?: [eE][+-]?[0-9](?: _?[0-9] )* )\n )([jJ])?\\b\n",
"captures": {
"1": {
"name": "storage.type.imaginary.number.gdscript"
}
}
},
{
"match": "[-]?[0-9][0-9_]*",
"name": "constant.numeric.integer.gdscript"
Expand Down Expand Up @@ -622,7 +631,7 @@
},
"builtin_get_node_shorthand_quoted": {
"name": "string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape.gdscript",
"begin": "(?:(\\$)|(&|\\^|@))(\"|')",
"begin": "(?:(\\$|%)|(&|\\^|@))(\"|')",
"beginCaptures": {
"1": {
"name": "keyword.control.flow.gdscript"
Expand Down Expand Up @@ -798,17 +807,10 @@
"name": "entity.name.function.gdscript"
}
},
"end": "(:|(?=[#'\"\\n]))",
"end2": "(\\s*(\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:)",
"endCaptures2": {
"end": "(:)",
"endCaptures": {
"1": {
"name": "punctuation.separator.annotation.result.gdscript"
},
"2": {
"name": "keyword.language.void.gdscript"
},
"3": {
"name": "entity.name.type.class.gdscript markup.italic"
"name": "punctuation.section.function.begin.gdscript"
}
},
"patterns": [
Expand Down

0 comments on commit 05b04d4

Please sign in to comment.