Update hcl
This commit is contained in:
parent
1d23455829
commit
4b491229ba
|
@ -74,14 +74,6 @@ func (s *Scanner) next() rune {
|
||||||
return eof
|
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
|
// remember last position
|
||||||
s.prevPos = s.srcPos
|
s.prevPos = s.srcPos
|
||||||
|
|
||||||
|
@ -89,18 +81,27 @@ func (s *Scanner) next() rune {
|
||||||
s.lastCharLen = size
|
s.lastCharLen = size
|
||||||
s.srcPos.Offset += size
|
s.srcPos.Offset += size
|
||||||
|
|
||||||
|
if ch == utf8.RuneError && size == 1 {
|
||||||
|
s.err("illegal UTF-8 encoding")
|
||||||
|
return ch
|
||||||
|
}
|
||||||
|
|
||||||
if ch == '\n' {
|
if ch == '\n' {
|
||||||
s.srcPos.Line++
|
s.srcPos.Line++
|
||||||
s.lastLineLen = s.srcPos.Column
|
s.lastLineLen = s.srcPos.Column
|
||||||
s.srcPos.Column = 0
|
s.srcPos.Column = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we see a null character with data left, then that is an error
|
if ch == '\x00' {
|
||||||
if ch == '\x00' && s.buf.Len() > 0 {
|
|
||||||
s.err("unexpected null character (0x00)")
|
s.err("unexpected null character (0x00)")
|
||||||
return eof
|
return eof
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ch == '\uE123' {
|
||||||
|
s.err("unicode code point U+E123 reserved for internal use")
|
||||||
|
return utf8.RuneError
|
||||||
|
}
|
||||||
|
|
||||||
// debug
|
// debug
|
||||||
// fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column)
|
// fmt.Printf("ch: %q, offset:column: %d:%d\n", ch, s.srcPos.Offset, s.srcPos.Column)
|
||||||
return ch
|
return ch
|
||||||
|
|
|
@ -1131,62 +1131,62 @@
|
||||||
{
|
{
|
||||||
"checksumSHA1": "HtpYAWHvd9mq+mHkpo7z8PGzMik=",
|
"checksumSHA1": "HtpYAWHvd9mq+mHkpo7z8PGzMik=",
|
||||||
"path": "github.com/hashicorp/hcl",
|
"path": "github.com/hashicorp/hcl",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=",
|
"checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=",
|
||||||
"path": "github.com/hashicorp/hcl/hcl/ast",
|
"path": "github.com/hashicorp/hcl/hcl/ast",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "/15SVLnCDzxICSatuYbfctrcpSM=",
|
"checksumSHA1": "/15SVLnCDzxICSatuYbfctrcpSM=",
|
||||||
"path": "github.com/hashicorp/hcl/hcl/parser",
|
"path": "github.com/hashicorp/hcl/hcl/parser",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "WR1BjzDKgv6uE+3ShcDTYz0Gl6A=",
|
"checksumSHA1": "WR1BjzDKgv6uE+3ShcDTYz0Gl6A=",
|
||||||
"path": "github.com/hashicorp/hcl/hcl/printer",
|
"path": "github.com/hashicorp/hcl/hcl/printer",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "PYDzRc61T0pbwWuLNHgBRp/gJII=",
|
"checksumSHA1": "2yAyqWxkMg1qpjx502/styJhiwg=",
|
||||||
"path": "github.com/hashicorp/hcl/hcl/scanner",
|
"path": "github.com/hashicorp/hcl/hcl/scanner",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=",
|
"checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=",
|
||||||
"path": "github.com/hashicorp/hcl/hcl/strconv",
|
"path": "github.com/hashicorp/hcl/hcl/strconv",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=",
|
"checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=",
|
||||||
"path": "github.com/hashicorp/hcl/hcl/token",
|
"path": "github.com/hashicorp/hcl/hcl/token",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "PwlfXt7mFS8UYzWxOK5DOq0yxS0=",
|
"checksumSHA1": "PwlfXt7mFS8UYzWxOK5DOq0yxS0=",
|
||||||
"path": "github.com/hashicorp/hcl/json/parser",
|
"path": "github.com/hashicorp/hcl/json/parser",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "afrZ8VmAwfTdDAYVgNSXbxa4GsA=",
|
"checksumSHA1": "afrZ8VmAwfTdDAYVgNSXbxa4GsA=",
|
||||||
"path": "github.com/hashicorp/hcl/json/scanner",
|
"path": "github.com/hashicorp/hcl/json/scanner",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
|
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
|
||||||
"path": "github.com/hashicorp/hcl/json/token",
|
"path": "github.com/hashicorp/hcl/json/token",
|
||||||
"revision": "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8",
|
"revision": "f40e974e75af4e271d97ce0fc917af5898ae7bda",
|
||||||
"revisionTime": "2017-10-17T18:19:29Z"
|
"revisionTime": "2018-03-20T20:20:55Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "rqMUsuunjuk0tI9MzUO2sddI38Y=",
|
"checksumSHA1": "rqMUsuunjuk0tI9MzUO2sddI38Y=",
|
||||||
|
|
Loading…
Reference in New Issue