use of ast.Expression.BlockContent in project L42 by ElvisResearchGroup.
the class ToAst method visitRoundBlockAux.
private Expression visitRoundBlockAux(ParserRuleContext ctx, DocsOptContext docsOpt, List<BbContext> bB, ETopContext eTop) {
Doc doc = parseDoc(docsOpt);
List<BlockContent> contents = new ArrayList<BlockContent>();
for (BbContext b : bB) {
List<VarDec> decs = new ArrayList<VarDec>();
for (DContext d : b.d()) {
decs.add(parseVDec(d));
}
assert b.ks() != null;
List<Catch> _catch = parseKs(b.ks());
contents.add(new BlockContent(decs, _catch));
}
Expression inner = eTop.accept(this);
return new Expression.RoundBlock(position(ctx), doc, inner, contents);
}
Aggregations