Movatterモバイル変換


[0]ホーム

URL:


hclsyntax

package
v0.0.0-...-fb75b32Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2019 License:MPL-2.0Imports:16Imported by:87

Details

Repository

github.com/hashicorp/hcl2

Links

Documentation

Overview

Package hclsyntax contains the parser, AST, etc for HCL's native language,as opposed to the JSON variant.

In normal use applications should rarely depend on this package directly,instead preferring the higher-level interface of the main hcl package andits companion package hclparse.

Index

Constants

This section is empty.

Variables

View Source
var (OpLogicalOr = &Operation{Impl:stdlib.OrFunc,Type:cty.Bool,}OpLogicalAnd = &Operation{Impl:stdlib.AndFunc,Type:cty.Bool,}OpLogicalNot = &Operation{Impl:stdlib.NotFunc,Type:cty.Bool,}OpEqual = &Operation{Impl:stdlib.EqualFunc,Type:cty.Bool,}OpNotEqual = &Operation{Impl:stdlib.NotEqualFunc,Type:cty.Bool,}OpGreaterThan = &Operation{Impl:stdlib.GreaterThanFunc,Type:cty.Bool,}OpGreaterThanOrEqual = &Operation{Impl:stdlib.GreaterThanOrEqualToFunc,Type:cty.Bool,}OpLessThan = &Operation{Impl:stdlib.LessThanFunc,Type:cty.Bool,}OpLessThanOrEqual = &Operation{Impl:stdlib.LessThanOrEqualToFunc,Type:cty.Bool,}OpAdd = &Operation{Impl:stdlib.AddFunc,Type:cty.Number,}OpSubtract = &Operation{Impl:stdlib.SubtractFunc,Type:cty.Number,}OpMultiply = &Operation{Impl:stdlib.MultiplyFunc,Type:cty.Number,}OpDivide = &Operation{Impl:stdlib.DivideFunc,Type:cty.Number,}OpModulo = &Operation{Impl:stdlib.ModuloFunc,Type:cty.Number,}OpNegate = &Operation{Impl:stdlib.NegateFunc,Type:cty.Number,})

Functions

funcParseConfig

func ParseConfig(src []byte, filenamestring, starthcl.Pos) (*hcl.File,hcl.Diagnostics)

ParseConfig parses the given buffer as a whole HCL config file, returninga *hcl.File representing its contents. If HasErrors called on the returneddiagnostics returns true, the returned body is likely to be incompleteand should therefore be used with care.

The body in the returned file has dynamic type *hclsyntax.Body, so callersmay freely type-assert this to get access to the full hclsyntax API insituations where detailed access is required. However, most common use-casesshould be served using the hcl.Body interface to ensure compatibility withother configurationg syntaxes, such as JSON.

funcParseTraversalAbs

func ParseTraversalAbs(src []byte, filenamestring, starthcl.Pos) (hcl.Traversal,hcl.Diagnostics)

ParseTraversalAbs parses the given buffer as a standalone absolute traversal.

Parsing as a traversal is more limited than parsing as an expession sinceit allows only attribute and indexing operations on variables. Traveralsare useful as a syntax for referring to objects without necessarilyevaluating them.

funcValidIdentifier

func ValidIdentifier(sstring)bool

ValidIdentifier tests if the given string could be a valid identifier ina native syntax expression.

This is useful when accepting names from the user that will be used asvariable or attribute names in the scope, to ensure that any name chosenwill be traversable using the variable or attribute traversal syntax.

funcVariables

func Variables(exprExpression) []hcl.Traversal

Variables returns all of the variables referenced within a given experssion.

This is the implementation of the "Variables" method on every nativeexpression.

funcVisitAll

func VisitAll(nodeNode, fVisitFunc)hcl.Diagnostics

VisitAll is a basic way to traverse the AST beginning with a particularnode. The given function will be called once for each AST node indepth-first order, but no context is provided about the shape of the tree.

The VisitFunc may return diagnostics, in which case they will be accumulatedand returned as a single set.

funcWalk

func Walk(nodeNode, wWalker)hcl.Diagnostics

Walk is a more complex way to traverse the AST starting with a particularnode, which provides information about the tree structure via separateEnter and Exit functions.

Types

typeAnonSymbolExpr

