From f1337a0748b5cfb728680c41b72138eabdcad6c0 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 14 Jan 2024 17:43:19 +0300 Subject: [PATCH] oppc/code: support leave keyword --- src/openpower/oppc/pc_code.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/openpower/oppc/pc_code.py b/src/openpower/oppc/pc_code.py index bbacaff1..22adf1e5 100644 --- a/src/openpower/oppc/pc_code.py +++ b/src/openpower/oppc/pc_code.py @@ -462,6 +462,11 @@ class CodeVisitor(pc_util.Visitor): yield node self[node].emit(stmt=str(node)) + @pc_util.Hook(pc_ast.LeaveKeyword) + def LeaveKeyword(self, node): + yield node + self[node].emit(stmt="break;") + @pc_util.Hook(pc_ast.Call.Name) def CallName(self, node): yield node -- 2.30.2