Elsa Ast Type Function

From MozillaWiki
Revision as of 21:12, 13 December 2007 by Hendrik Tews (talk | contribs) (where to find the parameters)
Jump to navigation Jump to 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.

Comments

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

Field content

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

Location

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.

Parameters

To access the variable nodes for the function parameters follow funcType.function_type_params.