Merge pull request #55822 from Chaosus/shader_fix_semicolon_3.x

This commit is contained in:
Rémi Verschelde 2021-12-12 21:10:38 +01:00 committed by GitHub
commit 4ebee76370
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3694,7 +3694,6 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (tk.type == TK_CURSOR) { if (tk.type == TK_CURSOR) {
//do nothing //do nothing
} else if (tk.type == TK_IDENTIFIER) {
} else if (tk.type == TK_PERIOD) { } else if (tk.type == TK_PERIOD) {
DataType dt = expr->get_datatype(); DataType dt = expr->get_datatype();
String st = expr->get_datatype_name(); String st = expr->get_datatype_name();
@ -5071,7 +5070,9 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Bui
block->parent_block = p_block; block->parent_block = p_block;
cf->blocks.push_back(block); cf->blocks.push_back(block);
err = _parse_block(block, p_builtin_types, true, p_can_break, p_can_continue); err = _parse_block(block, p_builtin_types, true, p_can_break, p_can_continue);
if (err) {
return err;
}
} else { } else {
_set_tkpos(pos); //rollback _set_tkpos(pos); //rollback
} }