mewmew / uc

A compiler for the µC language.
58 stars 5 forks source link

parser: Consider removing the *ast.File abstraction #40

Closed mewmew closed 8 years ago

mewmew commented 8 years ago

Premature abstraction is the root of all evil. The question is, is the *ast.File abstraction premature?

From ast.go:

// TODO: Consider removing file abstraction, and let []TopLevelDecl be the
// return type of Parse.
mewmew commented 8 years ago

Once support for include files and compilation of multiple C files is supported, having this abstraction starts to make sense. Therefore, the issue has been resolved after discussions and we've decided to keep the *ast.File abstraction.