Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.cc

    r3be261a rafc1045  
    222222}
    223223
     224OffsetPackExpr::OffsetPackExpr( StructInstType *type_, Expression *aname_ ) : Expression( aname_ ), type( type_ ) {
     225        add_result( new ArrayType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0, false, false ) );
     226}
     227
     228OffsetPackExpr::OffsetPackExpr( const OffsetPackExpr &other ) : Expression( other ), type( maybeClone( other.type ) ) {}
     229
     230OffsetPackExpr::~OffsetPackExpr() { delete type; }
     231
     232void OffsetPackExpr::print( std::ostream &os, int indent ) const {
     233        os << std::string( indent, ' ' ) << "Offset pack expression on ";
     234
     235        if ( type ) {
     236                type->print(os, indent + 2);
     237        } else {
     238                os << "<NULL>";
     239        }
     240
     241        os << std::endl;
     242        Expression::print( os, indent );
     243}
     244
    224245AttrExpr::AttrExpr( Expression *attr, Expression *expr_, Expression *_aname ) :
    225246                Expression( _aname ), attr( attr ), expr(expr_), type(0), isType(false) {
Note: See TracChangeset for help on using the changeset viewer.