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

Method AllOptField

parser/gen/cel_parser.go:4358–4377  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4356func (s *FieldInitializerListContext) SetValues(v []IExprContext) { s.values = v }
4357
4358func (s *FieldInitializerListContext) AllOptField() []IOptFieldContext {
4359 children := s.GetChildren()
4360 len := 0
4361 for _, ctx := range children {
4362 if _, ok := ctx.(IOptFieldContext); ok {
4363 len++
4364 }
4365 }
4366
4367 tst := make([]IOptFieldContext, len)
4368 i := 0
4369 for _, ctx := range children {
4370 if t, ok := ctx.(IOptFieldContext); ok {
4371 tst[i] = t.(IOptFieldContext)
4372 i++
4373 }
4374 }
4375
4376 return tst
4377}
4378
4379func (s *FieldInitializerListContext) OptField(i int) IOptFieldContext {
4380 var t antlr.RuleContext

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected