Generate AstNode accessors via astgen

Introduce the @astgen directives parsed by astgen, currently used for
the generation child node (operand) accessors. Please see the updated
internal documentation for details.
This commit is contained in:
Geza Lore
2022-09-21 13:56:03 +01:00
parent 0a8cfb8d2c
commit ce03293128
70 changed files with 1386 additions and 1530 deletions
+4 -4
View File
@@ -253,9 +253,9 @@ private:
AstVar* const indexVarp
= new AstVar{fl, VVarType::BLOCKTEMP, "__Vtableidx" + cvtToStr(m_modTables),
VFlagBitPacked{}, static_cast<int>(m_inWidthBits)};
m_modp->addStmtp(indexVarp);
m_modp->addStmtsp(indexVarp);
AstVarScope* const indexVscp = new AstVarScope{indexVarp->fileline(), m_scopep, indexVarp};
m_scopep->addVarp(indexVscp);
m_scopep->addVarsp(indexVscp);
// The 'output assigned' table builder
TableBuilder outputAssignedTableBuilder{fl};
@@ -274,8 +274,8 @@ private:
// Link it in.
// Keep sensitivity list, but delete all else
nodep->bodysp()->unlinkFrBackWithNext()->deleteTree();
nodep->addStmtp(stmtsp);
nodep->stmtsp()->unlinkFrBackWithNext()->deleteTree();
nodep->addStmtsp(stmtsp);
if (debug() >= 6) nodep->dumpTree(cout, " table_new: ");
}