- Timestamp:
- Jul 12, 2024, 3:30:06 PM (5 months ago)
- Branches:
- master
- Children:
- 76b507d
- Parents:
- 9c447e2
- Location:
- src/AST
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.cpp
r9c447e2 r0c327ce 284 284 // --- CountExpr 285 285 286 CountExpr::CountExpr( const CodeLocation & loc, const Expr * e ) 287 : Expr( loc, new BasicType( BasicKind::LongUnsignedInt) ), expr(e), type( nullptr ) {} 288 286 289 CountExpr::CountExpr( const CodeLocation & loc, const Type * t ) 287 : Expr( loc, new BasicType( BasicKind::LongUnsignedInt) ), type( t ) {}290 : Expr( loc, new BasicType( BasicKind::LongUnsignedInt) ), expr(nullptr), type( t ) {} 288 291 289 292 // --- AlignofExpr -
src/AST/Expr.hpp
r9c447e2 r0c327ce 496 496 class CountExpr final : public Expr { 497 497 public: 498 ptr<Expr> expr; 498 499 ptr<Type> type; 499 500 501 CountExpr( const CodeLocation & loc, const Expr * t ); 500 502 CountExpr( const CodeLocation & loc, const Type * t ); 501 503 -
src/AST/Pass.impl.hpp
r9c447e2 r0c327ce 1339 1339 maybe_accept( node, &CountExpr::result ); 1340 1340 } 1341 maybe_accept( node, &CountExpr::type ); 1341 if ( node->type ) { 1342 maybe_accept( node, &CountExpr::type ); 1343 } else { 1344 maybe_accept( node, &CountExpr::expr ); 1345 } 1342 1346 } 1343 1347 VISIT_END( Expr, node ); -
src/AST/Print.cpp
r9c447e2 r0c327ce 1146 1146 os << "Count Expression on: "; 1147 1147 ++indent; 1148 node->type->accept( *this ); 1148 if ( node->type ) node->type->accept( *this ); 1149 else safe_print( node->expr ); 1149 1150 --indent; 1150 1151 postprint( node );
Note: See TracChangeset
for help on using the changeset viewer.