package
0.0.0-20190712010647-ace444864d00
Repository: https://github.com/mcuadros/hcl2.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
LexConfig performs lexical analysis on the given buffer, treating it as a whole HCL config file, and returns the resulting tokens.
LexExpression performs lexical analysis on the given buffer, treating it as a standalone HCL expression, and returns the resulting tokens.
LexTemplate performs lexical analysis on the given buffer, treating it as a standalone HCL template, and returns the resulting tokens.
ParseConfig parses the given buffer as a whole HCL config file, returning a *hcl.File representing its contents.
ParseExpression parses the given buffer as a standalone HCL expression, returning it as an instance of Expression.
ParseTemplate parses the given buffer as a standalone HCL template, returning it as an instance of Expression.
ParseTraversalAbs parses the given buffer as a standalone absolute traversal.
ValidIdentifier tests if the given string could be a valid identifier in a native syntax expression.
Variables returns all of the variables referenced within a given experssion.
VisitAll is a basic way to traverse the AST beginning with a particular node.
Walk is a more complex way to traverse the AST starting with a particular node, which provides information about the tree structure via separate Enter and Exit functions.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TokenNil is a placeholder for when a token is required but none is available, e.g.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
might contain backslash escapes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
cannot contain backslash escapes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
AnonSymbolExpr is used as a placeholder for a value in an expression that can be applied dynamically to any value at runtime.
Attribute represents a single attribute definition within a body.
No description provided by the author
Block represents a nested block structure.
Body is the implementation of hcl.Body for the HCL native syntax.
ChildScope is a synthetic AST node that is visited during a walk to indicate that its descendent will be evaluated in a child scope, which may mask certain variables from the parent scope as locals.
No description provided by the author
File is the top-level object resulting from parsing a configuration file.
ForExpr represents iteration constructs:
tuple = [for i, v in list: upper(v) if i > 2] object = {for k, v in map: k => upper(v)} object_of_tuples = {for v in list: v.key: v...}.
FunctionCallExpr is an Expression that calls a function from the EvalContext and returns its result.
No description provided by the author
LiteralValueExpr is an expression that just always returns a given value.
No description provided by the author
No description provided by the author
ObjectConsKeyExpr is a special wrapper used only for ObjectConsExpr keys, which deals with the special case that a naked identifier in that position must be interpreted as a literal string rather than evaluated directly.
No description provided by the author
RelativeTraversalExpr is an Expression that retrieves a value from another value using a _relative_ traversal.
ScopeTraversalExpr is an Expression that retrieves a value from the scope using a traversal.
No description provided by the author
No description provided by the author
TemplateJoinExpr is used to convert tuples of strings produced by template constructs (i.e.
TemplateWrapExpr is used instead of a TemplateExpr when a template consists _only_ of a single interpolation sequence.
Token represents a sequence of bytes from some HCL code that has been tagged with a type and its range within the source file.
No description provided by the author
No description provided by the author
# Interfaces
Expression is the abstract type for nodes that behave as HCL expressions.
Node is the abstract type that every AST node implements.
Walker is an interface used with Walk.
# Type aliases
Attributes is the collection of attribute definitions within a body.
Blocks is the list of nested blocks within a body.
No description provided by the author
Tokens is a slice of Token.
TokenType is an enumeration used for the Type field on Token.
VisitFunc is the callback signature for VisitAll.