Elsa Ast Type Function

From MozillaWiki
Jump to: navigation, search

Function is a Ast type node (without any subtype nodes). Function is a record.

Record Data Fields

Subtype Nodes (Subclasses)

Function has no subtype nodes.


Please make your modifications only below, because the content above will be regenerated automatically from time to time.

Field content

Name. Parameters can be accessed easier via funcType.function_type_params.
nonempty only for constructors: member initialization list
true, if compiler generated function (default constructor of similar)


Function nodes don't have a sourceLoc field, but the syntax nodes above Function nodes do.

Function name

To obtain the function name go to the declarator via nameAndParams and extract the name of the declarator_var. Variable name and declarator variable are always present, as far as I can tell.


To access the variable nodes for the function parameters follow funcType.function_type_params. For nonstatic methods, this contains the this pointer, which actually has a reference type (with variable_name __receiver).