Changeset 21300d7 for src/AST/Print.hpp


Ignore:
Timestamp:
Jun 12, 2019, 4:06:37 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
462a7c7, d60780c
Parents:
aaeacf4 (diff), 6625727 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Print.hpp

    raaeacf4 r21300d7  
    1616#pragma once
    1717
    18 #include <iosfwd>
    19 #include <utility> // for forward
     18#include <iostream>
     19#include <utility>   // for forward
    2020
    2121#include "AST/Node.hpp"
     
    3232void printShort( std::ostream & os, const ast::Decl * node, Indenter indent = {} );
    3333
    34 inline void printShort( std::ostream & os, const ast::Decl * node, unsigned int indent ) {
    35     printShort( os, node, Indenter{ indent } );
     34/// Print a collection of items
     35template< typename Coll >
     36void printAll( std::ostream & os, const Coll & c, Indenter indent = {} ) {
     37    for ( const auto & i : c ) {
     38        if ( ! i ) continue;
     39       
     40        os << indent;
     41        print( os, i, indent );
     42        os << std::endl;
     43    }
    3644}
    3745
Note: See TracChangeset for help on using the changeset viewer.