Implement recursive compilation (basic)