An AST node representing a
function declaration, either for a regular function, a getter, or a setter.
The shape of this node is:
IFunctionNode IMetaTagsNode <-- getMetaTagsNode() INamespaceDecorationNode <-- getNamespaceNode() IKeywordNode <-- getKeywordNode() IKeywordNode <-- getAccessorKeywordNode() IExpressionNode <-- getNameExpressionNode() IContainerNode <-- getParametersContainerNode() IExpressionNode <-- getReturnTypeNode() IScopedNode <-- getScopedNode()
For example,
[Foo] [Bar] public function f(i:int, j:int = 0):void { ... } is represented as
IVariableNode IMetaTagsNode IMetaTagNode "Foo" IMetaTagNode "Bar" INamespaceDecorationNode "public" IKeywordNode "function" IIdentifierNode "f" IContainerNode IParameterNode IIdentifierNode "a" IIdentifierNode "*" IParameterNode IIdentifierNode "b" IIdentifierNode "int" INumericLiteralNode 0 IIdentifierNode "void" IScopedNode ...
If there is no metadata, the corresponding child node is not present.
If there is no namespace, the corresponding child node is not present.
For a getter or setter, there are two child nodes which are IKeywordNode, one for "function" and one for "get" or "set". For a plain function, the second keyword node is not present. If there are no parameters, there is an empty child IContainerNode.
If there is no return type, the corresponding child node is not present.