Versions in this module Expand all Collapse all v2 v2.1.0 Nov 20, 2022 v2.0.0 Oct 26, 2022 Changes in this version + var OpAdd = &Operation + var OpDivide = &Operation + var OpEqual = &Operation + var OpGreaterThan = &Operation + var OpGreaterThanOrEqual = &Operation + var OpLessThan = &Operation + var OpLessThanOrEqual = &Operation + var OpLogicalAnd = &Operation + var OpLogicalNot = &Operation + var OpLogicalOr = &Operation + var OpModulo = &Operation + var OpMultiply = &Operation + var OpNegate = &Operation + var OpNotEqual = &Operation + var OpSubtract = &Operation + func ParseConfig(src []byte, filename string, start hcl.Pos) (*hcl.File, hcl.Diagnostics) + func ParseStringLiteralToken(tok Token) (string, hcl.Diagnostics) + func ParseTraversalAbs(src []byte, filename string, start hcl.Pos) (hcl.Traversal, hcl.Diagnostics) + func ValidIdentifier(s string) bool + func Variables(expr Expression) []hcl.Traversal + func VisitAll(node Node, f VisitFunc) hcl.Diagnostics + func Walk(node Node, w Walker) hcl.Diagnostics + type AnonSymbolExpr struct + SrcRange hcl.Range + func (e *AnonSymbolExpr) Range() hcl.Range + func (e *AnonSymbolExpr) StartRange() hcl.Range + func (e *AnonSymbolExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *AnonSymbolExpr) Variables() []hcl.Traversal + type Attribute struct + EqualsRange hcl.Range + Expr Expression + Name string + NameRange hcl.Range + SrcRange hcl.Range + func (a *Attribute) AsHCLAttribute() *hcl.Attribute + func (a *Attribute) Range() hcl.Range + type Attributes map[string]*Attribute + func (a Attributes) Range() hcl.Range + type BinaryOpExpr struct + LHS Expression + Op *Operation + RHS Expression + SrcRange hcl.Range + func (e *BinaryOpExpr) Range() hcl.Range + func (e *BinaryOpExpr) StartRange() hcl.Range + func (e *BinaryOpExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *BinaryOpExpr) Variables() []hcl.Traversal + type Block struct + Body *Body + CloseBraceRange hcl.Range + LabelRanges []hcl.Range + Labels []string + OpenBraceRange hcl.Range + Type string + TypeRange hcl.Range + func (b *Block) AsHCLBlock() *hcl.Block + func (b *Block) DefRange() hcl.Range + func (b *Block) Range() hcl.Range + type Blocks []*Block + func (bs Blocks) Range() hcl.Range + type Body struct + Attributes Attributes + Blocks Blocks + EndRange hcl.Range + SrcRange hcl.Range + func (b *Body) AttributeAtPos(pos hcl.Pos) *hcl.Attribute + func (b *Body) BlocksAtPos(pos hcl.Pos) []*hcl.Block + func (b *Body) Content(schema *hcl.BodySchema) (*hcl.BodyContent, hcl.Diagnostics) + func (b *Body) InnermostBlockAtPos(pos hcl.Pos) *hcl.Block + func (b *Body) JustAttributes() (hcl.Attributes, hcl.Diagnostics) + func (b *Body) MissingItemRange() hcl.Range + func (b *Body) OutermostBlockAtPos(pos hcl.Pos) *hcl.Block + func (b *Body) OutermostExprAtPos(pos hcl.Pos) hcl.Expression + func (b *Body) PartialContent(schema *hcl.BodySchema) (*hcl.BodyContent, hcl.Body, hcl.Diagnostics) + func (b *Body) Range() hcl.Range + type ChildScope struct + Expr Expression + LocalNames map[string]struct{} + func (e ChildScope) Range() hcl.Range + type ConditionalExpr struct + Condition Expression + FalseResult Expression + SrcRange hcl.Range + TrueResult Expression + func (e *ConditionalExpr) Range() hcl.Range + func (e *ConditionalExpr) StartRange() hcl.Range + func (e *ConditionalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *ConditionalExpr) Variables() []hcl.Traversal + type Expression interface + StartRange func() hcl.Range + Value func(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + Variables func() []hcl.Traversal + func ParseExpression(src []byte, filename string, start hcl.Pos) (Expression, hcl.Diagnostics) + func ParseTemplate(src []byte, filename string, start hcl.Pos) (Expression, hcl.Diagnostics) + type File struct + Body *Body + Bytes []byte + func (f *File) AsHCLFile() *hcl.File + type ForExpr struct + CloseRange hcl.Range + CollExpr Expression + CondExpr Expression + Group bool + KeyExpr Expression + KeyVar string + OpenRange hcl.Range + SrcRange hcl.Range + ValExpr Expression + ValVar string + func (e *ForExpr) Range() hcl.Range + func (e *ForExpr) StartRange() hcl.Range + func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *ForExpr) Variables() []hcl.Traversal + type FunctionCallDiagExtra interface + CalledFunctionName func() string + FunctionCallError func() error + type FunctionCallExpr struct + Args []Expression + CloseParenRange hcl.Range + ExpandFinal bool + Name string + NameRange hcl.Range + OpenParenRange hcl.Range + func (e *FunctionCallExpr) ExprCall() *hcl.StaticCall + func (e *FunctionCallExpr) Range() hcl.Range + func (e *FunctionCallExpr) StartRange() hcl.Range + func (e *FunctionCallExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *FunctionCallExpr) Variables() []hcl.Traversal + type IndexExpr struct + BracketRange hcl.Range + Collection Expression + Key Expression + OpenRange hcl.Range + SrcRange hcl.Range + func (e *IndexExpr) Range() hcl.Range + func (e *IndexExpr) StartRange() hcl.Range + func (e *IndexExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *IndexExpr) Variables() []hcl.Traversal + type Keyword []byte + func (kw Keyword) TokenMatches(token Token) bool + type LiteralValueExpr struct + SrcRange hcl.Range + Val cty.Value + func (e *LiteralValueExpr) AsTraversal() hcl.Traversal + func (e *LiteralValueExpr) Range() hcl.Range + func (e *LiteralValueExpr) StartRange() hcl.Range + func (e *LiteralValueExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *LiteralValueExpr) Variables() []hcl.Traversal + type Node interface + Range func() hcl.Range + type ObjectConsExpr struct + Items []ObjectConsItem + OpenRange hcl.Range + SrcRange hcl.Range + func (e *ObjectConsExpr) ExprMap() []hcl.KeyValuePair + func (e *ObjectConsExpr) Range() hcl.Range + func (e *ObjectConsExpr) StartRange() hcl.Range + func (e *ObjectConsExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *ObjectConsExpr) Variables() []hcl.Traversal + type ObjectConsItem struct + KeyExpr Expression + ValueExpr Expression + type ObjectConsKeyExpr struct + ForceNonLiteral bool + Wrapped Expression + func (e *ObjectConsKeyExpr) AsTraversal() hcl.Traversal + func (e *ObjectConsKeyExpr) Range() hcl.Range + func (e *ObjectConsKeyExpr) StartRange() hcl.Range + func (e *ObjectConsKeyExpr) UnwrapExpression() Expression + func (e *ObjectConsKeyExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *ObjectConsKeyExpr) Variables() []hcl.Traversal + type Operation struct + Impl function.Function + Type cty.Type + type ParenthesesExpr struct + SrcRange hcl.Range + func (e *ParenthesesExpr) Range() hcl.Range + type RelativeTraversalExpr struct + Source Expression + SrcRange hcl.Range + Traversal hcl.Traversal + func (e *RelativeTraversalExpr) AsTraversal() hcl.Traversal + func (e *RelativeTraversalExpr) Range() hcl.Range + func (e *RelativeTraversalExpr) StartRange() hcl.Range + func (e *RelativeTraversalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *RelativeTraversalExpr) Variables() []hcl.Traversal + type ScopeTraversalExpr struct + SrcRange hcl.Range + Traversal hcl.Traversal + func (e *ScopeTraversalExpr) AsTraversal() hcl.Traversal + func (e *ScopeTraversalExpr) Range() hcl.Range + func (e *ScopeTraversalExpr) StartRange() hcl.Range + func (e *ScopeTraversalExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *ScopeTraversalExpr) Variables() []hcl.Traversal + type SplatExpr struct + Each Expression + Item *AnonSymbolExpr + MarkerRange hcl.Range + Source Expression + SrcRange hcl.Range + func (e *SplatExpr) Range() hcl.Range + func (e *SplatExpr) StartRange() hcl.Range + func (e *SplatExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *SplatExpr) Variables() []hcl.Traversal + type TemplateExpr struct + Parts []Expression + SrcRange hcl.Range + func (e *TemplateExpr) IsStringLiteral() bool + func (e *TemplateExpr) Range() hcl.Range + func (e *TemplateExpr) StartRange() hcl.Range + func (e *TemplateExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *TemplateExpr) Variables() []hcl.Traversal + type TemplateJoinExpr struct + Tuple Expression + func (e *TemplateJoinExpr) Range() hcl.Range + func (e *TemplateJoinExpr) StartRange() hcl.Range + func (e *TemplateJoinExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *TemplateJoinExpr) Variables() []hcl.Traversal + type TemplateWrapExpr struct + SrcRange hcl.Range + Wrapped Expression + func (e *TemplateWrapExpr) Range() hcl.Range + func (e *TemplateWrapExpr) StartRange() hcl.Range + func (e *TemplateWrapExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *TemplateWrapExpr) Variables() []hcl.Traversal + type Token struct + Bytes []byte + Range hcl.Range + Type TokenType + type TokenType rune + const TokenAnd + const TokenApostrophe + const TokenBacktick + const TokenBadUTF8 + const TokenBang + const TokenBitwiseAnd + const TokenBitwiseNot + const TokenBitwiseOr + const TokenBitwiseXor + const TokenCBrace + const TokenCBrack + const TokenCHeredoc + const TokenCParen + const TokenCQuote + const TokenColon + const TokenColonOp + const TokenComma + const TokenComment + const TokenDot + const TokenEOF + const TokenEllipsis + const TokenEqual + const TokenFatArrow + const TokenGreaterThan + const TokenGreaterThanEq + const TokenIdent + const TokenInvalid + const TokenLessThan + const TokenLessThanEq + const TokenMinus + const TokenNewline + const TokenNil + const TokenNotEqual + const TokenNumberLit + const TokenOBrace + const TokenOBrack + const TokenOHeredoc + const TokenOParen + const TokenOQuote + const TokenOr + const TokenPercent + const TokenPlus + const TokenQuestion + const TokenQuotedLit + const TokenQuotedNewline + const TokenSemicolon + const TokenSlash + const TokenStar + const TokenStarStar + const TokenStringLit + const TokenTabs + const TokenTemplateControl + const TokenTemplateInterp + const TokenTemplateSeqEnd + func (i TokenType) String() string + func (t TokenType) GoString() string + type Tokens []Token + func LexConfig(src []byte, filename string, start hcl.Pos) (Tokens, hcl.Diagnostics) + func LexExpression(src []byte, filename string, start hcl.Pos) (Tokens, hcl.Diagnostics) + func LexTemplate(src []byte, filename string, start hcl.Pos) (Tokens, hcl.Diagnostics) + type TupleConsExpr struct + Exprs []Expression + OpenRange hcl.Range + SrcRange hcl.Range + func (e *TupleConsExpr) ExprList() []hcl.Expression + func (e *TupleConsExpr) Range() hcl.Range + func (e *TupleConsExpr) StartRange() hcl.Range + func (e *TupleConsExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *TupleConsExpr) Variables() []hcl.Traversal + type UnaryOpExpr struct + Op *Operation + SrcRange hcl.Range + SymbolRange hcl.Range + Val Expression + func (e *UnaryOpExpr) Range() hcl.Range + func (e *UnaryOpExpr) StartRange() hcl.Range + func (e *UnaryOpExpr) Value(ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) + func (e *UnaryOpExpr) Variables() []hcl.Traversal + type VisitFunc func(node Node) hcl.Diagnostics + type Walker interface + Enter func(node Node) hcl.Diagnostics + Exit func(node Node) hcl.Diagnostics