blark.transform.UnaryOperation
- class blark.transform.UnaryOperation(op: Token, expr: Expression, meta: Meta | None = None)[source]
Bases:
ExpressionA unary - single operand - operation:
NOT,-, or+.Lark grammar
This class is used by the following grammar rules:
unary_expressionunary_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]