Hi Vinicius,
Thank you for being interested in this project!
Just FYI, there's another discussion about this project: [GSOC]Integration of libSyntax with the rest of the compiler pipeline
And so is mine ![]()
In addition to this, we want to input serialized libSyntax tree (JSON) directly to the compiler.
Since it's super ambitious, I don't think we fully finish this work and merge into the repo in this GSoC timeframe. But I believe we should eventually do this. In your proposal, I expect you to plan what you will finish in the timeframe, and what you will not.
Roughly, we should do:
- Implement a parser to parse only into libSyntax tree.
- Modify AST nodes to hold libSyntax nodes for source information (
getLoc()etc.) - Implement a libSyntax tree to AST translator. This should do:
- Everything the current parser do:
- Diagnostics
- Name binding
- Resolve
#ifconfig - Code completion
- (Hopefully) Move some feature from Sema:
- Resolve
import - Fold sequence expression (Resolve operator precedence)
- Resolve type expression
- Resolve
- Everything the current parser do:
- Make a way to input serialized libSyntax tree to the compiler