06985781df
We currently have functions for constructing new expressions from either constant values or from traversals, but some surgical updates require producing a more complex expression. In the long run perhaps we'll have some mechanism for constructing valid expressions via a high-level AST-like API, similar to what we already have for structural constructs, but as a simpler first step here we add a mechanism to just write raw tokens directly into an expression, with the caller being responsible for making sure those tokens represent valid HCL expression syntax. Since this new API treats the given tokens as unstructured, the resulting expression can't fully support the whole of the expression API, but it's good enough for writing in complex expressions without disturbing existing content elsewhere in the input file. |
||
---|---|---|
.. | ||
ast_attribute.go | ||
ast_block_test.go | ||
ast_block.go | ||
ast_body_test.go | ||
ast_body.go | ||
ast_expression.go | ||
ast_test.go | ||
ast.go | ||
doc.go | ||
examples_test.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 |