API reference
python:astx:astx.EnumDeclStmt
class EnumDeclStmt
EnumDeclStmt(name: str, attributes: Iterable[VariableDeclaration] | ASTNodes[VariableDeclaration] = [], visibility: VisibilityKind = VisibilityKind.public, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/classes.py:359
Declared as: python:astx:astx.classes.EnumDeclStmt
AST class for enum declaration.
Attributes
-
kind — Type: ASTKind
-
name — Type: str
-
attributes — Type: ASTNodes[VariableDeclaration]
-
visibility — Type: VisibilityKind
Methods
-
__init__ — Initialize EnumDeclStmt instance.
-
__str__ — Return a string that represents the object.
-
get_struct — Return the AST structure of the object.