GoalOccurrences.java 文件源码

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

项目:exterminator 作者:
public GoalOccurrences(CoqFTParser parser, CoqParser.Goal_occurrencesContext ctx) {
    super(parser, ctx);

    this.idents = new ArrayList<>();
    this.atOccurrences = new HashMap<>();
    for(int i = 0; i < ctx.getChildCount(); i++) {
        ParseTree child = ctx.getChild(i);
        if(child instanceof CoqParser.IdentContext) {
            idents.add(new Ident(parser, (CoqParser.IdentContext)child));
        } else if(child instanceof CoqParser.At_occurrencesContext && child != ctx.selectOccurrences) {
            Occurrences o = new Occurrences(parser, ((CoqParser.At_occurrencesContext)child).occurrences());
            atOccurrences.put(idents.get(idents.size() - 1), o);
        }
    }

    this.isStar = ctx.star != null;
    this.hasSelect = ctx.TOK_SELECT() != null;
    this.hasSelectStar = ctx.selectStar != null;

    if(ctx.selectOccurrences != null) {
        this.selectAtOccurrences = new Occurrences(parser, ctx.selectOccurrences.occurrences());
    } else {
        this.selectAtOccurrences = null;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号