casting
¶
AST types module.
Classes:
-
TypeCastExpr
–AST class for type casting expressions.
TypeCastExpr
¶
TypeCastExpr(expr: Expr, target_type: DataType, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Bases: Expr
AST class for type casting expressions.
Methods:
-
get_struct
–Return the AST structure of the TypeCast expression.
-
to_json
–Return an json string that represents the object.
-
to_yaml
–Return an yaml string that represents the object.
Source code in src/astx/types/casting.py
29 30 31 32 33 34 35 36 37 38 39 |
|
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Return the AST structure of the TypeCast expression.
Source code in src/astx/types/casting.py
45 46 47 48 49 50 51 52 53 |
|
to_json
¶
Return an json string that represents the object.
Source code in src/astx/base.py
265 266 267 |
|
to_yaml
¶
Return an yaml string that represents the object.
Source code in src/astx/base.py
259 260 261 262 263 |
|