operators
¶
ASTx operators.
BinaryOp
¶
Bases: DataTypeOps
AST class for the binary operator.
Source code in src/astx/datatypes.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure that represents the object.
Source code in src/astx/datatypes.py
158 159 160 161 162 163 164 165 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
217 218 219 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
211 212 213 214 215 |
|
DataTypeOps
¶
Bases: DataType
Overload some magic functions used for the main operations.
Source code in src/astx/base.py
301 302 303 304 305 306 307 308 309 310 311 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return a simple structure that represents the object.
Source code in src/astx/base.py
317 318 319 320 321 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
217 218 219 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
211 212 213 214 215 |
|
UnaryOp
¶
Bases: DataTypeOps
AST class for the unary operator.
Source code in src/astx/datatypes.py
93 94 95 96 97 98 99 100 101 102 103 104 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the object.
Source code in src/astx/datatypes.py
110 111 112 113 114 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
217 218 219 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
211 212 213 214 215 |
|