mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 15:11:19 +00:00
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.
This commit is contained in:
parent
2ec0da1a75
commit
7548e043fc
14 changed files with 145 additions and 33 deletions
|
|
@ -0,0 +1,35 @@
|
|||
const π = PI
|
||||
var ㄥ = π
|
||||
|
||||
func test():
|
||||
var փորձարկում = "test"
|
||||
prints("փորձարկում", փորձարկում)
|
||||
var امتحان = "test"
|
||||
prints("امتحان", امتحان)
|
||||
var পরীক্ষা = "test"
|
||||
prints("পরীক্ষা", পরীক্ষা)
|
||||
var тест = "test"
|
||||
prints("тест", тест)
|
||||
var जाँच = "test"
|
||||
prints("जाँच", जाँच)
|
||||
var 기준 = "test"
|
||||
prints("기준", 기준)
|
||||
var 测试 = "test"
|
||||
prints("测试", 测试)
|
||||
var テスト = "test"
|
||||
prints("テスト", テスト)
|
||||
var 試験 = "test"
|
||||
prints("試験", 試験)
|
||||
var പരീക്ഷ = "test"
|
||||
prints("പരീക്ഷ", പരീക്ഷ)
|
||||
var ทดสอบ = "test"
|
||||
prints("ทดสอบ", ทดสอบ)
|
||||
var δοκιμή = "test"
|
||||
prints("δοκιμή", δοκιμή)
|
||||
|
||||
const d = 1.1
|
||||
_process(d)
|
||||
print(is_equal_approx(ㄥ, PI + (d * PI)))
|
||||
|
||||
func _process(Δ: float) -> void:
|
||||
ㄥ += Δ * π
|
||||
Loading…
Add table
Add a link
Reference in a new issue