Creating an AST
In this chapter, we will see how to create an AST using the auto_lsp
crate.
Any AST is created in two main steps:
- Write the query to capture the nodes you are interested in.
- Define the corresponding AST structures in Rust.
There is no specific order to follow; you can perform both steps in parallel.
In the next chapter, we will explore how to write the core query to capture the nodes.