Skip to content

Commit

Permalink
Fix bug #375 (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
pprados committed Mar 24, 2022
1 parent 7661493 commit 1a40d17
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyparsing/helpers.py
Expand Up @@ -805,8 +805,10 @@ def parseImpl(self, instring, loc, doActions=True):
_FB.__name__ = "FollowedBy>"

ret = Forward()
lpar = Suppress(lpar)
rpar = Suppress(rpar)
if isinstance(lpar, str):
lpar = Suppress(lpar)
if isinstance(rpar, str):
rpar = Suppress(rpar)
lastExpr = base_expr | (lpar + ret + rpar)
for i, operDef in enumerate(op_list):
opExpr, arity, rightLeftAssoc, pa = (operDef + (None,))[:4]
Expand Down

0 comments on commit 1a40d17

Please sign in to comment.