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

ktn_code: separate attrs that are values from the ones that are nodes #30

Closed
jfacorro opened this issue Mar 18, 2015 · 0 comments
Closed

Comments

@jfacorro
Copy link

This requirement is based on the necessity of finding the node for a location (i.e. {Line, Column}). Since not all nodes are added as children (e.g. the patterns/argument in a function clause), when traversing the parse tree based on parent-child relationship, some nodes are not included in the traversal. Adding these nodes as children wouldn't be the correct approach since the semantic that the structure of the parse tree has to convey would be lost (e.g. in Elvis's nesting level rule).

A possible solution would be to add an extra key (apart from type, attrs and content) in each node where the attributes that are actually nodes are added in a map. This new key could be named meta, attrs_node or something better that I can't think of right now.

jfacorro added a commit that referenced this issue Mar 18, 2015
@jfacorro jfacorro changed the title ktn_code: separate attrs that are values form the ones that are nodes ktn_code: separate attrs that are values from the ones that are nodes Mar 19, 2015
jfacorro added a commit that referenced this issue Mar 19, 2015
jfacorro added a commit that referenced this issue Mar 19, 2015
jfacorro added a commit that referenced this issue Mar 19, 2015
@igaray igaray closed this as completed in 27a9082 Mar 19, 2015
elbrujohalcon pushed a commit that referenced this issue May 6, 2018
Several Tiny Updates
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