Fix broken parsing case

This commit is contained in:
Mitchell Hashimoto 2014-08-28 16:56:08 -07:00
parent 982cf1ff35
commit 71e25b33f0
3 changed files with 11 additions and 1 deletions

View File

@ -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,

View File

@ -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
}

View File

@ -0,0 +1,2 @@
foo="bar"
bar="${file("bing/bong.txt")}"