Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parser support for semicolons after annotation #54852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Scony
Copy link
Contributor

@Scony Scony commented Nov 10, 2021

Following GDScript will now parse correctly:

pass;var x;@export;@onready;;;var y : float;pass

func test():
       pass

This closes #54280

@Scony Scony requested a review from a team as a code owner November 10, 2021 20:17
@Scony Scony changed the title Add parser support for semicolons after annotation, fixes #54280 Add parser support for semicolons after annotation Nov 10, 2021
@Scony Scony force-pushed the allow-semicolons-after-annotation branch 2 times, most recently from 0d73bf4 to 80aa23e Compare November 10, 2021 20:29
@AaronRecord
Copy link
Contributor

Why is this useful exactly? Annotations can already be written on the same line as a statement without a semicolon

@Scony
Copy link
Contributor Author

Scony commented Nov 10, 2021

@LightningAA it just fixes the lack of consistency among newline/semicolon-separated statements

@Scony
Copy link
Contributor Author

Scony commented Jan 10, 2023

Also, it allows code such as:

@tool;var x

to parse correctly.

@Mickeon
Copy link
Contributor

Mickeon commented Mar 6, 2024

The PR is two years old and, at least at a glance, looks good to me. Although there are no merge conflicts, could you rebase this just in case?

@Scony Scony force-pushed the allow-semicolons-after-annotation branch from 80aa23e to 46b8858 Compare March 6, 2024 22:33
@Scony
Copy link
Contributor Author

Scony commented Mar 6, 2024

The PR is two years old and, at least at a glance, looks good to me. Although there are no merge conflicts, could you rebase this just in case?

done

@Mickeon Mickeon requested a review from dalexeev March 6, 2024 22:34
@Scony Scony force-pushed the allow-semicolons-after-annotation branch from 46b8858 to 46d2fd5 Compare March 7, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parse error while parsing the annotation corner-case
6 participants