1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Add support for the TAU constant. Fixes #12094.

This commit is contained in:
Goutte
2017-11-04 10:34:27 +01:00
parent c1855dcff1
commit 91ca725f9b
11 changed files with 34 additions and 9 deletions

View File

@@ -362,6 +362,13 @@ GDParser::Node *GDParser::_parse_expression(Node *p_parent, bool p_static, bool
constant->value = Math_PI;
tokenizer->advance();
expr = constant;
} else if (tokenizer->get_token() == GDTokenizer::TK_CONST_TAU) {
//constant defined by tokenizer
ConstantNode *constant = alloc_node<ConstantNode>();
constant->value = Math_TAU;
tokenizer->advance();
expr = constant;
} else if (tokenizer->get_token() == GDTokenizer::TK_CONST_INF) {
//constant defined by tokenizer