From f15ab48d8f44369d04f8439f32cb07edbddda5df Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 16 Jan 2024 22:09:45 +0300 Subject: [PATCH] oppc/code: handle call statements --- src/openpower/oppc/pc_code.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openpower/oppc/pc_code.py b/src/openpower/oppc/pc_code.py index 8f1b771e..9b92caef 100644 --- a/src/openpower/oppc/pc_code.py +++ b/src/openpower/oppc/pc_code.py @@ -184,6 +184,10 @@ class CodeVisitor(pc_util.Visitor): yield node with self[node]: for subnode in node: + if isinstance(subnode, pc_ast.Call): + (level, stmt) = self[subnode][-1] + assert stmt[-1] == ")" + self[subnode][-1] = (level, f"{stmt};") for (level, stmt) in self[subnode]: self[node].emit(stmt=stmt, level=level) -- 2.30.2