Browse Source

Merge pull request #52521 from kdiduk/52499-preload-parsing-error-when-newline-encountered

Rémi Verschelde 3 years ago
parent
commit
3f05c388a1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      modules/gdscript/gdscript_parser.cpp

+ 2 - 0
modules/gdscript/gdscript_parser.cpp

@@ -435,7 +435,9 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
 			bool valid = false;
 			ConstantNode *cn;
 
+			parenthesis++;
 			Node *subexpr = _parse_and_reduce_expression(p_parent, p_static);
+			parenthesis--;
 			if (subexpr) {
 				if (subexpr->type == Node::TYPE_CONSTANT) {
 					cn = static_cast<ConstantNode *>(subexpr);