You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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
andcontent
) in each node where the attributes that are actually nodes are added in a map. This new key could be namedmeta
,attrs_node
or something better that I can't think of right now.The text was updated successfully, but these errors were encountered: