API reference
python:astx:astx.classes.StructDeclStmt.__init__
method __init__
__init__(name: str, attributes: Iterable[VariableDeclaration] | ASTNodes[VariableDeclaration] = [], decorators: Iterable[Expr] | ASTNodes[Expr] = [], methods: Iterable[FunctionDef] | ASTNodes[FunctionDef] = [], visibility: VisibilityKind = VisibilityKind.public, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None) -> None
Source: packages/astx/src/astx/classes.py:417
Initialize StructDeclStmt instance.
Parameters
-
name — Name identifying the declaration or operation.; Type: str
-
attributes — Attributes.; Type: Iterable[VariableDeclaration] | ASTNodes[VariableDeclaration]
-
decorators — Decorators.; Type: Iterable[Expr] | ASTNodes[Expr]
-
methods — Methods.; Type: Iterable[FunctionDef] | ASTNodes[FunctionDef]
-
visibility — Visibility.; Type: VisibilityKind
-
loc — Source coordinates associated with the node.; Type: SourceLocation
-
parent — Parent node or enclosing scope.; Type: Optional[ASTNodes]
Returns
Type: None