Logo
Explore Help
Sign In
northern-lighthouse/godot
1
0
Fork 0
You've already forked godot
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
0028fd625e2c5b202e204bc12828cbca043213d3
godot/modules/gdscript/tests/scripts/parser/warnings/confusable_identifier.gd

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
320 B
GDScript3
Raw Normal View History

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:17:37 -03:00
extends Node
Add support for Unicode identifiers in GDScript This is using an adapted version of UAX#31 to not rely on the ICU database (which isn't available in builds without TextServerAdvanced). It allows most characters used in diverse scripts but not everything.
2023-01-18 22:56:00 -03:00
func test():
var port = 0 # Only latin characters.
var pοrt = 1 # The "ο" is Greek omicron.
prints(port, pοrt)
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:17:37 -03:00
# 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.
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.1 Page: 1276ms Template: 82ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API