protected override void Fill(Match match, Span originalSpan)
{
base.Fill(match, originalSpan);
var npmMessageTypeGroup = match.Groups["NpmMessageType"];
if (npmMessageTypeGroup.Success) {
var span = new Span(originalSpan.Start + npmMessageTypeGroup.Index, npmMessageTypeGroup.Length);
switch (npmMessageTypeGroup.Value) {
case "WARN":
Type = new ParsedValue<MessageType>(MessageType.Warning, span);
break;
case "ERR!":
Type = new ParsedValue<MessageType>(MessageType.Error, span);
break;
default:
throw new ArgumentOutOfRangeException();
}
}
}