astx.callables
astx.callables
Source: packages/astx/src/astx/callables.py
title: Module for callable ASTx.Classes
Argument(Variable)
title: AST class for argument definition.
attributes:
kind:
type: ASTKind
mutability:
type: MutabilityKind
name:
type: str
type_:
type: DataType
default:
type: ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructArguments(ASTNodes[Argument])
title: AST class for argument definition.Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructFunctionCall(DataType)
title: AST class for function call.
attributes:
kind:
type: ASTKind
fn:
type: str
args:
type: Iterable[DataType]
type_:
type: DataTypeMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructFunctionPrototype(StatementType)
title: AST class for function prototype declaration.
attributes:
loc:
type: SourceLocation
kind:
type: ASTKind
name:
type: str
args:
type: Arguments
return_type:
type: AnyType
scope:
type: ScopeKind
visibility:
type: VisibilityKindMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Get the AST structure that represent the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructFunctionReturn(StatementType)
title: AST class for function `return` statement.
attributes:
kind:
type: ASTKind
value:
type: DataTypeMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructFunctionDef(StatementType)
title: AST class for function definition.
attributes:
kind:
type: ASTKind
prototype:
type: FunctionPrototype
body:
type: BlockMethods
name(self) -> str
title: Return the function prototype name.
returns:
type: strget_struct(self, simplified: bool=False) -> ReprStruct
title: Get the AST structure that represent the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructLambdaExpr(Expr)
title: AST class for lambda expressions.
attributes:
kind:
type: ASTKind
params:
type: Arguments
body:
type: ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the lambda expression.
parameters:
simplified:
type: bool
returns:
type: ReprStructFunctionAsyncDef(FunctionDef)
title: AST class for async function definition.
attributes:
kind:
type: ASTKind
prototype:
type: FunctionPrototype
body:
type: BlockMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Get the AST structure that represent the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructAwaitExpr(Expr)
title: AST class for AwaitExpr.
attributes:
kind:
type: ASTKind
value:
type: Optional[Expr]Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructYieldExpr(Expr)
title: AST class for YieldExpr.
attributes:
kind:
type: ASTKind
value:
type: Optional[Expr]Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructYieldStmt(StatementType)
title: AST class for yield statement.
attributes:
kind:
type: ASTKind
value:
type: Optional[Expr]Methods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStructYieldFromExpr(Expr)
title: AST class for YieldFromExpr.
attributes:
kind:
type: ASTKind
value:
type: ExprMethods
get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
simplified:
type: bool
returns:
type: ReprStruct