diff options
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index e45195578..b22d063d2 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -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; } } |