Add support for singletons to walk module deps.
Change-Id: I63405ee917a55ae92cf55070af94e01ddc266389
This commit is contained in:
parent
48aed8cee0
commit
e98b8a927d
1 changed files with 15 additions and 0 deletions
|
@ -32,6 +32,9 @@ type SingletonContext interface {
|
|||
|
||||
VisitAllModules(visit func(Module))
|
||||
VisitAllModulesIf(pred func(Module) bool, visit func(Module))
|
||||
VisitDepsDepthFirst(module Module, visit func(Module))
|
||||
VisitDepsDepthFirstIf(module Module, pred func(Module) bool,
|
||||
visit func(Module))
|
||||
}
|
||||
|
||||
var _ SingletonContext = (*singletonContext)(nil)
|
||||
|
@ -133,3 +136,15 @@ func (s *singletonContext) VisitAllModulesIf(pred func(Module) bool,
|
|||
|
||||
s.context.visitAllModulesIf(pred, visit)
|
||||
}
|
||||
|
||||
func (s *singletonContext) VisitDepsDepthFirst(module Module,
|
||||
visit func(Module)) {
|
||||
|
||||
s.context.visitDepsDepthFirst(module, visit)
|
||||
}
|
||||
|
||||
func (s *singletonContext) VisitDepsDepthFirstIf(module Module,
|
||||
pred func(Module) bool, visit func(Module)) {
|
||||
|
||||
s.context.visitDepsDepthFirstIf(module, pred, visit)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue