diff options
-rw-r--r-- | main.c | 1 | ||||
-rw-r--r-- | test.toc | 5 | ||||
-rw-r--r-- | types.c | 7 |
3 files changed, 8 insertions, 5 deletions
@@ -8,7 +8,6 @@ see development.md for development information @TODO: -if we do #include "foo.toc", bar; and foo.toc fails, bar should be declared as TYPE_UNKNOWN (right now it's undeclared) fix #foreign not at global scope - right now the cgen'd definition doesn't use the proper type figure out how printf is gonna work improve type_to_str: @@ -1,6 +1,7 @@ -#include "std/io.toc", io; +#include "main.c", t; + main ::= fn() { - io.puts("Hello, world!"); + t.puts("hi"); } main(); @@ -3878,7 +3878,6 @@ top: { char *contents = read_file_contents(tr->allocr, filename, s->where); if (!contents) { - tr->had_include_err = true; success = false; goto nms_done; } @@ -3919,7 +3918,11 @@ top: tr->block = prev_block; } if (inc_f) inc_f->flags &= (IncFileFlags)~(IncFileFlags)INC_FILE_INCLUDING; - if (!success) return false; + if (!success) { + // give up on typing if #include failed + tr->had_include_err = true; + return false; + } } break; case STMT_MESSAGE: { Message *m = s->message; |