Changeset 033ff37 for src/SynTree/Expression.h
- Timestamp:
- Jul 26, 2019, 6:39:42 AM (5 years ago)
- 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:
- be53b87
- Parents:
- f673c13c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.h
rf673c13c r033ff37 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Feb 18 18:29:51201913 // Update Count : 4912 // Last Modified On : Thu Jul 25 22:21:44 2019 13 // Update Count : 50 14 14 // 15 15 … … 463 463 }; 464 464 465 /// AttrExpr represents an @attribute expression (like sizeof, but user-defined)466 class AttrExpr : public Expression {467 public:468 Expression * attr;469 Expression * expr;470 Type * type;471 bool isType;472 473 AttrExpr(Expression * attr, Expression * expr );474 AttrExpr( const AttrExpr & other );475 AttrExpr( Expression * attr, Type * type );476 virtual ~AttrExpr();477 478 Expression * get_attr() const { return attr; }479 void set_attr( Expression * newValue ) { attr = newValue; }480 Expression * get_expr() const { return expr; }481 void set_expr( Expression * newValue ) { expr = newValue; }482 Type * get_type() const { return type; }483 void set_type( Type * newValue ) { type = newValue; }484 bool get_isType() const { return isType; }485 void set_isType( bool newValue ) { isType = newValue; }486 487 virtual AttrExpr * clone() const override { return new AttrExpr( * this ); }488 virtual void accept( Visitor & v ) override { v.visit( this ); }489 virtual void accept( Visitor & v ) const override { v.visit( this ); }490 virtual Expression * acceptMutator( Mutator & m ) override { return m.mutate( this ); }491 virtual void print( std::ostream & os, Indenter indent = {} ) const override;492 };493 494 465 /// LogicalExpr represents a short-circuit boolean expression (&& or ||) 495 466 class LogicalExpr : public Expression {
Note: See TracChangeset
for help on using the changeset viewer.