Commit Graph

11 Commits

Author SHA1 Message Date
Dave Cunningham
724650d358
Add native golang formatter (#388)
Add native golang formatter
2020-03-10 22:19:49 +00:00
Stanisław Barzowski
9ada769ce4 Make golangci-lint happy
Some of the suggestions are minor bug fixes (missing error handling).
2020-03-05 14:54:27 +01:00
Dave Cunningham
803ad646cb Refactor parseParameter to return ast.Parameter 2020-03-05 09:33:21 +01:00
Dave Cunningham
5476fefb25 Add ParseParameter. Also fell down the rabbithole improving content and consistency of parse errors 2020-03-05 09:33:21 +01:00
Dave Cunningham
ce07c7fb8b Allow positional params after optionals 2020-03-05 09:33:21 +01:00
Dave Cunningham
0e67cc3c68 Refactor to allow interleaving optional and positional params 2020-03-05 09:33:21 +01:00
Dave Cunningham
8b2b1ba839 Avoid float overflow errors at parse time. 2020-02-27 23:06:53 +00:00
Dave Cunningham
0959f85501 break up parseObjectRemainder 2019-11-06 19:46:26 +00:00
Dave Cunningham
407c0f311a Fix #331 missing comma error 2019-10-16 22:15:28 +02:00
Dave Cunningham
dc5c94ac78
Add fodder to AST nodes (#319)
* Preserve fodder during parsing.
2019-09-24 12:11:22 +01:00
Stanisław Barzowski
45f3912215 Make parser package internal
There is no reason for external users to directly depend
on parser. It had a few random things exported as well,
namely errors and "children" functions (helpers for AST
traversal).

It was easy to extract the errors package, but I needed to leave
children in parser for now. The errors package was also
made internal, but it's a candidate for making it public
again potentially (if someone wants to display error messages
just like us). For now it's probably too incomplete anyway.

This change has a potential of breaking the existing users
since we technically remove public APIs. These were not needed
or even helpful for actually running Jsonnet code, but perhaps
someone used them anyway.
2019-09-03 17:28:33 +02:00