hclsyntax: Correct spec to allow colons as object element delimiter

To allow easir adaptation of data already serialized as JSON, HCL native
syntax allows both equals signs _and_ colons for object constructors.

This was already implemented, but not reflected in the pseudo-BNF in
the specification.
This commit is contained in:
Martin Atkins 2020-03-05 09:51:26 -08:00 committed by GitHub
parent 5200d8dd67
commit 2cf95f2b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ tuple = "[" (
object = "{" (
(objectelem ("," objectelem)* ","?)?
) "}";
objectelem = (Identifier | Expression) "=" Expression;
objectelem = (Identifier | Expression) ("=" | ":") Expression;
```
Only tuple and object values can be directly constructed via native syntax.