docs(expression.py): describe new `name` & `value` productions
This commit is contained in:
parent
3cce243774
commit
540ede3439
|
@ -8,12 +8,15 @@ 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 ('(' name '=' value ( ', ' name '=' value )* ')')?
|
||||||
|
|
||||||
ident: (\w|:|\+|-|\.|\[|\]|\\|/)+
|
ident: (\w|:|\+|-|\.|\[|\]|\\|/)+
|
||||||
|
name: a valid ident, but not a reserved keyword
|
||||||
|
value: (unescaped) string literal | (-)?[0-9]+ | 'False' | 'True' | 'None'
|
||||||
|
|
||||||
The semantics are:
|
The semantics are:
|
||||||
|
|
||||||
- Empty expression evaluates to False.
|
- Empty expression evaluates to False.
|
||||||
- ident evaluates to True or False according to a provided matcher function.
|
- ident evaluates to True or False according to a provided matcher function.
|
||||||
- or/and/not evaluate according to the usual boolean semantics.
|
- or/and/not evaluate according to the usual boolean semantics.
|
||||||
|
- ident with parentheses and keyword arguments evaluates to True or False according to a provided matcher function.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
Loading…
Reference in New Issue