Skip to content
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

rule: intern fields and store them in a tree matching the rule structure. #11

Merged
merged 3 commits into from
Aug 27, 2019

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Jul 27, 2019

While exploring a better API for #10 I realized the path trick, as useful as it is otherwise, was holding me back, because it makes recursing on a rule/parse forest, while keeping track of fields, expensive.
You can already see an improvement in the Folder API, for example.

I'll update #10 to use this next, possibly a good idea to wait for that before merging.

Copy link
Collaborator

@CAD97 CAD97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definitely feels better to me.

rule,
fields: self.filter_fields(Some(i)).collect(),
fields: aggregate_fields
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This closure could be named child and aggregate_fields could be named children.

@eddyb
Copy link
Member Author

eddyb commented Aug 27, 2019

I was able to update gll to this, totally worth it! See rust-lang/gll#133.

@eddyb eddyb merged commit 7c360f2 into master Aug 27, 2019
@eddyb eddyb deleted the tree-fields branch August 27, 2019 13:34
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.

2 participants