From 9626c5dead41b8b5f145dc66823fa00ffe37a556 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Sat, 16 Oct 2021 14:50:08 +0200 Subject: [PATCH] attempt to fix Windows path issue with "library:" prefixes in AsmGen --- compiler/src/prog8/compiler/Compiler.kt | 4 ++-- compiler/src/prog8/compiler/target/cpu6502/codegen/AsmGen.kt | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler/src/prog8/compiler/Compiler.kt b/compiler/src/prog8/compiler/Compiler.kt index 5c37faa4e..125556019 100644 --- a/compiler/src/prog8/compiler/Compiler.kt +++ b/compiler/src/prog8/compiler/Compiler.kt @@ -375,7 +375,7 @@ fun printAst(programAst: Program) { println() } -internal fun loadAsmIncludeFile(filename: String, sourcePath: Path): Result { +internal fun loadAsmIncludeFile(filename: String, source: SourceCode): Result { return if (filename.startsWith(libraryFilePrefix)) { return runCatching { val stream = object {}.javaClass.getResourceAsStream("/prog8lib/${filename.substring(libraryFilePrefix.length)}") // TODO handle via SourceCode @@ -383,7 +383,7 @@ internal fun loadAsmIncludeFile(filename: String, sourcePath: Path): Result