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",
|
"basic_squish.hcl",
|
||||||
false,
|
false,
|
||||||
map[string]interface{}{
|
map[string]interface{}{
|
||||||
"foo": "bar",
|
"foo": "bar",
|
||||||
"bar": "${file(\"bing/bong.txt\")}",
|
"bar": "${file(\"bing/bong.txt\")}",
|
||||||
|
"foo-bar": "baz",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -170,7 +170,7 @@ func (x *hclLex) lexId(yylval *hclSymType) int {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if !unicode.IsDigit(c) && !unicode.IsLetter(c) && c != '_' {
|
if !unicode.IsDigit(c) && !unicode.IsLetter(c) && c != '_' && c != '-' {
|
||||||
x.backup()
|
x.backup()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
foo="bar"
|
foo="bar"
|
||||||
bar="${file("bing/bong.txt")}"
|
bar="${file("bing/bong.txt")}"
|
||||||
|
foo-bar="baz"
|
||||||
|
Loading…
Reference in New Issue
Block a user