diff options
| author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-04-17 17:12:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-17 17:12:10 +0200 |
| commit | d220680bd09181bd8e11006153d800eb9173578b (patch) | |
| tree | 27cef690209caabb2abb64e776d879b28ed48e40 /modules/gdscript/tests/scripts/parser | |
| parent | 055ee1276f097727d1c0ba3c1c25a12981c20bfa (diff) | |
| parent | ab9f60dd1aa6e1d5b6b24878e9dc6a290d95be8f (diff) | |
| download | redot-engine-d220680bd09181bd8e11006153d800eb9173578b.tar.gz | |
Merge pull request #62830 from ajreckof/access-identifier-keywords
fix access to identifiers that are reserved keywords
Diffstat (limited to 'modules/gdscript/tests/scripts/parser')
| -rw-r--r-- | modules/gdscript/tests/scripts/parser/features/reserved_keywords_as_attribute.gd | 36 | ||||
| -rw-r--r-- | modules/gdscript/tests/scripts/parser/features/reserved_keywords_as_attribute.out | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/reserved_keywords_as_attribute.gd b/modules/gdscript/tests/scripts/parser/features/reserved_keywords_as_attribute.gd new file mode 100644 index 0000000000..87f9479812 --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/reserved_keywords_as_attribute.gd @@ -0,0 +1,36 @@ +var dict = {} + +func test(): + dict.if = 1 + dict.elif = 1 + dict.else = 1 + dict.for = 1 + dict.while = 1 + dict.match = 1 + dict.break = 1 + dict.continue = 1 + dict.pass = 1 + dict.return = 1 + dict.class = 1 + dict.class_name = 1 + dict.extends = 1 + dict.is = 1 + dict.in = 1 + dict.as = 1 + dict.self = 1 + dict.signal = 1 + dict.func = 1 + dict.static = 1 + dict.const = 1 + dict.enum = 1 + dict.var = 1 + dict.breakpoint = 1 + dict.preload = 1 + dict.await = 1 + dict.yield = 1 + dict.assert = 1 + dict.void = 1 + dict.PI = 1 + dict.TAU = 1 + dict.INF = 1 + dict.NAN = 1 diff --git a/modules/gdscript/tests/scripts/parser/features/reserved_keywords_as_attribute.out b/modules/gdscript/tests/scripts/parser/features/reserved_keywords_as_attribute.out new file mode 100644 index 0000000000..d73c5eb7cd --- /dev/null +++ b/modules/gdscript/tests/scripts/parser/features/reserved_keywords_as_attribute.out @@ -0,0 +1 @@ +GDTEST_OK |
