Fix GDScript Syntax Highlighting for "self" Keyword (#846)

* Rewrite rules for highlighting "self"

---------

Co-authored-by: David Kincaid <daelonsuzuka@gmail.com>
This commit is contained in:
Asaf Shilo
2025-04-26 23:00:15 +03:00
committed by GitHub
parent d14e2ee280
commit 911a34fda4
3 changed files with 11 additions and 19 deletions

View File

@@ -1,3 +1,6 @@
# --- IN ---
var c = 0
func f():
const a = preload("res://a.gd")
const b = load("res://b.gd")
@@ -8,3 +11,7 @@ func f():
andigin.x = 1
print(a)
self.c = 1
print(self.c + 2)
print(func() return self.c + 2)

View File

@@ -1,10 +0,0 @@
func f():
const a = preload("res://a.gd")
const b = load("res://b.gd")
var origin: Vector2 = Vector2.ZERO
origin.x = 1
var andigin: Vector2 = Vector2.ZERO
andigin.x = 1
print(a)