felixangell / kpd

an old compiler for Krug written in D - a prototype version
MIT License
44 stars 1 forks source link

inject a main function in the generated code that invokes the main modules entry point #32

Closed felixangell closed 6 years ago

felixangell commented 6 years ago

I think this would be a better alternative than to say re-write the main modules main function as _start, etc.

felixangell commented 6 years ago

right now this is done per module which is obviously not correct if we have more than one module. ideally this might be injected into the actual AST as well for the main module and have an attribute so that the name is not mangled

felixangell commented 6 years ago

this is now done only once