From c9849d667ab55c23d343332a11afb3eb8ede3f2d Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sun, 17 Jul 2016 17:16:14 +0100 Subject: Update vendor libs --- vendor/github.com/hashicorp/hcl/json/parser/parser.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'vendor/github.com/hashicorp/hcl/json/parser/parser.go') diff --git a/vendor/github.com/hashicorp/hcl/json/parser/parser.go b/vendor/github.com/hashicorp/hcl/json/parser/parser.go index 65d56c9..3a62ec3 100644 --- a/vendor/github.com/hashicorp/hcl/json/parser/parser.go +++ b/vendor/github.com/hashicorp/hcl/json/parser/parser.go @@ -128,6 +128,12 @@ func (p *Parser) objectKey() ([]*ast.ObjectKey, error) { Token: p.tok.HCLToken(), }) case token.COLON: + // If we have a zero keycount it means that we never got + // an object key, i.e. `{ :`. This is a syntax error. + if keyCount == 0 { + return nil, fmt.Errorf("expected: STRING got: %s", p.tok.Type) + } + // Done return keys, nil case token.ILLEGAL: -- cgit v1.2.3