From f3dafb02a52c3df3198cf89039effcaf2b24037d Mon Sep 17 00:00:00 2001 From: SrGaabriel Date: Thu, 5 Sep 2024 17:10:26 -0300 Subject: [PATCH] =?UTF-8?q?refactor:=20change=20file=20extension=20to=20?= =?UTF-8?q?=C2=B4sl`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bard/output/ll/bard.ll | 12 ++++++------ bard/output/ll/signatures.json | 2 +- bard/output/ll/stdlib.ll | 6 +++--- bard/output/output.exe | Bin 128512 -> 128512 bytes bard/src/{main.wy => main.sl} | 0 .../kotlin/SeleneCompilerPlatform.kt | 4 ++++ .../kotlin/io/LoggedResourceManager.kt | 3 ++- stdlib/src/{collections.wy => collections.sl} | 0 stdlib/src/{io.wy => io.sl} | 0 stdlib/src/{math.wy => math.sl} | 0 stdlib/src/{networking.wy => networking.sl} | 0 stdlib/src/{str.wy => str.sl} | 0 stdlib/src/{types.wy => types.sl} | 0 13 files changed, 16 insertions(+), 11 deletions(-) rename bard/src/{main.wy => main.sl} (100%) rename stdlib/src/{collections.wy => collections.sl} (100%) rename stdlib/src/{io.wy => io.sl} (100%) rename stdlib/src/{math.wy => math.sl} (100%) rename stdlib/src/{networking.wy => networking.sl} (100%) rename stdlib/src/{str.wy => str.sl} (100%) rename stdlib/src/{types.wy => types.sl} (100%) diff --git a/bard/output/ll/bard.ll b/bard/output/ll/bard.ll index aa2f5df..d34b8c6 100644 --- a/bard/output/ll/bard.ll +++ b/bard/output/ll/bard.ll @@ -46,24 +46,24 @@ entry: %19 = getelementptr inbounds [14 x i8], [14 x i8]* %4, i32 0, i32 0 call void @println_str(i8* %19) %21 = add i32 2, 0 - call i1 @callback(i32 %21, ptr @lambda_294658058) + call i1 @callback(i32 %21, ptr @lambda_966544353) %25 = add i32 4, 0 - call i1 @callback(i32 %25, ptr @lambda_1278852808) + call i1 @callback(i32 %25, ptr @lambda_525968792) %29 = add i32 8, 0 - call i1 @callback(i32 %29, ptr @lambda_1955920234) + call i1 @callback(i32 %29, ptr @lambda_391630194) ret void } -define i32 @lambda_294658058(i32 %22) { +define i32 @lambda_966544353(i32 %22) { entry: %33 = add i32 %22, 12 ret i32 %33 } -define i32 @lambda_1278852808(i32 %26) { +define i32 @lambda_525968792(i32 %26) { entry: %34 = add i32 %26, 24 ret i32 %34 } -define i32 @lambda_1955920234(i32 %30) { +define i32 @lambda_391630194(i32 %30) { entry: %35 = add i32 %30, 36 ret i32 %35 diff --git a/bard/output/ll/signatures.json b/bard/output/ll/signatures.json index 1961084..f36a60b 100644 --- a/bard/output/ll/signatures.json +++ b/bard/output/ll/signatures.json @@ -1 +1 @@ -{"structs":[{"name":"Socket","module":"stdlib","fields":{"id":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"family":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"port":{"type":"me.gabriel.selene.frontend.SeleneType.Int16"},"ip_address":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}}},{"name":"TcpServer","module":"stdlib","fields":{"ip_address":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"port":{"type":"me.gabriel.selene.frontend.SeleneType.Int16"}}}],"functions":[{"module":"stdlib","name":"length","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]},{"module":"stdlib","name":"text","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.String"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]},{"module":"stdlib","name":"printf","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Any"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"println","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Any"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"readln","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.String"},"parameters":[],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"arraylen","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Any"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"sin","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"cos","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"tan","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"asin","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"acos","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"atan","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"atan2","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"socket","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"bind","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int8"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"listen","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"accept","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int8"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"receive","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int8"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"send","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int8"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"close","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"bard","name":"callback","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Lambda","id":"lambda","signature":"(int32) -> int32","parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}}],"modifiers":[]},{"module":"bard","name":"main","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[],"modifiers":[]}],"traits":[{"name":"Collection","functions":[{"module":"stdlib","name":"size","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]},{"module":"stdlib","name":"get","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.String"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":[]},{"module":"stdlib","name":"push","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Mutable","id":"mutate","signature":"mut self","baseType":{"type":"me.gabriel.selene.frontend.SeleneType.Self"}},{"type":"me.gabriel.selene.frontend.SeleneType.String"}],"modifiers":[]}]},{"name":"Legible","functions":[{"module":"stdlib","name":"text","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.String"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]}],"impls":[{"struct":"string","trait":"Legible","index":90767234,"module":"stdlib","types":[{"type":"me.gabriel.selene.frontend.SeleneType.String"}]},{"struct":"int32","trait":"Legible","index":1522132780,"module":"stdlib","types":[{"type":"me.gabriel.selene.frontend.SeleneType.String"}]}]},{"name":"CharArray","functions":[{"module":"stdlib","name":"length","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]}],"impls":[{"struct":"string","trait":"CharArray","index":63390,"module":"stdlib","types":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}]}]}]} \ No newline at end of file +{"structs":[{"name":"Socket","module":"stdlib","fields":{"id":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"family":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"port":{"type":"me.gabriel.selene.frontend.SeleneType.Int16"},"ip_address":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}}},{"name":"TcpServer","module":"stdlib","fields":{"ip_address":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"port":{"type":"me.gabriel.selene.frontend.SeleneType.Int16"}}}],"functions":[{"module":"stdlib","name":"length","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]},{"module":"stdlib","name":"text","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.String"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]},{"module":"stdlib","name":"printf","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Any"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"println","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Any"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"readln","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.String"},"parameters":[],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"arraylen","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Any"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"sin","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"cos","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"tan","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"asin","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"acos","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"atan","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"atan2","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Float64"},{"type":"me.gabriel.selene.frontend.SeleneType.Float64"}],"modifiers":["INTRINSIC"]},{"module":"stdlib","name":"socket","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"bind","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int8"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"listen","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"accept","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int8"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"receive","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int8"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"send","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int8"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"stdlib","name":"close","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":["INTERNAL","INTRINSIC"]},{"module":"bard","name":"callback","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},{"type":"me.gabriel.selene.frontend.SeleneType.Lambda","id":"lambda","signature":"(int32) -> int32","parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}}],"modifiers":[]},{"module":"bard","name":"main","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[],"modifiers":[]}],"traits":[{"name":"Collection","functions":[{"module":"stdlib","name":"size","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]},{"module":"stdlib","name":"get","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.String"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"},{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}],"modifiers":[]},{"module":"stdlib","name":"push","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Void"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Mutable","id":"mutate","signature":"mut self","baseType":{"type":"me.gabriel.selene.frontend.SeleneType.Self"}},{"type":"me.gabriel.selene.frontend.SeleneType.String"}],"modifiers":[]}]},{"name":"Legible","functions":[{"module":"stdlib","name":"text","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.String"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]}],"impls":[{"struct":"string","trait":"Legible","index":1522132780,"module":"stdlib","types":[{"type":"me.gabriel.selene.frontend.SeleneType.String"}]},{"struct":"int32","trait":"Legible","index":73181251,"module":"stdlib","types":[{"type":"me.gabriel.selene.frontend.SeleneType.String"}]}]},{"name":"CharArray","functions":[{"module":"stdlib","name":"length","returnType":{"type":"me.gabriel.selene.frontend.SeleneType.Int32"},"parameters":[{"type":"me.gabriel.selene.frontend.SeleneType.Self"}],"modifiers":[]}],"impls":[{"struct":"string","trait":"CharArray","index":504858437,"module":"stdlib","types":[{"type":"me.gabriel.selene.frontend.SeleneType.Int32"}]}]}]} \ No newline at end of file diff --git a/bard/output/ll/stdlib.ll b/bard/output/ll/stdlib.ll index 588eb7c..7631661 100644 --- a/bard/output/ll/stdlib.ll +++ b/bard/output/ll/stdlib.ll @@ -1,14 +1,14 @@ -@trait_1522132780 = unnamed_addr constant <{ i16, i16, ptr }> <{ +@trait_73181251 = unnamed_addr constant <{ i16, i16, ptr }> <{ i16 8, i16 8, ptr @int32.text }>, align 8 -@trait_90767234 = unnamed_addr constant <{ i16, i16, ptr }> <{ +@trait_1522132780 = unnamed_addr constant <{ i16, i16, ptr }> <{ i16 8, i16 8, ptr @string.text }>, align 8 -@trait_63390 = unnamed_addr constant <{ i16, i16, ptr }> <{ +@trait_504858437 = unnamed_addr constant <{ i16, i16, ptr }> <{ i16 8, i16 8, ptr @string.length diff --git a/bard/output/output.exe b/bard/output/output.exe index c2f489bd2d0c7f4de7a6aa86d5660ed7095e76d5..be01026ff4b11d8662261ba5cc96b417aa3e418a 100644 GIT binary patch delta 29 jcmZp8!`|?QeE}mAuRt>s<8~%S#-I&A_V%!ijH_G#h_48? delta 29 jcmZp8!`|?QeE}m=2v;)`<8~%S#-I&A_V%!ijH_G#kJkw} diff --git a/bard/src/main.wy b/bard/src/main.sl similarity index 100% rename from bard/src/main.wy rename to bard/src/main.sl diff --git a/compiler/src/commonMain/kotlin/SeleneCompilerPlatform.kt b/compiler/src/commonMain/kotlin/SeleneCompilerPlatform.kt index 8011863..14c39e9 100644 --- a/compiler/src/commonMain/kotlin/SeleneCompilerPlatform.kt +++ b/compiler/src/commonMain/kotlin/SeleneCompilerPlatform.kt @@ -8,4 +8,8 @@ interface SeleneCompilerPlatform { val logger: SeleneLogger fun exitProcess(status: Int): Nothing + + companion object { + val FILE_EXTENSIONS = arrayOf("sl") + } } \ No newline at end of file diff --git a/compiler/src/commonMain/kotlin/io/LoggedResourceManager.kt b/compiler/src/commonMain/kotlin/io/LoggedResourceManager.kt index ed5b7e6..8b73c72 100644 --- a/compiler/src/commonMain/kotlin/io/LoggedResourceManager.kt +++ b/compiler/src/commonMain/kotlin/io/LoggedResourceManager.kt @@ -2,6 +2,7 @@ package me.gabriel.selene.compiler.io import kotlinx.serialization.encodeToString import me.gabriel.selene.analysis.signature.Signatures +import me.gabriel.selene.compiler.SeleneCompilerPlatform import me.gabriel.selene.compiler.cli.CommandLine import me.gabriel.selene.compiler.util.fileExtensionOrNull import me.gabriel.selene.tools.SeleneLogger @@ -21,7 +22,7 @@ class LoggedResourceManager( logger.log(LogLevel.DEBUG) { +"Reading the directory: ${directory}" } val builder = StringBuilder() fileSystem.list(directory).forEach { - if (it.fileExtensionOrNull != "wy") return@forEach + if (it.fileExtensionOrNull !in SeleneCompilerPlatform.FILE_EXTENSIONS) return@forEach logger.log(LogLevel.DEBUG) { +"Reading the file: ${it.name}" } builder.appendLine(fileSystem.read(it) { readUtf8() }) } diff --git a/stdlib/src/collections.wy b/stdlib/src/collections.sl similarity index 100% rename from stdlib/src/collections.wy rename to stdlib/src/collections.sl diff --git a/stdlib/src/io.wy b/stdlib/src/io.sl similarity index 100% rename from stdlib/src/io.wy rename to stdlib/src/io.sl diff --git a/stdlib/src/math.wy b/stdlib/src/math.sl similarity index 100% rename from stdlib/src/math.wy rename to stdlib/src/math.sl diff --git a/stdlib/src/networking.wy b/stdlib/src/networking.sl similarity index 100% rename from stdlib/src/networking.wy rename to stdlib/src/networking.sl diff --git a/stdlib/src/str.wy b/stdlib/src/str.sl similarity index 100% rename from stdlib/src/str.wy rename to stdlib/src/str.sl diff --git a/stdlib/src/types.wy b/stdlib/src/types.sl similarity index 100% rename from stdlib/src/types.wy rename to stdlib/src/types.sl