Introduce NotesVerbosity defining verbosity levels

This solves two issues:

1. Some notes were enabled explicitly for some verbosity levels, so
   --hintName:on has no effect if verbosity level was too low.

2. Verbosity level for notes is not longer scattered across the source code,
   instead if now lives in msgs.nim NotesVerbosity array

3. Individual note settings have stronger effect than verbosity setting,
   so --hintName:off will disable hint regardless of high verbosity setting,
   and vice-versa --hintName:on will enable hint even on low verbosity setting.
This commit is contained in:
Adam Strzelecki 2015-06-06 11:07:23 +02:00
commit 14e6ff6780
8 changed files with 36 additions and 13 deletions

View file

@ -15,7 +15,7 @@ import
proc verboseOpen(s: PSym): PPassContext =
#MessageOut('compiling ' + s.name.s);
result = nil # we don't need a context
if gVerbosity > 0: rawMessage(hintProcessing, s.name.s)
rawMessage(hintProcessing, s.name.s)
proc verboseProcess(context: PPassContext, n: PNode): PNode =
result = n