Add info about the end of range in scripting REPL compiler messages

This commit is contained in:
Ilya Muradyan
2020-02-12 16:57:52 +01:00
committed by Ilya Chernikov
parent 5e33612238
commit 489290263f
9 changed files with 119 additions and 17 deletions
@@ -37,10 +37,20 @@ class ScriptDiagnosticsMessageCollector(private val parentMessageCollector: Mess
if (mappedSeverity != null) {
val mappedLocation = location?.let {
if (it.line < 0 && it.column < 0) null // special location created by CompilerMessageLocation.create
else if (it.lineEnd < 0 && it.columnEnd < 0) SourceCode.Location(
SourceCode.Position(
it.line,
it.column
)
)
else SourceCode.Location(
SourceCode.Position(
it.line,
it.column
),
SourceCode.Position(
it.lineEnd,
it.columnEnd
)
)
}