Add parser support for semicolons after annotation, fixes #54280
This commit is contained in:
parent
9b94c80e9a
commit
46d2fd5a68
3 changed files with 6 additions and 0 deletions
|
@ -1567,6 +1567,10 @@ GDScriptParser::AnnotationNode *GDScriptParser::parse_annotation(uint32_t p_vali
|
||||||
}
|
}
|
||||||
complete_extents(annotation);
|
complete_extents(annotation);
|
||||||
|
|
||||||
|
while (match(GDScriptTokenizer::Token::SEMICOLON)) {
|
||||||
|
// Semicolons after annotation are optional.
|
||||||
|
}
|
||||||
|
|
||||||
match(GDScriptTokenizer::Token::NEWLINE); // Newline after annotation is optional.
|
match(GDScriptTokenizer::Token::NEWLINE); // Newline after annotation is optional.
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
pass;var x;@export;@warning_ignore("unused_private_class_variable");;;var _y : float;pass
|
|
@ -0,0 +1 @@
|
||||||
|
GDTEST_OK
|
Loading…
Reference in a new issue