Add VisitDirectDeps to module context

Change-Id: I271db2120aba1a5c99f21198f1eff6370e6e2389
This commit is contained in:
Colin Cross 2015-02-10 11:24:52 -08:00
parent b274e6c8e5
commit c7ffa30b8a

View file

@ -126,6 +126,8 @@ type ModuleContext interface {
OtherModuleName(m Module) string
OtherModuleErrorf(m Module, fmt string, args ...interface{})
VisitDirectDeps(visit func(Module))
VisitDirectDepsIf(pred func(Module) bool, visit func(Module))
VisitDepsDepthFirst(visit func(Module))
VisitDepsDepthFirstIf(pred func(Module) bool, visit func(Module))
@ -229,6 +231,14 @@ func (m *moduleContext) OtherModuleErrorf(module Module, format string,
})
}
func (m *moduleContext) VisitDirectDeps(visit func(Module)) {
m.context.visitDirectDeps(m.module, visit)
}
func (m *moduleContext) VisitDirectDepsIf(pred func(Module) bool, visit func(Module)) {
m.context.visitDirectDepsIf(m.module, pred, visit)
}
func (m *moduleContext) VisitDepsDepthFirst(visit func(Module)) {
m.context.visitDepsDepthFirst(m.module, visit)
}