Documentation of 'org.python.antlr.PythonTree' Java class
PythonTree
org.python.antlr

Class PythonTree

    • Field Detail

      • from_future_checked

        public boolean from_future_checked
    • Constructor Detail

      • PythonTree

        public PythonTree()
      • PythonTree

        public PythonTree(PyType subType)
      • PythonTree

        public PythonTree(org.antlr.runtime.Token t)
      • PythonTree

        public PythonTree(int ttype,
                          org.antlr.runtime.Token t)
    • Method Detail

      • getNode

        public org.antlr.runtime.tree.CommonTree getNode()
      • getToken

        public org.antlr.runtime.Token getToken()
      • isNil

        public boolean isNil()
      • getAntlrType

        public int getAntlrType()
      • getText

        public java.lang.String getText()
      • getLineno

        public int getLineno()
      • getCol_offset

        public int getCol_offset()
      • getTokenStartIndex

        public int getTokenStartIndex()
      • setTokenStartIndex

        public void setTokenStartIndex(int index)
      • getTokenStopIndex

        public int getTokenStopIndex()
      • setTokenStopIndex

        public void setTokenStopIndex(int index)
      • getCharStartIndex

        public int getCharStartIndex()
      • setCharStartIndex

        public void setCharStartIndex(int index)
      • getCharStopIndex

        public int getCharStopIndex()
      • setCharStopIndex

        public void setCharStopIndex(int index)
      • getChildIndex

        public int getChildIndex()
      • setParent

        public void setParent(PythonTree t)
      • setChildIndex

        public void setChildIndex(int index)
      • dottedNameListToString

        public static java.lang.String dottedNameListToString(java.util.List<Name> names)
        Converts a list of Name to a dotted-name string. Because leading dots are indexable identifiers (referring to parent directories in relative imports), a Name list may include leading dots, but not dots between names.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class PyObject
      • toStringTree

        public java.lang.String toStringTree()
      • accept

        public <R> R accept(VisitorIF<R> visitor)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • traverse

        public void traverse(VisitorIF<?> visitor)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getChildren

        public java.util.List<PythonTree> getChildren()
        Get the children internal List; note that if you directly mess with the list, do so at your own risk.
      • getFirstChildWithType

        public PythonTree getFirstChildWithType(int type)
      • getChildCount

        public int getChildCount()
      • addChild

        public void addChild(PythonTree t)
        Add t as child of this node. Warning: if t has no children, but child does and child isNil then this routine moves children to t via t.children = child.children; i.e., without copying the array.
      • addChildren

        public void addChildren(java.util.List<PythonTree> kids)
        Add all elements of kids list as children of this node
      • setChild

        public void setChild(int i,
                             PythonTree t)
      • deleteChild

        public java.lang.Object deleteChild(int i)
      • replaceChildren

        public void replaceChildren(int startChildIndex,
                                    int stopChildIndex,
                                    java.lang.Object t)
        Delete children from start to stop and replace with t even if t is a list (nil-root tree). num of children can increase or decrease. For huge child lists, inserting children can force walking rest of children to set their childindex; could be slow.
      • freshenParentAndChildIndexes

        public void freshenParentAndChildIndexes()
        Set the parent and child index values for all child of t
      • freshenParentAndChildIndexes

        public void freshenParentAndChildIndexes(int offset)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.