use of boa.compiler.transforms.VisitorDesugar in project compiler by boalang.
the class TypeCheckingVisitor method visit.
/** {@inheritDoc} */
@Override
public void visit(final VisitorExpression n, final SymbolTable env) {
n.env = env;
n.getType().accept(this, env);
for (final Statement s : n.getBody().getStatements()) if (!(s instanceof VisitStatement))
throw new TypeCheckException(s, "only 'before' or 'after' visit statements are allowed inside visitor bodies");
visitorChecker.start(n);
n.getBody().accept(this, env);
n.type = n.getType().type;
final VisitorDesugar desugar = new VisitorDesugar();
desugar.start(n);
}
Aggregations