Skip to content

Commit

Permalink
Update helpers.py (#510)
Browse files Browse the repository at this point in the history
Check both *lpar* and *rpar* here to not be instances of *Suppress*.
  • Loading branch information
cpburnz committed Sep 1, 2023
1 parent c09eb6e commit fa3e16e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyparsing/helpers.py
Expand Up @@ -777,7 +777,7 @@ def parseImpl(self, instring, loc, doActions=True):
rpar = Suppress(rpar)

# if lpar and rpar are not suppressed, wrap in group
if not (isinstance(rpar, Suppress) and isinstance(rpar, Suppress)):
if not (isinstance(lpar, Suppress) and isinstance(rpar, Suppress)):
lastExpr = base_expr | Group(lpar + ret + rpar)
else:
lastExpr = base_expr | (lpar + ret + rpar)
Expand Down

0 comments on commit fa3e16e

Please sign in to comment.