New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meaningful repr for ParserElements #423
Draft
djpohly
wants to merge
11
commits into
pyparsing:master
Choose a base branch
from
djpohly:new-repr
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Commits on Jul 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 02a176c - Browse repository at this point
Copy the full SHA 02a176cView commit details -
Meaningful repr for ParserElements
A couple of notes: - Populated instances of Forward are represented only as "Forward(...)" to prevent infinite recursion. - Helper classes like _PendingSkip and _ErrorStop are not yet handled.
Configuration menu - View commit details
-
Copy full SHA for 93f2271 - Browse repository at this point
Copy the full SHA 93f2271View commit details
Commits on Jul 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 81605f7 - Browse repository at this point
Copy the full SHA 81605f7View commit details
Commits on Jul 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for fa6615c - Browse repository at this point
Copy the full SHA fa6615cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 47353af - Browse repository at this point
Copy the full SHA 47353afView commit details
Commits on Jul 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b847d33 - Browse repository at this point
Copy the full SHA b847d33View commit details
Commits on Jul 7, 2022
-
ParserElement repr() implementation, with literals
Introduces a _make_repr() method with parameters to account for the different contexts in which an element may need to be represented (top level or as a term in an expression, as a potential string literal or not). In order to make the code a little easier to read, the __format__() method is implemented as well, with conversion specifiers used to indicate the context.
Configuration menu - View commit details
-
Copy full SHA for e2b8a34 - Browse repository at this point
Copy the full SHA e2b8a34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5735734 - Browse repository at this point
Copy the full SHA 5735734View commit details
Commits on Jul 8, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 1796bdc - Browse repository at this point
Copy the full SHA 1796bdcView commit details -
abbrev_charset() function for repr of charsets
This function determines how to represent a set of characters using srange(), then returns either the original set or the srange expression, whichever is shorter. To be used in repr() implementations in elements, such as Word, which are based on sets of characters.
Configuration menu - View commit details
-
Copy full SHA for 598fe10 - Browse repository at this point
Copy the full SHA 598fe10View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4065f60 - Browse repository at this point
Copy the full SHA 4065f60View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.