Merge pull request #172 from hashicorp/b-println

hcl/parser: don't print "illegal"
This commit is contained in:
Mitchell Hashimoto 2016-11-30 12:58:18 -08:00 committed by GitHub
commit b97feebd3d

View File

@ -256,7 +256,10 @@ func (p *Parser) objectKey() ([]*ast.ObjectKey, error) {
keyCount++
keys = append(keys, &ast.ObjectKey{Token: p.tok})
case token.ILLEGAL:
fmt.Println("illegal")
return keys, &PosError{
Pos: p.tok.Pos,
Err: fmt.Errorf("illegal character"),
}
default:
return keys, &PosError{
Pos: p.tok.Pos,