API reference
python:astx:astx.VariableAssignment
class VariableAssignment
VariableAssignment(name: str, value: Expr, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/operators.py:153
Declared as: python:astx:astx.operators.VariableAssignment
AST class for variable declaration.
Attributes
-
loc — Source coordinates attached to this node.; Type: SourceLocation
-
kind — Kind of value or operation.; Type: ASTKind
-
name — Name identifying this declaration.; Type: str
-
value — Stored value.; Type: Expr
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
Methods
-
__init__ — Initialize the VarExprAST instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure of the object.