diff options
author | Paul McGuire <ptmcg@austin.rr.com> | 2019-05-26 09:22:09 -0500 |
---|---|---|
committer | Paul McGuire <ptmcg@austin.rr.com> | 2019-05-26 09:22:09 -0500 |
commit | d2332c95675d71c10605eaf00b1171ef11d0970d (patch) | |
tree | ce6c2be40cef9d36358b54a437f2b8b6b884c195 /pyparsing.py | |
parent | f0264bd8d1a548a50b3e5f7d99cfefd577942d14 (diff) | |
download | pyparsing-git-d2332c95675d71c10605eaf00b1171ef11d0970d.tar.gz |
Updated runTests to call postParse before dumping parsed results; added nested_markup.py and updated delta_time.py (renamed from deltaTime.py) examples
Diffstat (limited to 'pyparsing.py')
-rw-r--r-- | pyparsing.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pyparsing.py b/pyparsing.py index 5b5897f..f09af0b 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -93,8 +93,8 @@ classes inherit from. Use the docstrings for examples of how to: namespace class """ -__version__ = "2.4.0" -__versionTime__ = "07 Apr 2019 18:28 UTC" +__version__ = "2.4.1" +__versionTime__ = "26 May 2019 14:04 UTC" __author__ = "Paul McGuire <ptmcg@users.sourceforge.net>" import string @@ -2535,7 +2535,6 @@ class ParserElement(object): BOM = '\ufeff' t = NL.transformString(t.lstrip(BOM)) result = self.parseString(t, parseAll=parseAll) - out.append(result.dump(full=fullDump)) success = success and not failureTests if postParse is not None: try: @@ -2543,7 +2542,10 @@ class ParserElement(object): if pp_value is not None: out.append(str(pp_value)) except Exception as e: + out.append(result.dump(full=fullDump)) out.append("{0} failed: {1}: {2}".format(postParse.__name__, type(e).__name__, e)) + else: + out.append(result.dump(full=fullDump)) except ParseBaseException as pe: fatal = "(FATAL)" if isinstance(pe, ParseFatalException) else "" if '\n' in t: |