Changes in / [9d23c2d:15934a6]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r9d23c2d r15934a6 1400 1400 virtual void visit( FunctionDecl * old ) override final { 1401 1401 if ( inCache( old ) ) return; 1402 // TODO 1403 auto decl = (ast::FunctionDecl *)nullptr; 1402 auto decl = new ast::FunctionDecl{ 1403 old->location, 1404 old->name, 1405 GET_ACCEPT_1(type, FunctionType), 1406 GET_ACCEPT_1(statements, CompoundStmt), 1407 { old->storageClasses.val }, 1408 { old->linkage.val }, 1409 GET_ACCEPT_V(attributes, Attribute), 1410 { old->get_funcSpec().val } 1411 }; 1412 decl->scopeLevel = old->scopeLevel; 1413 decl->mangleName = old->mangleName; 1414 decl->isDeleted = old->isDeleted; 1415 decl->uniqueId = old->uniqueId; 1416 decl->extension = old->extension; 1404 1417 cache.emplace( old, decl ); 1418 1419 this->node = decl; 1405 1420 } 1406 1421 … … 1487 1502 1488 1503 virtual void visit( TypeDecl * old ) override final { 1489 if ( inCache( old ) ) return; 1490 // TODO 1491 auto decl = (ast::TypeDecl *)nullptr; 1504 if ( inCache( old ) ) return; 1505 auto decl = new ast::TypeDecl{ 1506 old->location, 1507 old->name, 1508 { old->storageClasses.val }, 1509 GET_ACCEPT_1(base, Type), 1510 (ast::TypeVar::Kind)(unsigned)old->kind, 1511 old->sized, 1512 GET_ACCEPT_1(init, Type) 1513 }; 1514 decl->assertions = GET_ACCEPT_V(assertions, DeclWithType); 1515 decl->params = GET_ACCEPT_V(parameters, TypeDecl); 1516 decl->extension = old->extension; 1517 decl->uniqueId = old->uniqueId; 1492 1518 cache.emplace( old, decl ); 1519 1520 this->node = decl; 1493 1521 } 1494 1522 … … 1510 1538 } 1511 1539 1512 virtual void visit( AsmDecl * ) override final { 1513 1514 } 1515 1516 virtual void visit( StaticAssertDecl * ) override final { 1517 1540 virtual void visit( AsmDecl * old ) override final { 1541 auto decl = new ast::AsmDecl{ 1542 old->location, 1543 GET_ACCEPT_1(stmt, AsmStmt) 1544 }; 1545 decl->extension = old->extension; 1546 decl->uniqueId = old->uniqueId; 1547 decl->storage = { old->storageClasses.val }; 1548 1549 this->node = decl; 1550 } 1551 1552 virtual void visit( StaticAssertDecl * old ) override final { 1553 auto decl = new ast::StaticAssertDecl{ 1554 old->location, 1555 GET_ACCEPT_1(condition, Expr), 1556 GET_ACCEPT_1(message, ConstantExpr) 1557 }; 1558 decl->extension = old->extension; 1559 decl->uniqueId = old->uniqueId; 1560 decl->storage = { old->storageClasses.val }; 1561 1562 this->node = decl; 1518 1563 } 1519 1564
Note: See TracChangeset
for help on using the changeset viewer.