Ignore:
Timestamp:
Apr 3, 2018, 11:13:10 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
92fea32
Parents:
3d2b7bc
Message:

Add StaticAssertDecl? node

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.cc

    r3d2b7bc rf6e3e34  
    8181
    8282
     83StaticAssertDecl::StaticAssertDecl( Expression * condition, ConstantExpr * message ) : Declaration( "", Type::StorageClasses(), LinkageSpec::C ), condition( condition ), message( message )  {
     84}
     85
     86StaticAssertDecl::StaticAssertDecl( const StaticAssertDecl & other ) : Declaration( other ), condition( maybeClone( other.condition ) ), message( maybeClone( other.message ) )  {
     87}
     88
     89StaticAssertDecl::~StaticAssertDecl() {
     90        delete condition;
     91        delete message;
     92}
     93
     94void StaticAssertDecl::print( std::ostream &os, Indenter indent ) const {
     95        os << "Static Assert with condition: ";
     96        condition->print( os, indent+1 );
     97        os << std::endl << indent << "and message: ";
     98        message->print( os, indent+1 );
     99os << std::endl;
     100}
     101
     102void StaticAssertDecl::printShort( std::ostream &os, Indenter indent ) const {
     103        print( os, indent );
     104}
     105
    83106// Local Variables: //
    84107// tab-width: 4 //
Note: See TracChangeset for help on using the changeset viewer.