templates support
This commit is contained in:
22
Inspectron.Epson.Templates/Validation/TemplateWarning.cs
Normal file
22
Inspectron.Epson.Templates/Validation/TemplateWarning.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Inspectron.Epson.Templates.Language;
|
||||
|
||||
namespace Inspectron.Epson.Templates.Validation;
|
||||
|
||||
public enum TemplateWarningCode
|
||||
{
|
||||
// Semantic warnings (RTL100-RTL103)
|
||||
RTL100_EmptyBlock = 100,
|
||||
RTL101_UnusedVariable = 101,
|
||||
RTL102_PossibleNullReference = 102,
|
||||
RTL103_LineWidthExceeded = 103
|
||||
}
|
||||
|
||||
public record TemplateWarning(
|
||||
TemplateWarningCode Code,
|
||||
string Message,
|
||||
SourcePosition Position)
|
||||
{
|
||||
public string CodeString => Code.ToString().Split('_')[0];
|
||||
|
||||
public override string ToString() => $"{CodeString}: {Message} at {Position}";
|
||||
}
|
||||
Reference in New Issue
Block a user