Fix broken parsing case
This commit is contained in:
parent
982cf1ff35
commit
71e25b33f0
@ -21,6 +21,14 @@ func TestDecode_interface(t *testing.T) {
|
||||
"bar": "${file(\"bing/bong.txt\")}",
|
||||
},
|
||||
},
|
||||
{
|
||||
"basic_squish.hcl",
|
||||
false,
|
||||
map[string]interface{}{
|
||||
"foo": "bar",
|
||||
"bar": "${file(\"bing/bong.txt\")}",
|
||||
},
|
||||
},
|
||||
{
|
||||
"empty.hcl",
|
||||
false,
|
||||
|
@ -170,7 +170,7 @@ func (x *hclLex) lexId(yylval *hclSymType) int {
|
||||
break
|
||||
}
|
||||
|
||||
if unicode.IsSpace(c) {
|
||||
if !unicode.IsDigit(c) && !unicode.IsLetter(c) && c != '_' {
|
||||
x.backup()
|
||||
break
|
||||
}
|
||||
|
2
test-fixtures/basic_squish.hcl
Normal file
2
test-fixtures/basic_squish.hcl
Normal file
@ -0,0 +1,2 @@
|
||||
foo="bar"
|
||||
bar="${file("bing/bong.txt")}"
|
Loading…
Reference in New Issue
Block a user