Closed rzodkiewiczmr closed 4 years ago
@rzodkiewiczmr if you put type = string
inside quotes will work:
var HCL = require("js-hcl-parser")
const input = `
variable my_variable {
description = "Some description"
type = "string"
}
`
console.log(HCL.parse(input))
I'm trying to parse HCL file with list of variables, parsing fails.
const input =
variable my_variable {
description = "Some description"
type = string
}'
HCL.parse(input)
(I've changed ` into ' in JS code)
fails with error:
unable to parse JSON: At 4:12: Unknown token: 4:12 IDENT string
Seems like the parser is not ready to parse variables syntax?