mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
PI is now a built-in constant, fixes #2134
This commit is contained in:
parent
2db78e8f87
commit
61745855d0
3 changed files with 11 additions and 1 deletions
|
@ -267,6 +267,13 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
|
|||
constant->value=tokenizer->get_token_constant();
|
||||
tokenizer->advance();
|
||||
expr=constant;
|
||||
} else if (tokenizer->get_token()==GDTokenizer::TK_CONST_PI) {
|
||||
|
||||
//constant defined by tokenizer
|
||||
ConstantNode *constant = alloc_node<ConstantNode>();
|
||||
constant->value=Math_PI;
|
||||
tokenizer->advance();
|
||||
expr=constant;
|
||||
} else if (tokenizer->get_token()==GDTokenizer::TK_PR_PRELOAD) {
|
||||
|
||||
//constant defined by tokenizer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue