hcl/zcl
Martin Atkins 59a1343216 zclsyntax: allow numeric "attributes" inside attr-only splats
Terraform interprets HIL variables in such a way that it allows numeric
attribute names which then get interpreted as numeric indices into a
list. This is used to work around the fact that the splat expressions
don't work for the index operator.

zcl has "full splats" that _do_ support the index operator, but to allow
old Terraform configs to be processed by zcl we'll accept this special
case within attribute-only-splats only.

For the moment this is a special exception made by this specific
implementation of zcl rather than part of the spec, since it's
specifically a pragmatic Terraform migration strategy, but it might get
upgraded to full spec status later if we end up needing to support it
in other host languages.

This requires the scanner to be a little more picky about the ending
of numeric literals, so that they won't absorb the trailing period after
the number in foo.*.baz.1.baz . This is okay because the spec doesn't
allow trailing periods anyway, and this is not actually a change in
final behavior because the parser was already catching this situation
and rejecting it at a later point.
2017-06-24 09:39:16 -07:00
..
hclhil Add MissingItemRange to zcl.BodyContent 2017-06-03 16:46:49 -07:00
json json: beginnings of a JSON syntax specification document 2017-06-20 08:07:10 -07:00
zclsyntax zclsyntax: allow numeric "attributes" inside attr-only splats 2017-06-24 09:39:16 -07:00
diagnostic_text_test.go Mechanism for introspection of source code for editors 2017-05-19 19:33:58 -07:00
diagnostic_text.go Mechanism for introspection of source code for editors 2017-05-19 19:33:58 -07:00
diagnostic.go Initial support for printing out diagnostics 2017-05-18 19:01:41 -07:00
didyoumean.go zcl: Implement Traversal.TraverseAbs 2017-06-05 07:55:33 -07:00
doc.go Initial stubs of the public API 2017-05-13 17:44:11 -07:00
eval_context.go zclsyntax: look in parent EvalContexts for functions 2017-06-16 07:28:29 -07:00
merged_test.go Define Body.JustAttributes as returning Attributes 2017-05-21 15:43:41 -07:00
merged.go Define Body.JustAttributes as returning Attributes 2017-05-21 15:43:41 -07:00
ops.go zcl: Automatically convert key types when indexing 2017-06-05 07:39:14 -07:00
pos.go zcl: Range.String should not be a pointer method 2017-06-11 08:37:28 -07:00
schema.go json: start of low-level decoding 2017-05-19 19:33:58 -07:00
spec.md zcl: beginnings of the spec for the syntax-agnostic model 2017-06-21 22:00:23 -07:00
structure.go Add MissingItemRange to zcl.BodyContent 2017-06-03 16:46:49 -07:00
traversal.go zcl: allow nil Variables in EvalContext 2017-06-16 07:15:14 -07:00