* chore: update rules_go and gazelle version to fix bazel build
* chore: fix source file list in ast directory (ref: #746)
* chore: fix dependency list in formatter directory
* Gracefully handle encountered regular expression when running jsonnetfmt, adding tests.
* Do not validate verbatim strings.
* Also do not validate string blocks.
* Change golden prefix for formatter tests to fmt.golden to be consistant with cpp version.
* Export FormatNode so external users can pretty print an AST
Signed-off-by: Tom Wilkie <tom@grafana.com>
* Expose RawAST function.
Signed-off-by: Tom Wilkie <tom@grafana.com>
* Add comment
Signed-off-by: Tom Wilkie <tom@grafana.com>
---------
Signed-off-by: Tom Wilkie <tom@grafana.com>
Co-authored-by: Tom Wilkie <tom@grafana.com>
Exposes what I consider a good public API from the `internal/formatter`
package.
Having a go-native formatter is an awesome thing, especially because it
allows shipping the formatter as part of other projects. It's also fair
to keep the formatter's code in `internal`, yet third party projects
should have a way to use relevant parts of it.