Yup, turns out that bashing out the recursive decent parser from part one of CI took a couple of days, and now I've got most of a formatter for lang.
I want to add comments, which should be easy: Add a comment token type, have the scanner create a comment token at the end of comment lines with the original text (minus the leading \\
), add an Expr.Comment
type with a string payload, update Parser.Primary
to recognise the new token, and finally emit it at the right time in Formatter
.
After that, it's implementing a language server, which I think might be more work.