public object VisitBlockAST([NotNull] BlockASTContext context) { context.varDecl().ToList().ForEach(varDecl => Visit(varDecl)); context.constDecl().ToList().ForEach(constDecl => Visit(constDecl)); context.statement().ToList().ForEach(statement => Visit(statement)); return(null); }
public object VisitBlockAST([NotNull] BlockASTContext context) { context.varDecl().ToList().ForEach(varDecl => Visit(varDecl)); context.constDecl().ToList().ForEach(constDecl => Visit(constDecl)); List <Pair <string, IToken> > returnedTypes = new List <Pair <string, IToken> >(); context.statement().ToList().ForEach(statement => { var list = Visit(statement) as List <Pair <string, IToken> >; if (list != null) { returnedTypes.AddRange(list); } }); return(returnedTypes); }