- All Superinterfaces:
ASTNode,ExpressionNode,ForLoopInitializerNode,InitializerNode,SizeableNode
Node representing a function call. The children node include the expression
of function type and the sequence of actual arguments.
Note: the order of the children nodes is unspecified. Use the specific
methods (e.g., setFunction(ExpressionNode)) to read or change a
child node.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.ASTNode
ASTNode.NodeKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.expression.ExpressionNode
ExpressionNode.ExpressionKind -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a deep copy of this AST node.getArgument(int index) Returns the index-th argument, indexed from 0.Returns the arguments of this function call node, which is a sequence node of expressions.getContextArgument(int index) Returns the index-th execution context argument, indexed from 0.The function being called.intReturns the number of actual arguments occurring in this function call.intReturns the number of actual execution context arguments occurring in this function call.Returns the actual scope parameter names used when instantiating a scope-generic functions, as infinvalid input: '<'s1,s2>(...)This will be deprecated soon.voidsetArgument(int index, ExpressionNode value) Sets the index-th argument.voidsetArguments(SequenceNode<ExpressionNode> arguments) Updates the actual parameters of the function call node.voidsetContextArgument(int index, ExpressionNode value) Sets the index-th execution context argument.voidsetContextArguments(SequenceNode<ExpressionNode> arguments) Updates the actual execution context parameters of the function call node.voidsetFunction(ExpressionNode function) Sets the value returned bygetFunction().Methods inherited from interface dev.civl.abc.ast.node.IF.ASTNode
addAllTransformAnnotations, addTransformAnnotation, child, childIndex, children, diff, equiv, getAttribute, getOwner, getScope, getSource, id, keepOnly, nextDFS, nodeKind, numChildren, parent, prettyPrint, prettyRepresentation, prettyRepresentation, print, remove, removeChild, removeTransformAnnotation, setAttribute, setChild, setId, setOwner, setScope, toString, transformAnnotationsMethods inherited from interface dev.civl.abc.ast.node.IF.expression.ExpressionNode
addConversion, expressionKind, getConversion, getConvertedType, getInitialType, getNumConversions, isConstantExpression, isLvalue, removeConversions, setInitialTypeMethods inherited from interface dev.civl.abc.ast.node.IF.declaration.InitializerNode
isSideEffectFreeMethods inherited from interface dev.civl.abc.ast.node.IF.expression.SizeableNode
getType
-
Method Details
-
getFunction
ExpressionNode getFunction()The function being called.- Returns:
- the expression of function type which evaluates to the function being called; the most common case is an identifier expression giving the name of a function
-
setFunction
Sets the value returned bygetFunction().- Parameters:
function- the expression of function type which evaluates to the function being called; the most common case is an identifier expression giving the name of a function
-
getNumberOfContextArguments
int getNumberOfContextArguments()Returns the number of actual execution context arguments occurring in this function call.- Returns:
- the number of actual execution context arguments
-
getNumberOfArguments
int getNumberOfArguments()Returns the number of actual arguments occurring in this function call.- Returns:
- the number of actual arguments
-
getContextArgument
Returns the index-th execution context argument, indexed from 0.- Returns:
- the index-th actual execution context argument
-
getArguments
SequenceNode<ExpressionNode> getArguments()Returns the arguments of this function call node, which is a sequence node of expressions.- Returns:
- the arguments of this function call node
-
getArgument
Returns the index-th argument, indexed from 0.- Returns:
- the index-th actual argument
-
setContextArgument
Sets the index-th execution context argument.- Parameters:
index- nonnegative integervalue- expression node to use as index-th actual execution context argument
-
setArgument
Sets the index-th argument.- Parameters:
index- nonnegative integervalue- expression node to use as index-th actual argument
-
copy
FunctionCallNode copy()Description copied from interface:ASTNodeReturns a deep copy of this AST node. The node and all of its descendants will be cloned. The cloning does not copy analysis or attribute information.- Specified by:
copyin interfaceASTNode- Specified by:
copyin interfaceExpressionNode- Specified by:
copyin interfaceForLoopInitializerNode- Specified by:
copyin interfaceInitializerNode- Specified by:
copyin interfaceSizeableNode- Returns:
- deep copy of this node
-
getScopeList
SequenceNode<ExpressionNode> getScopeList()Returns the actual scope parameter names used when instantiating a scope-generic functions, as infinvalid input: '<'s1,s2>(...)This will be deprecated soon.- Returns:
- the scope parameters
-
setContextArguments
Updates the actual execution context parameters of the function call node.- Parameters:
arguments- The actual execution context parameters to be used to update the function call node.
-
setArguments
Updates the actual parameters of the function call node.- Parameters:
arguments- The actual parameters to be used to update the function call node.
-