类 ASTAppender


  • public class ASTAppender
    extends Object
    Appends child nodes to a parent efficiently.
    作者:
    Joshua Davis
    • 构造器概要

      构造器 
      构造器 说明
      ASTAppender​(antlr.ASTFactory factory, antlr.collections.AST parent)
      Builds an appender using the given factory and parent
    • 构造器详细资料

      • ASTAppender

        public ASTAppender​(antlr.ASTFactory factory,
                           antlr.collections.AST parent)
        Builds an appender using the given factory and parent
        参数:
        factory - The AST factory
        parent - The AST parent
    • 方法详细资料

      • append

        public antlr.collections.AST append​(int type,
                                            String text,
                                            boolean appendIfEmpty)
        Append a new child to parent using the given node type and text, but only if the text is non-empty
        参数:
        type - The node type
        text - The node text
        appendIfEmpty - Should we do the append if the text is empty?
        返回:
        The generated AST node; may return null
      • append

        public antlr.collections.AST append​(antlr.collections.AST child)
        Append the given AST node as a child of parent.
        参数:
        child - The child to append
        返回:
        Returns what was passed in.