virtualx-engine/modules/gdscript/tests/scripts/parser/warnings/confusable_identifier.gd
George Marques 03ea77407c
GDScript: Be more lenient with identifiers
- Allow identifiers similar to keywords if they are in ASCII range.
- Allow constants to be treated as regular identifiers.
- Allow keywords that can be used as identifiers in expressions.
2023-02-09 11:19:05 -03:00

12 lines
320 B
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

extends Node
func test():
var port = 0 # Only latin characters.
var pοrt = 1 # The "ο" is Greek omicron.
prints(port, pοrt)
# Do not call this since nodes aren't in the tree. It is just a parser check.
func nodes():
var _node1 = $port # Only latin characters.
var _node2 = $pοrt # The "ο" is Greek omicron.