Fix positive operator in GDScript compiler

This commit is contained in:
George Marques 2018-05-23 17:43:56 -03:00
parent d55351ed20
commit 3cec24baa8
No known key found for this signature in database
GPG Key ID: 046BD46A3201E43D
1 changed files with 3 additions and 0 deletions

View File

@ -738,6 +738,9 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
case GDScriptParser::OperatorNode::OP_NEG: {
if (!_create_unary_operator(codegen, on, Variant::OP_NEGATE, p_stack_level)) return -1;
} break;
case GDScriptParser::OperatorNode::OP_POS: {
if (!_create_unary_operator(codegen, on, Variant::OP_POSITIVE, p_stack_level)) return -1;
} break;
case GDScriptParser::OperatorNode::OP_NOT: {
if (!_create_unary_operator(codegen, on, Variant::OP_NOT, p_stack_level)) return -1;
} break;