mighty

The mighty programming language, compiler and tools (WIP)
Log | Files | Refs

commit 6998426c94d9dadcc3ec17cdc13302a62688b5e2
parent b23fdf8985b7608028a5fc9ebea279d220e0cacd
Author: citbl <citbl@citbl.org>
Date:   Wed, 20 May 2026 23:01:39 +1000

minor

Diffstat:
Mmtcc/src/lexer.c | 2+-
Mmtcc/src/lexer.h | 2+-
Mmtcc/src/main.c | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/mtcc/src/lexer.c b/mtcc/src/lexer.c @@ -51,7 +51,7 @@ lexer_lex(struct lexer *lexer) { col++; } ident = (struct span){ - .filename = lexer->filename, .col = start_col, .line = line, .start = start, .stop = i}; + .filename = lexer->file, .col = start_col, .line = line, .start = start, .stop = i}; type = compare_span_to_token(lexer, ident); tok = (struct token){.span = ident, .token_type = type}; add_token(lexer, tok); diff --git a/mtcc/src/lexer.h b/mtcc/src/lexer.h @@ -2,7 +2,7 @@ #include "token.h" struct lexer { - const char *filename; + const char *file; const char *src; size_t src_len; struct token *tokens; diff --git a/mtcc/src/main.c b/mtcc/src/main.c @@ -17,7 +17,7 @@ main(int argc, char **argv) { filename = argv[1]; file = read_file(filename); lexer = (struct lexer){ - .filename = filename, + .file = filename, .src = file.contents, .src_len = file.len, };