Add pretty printer for syntax tree nodes
5nord opened this issue · comments
A pretty printer package for our AST would be nice, because it would help with code formatters, language server formatting or with compiler error messages.
It's on our interests the pretty printer package provides only a minimal set of formatting options:
- choosing between tabs or spaces for indentation
- enable/disable comments
The exact formatting of white-spaces or the alignment of code should be hard-coded.
https://talks.golang.org/2015/gofmt-en.slide gives good inspiration and mind setting.
The exact formatting rules are not important, yet. I'd suggest to start with something like in here. And later refine where needed.
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days
An initial in implementation is available at https://github.com/nokia/ntt/blob/master/internal/ttcn3/printer/printer.go
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days