API reference
python:astx:astx.callables.Argument
class Argument
Argument(name: str, type_: DataType, mutability: MutabilityKind = MutabilityKind.constant, default: Expr = UNDEFINED, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/callables.py:31
AST class for argument definition.
Attributes
-
kind — Kind of value or operation.; Type: ASTKind
-
mutability — Mutability.; Type: MutabilityKind
-
name — Name identifying this declaration.; Type: str
-
type_ — Type associated with this expression.; Type: DataType
-
default — Default used when no value is supplied.; Type: Expr
-
loc — Type: SourceLocation
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
-
nbytes — Type: int
-
_tmp_id — Type: int
Methods
-
__init__ — Initialize the VarExprAST instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure of the object.