From 2cf95f2b60823e85a34924f3a35723a892ea6f92 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Thu, 5 Mar 2020 09:51:26 -0800 Subject: [PATCH] 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. --- hclsyntax/spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hclsyntax/spec.md b/hclsyntax/spec.md index 3fc5f5f..550bd93 100644 --- a/hclsyntax/spec.md +++ b/hclsyntax/spec.md @@ -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.