mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Merge pull request #52906 from vnen/gdscript-show-error-on-yield
This commit is contained in:
commit
679f70c1e1
4 changed files with 15 additions and 1 deletions
|
@ -2822,6 +2822,11 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_lambda(ExpressionNode *p_p
|
|||
return lambda;
|
||||
}
|
||||
|
||||
GDScriptParser::ExpressionNode *GDScriptParser::parse_yield(ExpressionNode *p_previous_operand, bool p_can_assign) {
|
||||
push_error(R"("yield" was removed in Godot 4.0. Use "await" instead.)");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GDScriptParser::ExpressionNode *GDScriptParser::parse_invalid_token(ExpressionNode *p_previous_operand, bool p_can_assign) {
|
||||
// Just for better error messages.
|
||||
GDScriptTokenizer::Token::Type invalid = previous.type;
|
||||
|
@ -3178,7 +3183,7 @@ GDScriptParser::ParseRule *GDScriptParser::get_rule(GDScriptTokenizer::Token::Ty
|
|||
{ nullptr, nullptr, PREC_NONE }, // TRAIT,
|
||||
{ nullptr, nullptr, PREC_NONE }, // VAR,
|
||||
{ nullptr, nullptr, PREC_NONE }, // VOID,
|
||||
{ nullptr, nullptr, PREC_NONE }, // YIELD,
|
||||
{ &GDScriptParser::parse_yield, nullptr, PREC_NONE }, // YIELD,
|
||||
// Punctuation
|
||||
{ &GDScriptParser::parse_array, &GDScriptParser::parse_subscript, PREC_SUBSCRIPT }, // BRACKET_OPEN,
|
||||
{ nullptr, nullptr, PREC_NONE }, // BRACKET_CLOSE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue