Add parser support for semicolons after annotation, fixes #54280

This commit is contained in:
Pawel Lampe 2021-11-10 21:14:10 +01:00
parent 9b94c80e9a
commit 46d2fd5a68
3 changed files with 6 additions and 0 deletions

View File

@ -1567,6 +1567,10 @@ GDScriptParser::AnnotationNode *GDScriptParser::parse_annotation(uint32_t p_vali
}
complete_extents(annotation);
while (match(GDScriptTokenizer::Token::SEMICOLON)) {
// Semicolons after annotation are optional.
}
match(GDScriptTokenizer::Token::NEWLINE); // Newline after annotation is optional.
if (valid) {

View File

@ -0,0 +1 @@
pass;var x;@export;@warning_ignore("unused_private_class_variable");;;var _y : float;pass