INTERNAL USE ONLY: //+lazy build flag

This commit is contained in:
gingerBill
2021-07-25 13:06:09 +01:00
parent 92f3567ee6
commit 99080d41f3
8 changed files with 191 additions and 74 deletions

View File

@@ -5312,7 +5312,18 @@ bool parse_file(Parser *p, AstFile *f) {
return false;
}
} else if (lc == "+private") {
f->is_private = true;
f->flags |= AstFile_IsPrivate;
} else if (lc == "+lazy") {
if (build_context.ignore_lazy) {
// Ignore
} else if (f->flags & AstFile_IsTest) {
// Ignore
} else if (build_context.command_kind == Command_doc &&
f->pkg->kind == Package_Init) {
// Ignore
} else {
f->flags |= AstFile_IsLazy;
}
}
}
}
@@ -5405,7 +5416,7 @@ ParseFileError process_imported_file(Parser *p, ImportedFile const &imported_fil
String test_suffix = str_lit("_test");
if (string_ends_with(name, test_suffix) && name != test_suffix) {
file->is_test = true;
file->flags |= AstFile_IsTest;
}
}