From 29f57ec187ec977733e57923faf62575ac9782be Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 9 Jun 2025 09:16:48 +0200 Subject: [PATCH] algo.ShuntingYard: Add operator() Signed-off-by: Jan Lindemann --- tools/python/jwutils/algo/ShuntingYard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/python/jwutils/algo/ShuntingYard.py b/tools/python/jwutils/algo/ShuntingYard.py index 598ea94..6c4b8cb 100644 --- a/tools/python/jwutils/algo/ShuntingYard.py +++ b/tools/python/jwutils/algo/ShuntingYard.py @@ -57,6 +57,9 @@ class ShuntingYard(object): # export if len(msg): print(msg[1:]) + def operator(self, key: str) -> Operator: + return self.__ops[key] + def token_string(self): r = "" for k in sorted(self.__ops):