Esempio n. 1
0
 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);
 }
Esempio n. 2
0
        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);
        }