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

add ids to nodes #4

Open
kevinbarabash opened this issue Feb 5, 2017 · 0 comments
Open

add ids to nodes #4

kevinbarabash opened this issue Feb 5, 2017 · 0 comments

Comments

@kevinbarabash
Copy link
Member

An id has the following behavior:

  • cloning an AST does not update the id of nodes
  • need nodes created because of changes to the AST must be giving an id that has never been used before

The purpose of this is feature is to provide to indicate nodes which move because of a transform but are essentially the same node.

An alternative is to always create new ids whenever cloning but to also add a prevId which points to the value of the id for that node in the previous step. One benefit of this approach is that a node maybe copied several times (distribution) or collapsed into a single node (factoring).

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

No branches or pull requests

1 participant