Created
February 18, 2012 18:26
-
-
Save Whiteknight/1860547 to your computer and use it in GitHub Desktop.
pure winxed-to-pbc compiler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_winxed_compiler(string pbc_name = "winxedst3.pbc") | |
{ | |
var wx_pbc = load_packfile(pbc_name); | |
for (var load_sub in wx_pbc.subs_by_tag("load")) | |
load_sub(); | |
return compreg("winxed"); | |
} | |
function main[main](var args) | |
{ | |
var wx_compreg = get_winxed_compiler(); | |
string winxedcc_name = args.shift(); | |
string infile_name = args.shift(); | |
string outfile_name = args.shift(); | |
string code = (new 'FileHandle').readall(infile_name); | |
var pf = wx_compreg.compile(code); | |
pf.write_to_file(outfile_name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment