Changes in / [37eef7a:4073b16]
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/proposals/vtable.md
r37eef7a r4073b16 220 220 trait iterator(otype T, otype Item) { 221 221 bool has_next(T const &); 222 Item get_next(T &);222 Item get_next(T const *); 223 223 } 224 224 -
src/AST/Convert.cpp
r37eef7a r4073b16 1287 1287 1288 1288 const ast::Designation * visit( const ast::Designation * node ) override final { 1289 auto designation = new Designation( get<Expression>().acceptL( node->designators ) ); 1290 designation->location = node->location; 1291 this->node = designation; 1289 (void)node; 1292 1290 return nullptr; 1293 1291 } 1294 1292 1295 1293 const ast::Init * visit( const ast::SingleInit * node ) override final { 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; 1294 (void)node; 1302 1295 return nullptr; 1303 1296 } 1304 1297 1305 1298 const ast::Init * visit( const ast::ListInit * node ) override final { 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; 1299 (void)node; 1313 1300 return nullptr; 1314 1301 } 1315 1302 1316 1303 const ast::Init * visit( const ast::ConstructorInit * node ) override final { 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; 1304 (void)node; 1324 1305 return nullptr; 1325 1306 } … … 2636 2617 } 2637 2618 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 ); 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 2669 2633 } 2670 2634 -
src/AST/Stmt.hpp
r37eef7a r4073b16 96 96 }; 97 97 98 /// Assembly statement `asm ... ( "..." : ... )`99 98 class AsmStmt final : public Stmt { 100 99 public: … … 119 118 }; 120 119 121 /// C-preprocessor directive `#...`122 120 class DirectiveStmt final : public Stmt { 123 121 public: … … 134 132 }; 135 133 136 /// If conditional statement `if (...) ... else ...`137 134 class IfStmt final : public Stmt { 138 135 public: … … 154 151 }; 155 152 156 /// Switch or choose conditional statement `switch (...) { ... }`157 153 class SwitchStmt final : public Stmt { 158 154 public: … … 170 166 }; 171 167 172 /// Case label `case ...:` `default:`173 168 class CaseStmt final : public Stmt { 174 169 public: … … 188 183 }; 189 184 190 /// While loop `while (...) ...` `do ... while (...);191 185 class WhileStmt final : public Stmt { 192 186 public: … … 207 201 }; 208 202 209 /// For loop `for (... ; ... ; ...) ...`210 203 class ForStmt final : public Stmt { 211 204 public: … … 226 219 }; 227 220 228 /// Branch control flow statement `goto ...` `break` `continue` `fallthru`229 221 class BranchStmt final : public Stmt { 230 222 public: … … 254 246 }; 255 247 256 /// Return statement `return ...`257 248 class ReturnStmt final : public Stmt { 258 249 public: … … 268 259 }; 269 260 270 /// Throw statement `throw ...`271 261 class ThrowStmt final : public Stmt { 272 262 public: … … 287 277 }; 288 278 289 /// Try statement `try { ... } ...`290 279 class TryStmt final : public Stmt { 291 280 public: … … 305 294 }; 306 295 307 /// Catch clause of try statement308 296 class CatchStmt final : public Stmt { 309 297 public: … … 325 313 }; 326 314 327 /// Finally clause of try statement328 315 class FinallyStmt final : public Stmt { 329 316 public: … … 340 327 }; 341 328 342 /// Wait for concurrency statement `when (...) waitfor (... , ...) ... timeout(...) ... else ...`343 329 class WaitForStmt final : public Stmt { 344 330 public: … … 378 364 }; 379 365 380 /// With statement `with (...) ...`381 366 class WithStmt final : public Stmt { 382 367 public: … … 394 379 }; 395 380 396 /// Any declaration in a (compound) statement.397 381 class DeclStmt final : public Stmt { 398 382 public: … … 408 392 }; 409 393 410 /// Represents an implicit application of a constructor or destructor.411 394 class ImplicitCtorDtorStmt final : public Stmt { 412 395 public:
Note: See TracChangeset
for help on using the changeset viewer.