Cedric Richter

Results 11 comments of Cedric Richter

1. The PR is now updated to include tests for the visitor's core functionalities. 2. I found that the node equality check with the current cursor implementation is unnecessary. It...

Generally, I like the idea of having an easy way to iterate through all nodes. However, I think that a visitor pattern could add additional flexibility which cannot be easily...

I am not 100% sure how `depth_first_nodes` would operate. Would it modify/operate on the state of the cursor? In this case, I could imagine that `skip_children` could be implemented by...

If the complexity of creating a visitor is the main point, I could alternatively imagine the integration of visitors directly in the tree / cursor. For example, the tree could...

Would be interesting to then also include the `IsNot` node!

Hey! I am not so sure what output is expected here. Could you elaborate a bit? Currently, the AST edit contains all information you are mentioning: > line 1 (renaming...

`code.diff` sadly does not implement a functionality that directly supports your use case. > Do you think it is possible to get these results from the output of cd.difference() ?...

I am not a fan of referencing the target tree in the edit script. I would prefer if the edit script is only dependent on the tree for which it...

Thank you for this hint! I will add more custom visitors for the supported languages in the next release. Until then, you can use custom visitors to parse your code....

Hey! Thank you for pointing this out! Note that code_tokenize always tries to construct the AST/CST (based on tree-sitter) before tokenization. Since tree-sitter is a best-effort parser, it might inject...