MCPcopy Create free account
hub / github.com/cel-expr/cel-go / VisitCreateStruct

Method VisitCreateStruct

parser/parser.go:731–738  ·  view source on GitHub ↗

Visit a parse tree produced by CELParser#CreateStruct.

(ctx *gen.CreateStructContext)

Source from the content-addressed store, hash-verified

729
730// Visit a parse tree produced by CELParser#CreateStruct.
731func (p *parser) VisitCreateStruct(ctx *gen.CreateStructContext) any {
732 structID := p.helper.id(ctx.GetOp())
733 entries := []ast.EntryExpr{}
734 if ctx.GetEntries() != nil {
735 entries = p.Visit(ctx.GetEntries()).([]ast.EntryExpr)
736 }
737 return p.helper.newMap(structID, entries...)
738}
739
740// Visit a parse tree produced by CELParser#mapInitializerList.
741func (p *parser) VisitMapInitializerList(ctx *gen.MapInitializerListContext) any {

Callers 1

VisitMethod · 0.95

Calls 5

VisitMethod · 0.95
idMethod · 0.80
newMapMethod · 0.80
GetOpMethod · 0.65
GetEntriesMethod · 0.45

Tested by

no test coverage detected