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

Method AllOptField

repl/parser/commands_parser.go:8316–8335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8314func (s *FieldInitializerListContext) SetValues(v []IExprContext) { s.values = v }
8315
8316func (s *FieldInitializerListContext) AllOptField() []IOptFieldContext {
8317 children := s.GetChildren()
8318 len := 0
8319 for _, ctx := range children {
8320 if _, ok := ctx.(IOptFieldContext); ok {
8321 len++
8322 }
8323 }
8324
8325 tst := make([]IOptFieldContext, len)
8326 i := 0
8327 for _, ctx := range children {
8328 if t, ok := ctx.(IOptFieldContext); ok {
8329 tst[i] = t.(IOptFieldContext)
8330 i++
8331 }
8332 }
8333
8334 return tst
8335}
8336
8337func (s *FieldInitializerListContext) OptField(i int) IOptFieldContext {
8338 var t antlr.RuleContext

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected