IdentifyOversizeLists.java 文件源码

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

项目:codebuff 作者:
public void visitNonSingletonWithSeparator(ParserRuleContext ctx,
                                           List<? extends ParserRuleContext> siblings,
                                           Token separator)
{
    boolean oversize = isOversizeList(ctx, siblings, separator);
    Map<Token, Pair<Boolean, Integer>> tokenInfo =
        getInfoAboutListTokens(ctx, tokens, tokenToNodeMap, siblings, oversize);

    // copy sibling list info for associated tokens into overall list
    // but don't overwrite existing so that most general (largest construct)
    // list information is use/retained (i.e., not overwritten).
    for (Token t : tokenInfo.keySet()) {
        if ( !tokenToListInfo.containsKey(t) ) {
            tokenToListInfo.put(t, tokenInfo.get(t));
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号