aboutsummaryrefslogtreecommitdiff
path: root/interpreter/fuspel.c
diff options
context:
space:
mode:
authorCamil Staps2016-10-06 18:24:02 +0200
committerCamil Staps2016-10-06 18:24:02 +0200
commit5ef2105922fcd7edabff7ed30b20a28d34581d02 (patch)
tree6359033c9909df024c4c9e5d31e8f97236730d65 /interpreter/fuspel.c
parentReadme (diff)
Fixing the build
Diffstat (limited to 'interpreter/fuspel.c')
-rw-r--r--interpreter/fuspel.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/interpreter/fuspel.c b/interpreter/fuspel.c
index 919b92a..1cbdd4c 100644
--- a/interpreter/fuspel.c
+++ b/interpreter/fuspel.c
@@ -26,30 +26,26 @@ fuspel* import(fuspel* already_parsed, char* fname) {
f = fopen(fname_, "r");
if (!f) {
- fprintf(stderr, "Couldn't read %s\n", fname_);
+ fprintf(stderr, "Couldn't read %s.\n", fname_);
exit(EXIT_FAILURE);
}
- printf("Lexing %s...\n", fname_);
-
while (!feof(f)) {
char program[LINE_LENGTH];
if (!fgets(program, LINE_LENGTH, f)) {
if (feof(f))
break;
- fprintf(stderr, "Couldn't read input.\n");
+ fprintf(stderr, "Couldn't read %s.\n", fname_);
exit(EXIT_FAILURE);
}
tokens = lex(tokens, program);
if (!tokens) {
- fprintf(stderr, "Couldn't lex program.\n");
+ fprintf(stderr, "Couldn't lex module %s.\n", fname);
exit(EXIT_FAILURE);
}
}
- printf("Parsing %s...\n", fname_);
-
my_free(fname_);
pgm = parse(tokens);
@@ -94,7 +90,6 @@ static struct argp argp = { options, parse_opt, args_doc, doc, 0, 0, 0 };
int main(int argc, char* argv[]) {
expression* result;
- int i;
struct environment env;
env.printProgram = false;