mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
check: run some phases once not once-per-file
This commit is contained in:
1 parent
190f249031
commit
b20c177a08
1 file changed
+7
-6
+7
-6
@@ -166,13 +166,14 @@ func Check(tm *t.Map, files []*a.File, resolveUse func(usePath string) ([]byte,
|
||||
}
|
||||
|
||||
for _, phase := range phases {
|
||||
for _, f := range files {
|
||||
if phase.kind == a.KInvalid {
|
||||
if err := phase.check(c, nil); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
continue
|
||||
if phase.kind == a.KInvalid {
|
||||
if err := phase.check(c, nil); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
for _, f := range files {
|
||||
for _, n := range f.TopLevelDecls() {
|
||||
if n.Kind() != phase.kind {
|
||||
continue
|
||||
|
||||
Reference in new issue
Block a user