From 9595d79450dd4d13ddfecf78f4344eca80fd78d7 Mon Sep 17 00:00:00 2001 From: Eldad Sitbon Date: Wed, 3 Apr 2024 13:40:02 +0300 Subject: [PATCH] fix p_case_clause bug --- bashlex/parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bashlex/parser.py b/bashlex/parser.py index 6980ee75..1bcdae82 100644 --- a/bashlex/parser.py +++ b/bashlex/parser.py @@ -388,7 +388,8 @@ def p_case_clause(p): if len(p) == 2: p[0] = [p[1]] else: - p[0].extend(p[2]) + p[0] = p[1] + p[0].append(p[2]) def p_pattern_list(p): '''pattern_list : newline_list pattern RIGHT_PAREN compound_list