-
-
Notifications
You must be signed in to change notification settings - Fork 384
Open
Description
Lossless Parsing with Whitespace Preservation
It looks like the lexer discards the whitespace. This should not be discarded and rather sent to other hidden channel.
This results in loss of information. Downsides:
- Cannot reconstruct the exact original source from the parse tree
- Build accurate code formatters
- Develop linters that understand whitespace context
WS
: [ \t\r\n] -> skip
;
I see this might be inspired from mustache: https://github.com/jknack/handlebars.java/blob/master/handlebars/src/main/java/com/github/jknack/handlebars/internal/MustacheSpec.java
However this can be discarded in TemplateBuilder.java
Metadata
Metadata
Assignees
Labels
No labels