GDScript: Show specific error when "yield" is used

To help people porting code, it gives a hint to use "await" instead of a
generic error.
This commit is contained in:
George Marques 2021-09-21 14:38:14 -03:00
parent db028ac700
commit 262d6c6bef
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D
4 changed files with 15 additions and 1 deletions

View file

@ -1388,6 +1388,7 @@ private:
ExpressionNode *parse_attribute(ExpressionNode *p_previous_operand, bool p_can_assign);
ExpressionNode *parse_subscript(ExpressionNode *p_previous_operand, bool p_can_assign);
ExpressionNode *parse_lambda(ExpressionNode *p_previous_operand, bool p_can_assign);
ExpressionNode *parse_yield(ExpressionNode *p_previous_operand, bool p_can_assign);
ExpressionNode *parse_invalid_token(ExpressionNode *p_previous_operand, bool p_can_assign);
TypeNode *parse_type(bool p_allow_void = false);
#ifdef TOOLS_ENABLED