A little bit of code support now

This commit is contained in:
Michael Hansen
2009-07-26 10:07:13 +00:00
parent 98a50fd042
commit b89ae8b2ac
12 changed files with 556 additions and 28 deletions

21
pycdc.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include "ASTree.h"
int main(int argc, char* argv[])
{
if (argc < 2) {
fprintf(stderr, "No input file specified\n");
return 1;
}
PycModule mod;
mod.loadFromFile(argv[1]);
printf("# Source Generated with Decompyle++ pycdc\n");
printf("# File: %s (Python %d.%d%s)\n", argv[1], mod.majorVer(), mod.minorVer(),
(mod.majorVer() < 3 && mod.isUnicode()) ? " Unicode" : "");
ASTree source;
source.load(&mod);
source.printSource(&mod);
return 0;
}