type AnonSymbolExpr struct {SrcRangehcl.Range// contains filtered or unexported fields}

AnonSymbolExpr is used as a placeholder for a value in an expression thatcan be applied dynamically to any value at runtime.

This is a rather odd, synthetic expression. It is used as part of therepresentation of splat expressions as a placeholder for the current itembeing visited in the splat evaluation.

AnonSymbolExpr cannot be evaluated in isolation. If its Value is calleddirectly then cty.DynamicVal will be returned. Instead, it is evaluatedin terms of another node (i.e. a splat expression) which temporarilyassigns it a value.

func (*AnonSymbolExpr)Range

func (e *AnonSymbolExpr) Range()hcl.Range

func (*AnonSymbolExpr)StartRange

func (e *AnonSymbolExpr) StartRange()hcl.Range

func (*AnonSymbolExpr)Value

func (*AnonSymbolExpr)Variables

func (e *AnonSymbolExpr) Variables() []hcl.Traversal

typeAttribute

type Attribute struct {NamestringExprExpressionSrcRangehcl.RangeNameRangehcl.RangeEqualsRangehcl.Range}

Attribute represents a single attribute definition within a body.

func (*Attribute)AsHCLAttribute

func (a *Attribute) AsHCLAttribute() *hcl.Attribute

AsHCLAttribute returns the block data expressed as a *hcl.Attribute.

func (*Attribute)Range

func (a *Attribute) Range()hcl.Range

typeAttributes

type Attributes map[string]*Attribute

Attributes is the collection of attribute definitions within a body.

func (Attributes)Range

func (aAttributes) Range()hcl.Range

Range returns the range of some arbitrary point within the set ofattributes, or an invalid range if there are no attributes.

This is provided only to complete the Node interface, but has no practicaluse.

typeBinaryOpExpr

type BinaryOpExpr struct {LHSExpressionOp  *OperationRHSExpressionSrcRangehcl.Range}

func (*BinaryOpExpr)Range

func (e *BinaryOpExpr) Range()hcl.Range

func (*BinaryOpExpr)StartRange

func (e *BinaryOpExpr) StartRange()hcl.Range

func (*BinaryOpExpr)Value

func (*BinaryOpExpr)Variables

func (e *BinaryOpExpr) Variables() []hcl.Traversal

typeBlock

type Block struct {TypestringLabels []stringBody   *BodyTypeRangehcl.RangeLabelRanges     []hcl.RangeOpenBraceRangehcl.RangeCloseBraceRangehcl.Range}

Block represents a nested block structure

func (*Block)AsHCLBlock

func (b *Block) AsHCLBlock() *hcl.Block

AsHCLBlock returns the block data expressed as a *hcl.Block.

func (*Block)DefRange

func (b *Block) DefRange()hcl.Range

func (*Block)Range

func (b *Block) Range()hcl.Range

typeBlocks

type Blocks []*Block

Blocks is the list of nested blocks within a body.

func (Blocks)Range

func (bsBlocks) Range()hcl.Range

Range returns the range of some arbitrary point within the list ofblocks, or an invalid range if there are no blocks.

This is provided only to complete the Node interface, but has no practicaluse.

typeBody

type Body struct {AttributesAttributesBlocksBlocksSrcRangehcl.RangeEndRangehcl.Range// Final token of the body, for reporting missing items// contains filtered or unexported fields}

Body is the implementation of hcl.Body for the HCL native syntax.

func (*Body)AttributeAtPos

func (b *Body) AttributeAtPos(poshcl.Pos) *hcl.Attribute

AttributeAtPos implements the method of the same name for an *hcl.Filethat is backed by a *Body.

func (*Body)BlocksAtPos

func (b *Body) BlocksAtPos(poshcl.Pos) []*hcl.Block

BlocksAtPos implements the method of the same name for an *hcl.File thatis backed by a *Body.

func (*Body)Content

func (b *Body) Content(schema *hcl.BodySchema) (*hcl.BodyContent,hcl.Diagnostics)

func (*Body)InnermostBlockAtPos

func (b *Body) InnermostBlockAtPos(poshcl.Pos) *hcl.Block

InnermostBlockAtPos implements the method of the same name for an *hcl.Filethat is backed by a *Body.

func (*Body)JustAttributes

func (b *Body) JustAttributes() (hcl.Attributes,hcl.Diagnostics)

func (*Body)MissingItemRange

func (b *Body) MissingItemRange()hcl.Range

func (*Body)OutermostBlockAtPos

func (b *Body) OutermostBlockAtPos(poshcl.Pos) *hcl.Block

OutermostBlockAtPos implements the method of the same name for an *hcl.Filethat is backed by a *Body.

func (*Body)OutermostExprAtPos

func (b *Body) OutermostExprAtPos(poshcl.Pos)hcl.Expression

OutermostExprAtPos implements the method of the same name for an *hcl.Filethat is backed by a *Body.

func (*Body)PartialContent

func (b *Body) PartialContent(schema *hcl.BodySchema) (*hcl.BodyContent,hcl.Body,hcl.Diagnostics)

func (*Body)Range

func (b *Body) Range()hcl.Range

typeChildScope

type ChildScope struct {LocalNames map[string]struct{}ExprExpression}

ChildScope is a synthetic AST node that is visited during a walk toindicate that its descendent will be evaluated in a child scope, whichmay mask certain variables from the parent scope as locals.

ChildScope nodes don't really exist in the AST, but are rather synthesizedon the fly during walk. Therefore it doesn't do any good to transform them;instead, transform either parent node that created a scope or the expressionthat the child scope struct wraps.

func (ChildScope)Range

func (eChildScope) Range()hcl.Range

Range returns the range of the expression that the ChildScope isencapsulating. It isn't really very useful to call Range on a ChildScope.

typeConditionalExpr

type ConditionalExpr struct {ConditionExpressionTrueResultExpressionFalseResultExpressionSrcRangehcl.Range}

func (*ConditionalExpr)Range

func (e *ConditionalExpr) Range()hcl.Range

func (*ConditionalExpr)StartRange

func (e *ConditionalExpr) StartRange()hcl.Range

func (*ConditionalExpr)Value

func (*ConditionalExpr)Variables

func (e *ConditionalExpr) Variables() []hcl.Traversal

typeExpression

type Expression interface {NodeValue(ctx *hcl.EvalContext) (cty.Value,hcl.Diagnostics)Variables() []hcl.TraversalStartRange()hcl.Range}

Expression is the abstract type for nodes that behave as HCL expressions.

funcParseExpression

func ParseExpression(src []byte, filenamestring, starthcl.Pos) (Expression,hcl.Diagnostics)

ParseExpression parses the given buffer as a standalone HCL expression,returning it as an instance of Expression.

funcParseTemplate

func ParseTemplate(src []byte, filenamestring, starthcl.Pos) (Expression,hcl.Diagnostics)

ParseTemplate parses the given buffer as a standalone HCL template,returning it as an instance of Expression.

typeFile

type File struct {Body  *BodyBytes []byte}

File is the top-level object resulting from parsing a configuration file.

func (*File)AsHCLFile

func (f *File) AsHCLFile() *hcl.File

typeForExpr

type ForExpr struct {KeyVarstring// empty if ignoring the keyValVarstringCollExprExpressionKeyExprExpression// nil when producing a tupleValExprExpressionCondExprExpression// null if no "if" clause is presentGroupbool// set if the ellipsis is used on the value in an object forSrcRangehcl.RangeOpenRangehcl.RangeCloseRangehcl.Range}

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...}

func (*ForExpr)Range

func (e *ForExpr) Range()hcl.Range

func (*ForExpr)StartRange

func (e *ForExpr) StartRange()hcl.Range

func (*ForExpr)Value

func (e *ForExpr) Value(ctx *hcl.EvalContext) (cty.Value,hcl.Diagnostics)

func (*ForExpr)Variables

func (e *ForExpr) Variables() []hcl.Traversal

typeFunctionCallExpr

type FunctionCallExpr struct {NamestringArgs []Expression// If true, the final argument should be a tuple, list or set which will// expand to be one argument per element.ExpandFinalboolNameRangehcl.RangeOpenParenRangehcl.RangeCloseParenRangehcl.Range}

FunctionCallExpr is an Expression that calls a function from the EvalContextand returns its result.

func (*FunctionCallExpr)ExprCall

func (e *FunctionCallExpr) ExprCall() *hcl.StaticCall

Implementation for hcl.ExprCall.

func (*FunctionCallExpr)Range

func (e *FunctionCallExpr) Range()hcl.Range

func (*FunctionCallExpr)StartRange

func (e *FunctionCallExpr) StartRange()hcl.Range

func (*FunctionCallExpr)Value

func (*FunctionCallExpr)Variables

func (e *FunctionCallExpr) Variables() []hcl.Traversal

typeIndexExpr

type IndexExpr struct {CollectionExpressionKeyExpressionSrcRangehcl.RangeOpenRangehcl.Range}

func (*IndexExpr)Range

func (e *IndexExpr) Range()hcl.Range

func (*IndexExpr)StartRange

func (e *IndexExpr) StartRange()hcl.Range

func (*IndexExpr)Value

func (e *IndexExpr) Value(ctx *hcl.EvalContext) (cty.Value,hcl.Diagnostics)

func (*IndexExpr)Variables

func (e *IndexExpr) Variables() []hcl.Traversal

typeKeyword

type Keyword []byte

func (Keyword)TokenMatches

func (kwKeyword) TokenMatches(tokenToken)bool

typeLiteralValueExpr

type LiteralValueExpr struct {Valcty.ValueSrcRangehcl.Range}

LiteralValueExpr is an expression that just always returns a given value.

func (*LiteralValueExpr)AsTraversal

func (e *LiteralValueExpr) AsTraversal()hcl.Traversal

Implementation for hcl.AbsTraversalForExpr.

func (*LiteralValueExpr)Range

func (e *LiteralValueExpr) Range()hcl.Range

func (*LiteralValueExpr)StartRange

func (e *LiteralValueExpr) StartRange()hcl.Range

func (*LiteralValueExpr)Value

func (*LiteralValueExpr)Variables

func (e *LiteralValueExpr) Variables() []hcl.Traversal

typeNode

type Node interface {Range()hcl.Range// contains filtered or unexported methods}

Node is the abstract type that every AST node implements.

This is a closed interface, so it cannot be implemented from outside ofthis package.

typeObjectConsExpr

type ObjectConsExpr struct {Items []ObjectConsItemSrcRangehcl.RangeOpenRangehcl.Range}

func (*ObjectConsExpr)ExprMap

func (e *ObjectConsExpr) ExprMap() []hcl.KeyValuePair

Implementation for hcl.ExprMap

func (*ObjectConsExpr)Range

func (e *ObjectConsExpr) Range()hcl.Range

func (*ObjectConsExpr)StartRange

func (e *ObjectConsExpr) StartRange()hcl.Range

func (*ObjectConsExpr)Value

func (*ObjectConsExpr)Variables

func (e *ObjectConsExpr) Variables() []hcl.Traversal

typeObjectConsItem

type ObjectConsItem struct {KeyExprExpressionValueExprExpression}

typeObjectConsKeyExpr

type ObjectConsKeyExpr struct {WrappedExpression}

ObjectConsKeyExpr is a special wrapper used only for ObjectConsExpr keys,which deals with the special case that a naked identifier in that positionmust be interpreted as a literal string rather than evaluated directly.

func (*ObjectConsKeyExpr)AsTraversal

func (e *ObjectConsKeyExpr) AsTraversal()hcl.Traversal

Implementation for hcl.AbsTraversalForExpr.

func (*ObjectConsKeyExpr)Range

func (e *ObjectConsKeyExpr) Range()hcl.Range

func (*ObjectConsKeyExpr)StartRange

func (e *ObjectConsKeyExpr) StartRange()hcl.Range

func (*ObjectConsKeyExpr)UnwrapExpression

func (e *ObjectConsKeyExpr) UnwrapExpression()Expression

func (*ObjectConsKeyExpr)Value

func (*ObjectConsKeyExpr)Variables

func (e *ObjectConsKeyExpr) Variables() []hcl.Traversal

typeOperation

type Operation struct {Implfunction.FunctionTypecty.Type}

typeRelativeTraversalExpr

type RelativeTraversalExpr struct {SourceExpressionTraversalhcl.TraversalSrcRangehcl.Range}

RelativeTraversalExpr is an Expression that retrieves a value from anothervalue using a _relative_ traversal.

func (*RelativeTraversalExpr)AsTraversal

func (e *RelativeTraversalExpr) AsTraversal()hcl.Traversal

Implementation for hcl.AbsTraversalForExpr.

func (*RelativeTraversalExpr)Range

func (*RelativeTraversalExpr)StartRange

func (e *RelativeTraversalExpr) StartRange()hcl.Range

func (*RelativeTraversalExpr)Value

func (*RelativeTraversalExpr)Variables

func (e *RelativeTraversalExpr) Variables() []hcl.Traversal

typeScopeTraversalExpr

type ScopeTraversalExpr struct {Traversalhcl.TraversalSrcRangehcl.Range}

ScopeTraversalExpr is an Expression that retrieves a value from the scopeusing a traversal.

func (*ScopeTraversalExpr)AsTraversal

func (e *ScopeTraversalExpr) AsTraversal()hcl.Traversal

Implementation for hcl.AbsTraversalForExpr.

func (*ScopeTraversalExpr)Range

func (e *ScopeTraversalExpr) Range()hcl.Range

func (*ScopeTraversalExpr)StartRange

func (e *ScopeTraversalExpr) StartRange()hcl.Range

func (*ScopeTraversalExpr)Value

func (*ScopeTraversalExpr)Variables

func (e *ScopeTraversalExpr) Variables() []hcl.Traversal

typeSplatExpr

type SplatExpr struct {SourceExpressionEachExpressionItem   *AnonSymbolExprSrcRangehcl.RangeMarkerRangehcl.Range}

func (*SplatExpr)Range

func (e *SplatExpr) Range()hcl.Range

func (*SplatExpr)StartRange

func (e *SplatExpr) StartRange()hcl.Range

func (*SplatExpr)Value

func (e *SplatExpr) Value(ctx *hcl.EvalContext) (cty.Value,hcl.Diagnostics)

func (*SplatExpr)Variables

func (e *SplatExpr) Variables() []hcl.Traversal

typeTemplateExpr

type TemplateExpr struct {Parts []ExpressionSrcRangehcl.Range}

func (*TemplateExpr)IsStringLiteral

func (e *TemplateExpr) IsStringLiteral()bool

IsStringLiteral returns true if and only if the template consists only ofsingle string literal, as would be created for a simple quoted string like"foo".

If this function returns true, then calling Value on the same expressionwith a nil EvalContext will return the literal value.

Note that "${"foo"}", "${1}", etc aren't considered literal values for thepurposes of this method, because the intent of this method is to identifysituations where the user seems to be explicitly intending literal stringinterpretation, not situations that result in literals as a technicalityof the template expression unwrapping behavior.

func (*TemplateExpr)Range

func (e *TemplateExpr) Range()hcl.Range

func (*TemplateExpr)StartRange

func (e *TemplateExpr) StartRange()hcl.Range

func (*TemplateExpr)Value

func (*TemplateExpr)Variables

func (e *TemplateExpr) Variables() []hcl.Traversal

typeTemplateJoinExpr

type TemplateJoinExpr struct {TupleExpression}

TemplateJoinExpr is used to convert tuples of strings produced by templateconstructs (i.e. for loops) into flat strings, by converting the valuestos strings and joining them. This AST node is not used directly; it'sproduced as part of the AST of a "for" loop in a template.

func (*TemplateJoinExpr)Range

func (e *TemplateJoinExpr) Range()hcl.Range

func (*TemplateJoinExpr)StartRange

func (e *TemplateJoinExpr) StartRange()hcl.Range

func (*TemplateJoinExpr)Value

func (*TemplateJoinExpr)Variables

func (e *TemplateJoinExpr) Variables() []hcl.Traversal

typeTemplateWrapExpr

type TemplateWrapExpr struct {WrappedExpressionSrcRangehcl.Range}

TemplateWrapExpr is used instead of a TemplateExpr when a templateconsists _only_ of a single interpolation sequence. In that case, thetemplate's result is the single interpolation's result, verbatim withno type conversions.

func (*TemplateWrapExpr)Range

func (e *TemplateWrapExpr) Range()hcl.Range

func (*TemplateWrapExpr)StartRange

func (e *TemplateWrapExpr) StartRange()hcl.Range

func (*TemplateWrapExpr)Value

func (*TemplateWrapExpr)Variables

func (e *TemplateWrapExpr) Variables() []hcl.Traversal

typeToken

type Token struct {TypeTokenTypeBytes []byteRangehcl.Range}

Token represents a sequence of bytes from some HCL code that has beentagged with a type and its range within the source file.

typeTokenType

type TokenTyperune

TokenType is an enumeration used for the Type field on Token.

const (TokenOBraceTokenType = '{'TokenCBraceTokenType = '}'TokenOBrackTokenType = '['TokenCBrackTokenType = ']'TokenOParenTokenType = '('TokenCParenTokenType = ')'TokenOQuoteTokenType = '«'TokenCQuoteTokenType = '»'TokenOHeredocTokenType = 'H'TokenCHeredocTokenType = 'h'TokenStarTokenType = '*'TokenSlashTokenType = '/'TokenPlusTokenType = '+'TokenMinusTokenType = '-'TokenPercentTokenType = '%'TokenEqualTokenType = '='TokenEqualOpTokenType = '≔'TokenNotEqualTokenType = '≠'TokenLessThanTokenType = '<'TokenLessThanEqTokenType = '≤'TokenGreaterThanTokenType = '>'TokenGreaterThanEqTokenType = '≥'TokenAndTokenType = '∧'TokenOrTokenType = '∨'TokenBangTokenType = '!'TokenDotTokenType = '.'TokenCommaTokenType = ','TokenEllipsisTokenType = '…'TokenFatArrowTokenType = '⇒'TokenQuestionTokenType = '?'TokenColonTokenType = ':'TokenTemplateInterpTokenType = '∫'TokenTemplateControlTokenType = 'λ'TokenTemplateSeqEndTokenType = '∎'TokenQuotedLitTokenType = 'Q'// might contain backslash escapesTokenStringLitTokenType = 'S'// cannot contain backslash escapesTokenNumberLitTokenType = 'N'TokenIdentTokenType = 'I'TokenCommentTokenType = 'C'TokenNewlineTokenType = '\n'TokenEOFTokenType = '␄'TokenBitwiseAndTokenType = '&'TokenBitwiseOrTokenType = '|'TokenBitwiseNotTokenType = '~'TokenBitwiseXorTokenType = '^'TokenStarStarTokenType = '➚'TokenApostropheTokenType = '\''TokenBacktickTokenType = '`'TokenSemicolonTokenType = ';'TokenTabsTokenType = '␉'TokenInvalidTokenType = '�'TokenBadUTF8TokenType = '💩'TokenQuotedNewlineTokenType = '␤'// TokenNil is a placeholder for when a token is required but none is// available, e.g. when reporting errors. The scanner will never produce// this as part of a token stream.TokenNilTokenType = '\x00')

func (TokenType)GoString

func (tTokenType) GoString()string

func (TokenType)String

func (iTokenType) String()string

typeTokens

type Tokens []Token

Tokens is a slice of Token.

funcLexConfig

func LexConfig(src []byte, filenamestring, starthcl.Pos) (Tokens,hcl.Diagnostics)

LexConfig performs lexical analysis on the given buffer, treating it as awhole HCL config file, and returns the resulting tokens.

Only minimal validation is done during lexical analysis, so the returneddiagnostics may include errors about lexical issues such as bad characterencodings or unrecognized characters, but full parsing is required todetect _all_ syntax errors.

funcLexExpression

func LexExpression(src []byte, filenamestring, starthcl.Pos) (Tokens,hcl.Diagnostics)

LexExpression performs lexical analysis on the given buffer, treating it asa standalone HCL expression, and returns the resulting tokens.

Only minimal validation is done during lexical analysis, so the returneddiagnostics may include errors about lexical issues such as bad characterencodings or unrecognized characters, but full parsing is required todetect _all_ syntax errors.

funcLexTemplate

func LexTemplate(src []byte, filenamestring, starthcl.Pos) (Tokens,hcl.Diagnostics)

LexTemplate performs lexical analysis on the given buffer, treating it as astandalone HCL template, and returns the resulting tokens.

Only minimal validation is done during lexical analysis, so the returneddiagnostics may include errors about lexical issues such as bad characterencodings or unrecognized characters, but full parsing is required todetect _all_ syntax errors.

typeTupleConsExpr

type TupleConsExpr struct {Exprs []ExpressionSrcRangehcl.RangeOpenRangehcl.Range}

func (*TupleConsExpr)ExprList

func (e *TupleConsExpr) ExprList() []hcl.Expression

Implementation for hcl.ExprList

func (*TupleConsExpr)Range

func (e *TupleConsExpr) Range()hcl.Range

func (*TupleConsExpr)StartRange

func (e *TupleConsExpr) StartRange()hcl.Range

func (*TupleConsExpr)Value

func (*TupleConsExpr)Variables

func (e *TupleConsExpr) Variables() []hcl.Traversal

typeUnaryOpExpr

type UnaryOpExpr struct {Op  *OperationValExpressionSrcRangehcl.RangeSymbolRangehcl.Range}

func (*UnaryOpExpr)Range

func (e *UnaryOpExpr) Range()hcl.Range

func (*UnaryOpExpr)StartRange

func (e *UnaryOpExpr) StartRange()hcl.Range

func (*UnaryOpExpr)Value

func (*UnaryOpExpr)Variables

func (e *UnaryOpExpr) Variables() []hcl.Traversal

typeVisitFunc

type VisitFunc func(nodeNode)hcl.Diagnostics

VisitFunc is the callback signature for VisitAll.

typeWalker

type Walker interface {Enter(nodeNode)hcl.DiagnosticsExit(nodeNode)hcl.Diagnostics}

Walker is an interface used with Walk.

Source Files

View all Source files

Directories

PathSynopsis
fuzz

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp