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

Use AST instead of Treesitter's generated CST #34

Open
2 tasks
pherrymason opened this issue Jul 31, 2024 · 0 comments
Open
2 tasks

Use AST instead of Treesitter's generated CST #34

pherrymason opened this issue Jul 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@pherrymason
Copy link
Owner

pherrymason commented Jul 31, 2024

Work with an AST instead of CST

Tree sitter parser provides a CST (Context Syntax Tree) that contains too much unnecessary information and is hard to traverse.

Converting this CST to an AST, will allow a more comfortable way of traversing the code and should be easier to get more accurate information about what's currently under cursor, allowing to drop logic to parse strings that is prone to be fragile and difficult to understand (which is a wasteful effort as treesitter is already parsing that for me).

This will also allow to implement a system that could run passes on the tree, calculating necessary information required for the different operations of the LSP.

Furthermore, working with the AST will prepare for when the c3 compiler can emit the AST itself.

## Status

@pherrymason pherrymason added the enhancement New feature or request label Jul 31, 2024
@pherrymason pherrymason modified the milestones: 0.0.7, 0.0.8, 0.1.0 Jul 31, 2024
@pherrymason pherrymason changed the title Build AST Use AST instead of Treesitter's generated CST Aug 4, 2024
@pherrymason pherrymason modified the milestones: 0.1.0, Use the AST luke Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant