API reference
python:astx:astx.system.Cast
class Cast
Cast(value: astx.DataType, target_type: astx.DataType, *, mode: NumericMode = NumericMode.CHECKED)
Source: packages/astx/src/astx/system.py:129
Cast AST node for type conversions.
Represents a cast of value to a specified target_type.
Attributes
-
value — Type: astx.DataType
-
target_type — Type: astx.DataType
-
mode — Type: NumericMode
-
type_ — Type: astx.DataType
Methods
-
__init__ — Initialize Cast.
-
get_struct — Return the structured representation of the cast expression.