Movatterモバイル変換


[0]ホーム

URL:


ast

package
v0.26.1Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License:Apache-2.0, BSD-3-ClauseImports:8Imported by:38

Details

Repository

github.com/google/cel-go

Links

Documentation

Overview

Package ast declares data structures useful for parsed and checked abstract syntax trees

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

funcAlphaProtoConstantAsValadded inv0.22.0

func AlphaProtoConstantAsVal(c *exprpb.Constant) (ref.Val,error)

AlphaProtoConstantAsVal converts a v1alpha1.Constant protobuf to a CEL-native ref.Val.

funcConstantToVal

func ConstantToVal(c *exprpb.Constant) (ref.Val,error)

ConstantToVal converts a protobuf Constant to a CEL-native ref.Val.

funcEntryExprToProtoadded inv0.17.2

func EntryExprToProto(eEntryExpr) (*exprpb.Expr_CreateStruct_Entry,error)

EntryExprToProto converts an ast.EntryExpr to a protobuf CreateStruct entry

funcExprToProtoadded inv0.17.2

func ExprToProto(eExpr) (*exprpb.Expr,error)

ExprToProto serializes an ast.Expr value to a protobuf Expr representation.

funcHeightsadded inv0.24.0

func Heights(a *AST) map[int64]int

Heights computes the heights of all AST expressions and returns a map from expression id to height.

funcMaxIDadded inv0.18.0

func MaxID(a *AST)int64

MaxID returns the upper-bound, non-inclusive, of ids present within the AST's Expr value.

funcPostOrderVisitadded inv0.18.0

func PostOrderVisit(exprExpr, visitorVisitor)

PostOrderVisit walks the expression graph and calls the visitor in post-order (bottom-up).

funcPreOrderVisitadded inv0.18.0

func PreOrderVisit(exprExpr, visitorVisitor)

PreOrderVisit walks the expression graph and calls the visitor in pre-order (top-down).

funcProtoConstantAsValadded inv0.22.0

func ProtoConstantAsVal(c *celpb.Constant) (ref.Val,error)

ProtoConstantAsVal converts a canonical celpb.Constant protobuf to a CEL-native ref.Val.

funcReferenceInfoToProtoadded inv0.17.2

func ReferenceInfoToProto(info *ReferenceInfo) (*exprpb.Reference,error)

ReferenceInfoToProto converts a ReferenceInfo instance to a protobuf Reference suitable for serialization.

funcSourceInfoToProtoadded inv0.17.2

func SourceInfoToProto(info *SourceInfo) (*exprpb.SourceInfo,error)

SourceInfoToProto serializes an ast.SourceInfo value to a protobuf SourceInfo object.

funcToProtoadded inv0.17.2

func ToProto(ast *AST) (*exprpb.CheckedExpr,error)

ToProto converts an AST to a CheckedExpr protobouf.

funcValToConstant

func ValToConstant(vref.Val) (*exprpb.Constant,error)

ValToConstant converts a CEL-native ref.Val to a protobuf Constant.

Only simple scalar types are supported by this method.

Types

typeASTadded inv0.17.2

