astx.classes
astx.classes
Source: packages/astx/src/astx/classes.py
title: Module for classes definitions/declarations.Classes
ClassDeclStmt(StatementType)
title: AST class for class declaration.
attributes:
kind:
type: ASTKind
name:
type: str
bases:
type: ASTNodes[Expr]
decorators:
type: ASTNodes[Expr]
visibility:
type: VisibilityKind
is_abstract:
type: bool
metaclass:
type: Optional[Expr]
attributes:
type: ASTNodes[VariableDeclaration]
methods:
type: ASTNodes[FunctionDef]Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructClassDefStmt(ClassDeclStmt)
title: AST class for class definition, including attributes and methods.
attributes:
name:
type: str
bases:
type: ASTNodes[Expr]
decorators:
type: ASTNodes[Expr]
visibility:
type: VisibilityKind
is_abstract:
type: bool
metaclass:
type: Optional[Expr]
attributes:
type: ASTNodes[VariableDeclaration]
methods:
type: ASTNodes[FunctionDef]
kind:
type: ASTKind
body:
type: BlockMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructEnumDeclStmt(StatementType)
title: AST class for enum declaration.
attributes:
kind:
type: ASTKind
name:
type: str
attributes:
type: ASTNodes[VariableDeclaration]
visibility:
type: VisibilityKindMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructStructDeclStmt(StatementType)
title: AST class for struct declaration.
attributes:
kind:
type: ASTKind
name:
type: str
attributes:
type: ASTNodes[VariableDeclaration]
visibility:
type: VisibilityKind
decorators:
type: ASTNodes[Expr]
methods:
type: ASTNodes[FunctionDef]Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructStructDefStmt(StructDeclStmt)
title: AST class for struct definition.
attributes:
name:
type: str
attributes:
type: ASTNodes[VariableDeclaration]
visibility:
type: VisibilityKind
decorators:
type: ASTNodes[Expr]
methods:
type: ASTNodes[FunctionDef]
kind:
type: ASTKindMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStruct