API reference
python:astx:astx.BinaryOp
class BinaryOp
BinaryOp(op_code: str, lhs: DataType, rhs: DataType, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None, *, mode: NumericMode = NumericMode.CHECKED)
Source: packages/astx/src/astx/types/operators.py:305
Declared as: python:astx:astx.types.operators.BinaryOp
AST class for the binary operator.
Attributes
-
kind — Type: ASTKind
-
type_ — Type: ExprType
-
lhs — Type: DataType
-
rhs — Type: DataType
-
op_code — Type: str
-
mode — Type: NumericMode
Methods
-
__init__ — Initialize the BinaryOp instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure that represents the object.