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 shorthand options for annotations #5

Open
pkedy opened this issue Mar 23, 2021 · 0 comments
Open

Add shorthand options for annotations #5

pkedy opened this issue Mar 23, 2021 · 0 comments

Comments

@pkedy
Copy link
Member

pkedy commented Mar 23, 2021

Currently, annotations follow this syntax in order to support multi-valued annotations:

@myannotation(value1: "one", value2: "two")

For cases when 1 or no value is applicable for an annotation, it would be ideal to use a shorthand form to improve readability.

Single value - likely the most common usage

@myannotation("myvalue")

Is equivalent to

@myannotation(value: "myvalue")

No value - useful for "has annotation" style checks

@myannotation

Is equivalent to

@myannotation()
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

No branches or pull requests

1 participant