API reference
python:astx:astx.data.InlineVariableDeclaration
class InlineVariableDeclaration
InlineVariableDeclaration(name: str, type_: DataType, mutability: MutabilityKind = MutabilityKind.constant, visibility: VisibilityKind = VisibilityKind.public, scope: ScopeKind = ScopeKind.local, value: Expr = UNDEFINED, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/data.py:124
AST class for inline variable declaration expression.
Can be used in expressions like for loops.
Attributes
-
scope — Type: ScopeKind
-
visibility — Type: VisibilityKind
-
kind — Type: ASTKind
-
mutability — Type: MutabilityKind
-
name — Type: str
-
type_ — Type: DataType
-
value — Type: Expr
Methods
-
__init__ — Initialize the VarExprAST instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure of the object.