make msgs.nim more robust

This commit is contained in:
Andreas Rumpf
2018-04-30 12:07:12 +02:00
parent 50e1a489c0
commit 6dbfdecd74

View File

@@ -474,6 +474,10 @@ const
hintMin* = hintSuccess
hintMax* = high(TMsgKind)
static:
doAssert HintsToStr.len == ord(hintMax) - ord(hintMin) + 1
doAssert WarningsToStr.len == ord(warnMax) - ord(warnMin) + 1
type
TNoteKind* = range[warnMin..hintMax] # "notes" are warnings or hints
TNoteKinds* = set[TNoteKind]