hcl/hclwrite
Martin Atkins 77c0b55a59 hclwrite: Simplify internal data structures
The original prototype of hclwrite tried to track both the tokens and
the AST as two parallel data structures. This quickly exploded in
complexity, leading to lots of messy code to manage keeping those two
structures in sync.

This new approach melds the two structures together, creating first a
physical token tree (made of "node" objects, and hidden from the caller)
and then attaching the AST nodes to that token tree as additional sidecar
data.

The result is much easier to work with, leading to less code in the parser
and considerably less complex data structures in the parser's tests.

This commit is enough to reach feature parity with the previous prototype,
but it remains a prototype. With a more usable foundation, we'll evolve
this into a more complete implementation in subsequent commits.
2018-08-01 08:46:31 -07:00
..
ast_body_test.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
ast_body.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
ast_expression.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
ast_test.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
ast.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
doc.go Update doc comments and readmes for zcl -> HCL. 2017-09-11 16:56:31 -07:00
format_test.go hclwrite: Format shouldn't introduce spaces before index brackets 2018-05-23 16:56:29 -07:00
format.go hclwrite: Formatter should put a space after a comma 2018-07-14 15:05:37 -07:00
generate_test.go hclwrite: TokensForValue 2018-07-14 15:05:37 -07:00
generate.go hclwrite: TokensForValue 2018-07-14 15:05:37 -07:00
native_node_sorter.go Move the zcl package and its two parsing subpackages to "hcl" names 2017-09-11 16:40:37 -07:00
node.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
parser_test.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
parser.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
public.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
round_trip_test.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00
tokens.go hclwrite: Simplify internal data structures 2018-08-01 08:46:31 -07:00