mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 17:25:32 +00:00
23 lines
575 B
C#
23 lines
575 B
C#
namespace HaWeb.Models;
|
|
|
|
public class SyntaxCheckModel {
|
|
public string File { get; private set; }
|
|
public List<SyntaxError>? Errors { get; private set; }
|
|
|
|
public SyntaxCheckModel(string file) {
|
|
File = file;
|
|
}
|
|
|
|
public void Log(int? line, int? column, string msg) {
|
|
if (String.IsNullOrWhiteSpace(msg)) return;
|
|
if (Errors == null) Errors = new();
|
|
// var prefix = DateTime.Now.ToLongDateString() + ": ";
|
|
Errors.Add(new SyntaxError(line, column, msg));
|
|
}
|
|
|
|
public void ResetLog() {
|
|
Errors = null;
|
|
}
|
|
}
|
|
|