Reworked diagnostics, saves line positions in memory, instead of calculating later.
This commit is contained in:
@@ -51,11 +51,9 @@ namespace Upsilon.BaseTypes.UserData
|
||||
}
|
||||
else
|
||||
{
|
||||
var (i, pos) = diagnostics.ScriptString.GetLinePosition(span.Start);
|
||||
var line = diagnostics.ScriptString.GetLine(i);
|
||||
throw new ScriptRuntimeException(
|
||||
$"Tried indexing a CSharp list with a value that's not an integer. Value: {scriptIndex.ToCSharpObject()}",
|
||||
i, pos, line);
|
||||
span, diagnostics.ScriptString.GetSpan(span));
|
||||
}
|
||||
|
||||
index--;
|
||||
|
||||
Reference in New Issue
Block a user