ast: change file to have a list of sections

This commit is contained in:
Michael McLoughlin
2018-12-26 18:58:12 -08:00
parent bf6031521f
commit d29c6340d7
6 changed files with 30 additions and 12 deletions

View File

@@ -65,10 +65,11 @@ func ConstructLiveness(t *testing.T, ctx *build.Context) *avo.Function {
t.FailNow()
}
if len(f.Functions) != 1 {
fns := f.Functions()
if len(fns) != 1 {
t.Fatalf("expect 1 function")
}
fn := f.Functions[0]
fn := fns[0]
passes := []func(*avo.Function) error{
pass.LabelTarget,