Update HCL to latest version

Pulls in https://github.com/hashicorp/hcl/pull/125

Which fixes #6359
This commit is contained in:
Paul Hinze 2016-06-06 19:36:04 -05:00
parent 3044cc5c38
commit 029c79e677
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
4 changed files with 40 additions and 27 deletions

View File

@ -1,9 +0,0 @@
y.output
# ignore intellij files
.idea
*.iml
*.ipr
*.iws
*.test

View File

@ -1,3 +0,0 @@
sudo: false
language: go
go: 1.5

View File

@ -49,7 +49,8 @@ func Unquote(s string) (t string, err error) {
for len(s) > 0 { for len(s) > 0 {
// If we're starting a '${}' then let it through un-unquoted. // If we're starting a '${}' then let it through un-unquoted.
// Specifically: we don't unquote any characters within the `${}` // Specifically: we don't unquote any characters within the `${}`
// section, except for escaped quotes, which we handle specifically. // section, except for escaped quotes and escaped backslashes, which we
// handle specifically.
if s[0] == '$' && len(s) > 1 && s[1] == '{' { if s[0] == '$' && len(s) > 1 && s[1] == '{' {
buf = append(buf, '$', '{') buf = append(buf, '$', '{')
s = s[2:] s = s[2:]
@ -64,10 +65,12 @@ func Unquote(s string) (t string, err error) {
s = s[size:] s = s[size:]
// We special case escaped double quotes in interpolations, converting // We special case escaped double quotes and escaped backslashes in
// them to straight double quotes. // interpolations, converting them to their unescaped equivalents.
if r == '\\' { if r == '\\' {
if q, _ := utf8.DecodeRuneInString(s); q == '"' { q, _ := utf8.DecodeRuneInString(s)
switch q {
case '"', '\\':
continue continue
} }
} }

44
vendor/vendor.json vendored
View File

@ -758,48 +758,70 @@
"revision": "7e3c02b30806fa5779d3bdfc152ce4c6f40e7b38" "revision": "7e3c02b30806fa5779d3bdfc152ce4c6f40e7b38"
}, },
{ {
"checksumSHA1": "5LrCq/ydlbL6pq1cdmuxiw7QV98=",
"path": "github.com/hashicorp/hcl", "path": "github.com/hashicorp/hcl",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "WP5ODRo9+USuAsKYPu5RW3q8Epg=",
"path": "github.com/hashicorp/hcl/hcl/ast", "path": "github.com/hashicorp/hcl/hcl/ast",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "z03dif8bqgQ3Zk/1RGbvfgBXMXo=",
"path": "github.com/hashicorp/hcl/hcl/fmtcmd", "path": "github.com/hashicorp/hcl/hcl/fmtcmd",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "SVw0qm83Anf5T2GkYabn+f7Ibv0=",
"path": "github.com/hashicorp/hcl/hcl/parser", "path": "github.com/hashicorp/hcl/hcl/parser",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "CSmwxPOTz7GSpnWPF9aGkbVeR64=",
"path": "github.com/hashicorp/hcl/hcl/printer", "path": "github.com/hashicorp/hcl/hcl/printer",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "WZM0q7Sya8PcGj607x1npgcEPa4=",
"path": "github.com/hashicorp/hcl/hcl/scanner", "path": "github.com/hashicorp/hcl/hcl/scanner",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "ETy6J7OZ7zjBNq0V0Lm8E/7Xafw=",
"path": "github.com/hashicorp/hcl/hcl/strconv", "path": "github.com/hashicorp/hcl/hcl/strconv",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "VGNVyGYDGTTCTRqGH5R+CL0u6xw=",
"path": "github.com/hashicorp/hcl/hcl/token", "path": "github.com/hashicorp/hcl/hcl/token",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "uEaK2zagnGctsUmjWt8ZYmK1Yvs=",
"path": "github.com/hashicorp/hcl/json/parser", "path": "github.com/hashicorp/hcl/json/parser",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "S1e0F9ZKSnqgOLfjDTYazRL28tA=",
"path": "github.com/hashicorp/hcl/json/scanner", "path": "github.com/hashicorp/hcl/json/scanner",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
"path": "github.com/hashicorp/hcl/json/token", "path": "github.com/hashicorp/hcl/json/token",
"revision": "9a905a34e6280ce905da1a32344b25e81011197a" "revision": "d7400db7143f8e869812e50a53acd6c8d92af3b8",
"revisionTime": "2016-06-07T00:19:40Z"
}, },
{ {
"path": "github.com/hashicorp/hil", "path": "github.com/hashicorp/hil",