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}";
}
