diff options
author | ptmcg <ptmcg@austin.rr.com> | 2022-01-18 01:20:54 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2022-01-18 01:22:18 -0600 |
commit | 236cb8bc15ca8132ab26c8630623f447dfd6175a (patch) | |
tree | b4708d9f23553a42062ff0b0d079f5d6fbfa744a /pyparsing/helpers.py | |
parent | 5fb6e0d597f87530cf9ef32931d5bfabeb9ce95d (diff) | |
download | pyparsing-git-236cb8bc15ca8132ab26c8630623f447dfd6175a.tar.gz |
Fixed exception generated in a ParserElementEnhance if the contained expr is None
Diffstat (limited to 'pyparsing/helpers.py')
-rw-r--r-- | pyparsing/helpers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyparsing/helpers.py b/pyparsing/helpers.py index 19dd0e0..5e7b3ad 100644 --- a/pyparsing/helpers.py +++ b/pyparsing/helpers.py @@ -185,7 +185,7 @@ def match_previous_expr(expr: ParserElement) -> ParserElement: def must_match_these_tokens(s, l, t): theseTokens = _flatten(t.as_list()) if theseTokens != matchTokens: - raise ParseException("", 0, "") + raise ParseException(s, l, "Expected {}, found{}".format(matchTokens, theseTokens)) rep.set_parse_action(must_match_these_tokens, callDuringTry=True) |