(r *CompiledRule)
| 106 | } |
| 107 | |
| 108 | func recoverOriginalSource(r *CompiledRule) cel.Source { |
| 109 | match := r.Matches()[0] |
| 110 | var source cel.Source |
| 111 | if match.Output() != nil { |
| 112 | source = match.Output().Expr().Source() |
| 113 | } else { |
| 114 | source = match.Condition().Source() |
| 115 | } |
| 116 | if rel, ok := source.(*RelativeSource); ok { |
| 117 | source = rel.Source |
| 118 | } |
| 119 | return source |
| 120 | } |
| 121 | |
| 122 | type varIndex struct { |
| 123 | index int |