Class ChunkerInvoke

All Implemented Interfaces:
ChunkerInvokable, HasScope, IsScope, Node

public class ChunkerInvoke extends AbstractChunkerInvokable implements IsScope
  • Constructor Details

    • ChunkerInvoke

      public ChunkerInvoke(int id)
    • ChunkerInvoke

      public ChunkerInvoke(Chunker p, int id)
  • Method Details

    • jjtAccept

      public Object jjtAccept(ChunkerVisitor visitor, Object data)
      Accept the visitor.
      Specified by:
      jjtAccept in interface Node
      jjtAccept in class SimpleNode
    • getName

      public String getName()
      Specified by:
      getName in interface IsScope
    • setName

      public void setName(String name)
    • startArguments

      public void startArguments()
    • endArguments

      public void endArguments()
    • jjtAddChild

      public void jjtAddChild(Node n, int i)
      Description copied from interface: Node
      This method tells the node to add its argument to the node's list of children.
      Specified by:
      jjtAddChild in interface Node
      jjtAddChild in class SimpleNode
    • indexOfArgument

      public int indexOfArgument(Node node)
    • isCursorInArguments

      public boolean isCursorInArguments(int offset)
    • isCursorOnName

      public boolean isCursorOnName(int offset)
    • isAutocompleteTerminal

      public boolean isAutocompleteTerminal()
      Description copied from interface: Node
      Overridden manually for nodes who can "have a cursor on them" with respect to autocomplete. If any part of an ast node collects tokens that are "leaf nodes" (i.e. there are cursor positions where your ast node will be the most derived child found), then it is a candidate to be a terminal autocomplete source. When encountering whitespace or . or , we might search left or right for interesting nodes, and those ast nodes who are autocomplete terminal will be preferred over their children. The normal search algorithm is a standard binary tree search, where the next-leftmost|rightmost leaf node is transversed. When an `isAutocompleteTerminal() == true` node is found, however, we stop there to continue searches.
      Specified by:
      isAutocompleteTerminal in interface Node
      true for nodes that the visitor in ChunkerCompleter will visit and generate results. This is not needed for always-terminal nodes, like ChunkerNum or ChunkerIdent, but is needed by terminal-nodes-with-children, like ChunkerInvoke or ChunkerNew.