Closed Wallbraker closed 6 years ago
Maybe we should rename the src/volt folder to be called src/volta?
Makes sense to me. At the very least it might stop me from mixing up the name of the language and the name of the compiler quite so often. 😛
Do we want to move over everything like in this commit, or maybe we should start with the ir, lexer, parser and some misc helpers first? Like in parsec?
Hrm. That seems reasonable, in the the ir
, lexer
, and parser
stuff is a mostly well defined external API, whereas semantic
, lowerer
, and llvm
are more... mechanically inclined.
On the other hand, reasonable it may be, but in terms of logic I would see lib
handling everything that isn't arguments and outputting error messages etc, which would be handled by volta
proper. Which goes on to answer your third question...
Even if we move over all of the postparse and semantic code we might want to keep the LLVM backend out of it?
Probably not. This kind of thing seems like it would belong in volta.lib
, even if volta
is its only client.
Okay, made the change much smaller now and instead something we can build upon.
So what this change does is:
Add the dsupport
subfolder that holds all of the pure D code that glues phobos and watt together.
Add the lib
subfolder which now just has a dummy volta.ir.package
module that does nothing.
Add the vls
subfolder which just imports volta.ir
and a empty main function.
And then we can build upon these changes and refactor the volta code into the lib
subfolder to be more usable as a library.
Looks good from a theoretical perspective. Need to see if I can actually get it to work over here on Windows.
Maybe we should rename the
src/volt
folder to be calledsrc/volta
?Do we want to move over everything like in this commit, or maybe we should start with the
ir
,lexer
,parser
and some misc helpers first? Like in parsec?Even if we move over all of the
postparse
andsemantic
code we might want to keep the LLVM backend out of it?