VisitEntryExpr populates the coverageStats for the current entry expression based on the coverageStats of its direct children.
(e ast.EntryExpr)
| 1215 | // VisitEntryExpr populates the coverageStats for the current entry expression based on the coverageStats |
| 1216 | // of its direct children. |
| 1217 | func (pv parentVisitor) VisitEntryExpr(e ast.EntryExpr) { |
| 1218 | if pv.coverageStats[e.ID()] != nil { |
| 1219 | return |
| 1220 | } |
| 1221 | switch e.Kind() { |
| 1222 | case ast.MapEntryKind: |
| 1223 | me := e.AsMapEntry() |
| 1224 | if _, ok := pv.coverageStats[me.Key().ID()]; ok { |
| 1225 | pv.coverageStats[e.ID()] = make(set) |
| 1226 | } |
| 1227 | if _, ok := pv.coverageStats[me.Value().ID()]; ok { |
| 1228 | pv.coverageStats[e.ID()] = make(set) |
| 1229 | } |
| 1230 | case ast.StructFieldKind: |
| 1231 | sf := e.AsStructField() |
| 1232 | if _, ok := pv.coverageStats[sf.Value().ID()]; ok { |
| 1233 | pv.coverageStats[e.ID()] = make(set) |
| 1234 | } |
| 1235 | } |
| 1236 | } |
nothing calls this directly
no test coverage detected