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

Method VisitCreateStruct

parser/antlr_parser.go:637–644  ·  view source on GitHub ↗

Visit a parse tree produced by CELParser#CreateStruct.

(ctx *gen.CreateStructContext)

Source from the content-addressed store, hash-verified

635
636// Visit a parse tree produced by CELParser#CreateStruct.
637func (p *antlrVisitor) VisitCreateStruct(ctx *gen.CreateStructContext) any {
638 structID := p.helper.id(ctx.GetOp())
639 entries := []ast.EntryExpr{}
640 if ctx.GetEntries() != nil {
641 entries = p.Visit(ctx.GetEntries()).([]ast.EntryExpr)
642 }
643 return p.helper.newMap(structID, entries...)
644}
645
646// Visit a parse tree produced by CELParser#mapInitializerList.
647func (p *antlrVisitor) 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