hcl/hclsyntax
Alisdair McDiarmid d58c873a08 hclwrite: Fix panic for dotted full splat (foo.*)
The following expression caused a panic in hclwrite:

  a = foo.*

This was due to the unusual dotted form of a full splat (where the splat
operator is at the end of the expression) being generated with an
invalid source range. In the full splat case, the end of the range was
uninitialized, which caused the token slice to be empty, and thus the
panic.

This commit fixes the bug, adds test coverage, and includes some bonus
tests for other splat expression cases.
2020-05-13 16:23:21 -04:00
..
fuzz Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
diagnostics.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
didyoumean_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
didyoumean.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
doc.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
expression_ops.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
expression_static_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
expression_template_test.go hclsyntax: Additional tests for template sequence escapes 2019-10-01 15:59:10 -07:00
expression_template.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
expression_test.go hclsyntax: Allow parens to force mapping key to be expression 2019-10-01 15:59:10 -07:00
expression_vars_gen.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
expression_vars.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
expression.go ext/customdecode: Custom expression decoding extension 2019-12-17 07:51:07 -08:00
file.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
generate.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
keywords.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
navigation_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
navigation.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
node.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
parse_traversal_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
parser_template.go Use Unicode 12.0.0 grapheme cluster segmentation rules 2020-03-09 09:16:33 -07:00
parser_test.go hclsyntax: Source range of IndexExpr must cover whole expression 2019-12-06 09:09:18 -08:00
parser_traversal.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
parser.go hclwrite: Fix panic for dotted full splat (foo.*) 2020-05-13 16:23:21 -04:00
peeker_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
peeker.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
public_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
public.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
scan_string_lit_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
scan_string_lit.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
scan_string_lit.rl Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
scan_tokens_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
scan_tokens.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
scan_tokens.rl Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
spec.md hclsyntax: Correct spec to allow colons as object element delimiter 2020-03-05 09:51:26 -08:00
structure_at_pos_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
structure_at_pos.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
structure_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
structure.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
token_type_string.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
token.go Use Unicode 12.0.0 grapheme cluster segmentation rules 2020-03-09 09:16:33 -07:00
unicode2ragel.rb Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
unicode_derived.rl Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
variables_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
variables.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
walk_test.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00
walk.go Unfold the "hcl" directory up into the root 2019-09-09 16:08:19 -07:00