aboutsummaryrefslogtreecommitdiff
path: root/src/parser.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-09-18 12:52:43 +0100
committergingerBill <bill@gingerbill.org>2021-09-18 12:52:43 +0100
commit05ac2002e0296c3acccca1d8cffaafb002e43120 (patch)
treef809fac39673bc362f2a3b5958a65812d65701bb /src/parser.cpp
parent73427d3ab3d63553fc1fc208815222c0ccb8e084 (diff)
Force file copy on `odin strip-semicolon`
Diffstat (limited to 'src/parser.cpp')
-rw-r--r--src/parser.cpp3
1 files changed, 2 insertions, 1 deletions
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: