MCPcopy
hub / github.com/hashicorp/hcl / Variables

Method Variables

hclwrite/ast_expression.go:132–139  ·  view source on GitHub ↗

Variables returns the absolute traversals that exist within the receiving expression.

()

Source from the content-addressed store, hash-verified

130// Variables returns the absolute traversals that exist within the receiving
131// expression.
132func (e *Expression) Variables() []*Traversal {
133 nodes := e.absTraversals.List()
134 ret := make([]*Traversal, len(nodes))
135 for i, node := range nodes {
136 ret[i] = node.content.(*Traversal)
137 }
138 return ret
139}
140
141// RenameVariablePrefix examines each of the absolute traversals in the
142// receiving expression to see if they have the given sequence of names as

Callers

nothing calls this directly

Implementers 15

staticExprstatic_expr.go
fixedExpressiongohcl/decode_test.go
LiteralValueExprhclsyntax/expression.go
ScopeTraversalExprhclsyntax/expression.go
RelativeTraversalExprhclsyntax/expression.go
FunctionCallExprhclsyntax/expression.go
ConditionalExprhclsyntax/expression.go
IndexExprhclsyntax/expression.go
TupleConsExprhclsyntax/expression.go
ObjectConsExprhclsyntax/expression.go
ObjectConsKeyExprhclsyntax/expression.go
ForExprhclsyntax/expression.go

Calls 1

ListMethod · 0.80

Tested by

no test coverage detected