Fix attribute grammar and update documentation

This commit is contained in:
Casey Rodarmor 2025-06-24 01:37:03 -07:00
parent 152b910922
commit fcc6340f66
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