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

Method AllOptExpr

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

Source from the content-addressed store, hash-verified

4091func (s *ListInitContext) SetElems(v []IOptExprContext) { s.elems = v }
4092
4093func (s *ListInitContext) AllOptExpr() []IOptExprContext {
4094 children := s.GetChildren()
4095 len := 0
4096 for _, ctx := range children {
4097 if _, ok := ctx.(IOptExprContext); ok {
4098 len++
4099 }
4100 }
4101
4102 tst := make([]IOptExprContext, len)
4103 i := 0
4104 for _, ctx := range children {
4105 if t, ok := ctx.(IOptExprContext); ok {
4106 tst[i] = t.(IOptExprContext)
4107 i++
4108 }
4109 }
4110
4111 return tst
4112}
4113
4114func (s *ListInitContext) OptExpr(i int) IOptExprContext {
4115 var t antlr.RuleContext

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected