Currently, we drop all whitespace and comments are parsed into a statement level "trivia" type thing.
However, most places where we see a comment in the parser we just drop it. This would be bad for formatters since it would essentially dropped all comments.
If we add whitespace and comments as trivia in the lexing step then we don't need to worry about parsing it properly everywhere.
Currently, we drop all whitespace and comments are parsed into a statement level "trivia" type thing.
However, most places where we see a comment in the parser we just drop it. This would be bad for formatters since it would essentially dropped all comments.
If we add whitespace and comments as trivia in the lexing step then we don't need to worry about parsing it properly everywhere.