forked from github/verilator
Support method calls without parenthesis (#4034)
* Support method class without parenthesis Signed-off-by: Ryszard Rozak <rrozak@antmicro.com> * Delete replaced nodes Signed-off-by: Ryszard Rozak <rrozak@antmicro.com> --------- Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
This commit is contained in:
parent
1ac721af8f
commit
371b8310d9
@ -2667,6 +2667,14 @@ private:
|
|||||||
}
|
}
|
||||||
if (AstEnumItemRef* const adfoundp = VN_CAST(foundp, EnumItemRef)) {
|
if (AstEnumItemRef* const adfoundp = VN_CAST(foundp, EnumItemRef)) {
|
||||||
nodep->replaceWith(adfoundp->cloneTree(false));
|
nodep->replaceWith(adfoundp->cloneTree(false));
|
||||||
|
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (AstNodeFTask* const methodp = VN_CAST(foundp, NodeFTask)) {
|
||||||
|
nodep->replaceWith(new AstMethodCall{nodep->fileline(),
|
||||||
|
nodep->fromp()->unlinkFrBack(),
|
||||||
|
nodep->name(), nullptr});
|
||||||
|
VL_DO_DANGLING(pushDeletep(nodep), nodep);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
UINFO(1, "found object " << foundp << endl);
|
UINFO(1, "found object " << foundp << endl);
|
||||||
|
@ -24,6 +24,7 @@ module t (/*AUTOARG*/);
|
|||||||
if (c.get_methoda() != 20) $stop;
|
if (c.get_methoda() != 20) $stop;
|
||||||
c.setv_methoda(30);
|
c.setv_methoda(30);
|
||||||
if (c.get_methoda() != 30) $stop;
|
if (c.get_methoda() != 30) $stop;
|
||||||
|
if (c.get_methoda != 30) $stop;
|
||||||
$write("*-* All Finished *-*\n");
|
$write("*-* All Finished *-*\n");
|
||||||
$finish;
|
$finish;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user