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

Implement attachement of code comments to AST node via an AST attribute system #736

Open
denismerigoux opened this issue Oct 30, 2024 · 0 comments
Assignees
Labels
🔧 compiler Issue concerns the compiler ✨ enhancement New feature or request

Comments

@denismerigoux
Copy link
Contributor

In order to make progress on #673, the attribute system of #392 has entered the critical path. This issue states that work on the attribute system should begin with the following objectives :

  • capture comments inside Catala code blocks as either surfact AST nodes or annotations on neighbouring surface AST nodes (the parser and lexer should be modified) ;
  • the rules for knowing where to attach comments to AST nodes can be simple at first : the comment is always attached to the AST node of the token immediately after the comment in the linear flow of tokens ;
  • code comments attached to AST nodes should be pushed down the compilation chain at least to Desugared (used by catala-language-server: test case format should include prose sections and possibly metadata #673).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 compiler Issue concerns the compiler ✨ enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants