Lots of work on type binding
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Upsilon.BaseTypes;
|
||||
using Upsilon.Parser;
|
||||
using Upsilon.Text;
|
||||
|
||||
namespace Upsilon
|
||||
@@ -37,6 +39,16 @@ namespace Upsilon
|
||||
{
|
||||
LogError($"Null Reference Encountered", span);
|
||||
}
|
||||
|
||||
public void LogUnknownType(TextSpan eSpan)
|
||||
{
|
||||
LogError($"Unknown Type found", eSpan);
|
||||
}
|
||||
|
||||
public void LogUnknownOperator(TextSpan eSpan, SyntaxKind text, Type leftType, Type rightType)
|
||||
{
|
||||
LogError($"No binary operator {text} found for types '{leftType}' and '{rightType}'", eSpan);
|
||||
}
|
||||
}
|
||||
|
||||
public class DiagnosticsMessage
|
||||
@@ -71,7 +83,7 @@ namespace Upsilon
|
||||
|
||||
public string AfterError(int i = 5)
|
||||
{
|
||||
return Diagnostics.ScriptString.GetSpan(Span.Start + 1, i);
|
||||
return Diagnostics.ScriptString.GetSpan(Span.Start + Span.Length, i);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user