Capítulo 417 de 859
This class allows to define multiple overloaded versions of the same function. Depending on the parameters of the function call, the node picks the best-fit overloaded version.
Fn function definitions.Constructor
| Signature |
|---|
new FunctionOverloadingNode( functionNodes : Array.<function()>, …parametersNodes : Node ) |
Properties
| Property | Description |
|---|---|
.functionNodes : Array.<function()> | Array of Fn function definitions. |
.global : boolean | This node is marked as global. |
.parametersNodes : Array.<Node> | A list of parameter nodes. |
Methods
| Method | Description |
|---|---|
.generateNodeType( builder : NodeBuilder ) : string | This method is overwritten since the node type is inferred from the function's return type. |
.getCandidateFn( builder : NodeBuilder ) : FunctionNode | Returns the candidate function for the current parameters. |
.setup( builder : NodeBuilder ) : Node | Sets up the node for the current parameters. |