GDScript: Fix repeated _ are allowed after decimal point

This commit is contained in:
Danil Alexeev
2023-02-13 09:46:31 +03:00
parent 33957aee69
commit fba8cbe6db
7 changed files with 88 additions and 15 deletions
@@ -1,3 +1,3 @@
func test():
# Number separators may not be placed right next to each other.
var __ = 1__23
var _num = 1__23
@@ -1,2 +1,2 @@
GDTEST_PARSER_ERROR
Only one underscore can be used as a numeric separator.
Multiple underscores cannot be adjacent in a numeric literal.
@@ -0,0 +1,3 @@
func test():
# Number separators may not be placed right next to each other.
var _num = 123.45__67
@@ -0,0 +1,2 @@
GDTEST_PARSER_ERROR
Multiple underscores cannot be adjacent in a numeric literal.