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 35c4cad7ad
commit 80aa23e7eb
3 changed files with 9 additions and 0 deletions

View file

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

View file

@ -0,0 +1,6 @@
#GDTEST_OK
pass;var x;@export;@onready;;;var y : float;pass
func test():
pass