Skip to content

Commit

Permalink
Merge pull request #42 from ErwannLesech/fix-tab
Browse files Browse the repository at this point in the history
fix<lexer>: add tab
  • Loading branch information
Nimu93 authored Jan 13, 2024
2 parents 91a8aee + 2c4f8ba commit c9a105a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/lexer/lexer.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ struct token parse_input_for_tok(struct lexer *lexer)

bool is_diactivated = false;

while (lexer->data[lexer->index] == ' ')
while (lexer->data[lexer->index] == ' '
|| lexer->data[lexer->index] == '\t')
{
++lexer->index;
}
Expand Down
4 changes: 2 additions & 2 deletions src/parser/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ int parser_loop(struct lexer *lexer, bool logger_enabled,
if (return_value != 0 && return_value != 1)
{
fprintf(stderr, "Error while executing\n");
ast_free(ast);
return return_value;
// ast_free(ast);
// return return_value;
}
ast_free(ast);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/error/error_syntax/testsuite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ run_test error_syntax9.test
run_test error_syntax10.test
run_test error_syntax11.test
run_test error_syntax12.test
run_test error_syntax13.test
run_test error_syntax13.test

0 comments on commit c9a105a

Please sign in to comment.