diff options
| author | gingerBill <bill@gingerbill.org> | 2024-01-07 19:56:00 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-01-07 19:56:00 +0000 |
| commit | aff8f06e3cb1bdb9c3ffee98a68675c843df78fd (patch) | |
| tree | 14045e04f2c06c1dfb78cad9cbd0a4528959ccad /src/parser.cpp | |
| parent | 1e1228fb37bafd6ab277247a8bea91fab68914e0 (diff) | |
Add frontend stuff instrumentation tooling
//+no-instrumentation
@(no_instrumentation)
@(instrumentation_enter)
@(instrumentation_exit)
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index c0498b425..2671054df 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -5919,7 +5919,7 @@ gb_internal bool parse_file(Parser *p, AstFile *f) { f->vet_flags = parse_vet_tag(tok, lc); f->vet_flags_set = true; } else if (string_starts_with(lc, str_lit("+ignore"))) { - return false; + return false; } else if (string_starts_with(lc, str_lit("+private"))) { f->flags |= AstFile_IsPrivatePkg; String command = string_trim_starts_with(lc, str_lit("+private ")); @@ -5941,6 +5941,8 @@ gb_internal bool parse_file(Parser *p, AstFile *f) { } else { f->flags |= AstFile_IsLazy; } + } else if (lc == "+no-instrumentation") { + f->flags |= AstFile_NoInstrumentation; } else { warning(tok, "Ignoring unknown tag '%.*s'", LIT(lc)); } |