Commit Graph

11 Commits

Author SHA1 Message Date
Martin Atkins
6c4344623b Unfold the "hcl" directory up into the root
The main HCL package is more visible this way, and so it's easier than
having to pick it out from dozens of other package directories.
2019-09-09 16:08:19 -07:00
Martin Atkins
3327dee567 Change module path to github.com/hashicorp/hcl/v2
This is in preparation for the first v2 release from the main HCL
repository.
2019-09-09 15:46:40 -07:00
Radek Simko
0c888d1241 deps: Bump github.com/go-test/deep to 1.0.3 2019-08-21 13:32:43 +01:00
Martin Atkins
318e80eefe dependencies: go get github.com/zclconf/go-cty@v1.0.0
This introduces only some minor bugfixes compared to the commit we
selected before; the main goal here is to be on an actual tagged release
rather than an arbitrary commit.
2019-06-07 08:54:42 -07:00
Martin Atkins
640445e163 hcl/hclsyntax: Correct scanning of literal $ and % before quotes
The TemplateStringLiteral production was not quite right, causing a
literal $ or % immediately followed by " to consume the quotes and any
following characters on the line if there were any more characters on the
line.

Now we match things more precisely, but at the expense of generating some
redundant extra tokens when escapes and literal dollar/percent signs are
present. Those extra tokens don't matter in practice because the resulting
strings get concatenated together anyway, which is proven by the fact
that this changeset includes changes only to the scanner and parser tests,
and not to any of the expression result tests.

While here, I also improved the error message for when the user attempts
to split a quoted string over multiple lines. Previously it was just using
the generic "invalid character" message, which isn't particularly
actionable. Now we'll give the user a couple options of what to do
instead.
2019-05-03 14:30:20 -07:00
Martin Atkins
ffaa892c15 go get github.com/zclconf/go-cty@master
This includes several upstream fixes and usability improvements.
2019-04-30 11:00:40 -07:00
Martin Atkins
96efb87de3 dependencies: go get github.com/zclconf/go-cty@master
This includes a new function cty.ParseNumberVal which centralizes the
standard way to produce a cty.Number from a string so we can be sure to
always get comparable numbers.
2019-01-24 14:58:15 -08:00
James Bardin
4d82d52bfa
update go.mod (#60)
Fix import for howett.net/plist, and update go.mod.
2018-11-29 15:21:51 -05:00
James Bardin
acdba6be6b
convert to correct types in expressions (#59)
* Add tests to cover new behavior introduced in cty

Convert should now not convert null to DynamicPseudoType, and Equals
will always compare Nulls as equal.

* update go.mod
2018-11-29 14:43:45 -05:00
Martin Atkins
309e278914 hclpack: Implement JSON marshaling (but not unmarshaling, yet) 2018-11-11 03:25:19 +00:00
Martin Atkins
d6049c2a04 Get ready to be a Go module
However, since this repository is only a temporary home for this module,
the go.mod file carries a warning to that effect. It will move to its more
permanent home as it transitions from experimental to released.
2018-08-17 19:07:38 -07:00