summary refs log tree commit diff stats
path: root/compiler/options.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/options.nim')
-rw-r--r--compiler/options.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/options.nim b/compiler/options.nim
index ec87ed805..4c5b6b668 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -141,6 +141,12 @@ proc newConfigRef*(): ConfigRef =
     notes: NotesVerbosity[1], mainPackageNotes: NotesVerbosity[1],
     symbols: newStringTable(modeStyleInsensitive))
 
+proc newPartialConfigRef*(): ConfigRef =
+  ## create a new ConfigRef that is only good enough for error reporting.
+  result = ConfigRef(foreignPackageNotes: {hintProcessing, warnUnknownMagic,
+    hintQuitCalled, hintExecuting},
+    notes: NotesVerbosity[1], mainPackageNotes: NotesVerbosity[1])
+
 proc cppDefine*(c: ConfigRef; define: string) =
   c.cppDefines.incl define