Skip to content

My takeaways from working with this grammar #312

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

digitcrusher
Copy link

This is a pull request of a few fixes I had to apply while adapting this grammar for my text editor. Here's some reasoning behind each commit, from oldest to newest:

  1. The first commit slashes a dozen individual queries to match function parameter names into just one. This closes Difference in fields between parameters #199.
  2. Classifying assignment statements as expression statements is not only wrong (Python 3, Python 2) but also introduces an unnecessary level of indirection when querying for class attribute declarations.
  3. as_pattern already has an alias field. This change brings _as_pattern into line.
  4. Free stuff. Discriminating member identifiers is necessary to ensure lambda foo: foo == obj.foo produces the correct result. The only other solution is to capture expression as local.reference instead of identifier but that produces a lot of useless matches.
  5. Self-explanatory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Difference in fields between parameters
1 participant