From 1adb289c10dca8d00e3670a5c730d5173e12b6e7 Mon Sep 17 00:00:00 2001 From: Niels Bross Date: Mon, 6 Jan 2025 22:17:44 +0100 Subject: [PATCH] Add error propagation to lexer. --- Lexing.jai | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lexing.jai b/Lexing.jai index ab77cf9..7b6a310 100644 --- a/Lexing.jai +++ b/Lexing.jai @@ -509,12 +509,14 @@ lex :: (result : *Compile_Result) { for *file : result.files { lexer : Lexer; init_lexer_from_string(*lexer, file.file.source); + lexer.path = file.file.path; token : *Token = scan_next_token(*lexer); while token && token.kind != .TOKEN_EOF { token = scan_next_token(*lexer); } array_copy(*file.tokens.tokens, lexer.result.tokens); + result.had_error |= lexer.result.had_error; // @Incomplete(nb): Temporary until we figure out a good way of passing this stuff around copy_messages(lexer.result.messages, *result.messages);