Changeset f77f12e2 for src/main.cc


Ignore:
Timestamp:
Apr 11, 2016, 5:59:36 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
7a69460
Parents:
f326f99
Message:

tweak output in case of error with -y flag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rf326f99 rf77f12e2  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Thu Mar 31 14:00:12 2016
     12// Last Modified On : Mon Apr 11 17:49:38 2016
    1313// Update Count     : 200
    1414//
     
    5656
    5757static void parse( FILE * input, LinkageSpec::Type t, bool shouldExit = false );
    58 static void dump( std::list< Declaration * > & translationUnit );
     58static void dump( std::list< Declaration * > & translationUnit, std::ostream & out = std::cout );
    5959
    6060bool
     
    308308        } catch ( SemanticError &e ) {
    309309                if ( errorp ) {
    310                         dump( translationUnit );
     310                        std::cerr << "---AST at error:---" << std::endl;
     311                        dump( translationUnit, std::cerr );
     312                        std::cerr << std::endl << "---End of AST, begin error message:---\n" << std::endl;
    311313                }
    312314                e.print( std::cerr );
     
    348350}
    349351
    350 static void dump( std::list< Declaration * > & translationUnit ) {
     352static void dump( std::list< Declaration * > & translationUnit, std::ostream & out ) {
    351353        std::list< Declaration * > decls;
    352354        if ( noprotop ) {
     
    357359        }
    358360
    359         printAll( decls, std::cout );
     361        printAll( decls, out );
    360362        deleteAll( translationUnit );
    361363}
Note: See TracChangeset for help on using the changeset viewer.