Skip to content

Commit e909ee1

Browse files
committed
applying code review suggestions
1 parent 0a9a27f commit e909ee1

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

library/src/main/kotlin/com/strumenta/kolasu/languageserver/KolasuServer.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,12 @@ open class KolasuServer<T : Node>(
416416

417417
if (showParsingErrors) {
418418
for (issue in parsingResult.issues) {
419-
var range = Range(Position(0, 0), Position(0, 0))
420-
if (issue.position!=null){
421-
range = toLSPRange(issue.position!!)
422-
}
419+
val range =
420+
if (issue.position != null) {
421+
toLSPRange(issue.position!!)
422+
} else {
423+
Range(Position(0, 0), Position(0, 0))
424+
}
423425
diagnostics.add(
424426
Diagnostic(
425427
range,

0 commit comments

Comments
 (0)