Class Node

    • Field Detail

      • parent

        private Node parent
      • firstChild

        private Node firstChild
      • lastChild

        private Node lastChild
      • prev

        private Node prev
      • next

        private Node next
      • sourceSpans

        private java.util.List<SourceSpan> sourceSpans
    • Constructor Detail

      • Node

        public Node()
    • Method Detail

      • accept

        public abstract void accept​(Visitor visitor)
      • getNext

        public Node getNext()
      • getPrevious

        public Node getPrevious()
      • getFirstChild

        public Node getFirstChild()
      • getLastChild

        public Node getLastChild()
      • getParent

        public Node getParent()
      • setParent

        protected void setParent​(Node parent)
      • appendChild

        public void appendChild​(Node child)
      • prependChild

        public void prependChild​(Node child)
      • unlink

        public void unlink()
      • insertAfter

        public void insertAfter​(Node sibling)
      • insertBefore

        public void insertBefore​(Node sibling)
      • getSourceSpans

        public java.util.List<SourceSpan> getSourceSpans()
        Returns:
        the source spans of this node if included by the parser, an empty list otherwise
        Since:
        0.16.0
      • setSourceSpans

        public void setSourceSpans​(java.util.List<SourceSpan> sourceSpans)
        Replace the current source spans with the provided list.
        Parameters:
        sourceSpans - the new source spans to set
        Since:
        0.16.0
      • addSourceSpan

        public void addSourceSpan​(SourceSpan sourceSpan)
        Add a source span to the end of the list.
        Parameters:
        sourceSpan - the source span to add
        Since:
        0.16.0
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringAttributes

        protected java.lang.String toStringAttributes()