77c0b55a59
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. |
||
---|---|---|
.. | ||
ast_body_test.go | ||
ast_body.go | ||
ast_expression.go | ||
ast_test.go | ||
ast.go | ||
doc.go | ||
format_test.go | ||
format.go | ||
generate_test.go | ||
generate.go | ||
native_node_sorter.go | ||
node.go | ||
parser_test.go | ||
parser.go | ||
public.go | ||
round_trip_test.go | ||
tokens.go |