tokenise comments
Open
- Dominant language
- Haskell
- Stars
- 892
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Currently comments are treated as whiteSpace. This leaves {-# LANGUAGE #-} and other Haskell pragmas out of parsed AST.
This proposal is to parse comments as a distinct token
`whiteSpace` could return [String] where each string is a separate comment line
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the whiteSpace parser and how comments are currently discarded before the parsed AST is built. Check how {-# LANGUAGE #-} pragmas are handled, then define the token representation needed for distinct comment lines; done means comments and Haskell pragmas are preserved in the AST without being treated as whitespace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100