Support for getting severity from single diagnostic
This commit is contained in:
@@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
9
PorygonSharp/DiagnosticHandling/DiagnosticSeverity.cs
Normal file
9
PorygonSharp/DiagnosticHandling/DiagnosticSeverity.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
namespace PorygonSharp.DiagnosticHandling
|
||||||
|
{
|
||||||
|
public enum DiagnosticSeverity
|
||||||
|
{
|
||||||
|
Info,
|
||||||
|
Warning,
|
||||||
|
Error
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user