mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55: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 _, phase := range phases {
|
||||||
for _, f := range files {
|
if phase.kind == a.KInvalid {
|
||||||
if phase.kind == a.KInvalid {
|
if err := phase.check(c, nil); err != nil {
|
||||||
if err := phase.check(c, nil); err != nil {
|
return nil, err
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, f := range files {
|
||||||
for _, n := range f.TopLevelDecls() {
|
for _, n := range f.TopLevelDecls() {
|
||||||
if n.Kind() != phase.kind {
|
if n.Kind() != phase.kind {
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in new issue
Block a user