Visitor.java 文件源码

java
阅读 26 收藏 0 点赞 0 评论 0

项目:ts-swift-transpiler 作者:
public String visitChildren(RuleNode node, List<Integer> withoutNodes) {
    if(node == null) return "";
    String result = this.defaultResult();
    int n = node.getChildCount();

    for(int i = 0; i < n && this.shouldVisitNextChild(node, result); ++i) {
        if(withoutNodes != null && withoutNodes.contains(i)) continue;
        ParseTree c = node.getChild(i);
        String childResult = c instanceof TerminalNode ? printTerminalNode((TerminalNode) c) : c.accept(this);
        result = this.aggregateResult(result, childResult);
    }

    return result;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号