Support "break", "continue", "return".

This commit is contained in:
Wilson Snyder
2010-02-14 10:01:21 -05:00
parent 48603c0ee2
commit cdd06e7236
28 changed files with 761 additions and 84 deletions
+7
View File
@@ -75,6 +75,13 @@ private:
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstInitial* nodep, AstNUser*) {
nodep->iterateChildren(*this);
// Initial assignments under function/tasks can just be simple assignments without the initial
if (m_ftaskp) {
nodep->replaceWith(nodep->bodysp()->unlinkFrBackWithNext()); nodep=NULL;
}
}
virtual void visit(AstVAssert* nodep, AstNUser*) {
if (m_assertp) nodep->v3error("Assert not allowed under another assert");
m_assertp = nodep;