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 [attribute: value] shorthand #2136

Merged
merged 5 commits into from
Jun 8, 2024

Conversation

neunenak
Copy link
Contributor

@neunenak neunenak commented Jun 7, 2024

#2086

Adds a shorthand syntax [attribute: value] for attributes with a single argument, that is equivalent to [attribute(value)].

Copy link
Owner

@casey casey left a comment

Choose a reason for hiding this comment

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

I like the [attribute: value] shorthand, but I don't think we should parse multiple attribute values until we actually have an attribute that takes multiple values, so Attribute:new should be changed back to take an Option<StringLiteral>

@neunenak neunenak requested a review from casey June 8, 2024 17:42
Copy link
Owner

@casey casey left a comment

Choose a reason for hiding this comment

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

One more thing: Can you add a separate [attribute: value] test instead of changing the existing group test? I think we can have a single test which tests the short syntax, and leave the other tests as they are.

Copy link
Owner

@casey casey left a comment

Choose a reason for hiding this comment

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

LGTM!

@casey casey enabled auto-merge (squash) June 8, 2024 18:32
@casey casey merged commit 1ca53e8 into casey:master Jun 8, 2024
5 checks passed
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