Module dev.civl.abc

Interface FunctionCallNode

All Superinterfaces:
ASTNode, ExpressionNode, ForLoopInitializerNode, InitializerNode, SizeableNode

public interface FunctionCallNode extends ExpressionNode
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.

  • 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

      void setFunction(ExpressionNode function)
      Sets the value returned by getFunction().
      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

      ExpressionNode getContextArgument(int index)
      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

      ExpressionNode getArgument(int index)
      Returns the index-th argument, indexed from 0.
      Returns:
      the index-th actual argument
    • setContextArgument

      void setContextArgument(int index, ExpressionNode value)
      Sets the index-th execution context argument.
      Parameters:
      index - nonnegative integer
      value - expression node to use as index-th actual execution context argument
    • setArgument

      void setArgument(int index, ExpressionNode value)
      Sets the index-th argument.
      Parameters:
      index - nonnegative integer
      value - expression node to use as index-th actual argument
    • copy

      Description copied from interface: ASTNode
      Returns 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:
      copy in interface ASTNode
      Specified by:
      copy in interface ExpressionNode
      Specified by:
      copy in interface ForLoopInitializerNode
      Specified by:
      copy in interface InitializerNode
      Specified by:
      copy in interface SizeableNode
      Returns:
      deep copy of this node
    • getScopeList

      SequenceNode<ExpressionNode> getScopeList()
      Returns the actual scope parameter names used when instantiating a scope-generic functions, as in finvalid input: '<'s1,s2>(...) This will be deprecated soon.
      Returns:
      the scope parameters
    • setContextArguments

      void setContextArguments(SequenceNode<ExpressionNode> arguments)
      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

      void setArguments(SequenceNode<ExpressionNode> arguments)
      Updates the actual parameters of the function call node.
      Parameters:
      arguments - The actual parameters to be used to update the function call node.