From 13bca200eceb174d947a69de56a02ae6ea7db520 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 26 Aug 2016 16:14:46 +0200 Subject: Fix bug with names starting with a c --- interpreter/fuspelc.c | 6 +++--- interpreter/lex.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'interpreter') 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)) { -- cgit v1.2.3