summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.cpp
diff options
context:
space:
mode:
authorBernhard Liebl <Bernhard.Liebl@gmx.org>2017-12-15 16:43:27 +0100
committerBernhard Liebl <Bernhard.Liebl@gmx.org>2018-07-31 17:56:48 +0200
commitba974b8d1e245818d819791bd628e70ec3b92de3 (patch)
tree59a47903e6a0233d041a6938ea2a6cb5f9fe6a63 /modules/gdscript/gdscript_parser.cpp
parent4e4702e3868af342b0e2964c7753fa4a3aa83af8 (diff)
downloadredot-engine-ba974b8d1e245818d819791bd628e70ec3b92de3.tar.gz
Allow some non-integer built-in constants in gdscript
Diffstat (limited to 'modules/gdscript/gdscript_parser.cpp')
-rw-r--r--modules/gdscript/gdscript_parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 852d465206..15ee4f4219 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -607,7 +607,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
_set_error("Built-in type constant or static function expected after '.'");
return NULL;
}
- if (!Variant::has_numeric_constant(bi_type, identifier)) {
+ if (!Variant::has_constant(bi_type, identifier)) {
if (tokenizer->get_token() == GDScriptTokenizer::TK_PARENTHESIS_OPEN &&
Variant::is_method_const(bi_type, identifier) &&
@@ -642,7 +642,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
} else {
ConstantNode *cn = alloc_node<ConstantNode>();
- cn->value = Variant::get_numeric_constant_value(bi_type, identifier);
+ cn->value = Variant::get_constant_value(bi_type, identifier);
cn->datatype = _type_from_variant(cn->value);
expr = cn;
}