Fix attribute grammar and update documentation (#2790)
Some checks are pending
CI / lint (push) Waiting to run
CI / msrv (push) Waiting to run
CI / pages (push) Waiting to run
CI / test (macos-latest) (push) Waiting to run
CI / test (ubuntu-latest) (push) Waiting to run
CI / test (windows-latest) (push) Waiting to run

This commit is contained in:
Casey Rodarmor 2025-06-24 01:48:12 -07:00 committed by GitHub
parent 152b910922
commit 1b54dd8e39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View file

@ -124,9 +124,11 @@ sequence : expression ',' sequence
recipe : attributes* '@'? NAME parameter* variadic? ':' dependencies eol body?
attributes : '[' attribute* ']' eol
attributes : '[' attribute (',' attribute)* ']' eol
attribute : NAME ( '(' string ')' )?
attribute : NAME
| NAME ':' string
| NAME '(' string (',' string)* ')'
parameter : '$'? NAME
| '$'? NAME '=' value

View file

@ -2108,6 +2108,13 @@ foo:
echo "foo"
```
Attributes with a single argument may be written with a colon:
```just
[group: 'bar']
foo:
```
#### Enabling and Disabling Recipes<sup>1.8.0</sup>
The `[linux]`, `[macos]`, `[unix]`, and `[windows]` attributes are