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 support for attributes (with no parameters) #15

Merged
merged 3 commits into from
Jun 22, 2024

Conversation

Dekkonot
Copy link
Contributor

As of the last Luau release (v630), there exists support for attributes. This PR adds support for them to this grammar file.

Of note is that in Luau, attributes are currently supported only for functions. This grammar doesn't attempt to stick to that though, since allowing something only before a function declaration seems needlessly complicated. I'm more than willing to change it however, since it's technically incorrect.

This RFC also doesn't add support for attribute parameters as defined in this RFC. The reasoning is that they currently don't exist in Luau, so supporting them in the grammar seems like it is jumping the gun. It would be akin to supporting read-only syntax for properties even though it doesn't really exist in the language yet. I am willing to change this if you want though.

Copy link
Owner

@JohnnyMorganz JohnnyMorganz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JohnnyMorganz JohnnyMorganz merged commit 5febad5 into JohnnyMorganz:main Jun 22, 2024
2 checks passed
@Dekkonot Dekkonot deleted the attributes branch June 26, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants