vendor: update HCL

This commit is contained in:
Mitchell Hashimoto 2016-11-29 10:30:51 -08:00
parent f25592a3ef
commit 5ce7ff178b
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
3 changed files with 32 additions and 25 deletions

View File

@ -480,7 +480,7 @@ func (s *Scanner) scanString() {
// read character after quote
ch := s.next()
if ch < 0 || ch == eof {
if (ch == '\n' && braces == 0) || ch < 0 || ch == eof {
s.err("literal not terminated")
return
}

View File

@ -27,6 +27,9 @@ func Unquote(s string) (t string, err error) {
if quote != '"' {
return "", ErrSyntax
}
if !contains(s, '$') && !contains(s, '{') && contains(s, '\n') {
return "", ErrSyntax
}
// Is it trivial? Avoid allocation.
if !contains(s, '\\') && !contains(s, quote) && !contains(s, '$') {
@ -84,6 +87,10 @@ func Unquote(s string) (t string, err error) {
}
}
if s[0] == '\n' {
return "", ErrSyntax
}
c, multibyte, ss, err := unquoteChar(s, quote)
if err != nil {
return "", err

48
vendor/vendor.json vendored
View File

@ -1514,68 +1514,68 @@
{
"checksumSHA1": "8OPDk+bKyRGJoKcS4QNw9F7dpE8=",
"path": "github.com/hashicorp/hcl",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=",
"path": "github.com/hashicorp/hcl/hcl/ast",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "5HVecyfmcTm6OTffEi6LGayQf5M=",
"path": "github.com/hashicorp/hcl/hcl/fmtcmd",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "croNloscHsjX87X+4/cKOURf1EY=",
"path": "github.com/hashicorp/hcl/hcl/parser",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "1k1PQRPdYEjeTbXsYz5ZP+Won1w=",
"path": "github.com/hashicorp/hcl/hcl/printer",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "Zz4271B4Kc+rwwK7cbaRv7STfO8=",
"checksumSHA1": "z6wdP4mRw4GVjShkNHDaOWkbxS0=",
"path": "github.com/hashicorp/hcl/hcl/scanner",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "/e0ULfQnGeUKiM1+iMnQhImo62k=",
"checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=",
"path": "github.com/hashicorp/hcl/hcl/strconv",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=",
"path": "github.com/hashicorp/hcl/hcl/token",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "138aCV5n8n7tkGYMsMVQQnnLq+0=",
"path": "github.com/hashicorp/hcl/json/parser",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "YdvFsNOMSWMLnY6fcliWQa0O5Fw=",
"path": "github.com/hashicorp/hcl/json/scanner",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
"path": "github.com/hashicorp/hcl/json/token",
"revision": "7cb7455c285ca3bf3362aa4ba6a06a6d6f5c3ba0",
"revisionTime": "2016-11-22T02:11:24Z"
"revision": "5550aaba7896ad2a161888b40954bc0f0787bb81",
"revisionTime": "2016-11-29T18:26:28Z"
},
{
"checksumSHA1": "/TJCBetWCMVsOpehJzVk3S/xtWM=",