hcl: identifiers can have '-'
This commit is contained in:
parent
71e25b33f0
commit
a0a5d2873e
@ -25,8 +25,9 @@ func TestDecode_interface(t *testing.T) {
|
||||
"basic_squish.hcl",
|
||||
false,
|
||||
map[string]interface{}{
|
||||
"foo": "bar",
|
||||
"bar": "${file(\"bing/bong.txt\")}",
|
||||
"foo": "bar",
|
||||
"bar": "${file(\"bing/bong.txt\")}",
|
||||
"foo-bar": "baz",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ func (x *hclLex) lexId(yylval *hclSymType) int {
|
||||
break
|
||||
}
|
||||
|
||||
if !unicode.IsDigit(c) && !unicode.IsLetter(c) && c != '_' {
|
||||
if !unicode.IsDigit(c) && !unicode.IsLetter(c) && c != '_' && c != '-' {
|
||||
x.backup()
|
||||
break
|
||||
}
|
||||
|
@ -1,2 +1,3 @@
|
||||
foo="bar"
|
||||
bar="${file("bing/bong.txt")}"
|
||||
foo-bar="baz"
|
||||
|
Loading…
Reference in New Issue
Block a user