More work on the AST generator: includes, forward declarations, type lookup