You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix parse error using Vector{2,3,4}.INF
This commit is contained in:
@@ -164,6 +164,7 @@ bool GDScriptTokenizer::Token::is_identifier() const {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
case MATCH: // Used in String.match().
|
case MATCH: // Used in String.match().
|
||||||
|
case CONST_INF: // Used in Vector{2,3,4}.INF
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
func test():
|
||||||
|
var vec2: = Vector2.INF
|
||||||
|
var vec3: = Vector3.INF
|
||||||
|
|
||||||
|
print(vec2.x == INF)
|
||||||
|
print(vec3.z == INF)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
GDTEST_OK
|
||||||
|
true
|
||||||
|
true
|
||||||
Reference in New Issue
Block a user