docs(expression.py): simplify grammar documentation by defining `kwargs` separately

This commit is contained in:
lovetheguitar 2024-06-25 09:16:57 +02:00
parent 3d07791c36
commit 36b384afc7
1 changed files with 2 additions and 1 deletions

View File

@ -5,9 +5,10 @@ The grammar is:
expression: expr? EOF
expr: and_expr ('or' and_expr)*
and_expr: not_expr ('and' not_expr)*
not_expr: 'not' not_expr | '(' expr ')' | ident ('(' name '=' value ( ', ' name '=' value )* ')')?
not_expr: 'not' not_expr | '(' expr ')' | ident kwargs?
ident: (\w|:|\+|-|\.|\[|\]|\\|/)+
kwargs: ('(' name '=' value ( ', ' name '=' value )* ')')
name: a valid ident, but not a reserved keyword
value: (unescaped) string literal | (-)?[0-9]+ | 'False' | 'True' | 'None'