From: Jacob Lifshay Date: Fri, 11 Nov 2022 08:41:18 +0000 (-0800) Subject: fix bug in parser when concatenating stuff that isn't variables X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a1647a9c947e487597067553e61c55cca11a7b2;p=openpower-isa.git fix bug in parser when concatenating stuff that isn't variables --- diff --git a/src/openpower/decoder/pseudo/parser.py b/src/openpower/decoder/pseudo/parser.py index 1e6a330f..42df81be 100644 --- a/src/openpower/decoder/pseudo/parser.py +++ b/src/openpower/decoder/pseudo/parser.py @@ -170,8 +170,9 @@ def check_concat(node): # checks if the comparison is already a concat print("check concat", node) if not isinstance(node, ast.Call): return [node] - print("func", node.func.id) - if node.func.id != 'concat': + node_func_id = getattr(node.func, "id", None) + print("func", node_func_id) + if node_func_id != 'concat': return [node] if node.keywords: # a repeated list-constant, don't optimise return [node]