API reference
python:astx:astx.FunctionPrototype
class FunctionPrototype
FunctionPrototype(name: str, args: Arguments, return_type: AnyType, scope: ScopeKind = ScopeKind.global_, visibility: VisibilityKind = VisibilityKind.public, loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/callables.py:287
Declared as: python:astx:astx.callables.FunctionPrototype
AST class for function prototype declaration.
Attributes
-
loc — Source coordinates attached to this node.; Type: SourceLocation
-
kind — Kind of value or operation.; Type: ASTKind
-
name — Name identifying this declaration.; Type: str
-
args — Declared or supplied call arguments.; Type: Arguments
-
return_type — Declared result type.; Type: AnyType
-
scope — Scope used to resolve names.; Type: ScopeKind
-
visibility — Visibility.; Type: VisibilityKind
-
comment — Type: str
-
parent — Type: Optional[ASTNodes]
-
ref — Type: str
Methods
-
__init__ — Initialize the FunctionPrototype instance.
-
get_struct — Get the AST structure that represent the object.