Changes in / [9d23c2d:20de6fb]


Ignore:
Location:
src
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Bitfield.hpp

    r9d23c2d r20de6fb  
    5757};
    5858
    59 template<typename T>
    60 inline bool operator== ( const bitfield<T> & a, const bitfield<T> & b ) {
    61         return a.val == b.val;
    62 }
    63 
    64 template<typename T>
    65 inline bool operator!= ( const bitfield<T> & a, const bitfield<T> & b ) {
    66         return !(a == b);
    67 }
     59/// Adds default printing operator to a bitfield type.
     60/// Include in definition to add print function, requires other bitfield operators.
     61/// @param N  Number of bits in bitfield
     62#define MakeBitfieldPrint( N ) \
     63        static const char* Names[]; \
     64 \
     65        void print( std::ostream & os ) const { \
     66                if ( (*this).any() ) { \
     67                        for ( unsigned int i = 0; i < N; i += 1 ) { \
     68                                if ( (*this)[i] ) { \
     69                                        os << Names[i] << ' '; \
     70                                } \
     71                        } \
     72                } \
     73        }
    6874
    6975// Local Variables: //
  • src/AST/Node.cpp

    r9d23c2d r20de6fb  
    2626#include "Type.hpp"
    2727#include "TypeSubstitution.hpp"
    28 
    29 #include "Print.hpp"
    3028
    3129template< typename node_t, enum ast::Node::ref_type ref_t >
     
    4947
    5048std::ostream & ast::operator<< ( std::ostream & out, const ast::Node * node ) {
    51         print(out, node);
     49        (void)node;
     50        #warning unimplemented
     51        assertf(false, "Unimplemented");
    5252        return out;
    5353}
  • src/AST/module.mk

    r9d23c2d r20de6fb  
    2424        AST/LinkageSpec.cpp \
    2525        AST/Node.cpp \
    26         AST/Print.cpp \
    2726        AST/Stmt.cpp \
    2827        AST/Type.cpp \
  • src/Makefile.in

    r9d23c2d r20de6fb  
    169169        AST/Expr.$(OBJEXT) AST/Init.$(OBJEXT) \
    170170        AST/LinkageSpec.$(OBJEXT) AST/Node.$(OBJEXT) \
    171         AST/Print.$(OBJEXT) AST/Stmt.$(OBJEXT) AST/Type.$(OBJEXT) \
     171        AST/Stmt.$(OBJEXT) AST/Type.$(OBJEXT) \
    172172        AST/TypeSubstitution.$(OBJEXT)
    173173am__objects_2 = CodeGen/CodeGenerator.$(OBJEXT) \
     
    577577        AST/LinkageSpec.cpp \
    578578        AST/Node.cpp \
    579         AST/Print.cpp \
    580579        AST/Stmt.cpp \
    581580        AST/Type.cpp \
     
    742741        AST/$(DEPDIR)/$(am__dirstamp)
    743742AST/Node.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
    744 AST/Print.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
    745743AST/Stmt.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
    746744AST/Type.$(OBJEXT): AST/$(am__dirstamp) AST/$(DEPDIR)/$(am__dirstamp)
     
    11741172@AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/LinkageSpec.Po@am__quote@
    11751173@AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Node.Po@am__quote@
    1176 @AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Print.Po@am__quote@
    11771174@AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Stmt.Po@am__quote@
    11781175@AMDEP_TRUE@@am__include@ @am__quote@AST/$(DEPDIR)/Type.Po@am__quote@
Note: See TracChangeset for help on using the changeset viewer.