diff options
| author | Saracen | 2017-02-06 22:44:22 +0000 |
|---|---|---|
| committer | Saracen | 2017-02-28 21:52:33 +0000 |
| commit | 5e938f000136c076f9f35b8332dc7c022687a983 (patch) | |
| tree | a8e79b3f4a557ce4097791f5622728c69d22764f /modules/gdscript/gd_parser.cpp | |
| parent | 0f8c6dd3822c38b8145f08265abb9eba479f4d15 (diff) | |
| download | godot-5e938f000136c076f9f35b8332dc7c022687a983.tar.gz godot-5e938f000136c076f9f35b8332dc7c022687a983.tar.zst godot-5e938f000136c076f9f35b8332dc7c022687a983.zip | |
Diffstat (limited to 'modules/gdscript/gd_parser.cpp')
| -rw-r--r-- | modules/gdscript/gd_parser.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index 350f596f7..5147ccd63 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -375,6 +375,22 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_ constant->value=Math_PI; tokenizer->advance(); expr=constant; + } + else if (tokenizer->get_token() == GDTokenizer::TK_CONST_INF) { + + //constant defined by tokenizer + ConstantNode *constant = alloc_node<ConstantNode>(); + constant->value = Math_INF; + tokenizer->advance(); + expr = constant; + } + else if (tokenizer->get_token() == GDTokenizer::TK_CONST_NAN) { + + //constant defined by tokenizer + ConstantNode *constant = alloc_node<ConstantNode>(); + constant->value = Math_NAN; + tokenizer->advance(); + expr = constant; } else if (tokenizer->get_token()==GDTokenizer::TK_PR_PRELOAD) { //constant defined by tokenizer |
