astx.packages
astx.packages
Source: packages/astx/src/astx/packages.py
title: Define ASTx for more broader scope.Classes
Target(Expr)
title: Define the Architecture target for the program.
attributes:
datalayout:
type: str
triple:
type: strMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructModule(Block)
title: AST main expression class.
attributes:
kind:
type: ASTKind
name:
type: strMethods
block(self) -> list[AST]
title: Define an alias for self.nodes.
returns:
type: list[AST]get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructPackage(ASTNodes)
title: AST class for Package.
attributes:
name:
type: str
modules:
type: list[Module]
packages:
type: list[Package]Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructProgram(Package)
title: AST class for Program.
attributes:
name:
type: str
modules:
type: list[Module]
packages:
type: list[Package]
target:
type: TargetAliasExpr(Expr)
title: Represents an alias in an import statement.
attributes:
kind:
type: ASTKind
name:
type: str
asname:
type: strMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the alias.
parameters:
simplified:
type: bool
returns:
type: ReprStructImportStmt(StatementType)
title: Represents an import statement.
attributes:
kind:
type: ASTKind
names:
type: list[AliasExpr]Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the import statement.
parameters:
simplified:
type: bool
returns:
type: ReprStructImportFromStmt(StatementType)
title: Represents an import-from statement.
attributes:
kind:
type: ASTKind
module:
type: Optional[str]
names:
type: list[AliasExpr]
level:
type: intMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the import-from statement.
parameters:
simplified:
type: bool
returns:
type: ReprStructImportExpr(Expr)
title: Represents an import operation as an expression.
attributes:
kind:
type: ASTKind
names:
type: list[AliasExpr]Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the import expression.
parameters:
simplified:
type: bool
returns:
type: ReprStructImportFromExpr(Expr)
title: Represents a 'from ... import ...' operation as an expression.
attributes:
kind:
type: ASTKind
module:
type: str
names:
type: list[AliasExpr]
level:
type: intMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the import-from expression.
parameters:
simplified:
type: bool
returns:
type: ReprStruct