type AST struct {// contains filtered or unexported fields}

AST contains a protobuf expression and source info along with CEL-native type and reference information.

funcCopyadded inv0.17.2

func Copy(a *AST) *AST

Copy creates a deep copy of the Expr and SourceInfo values in the input AST.

Copies of the Expr value are generated using an internal default ExprFactory.

funcNewASTadded inv0.17.2

func NewAST(eExpr, sourceInfo *SourceInfo) *AST

NewAST creates a base AST instance with an ast.Expr and ast.SourceInfo value.

funcNewCheckedASTadded inv0.17.2

func NewCheckedAST(parsed *AST, typeMap map[int64]*types.Type, refMap map[int64]*ReferenceInfo) *AST

NewCheckedAST wraps an parsed AST and augments it with type and reference metadata.

funcToASTadded inv0.17.2

func ToAST(checked *exprpb.CheckedExpr) (*AST,error)

ToAST converts a CheckedExpr protobuf to an AST instance.

func (*AST)Expradded inv0.17.2

func (a *AST) Expr()Expr

Expr returns the root ast.Expr value in the AST.

func (*AST)GetOverloadIDsadded inv0.17.2

func (a *AST) GetOverloadIDs(idint64) []string

GetOverloadIDs returns the set of overload function names for a given expression id.

If the expression id is not a function call, or the AST is not type-checked, the result will be empty.

func (*AST)GetTypeadded inv0.17.2

func (a *AST) GetType(idint64) *types.Type

GetType returns the type for the expression at the given id, if one exists, else types.DynType.

func (*AST)IsCheckedadded inv0.17.2

func (a *AST) IsChecked()bool

IsChecked returns whether the AST is type-checked.

func (*AST)ReferenceMapadded inv0.17.2

func (a *AST) ReferenceMap() map[int64]*ReferenceInfo

ReferenceMap returns the map of expression id to identifier, constant, and function references.

func (*AST)SetReferenceadded inv0.17.2

func (a *AST) SetReference(idint64, r *ReferenceInfo)

SetReference adds a reference to the checked AST type map.

func (*AST)SetTypeadded inv0.17.2

func (a *AST) SetType(idint64, t *types.Type)

SetType sets the type of the expression node at the given id.

func (*AST)SourceInfoadded inv0.17.2

func (a *AST) SourceInfo() *SourceInfo

SourceInfo returns the source metadata associated with the parse / type-check passes.

func (*AST)TypeMapadded inv0.17.2

func (a *AST) TypeMap() map[int64]*types.Type

TypeMap returns the map of expression ids to type-checked types.

If the AST is not type-checked, the map will be empty.

typeCallExpradded inv0.17.2

type CallExpr interface {// FunctionName returns the name of the function.FunctionName()string// IsMemberFunction returns whether the call has a non-nil target indicating it is a member functionIsMemberFunction()bool// Target returns the target of the expression if one is present.Target()Expr// Args returns the list of call arguments, excluding the target.Args() []Expr// contains filtered or unexported methods}

CallExpr defines an interface for inspecting a function call and its arguments.

typeComprehensionExpradded inv0.17.2

type ComprehensionExpr interface {// IterRange returns the iteration range expression.IterRange()Expr// IterVar returns the iteration variable name.//// For one-variable comprehensions, the iter var refers to the element value// when iterating over a list, or the map key when iterating over a map.//// For two-variable comprehneions, the iter var refers to the list index or the// map key.IterVar()string// IterVar2 returns the second iteration variable name.//// When the value is non-empty, the comprehension is a two-variable comprehension.IterVar2()string// HasIterVar2 returns true if the second iteration variable is non-empty.HasIterVar2()bool// AccuVar returns the accumulation variable name.AccuVar()string// AccuInit returns the accumulation variable initialization expression.AccuInit()Expr// LoopCondition returns the loop condition expression.LoopCondition()Expr// LoopStep returns the loop step expression.LoopStep()Expr// Result returns the comprehension result expression.Result()Expr// contains filtered or unexported methods}

ComprehensionExpr defines an interface for inspecting a comprehension expression.

typeEntryExpradded inv0.17.2

type EntryExpr interface {// ID of the entry as it appears in the AST.ID()int64// Kind of the entry expression node. See EntryExprKind for valid enum values.Kind()EntryExprKind// AsMapEntry casts the EntryExpr to a MapEntry.//// The Kind() must be equal to MapEntryKind for the conversion to be well-defined.AsMapEntry()MapEntry// AsStructField casts the EntryExpr to a StructField//// The Kind() must be equal to StructFieldKind for the conversion to be well-defined.AsStructField()StructField// RenumberIDs performs an in-place update of the expression and all of its descendents numeric ids.RenumberIDs(IDGenerator)// contains filtered or unexported methods}

EntryExpr represents the base entry expression in a CEL map or struct literal.

funcProtoToEntryExpradded inv0.17.2

func ProtoToEntryExpr(e *exprpb.Expr_CreateStruct_Entry) (EntryExpr,error)

ProtoToEntryExpr converts a protobuf struct/map entry to an ast.EntryExpr

typeEntryExprKindadded inv0.17.2

type EntryExprKindint

EntryExprKind represents the possible EntryExpr kinds.

const (// UnspecifiedEntryExprKind indicates that the entry expr is not set.UnspecifiedEntryExprKindEntryExprKind =iota// MapEntryKind indicates that the entry is a MapEntry type with key and value expressions.MapEntryKind// StructFieldKind indicates that the entry is a StructField with a field name and initializer// expression.StructFieldKind)

typeExpradded inv0.17.2

type Expr interface {// ID of the expression as it appears in the ASTID()int64// Kind of the expression node. See ExprKind for the valid enum values.Kind()ExprKind// AsCall adapts the expr into a CallExpr//// The Kind() must be equal to a CallKind for the conversion to be well-defined.AsCall()CallExpr// AsComprehension adapts the expr into a ComprehensionExpr.//// The Kind() must be equal to a ComprehensionKind for the conversion to be well-defined.AsComprehension()ComprehensionExpr// AsIdent adapts the expr into an identifier string.//// The Kind() must be equal to an IdentKind for the conversion to be well-defined.AsIdent()string// AsLiteral adapts the expr into a constant ref.Val.//// The Kind() must be equal to a LiteralKind for the conversion to be well-defined.AsLiteral()ref.Val// AsList adapts the expr into a ListExpr.//// The Kind() must be equal to a ListKind for the conversion to be well-defined.AsList()ListExpr// AsMap adapts the expr into a MapExpr.//// The Kind() must be equal to a MapKind for the conversion to be well-defined.AsMap()MapExpr// AsSelect adapts the expr into a SelectExpr.//// The Kind() must be equal to a SelectKind for the conversion to be well-defined.AsSelect()SelectExpr// AsStruct adapts the expr into a StructExpr.//// The Kind() must be equal to a StructKind for the conversion to be well-defined.AsStruct()StructExpr// RenumberIDs performs an in-place update of the expression and all of its descendents numeric ids.RenumberIDs(IDGenerator)// SetKindCase replaces the contents of the current expression with the contents of the other.//// The SetKindCase takes ownership of any expression instances references within the input Expr.// A shallow copy is made of the Expr value itself, but not a deep one.//// This method should only be used during AST rewrites using temporary Expr values.SetKindCase(Expr)// contains filtered or unexported methods}

Expr represents the base expression node in a CEL abstract syntax tree.

Depending on the `Kind()` value, the Expr may be converted to a concrete expression typesas indicated by the `As<Kind>` methods.

funcProtoToExpradded inv0.17.2

func ProtoToExpr(e *exprpb.Expr) (Expr,error)

ProtoToExpr converts a protobuf Expr value to an ast.Expr value.

typeExprFactoryadded inv0.17.2

type ExprFactory interface {// CopyExpr creates a deep copy of the input Expr value.CopyExpr(Expr)Expr// CopyEntryExpr creates a deep copy of the input EntryExpr value.CopyEntryExpr(EntryExpr)EntryExpr// NewCall creates an Expr value representing a global function call.NewCall(idint64, functionstring, args ...Expr)Expr// NewComprehension creates an Expr value representing a one-variable comprehension over a value range.NewComprehension(idint64, iterRangeExpr, iterVar, accuVarstring, accuInit, loopCondition, loopStep, resultExpr)Expr// NewComprehensionTwoVar creates an Expr value representing a two-variable comprehension over a value range.NewComprehensionTwoVar(idint64, iterRangeExpr, iterVar, iterVar2, accuVarstring, accuInit, loopCondition, loopStep, resultExpr)Expr// NewMemberCall creates an Expr value representing a member function call.NewMemberCall(idint64, functionstring, receiverExpr, args ...Expr)Expr// NewIdent creates an Expr value representing an identifier.NewIdent(idint64, namestring)Expr// NewAccuIdent creates an Expr value representing an accumulator identifier within a// comprehension.NewAccuIdent(idint64)Expr// AccuIdentName reports the name of the accumulator variable to be used within a comprehension.AccuIdentName()string// NewLiteral creates an Expr value representing a literal value, such as a string or integer.NewLiteral(idint64, valueref.Val)Expr// NewList creates an Expr value representing a list literal expression with optional indices.//// Optional indices will typically be empty unless the CEL optional types are enabled.NewList(idint64, elems []Expr, optIndices []int32)Expr// NewMap creates an Expr value representing a map literal expressionNewMap(idint64, entries []EntryExpr)Expr// NewMapEntry creates a MapEntry with a given key, value, and a flag indicating whether// the key is optionally set.NewMapEntry(idint64, key, valueExpr, isOptionalbool)EntryExpr// NewPresenceTest creates an Expr representing a field presence test on an operand expression.NewPresenceTest(idint64, operandExpr, fieldstring)Expr// NewSelect creates an Expr representing a field selection on an operand expression.NewSelect(idint64, operandExpr, fieldstring)Expr// NewStruct creates an Expr value representing a struct literal with a given type name and a// set of field initializers.NewStruct(idint64, typeNamestring, fields []EntryExpr)Expr// NewStructField creates a StructField with a given field name, value, and a flag indicating// whether the field is optionally set.NewStructField(idint64, fieldstring, valueExpr, isOptionalbool)EntryExpr// NewUnspecifiedExpr creates an empty expression node.NewUnspecifiedExpr(idint64)Expr// contains filtered or unexported methods}

ExprFactory interfaces defines a set of methods necessary for building native expression values.

funcNewExprFactoryadded inv0.17.2

func NewExprFactory()ExprFactory

NewExprFactory creates an ExprFactory instance.

funcNewExprFactoryWithAccumulatoradded inv0.23.0

func NewExprFactoryWithAccumulator(idstring)ExprFactory

NewExprFactoryWithAccumulator creates an ExprFactory instance with a customaccumulator identifier name.

typeExprKind

type ExprKindint

ExprKind represents the expression node kind.

const (// UnspecifiedExprKind represents an unset expression with no specified properties.UnspecifiedExprKindExprKind =iota// CallKind represents a function call.CallKind// ComprehensionKind represents a comprehension expression generated by a macro.ComprehensionKind// IdentKind represents a simple variable, constant, or type identifier.IdentKind// ListKind represents a list literal expression.ListKind// LiteralKind represents a primitive scalar literal.LiteralKind// MapKind represents a map literal expression.MapKind// SelectKind represents a field selection expression.SelectKind// StructKind represents a struct literal expression.StructKind)

typeExprMatcher

type ExprMatcher func(NavigableExpr)bool

ExprMatcher takes a NavigableExpr in and indicates whether the value is a match.

This function type should be use with the `Match` and `MatchList` calls.

funcAllMatcher

func AllMatcher()ExprMatcher

AllMatcher returns true for all descendants of a NavigableExpr, effectively flattening them into a list.

Such a result would work well with subsequent MatchList calls.

funcConstantValueMatcher

func ConstantValueMatcher()ExprMatcher

ConstantValueMatcher returns an ExprMatcher which will return true if the input NavigableExpris comprised of all constant values, such as a simple literal or even list and map literal.

funcFunctionMatcher

func FunctionMatcher(funcNamestring)ExprMatcher

FunctionMatcher returns an ExprMatcher which will match NavigableExpr nodes of CallKind type whosefunction name is equal to `funcName`.

funcKindMatcher

func KindMatcher(kindExprKind)ExprMatcher

KindMatcher returns an ExprMatcher which will return true if the input NavigableExpr.Kind() matchesthe specified `kind`.

typeIDGeneratoradded inv0.17.2

type IDGenerator func(originalIDint64)int64

IDGenerator produces unique ids suitable for tagging expression nodes

typeListExpradded inv0.17.2

type ListExpr interface {// Elements returns the list elements as navigable expressions.Elements() []Expr// OptionalIndicies returns the list of optional indices in the list literal.OptionalIndices() []int32// IsOptional indicates whether the given element index is optional.IsOptional(int32)bool// Size returns the number of elements in the list.Size()int// contains filtered or unexported methods}

ListExpr defines an interface for inspecting a list literal expression.

typeMapEntryadded inv0.17.2

type MapEntry interface {// Key returns the map entry key expression.Key()Expr// Value returns the map entry value expression.Value()Expr// IsOptional returns whether the entry is optional.IsOptional()bool// contains filtered or unexported methods}

MapEntry defines an interface for inspecting a map entry.

typeMapExpradded inv0.17.2

type MapExpr interface {// Entries returns the map key value pairs as EntryExpr values.Entries() []EntryExpr// Size returns the number of entries in the map.Size()int// contains filtered or unexported methods}

MapExpr defines an interface for inspecting a map expression.

typeNavigableExpr

type NavigableExpr interface {Expr// Type of the expression.//// If the expression is type-checked, the type check metadata is returned. If the expression// has not been type-checked, the types.DynType value is returned.Type() *types.Type// Parent returns the parent expression node, if one exists.Parent() (NavigableExpr,bool)// Children returns a list of child expression nodes.Children() []NavigableExpr// Depth indicates the depth in the expression tree.//// The root expression has depth 0.Depth()int}

NavigableExpr represents the base navigable expression value with methods to inspect theparent and child expressions.

funcMatchDescendants

func MatchDescendants(exprNavigableExpr, matcherExprMatcher) []NavigableExpr

MatchDescendants takes a NavigableExpr and ExprMatcher and produces a list of NavigableExpr valuesmatching the input criteria in post-order (bottom up).

funcMatchSubset

func MatchSubset(exprs []NavigableExpr, matcherExprMatcher) []NavigableExpr

MatchSubset applies an ExprMatcher to a list of NavigableExpr values and their descendants, producing asubset of NavigableExpr values which match.

funcNavigateASTadded inv0.17.2

func NavigateAST(ast *AST)NavigableExpr

NavigateAST converts an AST to a NavigableExpr

funcNavigateExpradded inv0.17.2

func NavigateExpr(ast *AST, exprExpr)NavigableExpr

NavigateExpr creates a NavigableExpr whose type information is backed by the input AST.

If the expression is already a NavigableExpr, the parent and depth information will bepropagated on the new NavigableExpr value; otherwise, the expr value will be treatedas though it is the root of the expression graph with a depth of 0.

typeOffsetRangeadded inv0.17.2

type OffsetRange struct {Startint32Stopint32}

OffsetRange captures the start and stop positions of a section of text in the input expression.

typeReferenceInfo

type ReferenceInfo struct {NamestringOverloadIDs []stringValueref.Val}

ReferenceInfo contains a CEL native representation of an identifier reference which may refer toeither a qualified identifier name, a set of overload ids, or a constant value from an enum.

funcNewFunctionReference

func NewFunctionReference(overloads ...string) *ReferenceInfo

NewFunctionReference creates a ReferenceInfo instance for a set of function overloads.

funcNewIdentReference

func NewIdentReference(namestring, valueref.Val) *ReferenceInfo

NewIdentReference creates a ReferenceInfo instance for an identifier with an optional constant value.

funcProtoToReferenceInfoadded inv0.17.2

func ProtoToReferenceInfo(ref *exprpb.Reference) (*ReferenceInfo,error)

ProtoToReferenceInfo converts a protobuf Reference into a CEL-native ReferenceInfo instance.

func (*ReferenceInfo)AddOverload

func (r *ReferenceInfo) AddOverload(overloadIDstring)

AddOverload appends a function overload ID to the ReferenceInfo.

func (*ReferenceInfo)Equals

func (r *ReferenceInfo) Equals(other *ReferenceInfo)bool

Equals returns whether two references are identical to each other.

typeSelectExpradded inv0.17.2

type SelectExpr interface {// Operand returns the selection operand expression.Operand()Expr// FieldName returns the field name being selected from the operand.FieldName()string// IsTestOnly indicates whether the select expression is a presence test generated by a macro.IsTestOnly()bool// contains filtered or unexported methods}

SelectExpr defines an interface for inspecting a select expression.

typeSourceInfoadded inv0.17.2

type SourceInfo struct {// contains filtered or unexported fields}

SourceInfo records basic information about the expression as a textual input andas a parsed expression value.

funcCopySourceInfoadded inv0.17.2

func CopySourceInfo(info *SourceInfo) *SourceInfo

CopySourceInfo creates a deep copy of the MacroCalls within the input SourceInfo.

Copies of macro Expr values are generated using an internal default ExprFactory.

funcNewSourceInfoadded inv0.17.2

func NewSourceInfo(srccommon.Source) *SourceInfo

NewSourceInfo creates a simple SourceInfo object from an input common.Source value.

funcProtoToSourceInfoadded inv0.17.2

func ProtoToSourceInfo(info *exprpb.SourceInfo) (*SourceInfo,error)

ProtoToSourceInfo deserializes the protobuf into a native SourceInfo value.

func (*SourceInfo)ClearMacroCalladded inv0.18.0

func (s *SourceInfo) ClearMacroCall(idint64)

ClearMacroCall removes the macro call at the given expression id.

func (*SourceInfo)ClearOffsetRangeadded inv0.21.0

func (s *SourceInfo) ClearOffsetRange(idint64)

ClearOffsetRange removes the OffsetRange for the given expression id.

func (*SourceInfo)ComputeOffsetadded inv0.17.2

func (s *SourceInfo) ComputeOffset(line, colint32)int32

ComputeOffset calculates the 0-based character offset from a 1-based line and 0-based column.

func (*SourceInfo)Descriptionadded inv0.17.2

func (s *SourceInfo) Description()string

Description provides information about where the expression came from.

func (*SourceInfo)GetLocationByOffsetadded inv0.21.0

func (s *SourceInfo) GetLocationByOffset(offsetint32)common.Location

GetLocationByOffset returns the line and column information for a given character offset.

func (*SourceInfo)GetMacroCalladded inv0.17.2

func (s *SourceInfo) GetMacroCall(idint64) (Expr,bool)

GetMacroCall returns the original ast.Expr value for the given expression if it was generated viaa macro replacement.

Note, parsing options must be enabled to track macro calls before this method will return a value.

func (*SourceInfo)GetOffsetRangeadded inv0.17.2

func (s *SourceInfo) GetOffsetRange(idint64) (OffsetRange,bool)

GetOffsetRange retrieves an OffsetRange for the given expression id if one exists.

func (*SourceInfo)GetStartLocationadded inv0.17.2

func (s *SourceInfo) GetStartLocation(idint64)common.Location

GetStartLocation calculates the human-readable 1-based line and 0-based column of the first characterof the expression node at the id.

func (*SourceInfo)GetStopLocationadded inv0.17.2

func (s *SourceInfo) GetStopLocation(idint64)common.Location

GetStopLocation calculates the human-readable 1-based line and 0-based column of the last character forthe expression node at the given id.

If the SourceInfo was generated from a serialized protobuf representation, the stop location willbe identical to the start location for the expression.

func (*SourceInfo)LineOffsetsadded inv0.17.2

func (s *SourceInfo) LineOffsets() []int32

LineOffsets returns a list of the 0-based character offsets in the input text where newlines appear.

func (*SourceInfo)MacroCallsadded inv0.17.2

func (s *SourceInfo) MacroCalls() map[int64]Expr

MacroCalls returns a map of expression id to ast.Expr value where the id represents the expressionnode where the macro was inserted into the AST, and the ast.Expr value represents the original callsignature which was replaced.

func (*SourceInfo)OffsetRangesadded inv0.17.2

func (s *SourceInfo) OffsetRanges() map[int64]OffsetRange

OffsetRanges returns a map of expression id to OffsetRange values where the range indicates either:the start and end position in the input stream where the expression occurs, or the start positiononly. If the range only captures start position, the stop position of the range will be equal tothe start.

func (*SourceInfo)SetMacroCalladded inv0.17.2

func (s *SourceInfo) SetMacroCall(idint64, eExpr)

SetMacroCall records a macro call at a specific location.

func (*SourceInfo)SetOffsetRangeadded inv0.17.2

func (s *SourceInfo) SetOffsetRange(idint64, oOffsetRange)

SetOffsetRange sets the OffsetRange for the given expression id.

func (*SourceInfo)SyntaxVersionadded inv0.17.2

func (s *SourceInfo) SyntaxVersion()string

SyntaxVersion returns the syntax version associated with the text expression.

typeStructExpradded inv0.17.2

type StructExpr interface {// TypeName returns the struct type name.TypeName()string// Fields returns the set of field initializers in the struct expression as EntryExpr values.Fields() []EntryExpr// contains filtered or unexported methods}

StructExpr defines an interfaces for inspecting a struct and its field initializers.

typeStructFieldadded inv0.17.2

type StructField interface {// Name returns the name of the field.Name()string// Value returns the field initialization expression.Value()Expr// IsOptional returns whether the field is optional.IsOptional()bool// contains filtered or unexported methods}

StructField defines an interface for inspecting a struct field initialization.

typeVisitoradded inv0.18.0

type Visitor interface {// VisitExpr visits the input expression.VisitExpr(Expr)// VisitEntryExpr visits the input entry expression, i.e. a struct field or map entry.VisitEntryExpr(EntryExpr)}

Visitor defines an object for visiting Expr and EntryExpr nodes within an expression graph.

funcNewExprVisitoradded inv0.18.0

func NewExprVisitor(v func(Expr))Visitor

NewExprVisitor creates a visitor which only visits expression nodes.

Source Files

View all Source files

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