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
Thanks, I need to review this more carefully. The generic idea is that walk proved unpracticall to use, so I wish to mostly deprecate it and encourage people to use treequery instead; but that's no reason for it not to work.
Thanks! The treequery is very nice. I'm using it for some analysis. Regarding the bug, my feeling is the original walk requires a two-level cfg with the first level three children "expr", "stat", "block". The current tree query always construct a one level cfg, and the walk code was changed to support the one level structure. If I pass in a two-level cfg into the walk, the code cannot find the right functions.
I think this issue is not a bug in the source code. It is from the inconsistency between the 0.5 document http://metalua.luaforge.net/manual004.html#toc9. and the current walk implementation. This form works in the current code.
If I follow the document http://metalua.luaforge.net/manual004.html#toc9 to write an ast walker, such as
The walker doesn't work. The function returned by walker_builder() in walk.mlua cannot get the correct cfg up/down functions from the input cfg.
The below changes can fix it.
However, I found the current treequery.mlua will use cfg's first level methods. It seems the issue is still caused by some refactoring inconsistence.
The text was updated successfully, but these errors were encountered: