From db0cd79633fe05069dc4f9248d2796eb8ec3b858 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 27 Aug 2026 15:26:29 +0100 Subject: [PATCH] Use `thread_safe_file` --- src/check_stmt.cpp | 4 ++-- src/parser.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 4dd8829e2..4fb6688a8 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1387,7 +1387,7 @@ gb_internal void check_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_flags } } - if (is_strict_style(ast_file(node))) { + if (is_strict_style(node->thread_safe_file())) { Token stok = ss->token; for_array(i, bs->stmts) { Ast *stmt = bs->stmts[i]; @@ -1663,7 +1663,7 @@ gb_internal void check_type_switch_stmt(CheckerContext *ctx, Ast *node, u32 mod_ } } - if (is_strict_style(ast_file(node))) { + if (is_strict_style(node->thread_safe_file())) { Token stok = ss->token; for_array(i, bs->stmts) { Ast *stmt = bs->stmts[i]; diff --git a/src/parser.cpp b/src/parser.cpp index ddbcea290..922f30257 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -104,7 +104,7 @@ gb_internal bool ast_file_vet_explicit_allocators(AstFile *f) { } gb_internal bool file_allow_newline(AstFile *f) { - bool is_strict = is_strict_style(f) || ast_file_vet_style(f) + bool is_strict = is_strict_style(f) || ast_file_vet_style(f); return !is_strict; }