- Timestamp:
- Jun 20, 2019, 6:50:42 PM (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:
- 9af00d23
- Parents:
- 234b1cb
- Location:
- src/AST
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.hpp
r234b1cb rb8524ca 248 248 AddressExpr( const CodeLocation & loc, const Expr * a ); 249 249 250 /// Generate AddressExpr wrapping given expression at same location 251 AddressExpr( const Expr * a ) : AddressExpr( a->location, a ) {} 252 250 253 const Expr * accept( Visitor & v ) const override { return v.visit( this ); } 251 254 private: … … 281 284 /// Cast-to-void 282 285 CastExpr( const CodeLocation & loc, const Expr * a, GeneratedFlag g = GeneratedCast ); 286 287 /// Wrap a cast expression around an existing expression (always generated) 288 CastExpr( const Expr * a, const Type * to ) : CastExpr( a->location, a, to, GeneratedCast ) {} 289 290 /// Wrap a cast-to-void expression around an existing expression (always generated) 291 CastExpr( const Expr * a ) : CastExpr( a->location, a, GeneratedCast ) {} 283 292 284 293 const Expr * accept( Visitor & v ) const override { return v.visit( this ); } -
src/AST/Node.hpp
r234b1cb rb8524ca 17 17 18 18 #include <cassert> 19 #include <cstddef> // for nullptr_t 19 20 #include <iosfwd> 20 21 #include <type_traits> // for remove_reference … … 181 182 } 182 183 184 ptr_base & operator=( std::nullptr_t ) { 185 if ( node ) _dec(node); 186 node = nullptr; 187 return *this; 188 } 189 183 190 ptr_base & operator=( const ptr_base & o ) { 184 191 assign(o.node); -
src/AST/Stmt.hpp
r234b1cb rb8524ca 61 61 CompoundStmt( CompoundStmt&& o ) = default; 62 62 63 void push_back( Stmt * s ) { kids.emplace_back( s ); }64 void push_front( Stmt * s ) { kids.emplace_front( s ); }63 void push_back( const Stmt * s ) { kids.emplace_back( s ); } 64 void push_front( const Stmt * s ) { kids.emplace_front( s ); } 65 65 66 66 const CompoundStmt * accept( Visitor & v ) const override { return v.visit( this ); }
Note: See TracChangeset
for help on using the changeset viewer.