Interface Node

    • Method Detail

      • jjtOpen

        void jjtOpen()
        This method is called after the node has been made the current node. It indicates that child nodes can now be added to it.
      • jjtClose

        void jjtClose()
        This method is called after all the child nodes have been added.
      • jjtSetParent

        void jjtSetParent​(Node n)
        This pair of methods are used to inform the node of its parent.
      • jjtGetParent

        Node jjtGetParent()
      • jjtAddChild

        void jjtAddChild​(Node n,
                         int i)
        This method tells the node to add its argument to the node's list of children.
      • jjtInsertChild

        void jjtInsertChild​(Node n,
                            int i)
        This method inserts the specified node at the given index, shifting any existing items to the right.
      • jjtGetChild

        Node jjtGetChild​(int i)
        This method returns a child node. The children are numbered from zero, left to right.
      • jjtGetNumChildren

        int jjtGetNumChildren()
        Return the number of children the node has.
      • getId

        int getId()
      • jjtGetFirstToken

        Token jjtGetFirstToken()
      • jjtSetFirstToken

        void jjtSetFirstToken​(Token token)
      • jjtGetLastToken

        Token jjtGetLastToken()
      • jjtSetLastToken

        void jjtSetLastToken​(Token token)
      • tokens

        default io.deephaven.web.shared.fu.LinkedIterable<Token> tokens​(boolean strict)
      • tokensReversed

        default io.deephaven.web.shared.fu.LinkedIterable<Token> tokensReversed​(boolean strict)
      • addToken

        default void addToken​(Token token)
      • addToken

        void addToken​(Token token,
                      Node anchor)
      • rescope

        default Node rescope​(java.util.List<IsScope> scope)
      • setScope

        default void setScope​(java.util.List<IsScope> scope)
      • jjtAccept

        java.lang.Object jjtAccept​(ChunkerVisitor visitor,
                                   java.lang.Object data)
        Accept the visitor.
      • adopt

        void adopt​(Node node)
      • containsIndex

        default boolean containsIndex​(int i)
      • isChildOf

        default boolean isChildOf​(Node best)
      • toSource

        default java.lang.String toSource()
      • append

        default void append​(java.lang.StringBuilder b,
                            Token tok)
      • getEndIndex

        default int getEndIndex()
      • getStartIndex

        default int getStartIndex()
      • getChildren

        java.util.List<Node> getChildren()
      • isAutocompleteTerminal

        default boolean isAutocompleteTerminal()
        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.
        Returns:
        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.
      • isWellFormed

        boolean isWellFormed()
      • addChild

        default void addChild​(Node child)
      • addChild

        default void addChild​(Node child,
                              int index)
      • insertChild

        default void insertChild​(Node child,
                                 int index)
      • addScope

        default void addScope​(IsScope scope)
      • addScope

        default void addScope​(java.util.List<IsScope> scope)
      • maybeDetach

        default void maybeDetach()
      • removeChild

        void removeChild​(Node node)
      • indexOf

        int indexOf​(Node node)
      • asRange

        default io.deephaven.proto.backplane.script.grpc.DocumentRange.Builder asRange()
      • containsLines

        default boolean containsLines​(int winStartLine,
                                      int winEndLine)
      • contains

        default boolean contains​(io.deephaven.proto.backplane.script.grpc.Position pos)
      • findToken

        default Token findToken​(io.deephaven.proto.backplane.script.grpc.PositionOrBuilder requested)
      • distanceTo

        default int distanceTo​(int offset)