mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 02:13:36 +00:00
Adding error message for empty grouping expression
This commit is contained in:
parent
8a13be50ab
commit
fbd07bf3bf
1 changed files with 5 additions and 1 deletions
|
|
@ -2328,7 +2328,11 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_dictionary(ExpressionNode
|
|||
GDScriptParser::ExpressionNode *GDScriptParser::parse_grouping(ExpressionNode *p_previous_operand, bool p_can_assign) {
|
||||
ExpressionNode *grouped = parse_expression(false);
|
||||
pop_multiline();
|
||||
consume(GDScriptTokenizer::Token::PARENTHESIS_CLOSE, R"*(Expected closing ")" after grouping expression.)*");
|
||||
if (grouped == nullptr) {
|
||||
push_error(R"(Expected grouping expression.)");
|
||||
} else {
|
||||
consume(GDScriptTokenizer::Token::PARENTHESIS_CLOSE, R"*(Expected closing ")" after grouping expression.)*");
|
||||
}
|
||||
return grouped;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue