diff options
author | ptmcg <ptmcg@austin.rr.com> | 2021-09-08 17:35:16 -0500 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2021-09-08 17:35:16 -0500 |
commit | 6b51ff7faf0cb32170b415341725ddfc8d7b10c7 (patch) | |
tree | 26ca619ab9d098d30668cd784abfb258e526d44c /pyparsing/helpers.py | |
parent | d714f45d927a9712bbb93c8eb4f63b2fff7ad89a (diff) | |
download | pyparsing-git-6b51ff7faf0cb32170b415341725ddfc8d7b10c7.tar.gz |
The blackening
Diffstat (limited to 'pyparsing/helpers.py')
-rw-r--r-- | pyparsing/helpers.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index 5988f3e..f203111 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -763,6 +763,7 @@ def infix_notation( def parseImpl(self, instring, loc, doActions=True): self.expr.try_parse(instring, loc) return loc, [] + _FB.__name__ = "FollowedBy>" ret = Forward() @@ -792,18 +793,14 @@ def infix_notation( thisExpr = Forward().set_name(term_name) if rightLeftAssoc is OpAssoc.LEFT: if arity == 1: - matchExpr = _FB(lastExpr + opExpr) + Group( - lastExpr + opExpr[1, ...] - ) + matchExpr = _FB(lastExpr + opExpr) + Group(lastExpr + opExpr[1, ...]) elif arity == 2: if opExpr is not None: matchExpr = _FB(lastExpr + opExpr + lastExpr) + Group( lastExpr + (opExpr + lastExpr)[1, ...] ) else: - matchExpr = _FB(lastExpr + lastExpr) + Group( - lastExpr[2, ...] - ) + matchExpr = _FB(lastExpr + lastExpr) + Group(lastExpr[2, ...]) elif arity == 3: matchExpr = _FB( lastExpr + opExpr1 + lastExpr + opExpr2 + lastExpr |