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

Issue with getNodeId #19

Open
thanhlecongg opened this issue Aug 1, 2023 · 0 comments
Open

Issue with getNodeId #19

thanhlecongg opened this issue Aug 1, 2023 · 0 comments

Comments

@thanhlecongg
Copy link

thanhlecongg commented Aug 1, 2023

Hi,

I found that when you identify the root node in this line, you have ignored IfStatement and ForStatement. I guess your purpose is to traverse its children. But, how about other statements which also have children? For example, WhileStatement or BlockStatement also has children.

Particularly, I observed several cases in which the root node is BlockStatement. In such cases, your implementation returns the BlockStatement as the root node. As a result, the sub root in this line cannot be found as BlockStatement do not belong to linenode, making Recorder produce nothing.

This problem can be addressed by adding the condition of root.name != 'BlockStatement' to this line but I am not sure if it is in your intention or not. Thanks

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