Skip to content

Commit

Permalink
Syntax highlighting fixes (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaelonSuzuka authored Feb 21, 2024
1 parent 436ff64 commit 0c9c255
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions syntaxes/GDScript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
{ "include": "#function_call" },
{ "include": "#comment" },
{ "include": "#self" },
{ "include": "#func" },
{ "include": "#letter" },
{ "include": "#numbers" },
{ "include": "#builtin_classes" },
Expand Down Expand Up @@ -149,6 +150,10 @@
"match": "\\bself\\b",
"name": "variable.language.gdscript"
},
"func": {
"match": "\\bfunc\\b",
"name": "keyword.language.gdscript"
},
"logic_operator": {
"match": "\\b(and|or|not|!)\\b",
"name": "keyword.operator.wordlike.gdscript"
Expand Down Expand Up @@ -238,6 +243,14 @@
},
"end": "$|;",
"patterns": [
{
"match": "(:)?\\s*(set|get)\\s+=\\s+([a-zA-Z_]\\w*)",
"captures": {
"1": { "name": "punctuation.separator.annotation.gdscript" },
"2": { "name": "keyword.language.gdscript storage.type.const.gdscript" },
"3": { "name": "entity.name.function.gdscript" }
}
},
{
"match": ":=|=(?!=)",
"name": "keyword.operator.assignment.gdscript"
Expand Down
9 changes: 9 additions & 0 deletions syntaxes/examples/gdscript2.gd
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,13 @@ var warns_when_changed = "some value":
changed.emit(value)
warns_when_changed = value


var inline_setter_getter: String = "test" : get = getter, set = setter

func getter():
pass
func setter(x):
pass


# ------------------------------------------------------------------------------

0 comments on commit 0c9c255

Please sign in to comment.