Update hcl

This commit is contained in:
Jeff Mitchell 2018-03-20 16:36:37 -04:00
parent 1d23455829
commit 4b491229ba
2 changed files with 32 additions and 31 deletions

View File

@ -74,14 +74,6 @@ func (s *Scanner) next() rune {
return eof
}
if ch == utf8.RuneError && size == 1 {
s.srcPos.Column++
s.srcPos.Offset += size
s.lastCharLen = size
s.err("illegal UTF-8 encoding")
return ch
}
// remember last position
s.prevPos = s.srcPos
@ -89,18 +81,27 @@ func (s *Scanner) next() rune {
s.lastCharLen = size
s.srcPos.Offset += size
if ch == utf8.RuneError && size == 1 {
s.err("illegal UTF-8 encoding")
return ch
}
if ch == '\n' {
s.srcPos.Line++
s.lastLineLen = s.srcPos.Column
s.srcPos.Column = 0
}
// If we see a null character with data left, then that is an error
if ch == '\x00' && s.buf.Len() > 0 {
if ch == '\x00' {
s.err("unexpected null character (0x00)")
return eof
}
if ch == '\uE123' {
s.err("unicode code point U+E123 reserved for internal use")
return utf8.RuneError
}
// debug
// fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column)
return ch

42
vendor/vendor.json vendored
View File

@ -1131,62 +1131,62 @@
{
"checksumSHA1": "HtpYAWHvd9mq+mHkpo7z8PGzMik=",
"path": "github.com/hashicorp/hcl",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=",
"path": "github.com/hashicorp/hcl/hcl/ast",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "/15SVLnCDzxICSatuYbfctrcpSM=",
"path": "github.com/hashicorp/hcl/hcl/parser",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "WR1BjzDKgv6uE+3ShcDTYz0Gl6A=",
"path": "github.com/hashicorp/hcl/hcl/printer",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "PYDzRc61T0pbwWuLNHgBRp/gJII=",
"checksumSHA1": "2yAyqWxkMg1qpjx502/styJhiwg=",
"path": "github.com/hashicorp/hcl/hcl/scanner",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=",
"path": "github.com/hashicorp/hcl/hcl/strconv",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=",
"path": "github.com/hashicorp/hcl/hcl/token",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "PwlfXt7mFS8UYzWxOK5DOq0yxS0=",
"path": "github.com/hashicorp/hcl/json/parser",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "afrZ8VmAwfTdDAYVgNSXbxa4GsA=",
"path": "github.com/hashicorp/hcl/json/scanner",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
"path": "github.com/hashicorp/hcl/json/token",
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
"revisionTime": "2017-10-17T18:19:29Z"
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
"revisionTime": "2018-03-20T20:20:55Z"
},
{
"checksumSHA1": "rqMUsuunjuk0tI9MzUO2sddI38Y=",