-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Labels
Description
Issue To Be Solved
Currently the AST only retains comments for declarations if they are docstrings (///
line comments, a and /**
block comments).
To be able to use the AST for formatting, it must retain also non-docstring comments.
Retain comments for:
- Declarations
- Statements
- Expressions
Definition of Done
- Add AST elements for comments:
- Block comment
- Line comment
- Add a leading/trailing comments property
- Declarations: Line and block comments
- Statements: Line and block comments
- Expressions: Block comments
- Add comments to AST elements when parsing
- Declarations
- Statements
- Expressions
- Tests