first version of an PHP codegen

This commit is contained in:
Andreas Rumpf 2016-02-04 03:40:39 +01:00
commit 35567a1eb9
8 changed files with 665 additions and 411 deletions

View file

@ -108,6 +108,7 @@ proc commandCompileToJS =
defineSymbol("nimrod") # 'nimrod' is always defined
defineSymbol("ecmascript") # For backward compatibility
defineSymbol("js")
if gCmd == cmdCompileToPHP: defineSymbol("nimphp")
semanticPasses()
registerPass(JSgenPass)
compileProject()
@ -267,6 +268,9 @@ proc mainCommand* =
of "js", "compiletojs":
gCmd = cmdCompileToJS
commandCompileToJS()
of "php":
gCmd = cmdCompileToPHP
commandCompileToJS()
of "doc":
wantMainModule()
gCmd = cmdDoc