diff options
author | c+1 | 2023-05-17 11:38:44 -0400 |
---|---|---|
committer | c+1 | 2023-05-17 11:38:44 -0400 |
commit | a8bfa841540a13aea75fafcf11fe27688f1ea939 (patch) | |
tree | 7b709f47f831f8bcad61dd5f9a73942adfc50463 /src | |
parent | 6ada416e01aa358527b243236eae560399b7d84b (diff) |
new sytax?
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 2 | ||||
-rw-r--r-- | src/parser.c | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -12,7 +12,7 @@ int main(int argc, char* argv[]) { long fsource_size; char *source; - fsource = fopen ("examples/simple.halk", "rb"); + fsource = fopen ("examples/hello.halk", "rb"); if (!fsource) { log_err("Source file not found"); exit(1); diff --git a/src/parser.c b/src/parser.c index 0e6a015..c647e64 100644 --- a/src/parser.c +++ b/src/parser.c @@ -21,6 +21,7 @@ parser_t* parser_init(lexer_t* lexer) { // check for expected token, or throw syntax error void parser_check_expect(parser_t* parser, int token_type) { if (parser->token->type == token_type) { + log_dbg(strcat("Got expected token", lexer_get_c_as_string(parser->lexer))); parser->token = lexer_get_next_token(parser->lexer); } else { log_err("Unexpected token"); |