Type checking basics

This commit is contained in:
2026-02-08 23:05:50 +01:00
parent b31a2d01c6
commit 3db412a060
4 changed files with 780 additions and 73 deletions

View File

@@ -44,6 +44,17 @@ public sealed class DiagnosticBuilder(DiagnosticSeverity severity, string messag
return this;
}
public DiagnosticBuilder At(string fileName, TypedNode? node)
{
if (node != null && node.Tokens.Count != 0)
{
// todo(nub31): Calculate length based on last token
At(fileName, node.Tokens[0]);
}
return this;
}
public DiagnosticBuilder WithHelp(string helpMessage)
{
help = helpMessage;