Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix keywords being incorrectly highlighted as function calls #353

Merged
merged 6 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions syntaxes/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"useTabs": false,
"tabWidth": 4
}
3 changes: 3 additions & 0 deletions syntaxes/GDScript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@
{
"include": "#keywords"
},
{
"include": "#control_flow"
},
{
"include": "#function-call"
},
Expand Down
24 changes: 24 additions & 0 deletions syntaxes/examples/gdscript1.gd
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,30 @@ export(test_enum) var enum_variable = test_enum.VALUE_1

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

func if_test():
var some_bool := true

while some_bool:
pass
while (some_bool):
pass

if some_bool:
return some_bool

if (some_bool):
return (some_bool)
elif !some_bool:
return !some_bool
elif !(some_bool):
return !(some_bool)
elif (some_bool):
pass
else:
pass

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

class InnerClass:
var some_var = 100
var dict = {
Expand Down