mirror of
https://github.com/godotengine/godot.git
synced 2025-10-28 20:24:41 +00:00
GDScript: Show error when missing expression after ternary else
This commit is contained in:
parent
a5c299630d
commit
107af38fd1
3 changed files with 10 additions and 0 deletions
|
|
@ -2275,6 +2275,10 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_ternary_operator(Expressio
|
|||
|
||||
operation->false_expr = parse_precedence(PREC_TERNARY, false);
|
||||
|
||||
if (operation->false_expr == nullptr) {
|
||||
push_error(R"(Expected expression after "else".)");
|
||||
}
|
||||
|
||||
return operation;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue