소스 검색

Fix positive operator in GDScript compiler

George Marques 7 년 전
부모
커밋
3cec24baa8
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      modules/gdscript/gdscript_compiler.cpp

+ 3 - 0
modules/gdscript/gdscript_compiler.cpp

@@ -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;