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

@@ -29,7 +29,7 @@ func (p Func) Execute(f *avo.File) error {
type FunctionPass func(*avo.Function) error
func (p FunctionPass) Execute(f *avo.File) error {
for _, fn := range f.Functions {
for _, fn := range f.Functions() {
if err := p(fn); err != nil {
return err
}