diff options
author | Camil Staps | 2016-08-26 16:14:46 +0200 |
---|---|---|
committer | Camil Staps | 2016-08-26 16:14:46 +0200 |
commit | 13bca200eceb174d947a69de56a02ae6ea7db520 (patch) | |
tree | 886a1bce145b21e18158bcd5c0b0d36b6c860731 /interpreter | |
parent | Added strictness example (diff) |
Fix bug with names starting with a c
Diffstat (limited to 'interpreter')
-rw-r--r-- | interpreter/fuspelc.c | 6 | ||||
-rw-r--r-- | interpreter/lex.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/interpreter/fuspelc.c b/interpreter/fuspelc.c index c885e06..0e1d82b 100644 --- a/interpreter/fuspelc.c +++ b/interpreter/fuspelc.c @@ -19,13 +19,13 @@ int main(void) { if (!fgets(program, 79, stdin)) { if (feof(stdin)) break; - fprintf(stderr, "Couldn't read input."); + fprintf(stderr, "Couldn't read input.\n"); exit(EXIT_FAILURE); } tokens = lex(tokens, program); if (!tokens) { - fprintf(stderr, "Couldn't lex program."); + fprintf(stderr, "Couldn't lex program.\n"); exit(EXIT_FAILURE); } } @@ -35,7 +35,7 @@ int main(void) { my_free(tokens); if (!pgm) { - fprintf(stderr, "Couldn't parse program."); + fprintf(stderr, "Couldn't parse program.\n"); exit(EXIT_FAILURE); } diff --git a/interpreter/lex.c b/interpreter/lex.c index 8208248..0d93bea 100644 --- a/interpreter/lex.c +++ b/interpreter/lex.c @@ -68,8 +68,8 @@ token_list* lex(token_list* list, char* input) { is_space_char(input[4])) { list->elem.kind = TOKEN_CODE; input += 4; + break; } - break; default: if (is_int_char(*input)) { |