Changeset 37eef7a
- Timestamp:
- May 22, 2019, 1:36:01 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- d8938622, dd6d7c6
- Parents:
- 4073b16 (diff), 0f740d6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/proposals/vtable.md
r4073b16 r37eef7a 220 220 trait iterator(otype T, otype Item) { 221 221 bool has_next(T const &); 222 Item get_next(T const *);222 Item get_next(T &); 223 223 } 224 224 -
src/AST/Convert.cpp
r4073b16 r37eef7a 1287 1287 1288 1288 const ast::Designation * visit( const ast::Designation * node ) override final { 1289 (void)node; 1289 auto designation = new Designation( get<Expression>().acceptL( node->designators ) ); 1290 designation->location = node->location; 1291 this->node = designation; 1290 1292 return nullptr; 1291 1293 } 1292 1294 1293 1295 const ast::Init * visit( const ast::SingleInit * node ) override final { 1294 (void)node; 1296 auto init = new SingleInit( 1297 get<Expression>().accept1( node->value ), 1298 ast::MaybeConstruct == node->maybeConstructed 1299 ); 1300 init->location = node->location; 1301 this->node = init; 1295 1302 return nullptr; 1296 1303 } 1297 1304 1298 1305 const ast::Init * visit( const ast::ListInit * node ) override final { 1299 (void)node; 1306 auto init = new ListInit( 1307 get<Initializer>().acceptL( node->initializers ), 1308 get<Designation>().acceptL( node->designations ), 1309 ast::MaybeConstruct == node->maybeConstructed 1310 ); 1311 init->location = node->location; 1312 this->node = init; 1300 1313 return nullptr; 1301 1314 } 1302 1315 1303 1316 const ast::Init * visit( const ast::ConstructorInit * node ) override final { 1304 (void)node; 1317 auto init = new ConstructorInit( 1318 get<Statement>().accept1( node->ctor ), 1319 get<Statement>().accept1( node->dtor ), 1320 get<Initializer>().accept1( node->init ) 1321 ); 1322 init->location = node->location; 1323 this->node = init; 1305 1324 return nullptr; 1306 1325 } … … 2617 2636 } 2618 2637 2619 virtual void visit( Designation * ) override final { 2620 2621 } 2622 2623 virtual void visit( SingleInit * ) override final { 2624 2625 } 2626 2627 virtual void visit( ListInit * ) override final { 2628 2629 } 2630 2631 virtual void visit( ConstructorInit * ) override final { 2632 2638 virtual void visit( Designation * old ) override final { 2639 this->node = new ast::Designation( 2640 old->location, 2641 GET_ACCEPT_V(designators, Expr) 2642 ); 2643 } 2644 2645 virtual void visit( SingleInit * old ) override final { 2646 this->node = new ast::SingleInit( 2647 old->location, 2648 GET_ACCEPT_1(value, Expr), 2649 (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast::DoConstruct 2650 ); 2651 } 2652 2653 virtual void visit( ListInit * old ) override final { 2654 this->node = new ast::ListInit( 2655 old->location, 2656 GET_ACCEPT_V(initializers, Init), 2657 GET_ACCEPT_V(designations, Designation), 2658 (old->get_maybeConstructed()) ? ast::MaybeConstruct : ast::DoConstruct 2659 ); 2660 } 2661 2662 virtual void visit( ConstructorInit * old ) override final { 2663 this->node = new ast::ConstructorInit( 2664 old->location, 2665 GET_ACCEPT_1(ctor, Stmt), 2666 GET_ACCEPT_1(dtor, Stmt), 2667 GET_ACCEPT_1(init, Init) 2668 ); 2633 2669 } 2634 2670 -
src/AST/Stmt.hpp
r4073b16 r37eef7a 96 96 }; 97 97 98 /// Assembly statement `asm ... ( "..." : ... )` 98 99 class AsmStmt final : public Stmt { 99 100 public: … … 118 119 }; 119 120 121 /// C-preprocessor directive `#...` 120 122 class DirectiveStmt final : public Stmt { 121 123 public: … … 132 134 }; 133 135 136 /// If conditional statement `if (...) ... else ...` 134 137 class IfStmt final : public Stmt { 135 138 public: … … 151 154 }; 152 155 156 /// Switch or choose conditional statement `switch (...) { ... }` 153 157 class SwitchStmt final : public Stmt { 154 158 public: … … 166 170 }; 167 171 172 /// Case label `case ...:` `default:` 168 173 class CaseStmt final : public Stmt { 169 174 public: … … 183 188 }; 184 189 190 /// While loop `while (...) ...` `do ... while (...); 185 191 class WhileStmt final : public Stmt { 186 192 public: … … 201 207 }; 202 208 209 /// For loop `for (... ; ... ; ...) ...` 203 210 class ForStmt final : public Stmt { 204 211 public: … … 219 226 }; 220 227 228 /// Branch control flow statement `goto ...` `break` `continue` `fallthru` 221 229 class BranchStmt final : public Stmt { 222 230 public: … … 246 254 }; 247 255 256 /// Return statement `return ...` 248 257 class ReturnStmt final : public Stmt { 249 258 public: … … 259 268 }; 260 269 270 /// Throw statement `throw ...` 261 271 class ThrowStmt final : public Stmt { 262 272 public: … … 277 287 }; 278 288 289 /// Try statement `try { ... } ...` 279 290 class TryStmt final : public Stmt { 280 291 public: … … 294 305 }; 295 306 307 /// Catch clause of try statement 296 308 class CatchStmt final : public Stmt { 297 309 public: … … 313 325 }; 314 326 327 /// Finally clause of try statement 315 328 class FinallyStmt final : public Stmt { 316 329 public: … … 327 340 }; 328 341 342 /// Wait for concurrency statement `when (...) waitfor (... , ...) ... timeout(...) ... else ...` 329 343 class WaitForStmt final : public Stmt { 330 344 public: … … 364 378 }; 365 379 380 /// With statement `with (...) ...` 366 381 class WithStmt final : public Stmt { 367 382 public: … … 379 394 }; 380 395 396 /// Any declaration in a (compound) statement. 381 397 class DeclStmt final : public Stmt { 382 398 public: … … 392 408 }; 393 409 410 /// Represents an implicit application of a constructor or destructor. 394 411 class ImplicitCtorDtorStmt final : public Stmt { 395 412 public:
Note: See TracChangeset
for help on using the changeset viewer.