blark.transform.UnaryOperation
- class blark.transform.UnaryOperation(op: Token, expr: Expression, meta: Meta | None = None)[source]
Bases:
Expression
A unary - single operand - operation:
NOT
,-
, or+
.Lark grammar
This class is used by the following grammar rules:
unary_expression
unary_expression: [ UNARY_OPERATOR ] primary_expression
Methods
__init__
(op, expr[, meta])from_lark
(operator, expr)Attributes
- expr: Expression
- static from_lark(operator: Token | None, expr: Expression)[source]