Support for getting severity from single diagnostic
This commit is contained in:
parent
d36d091d28
commit
d13eb7d2d5
|
@ -8,7 +8,7 @@ namespace PorygonSharp.DiagnosticHandling
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct InternalRepresentation
|
public struct InternalRepresentation
|
||||||
{
|
{
|
||||||
private readonly int _severity;
|
private readonly DiagnosticSeverity _severity;
|
||||||
private readonly DiagnosticCode _code;
|
private readonly DiagnosticCode _code;
|
||||||
private readonly uint _start;
|
private readonly uint _start;
|
||||||
private readonly uint _length;
|
private readonly uint _length;
|
||||||
|
@ -17,6 +17,11 @@ namespace PorygonSharp.DiagnosticHandling
|
||||||
{
|
{
|
||||||
return _code;
|
return _code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DiagnosticSeverity GetSeverity()
|
||||||
|
{
|
||||||
|
return _severity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private InternalRepresentation _internalRepresentation;
|
private InternalRepresentation _internalRepresentation;
|
||||||
|
@ -51,5 +56,10 @@ namespace PorygonSharp.DiagnosticHandling
|
||||||
{
|
{
|
||||||
return Internal.GetCode();
|
return Internal.GetCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DiagnosticSeverity GetSeverity()
|
||||||
|
{
|
||||||
|
return Internal.GetSeverity();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace PorygonSharp.DiagnosticHandling
|
||||||
|
{
|
||||||
|
public enum DiagnosticSeverity
|
||||||
|
{
|
||||||
|
Info,
|
||||||
|
Warning,
|
||||||
|
Error
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue