Add support for attributes (with no parameters) #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.