Support assignment expressions.

This commit is contained in:
Wilson Snyder
2022-11-19 15:23:37 -05:00
parent 21d80cdfa1
commit aacb38b776
15 changed files with 201 additions and 52 deletions
+2 -1
View File
@@ -252,6 +252,7 @@ private:
// VISITORS
void visit(AstNodeAssign* nodep) override {
VL_RESTORER(m_ops);
m_ops = 0;
m_assignStep++;
iterateAndNextNull(nodep->rhsp());
@@ -360,7 +361,7 @@ private:
doDeletes();
}
void visit(AstNode* nodep) override {
m_ops++;
++m_ops;
if (!nodep->isSubstOptimizable()) m_ops = SUBST_MAX_OPS_NA;
iterateChildren(nodep);
}