add pic_compile

This commit is contained in:
Yuichi Nishiwaki
2014-01-20 16:57:39 +09:00
parent 293fef5235
commit 655eb7a3bd
6 changed files with 421 additions and 884 deletions
+3 -3
View File
@@ -122,7 +122,7 @@ repl(pic_state *pic)
#endif
/* eval */
proc = pic_codegen(pic, v);
proc = pic_compile(pic, v);
if (proc == NULL) {
printf("compilation error: %s\n", pic->errmsg);
pic->errmsg = NULL;
@@ -183,7 +183,7 @@ exec_file(pic_state *pic, const char *fname)
v = pic_car(pic, vs);
proc = pic_codegen(pic, v);
proc = pic_compile(pic, v);
if (proc == NULL) {
fputs(pic->errmsg, stderr);
fprintf(stderr, "fatal error: %s compilation failure\n", fname);
@@ -223,7 +223,7 @@ exec_string(pic_state *pic, const char *str)
for (i = 0; i < n; ++i) {
v = pic_car(pic, vs);
proc = pic_codegen(pic, v);
proc = pic_compile(pic, v);
if (proc == NULL) {
goto abort;
}