From 05ac2002e0296c3acccca1d8cffaafb002e43120 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 18 Sep 2021 12:52:43 +0100 Subject: Force file copy on `odin strip-semicolon` --- src/parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index e33531fad..f72d8a73c 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -4645,7 +4645,8 @@ ParseFileError init_ast_file(AstFile *f, String fullpath, TokenPos *err_pos) { zero_item(&f->tokenizer); f->tokenizer.curr_file_id = f->id; - TokenizerInitError err = init_tokenizer_from_fullpath(&f->tokenizer, f->fullpath); + bool copy_file_contents = build_context.command_kind == Command_strip_semicolon; + TokenizerInitError err = init_tokenizer_from_fullpath(&f->tokenizer, f->fullpath, copy_file_contents); if (err != TokenizerInit_None) { switch (err) { case TokenizerInit_Empty: -- cgit v1.2.3