aboutsummaryrefslogtreecommitdiff
path: root/src/Loader.kt
diff options
context:
space:
mode:
authorMarvin Borner2019-08-12 16:01:51 +0200
committerMarvin Borner2019-08-12 16:01:51 +0200
commita382841dc7d554b2ba3920d52f73e4cec428743e (patch)
tree536035f23c3d0d1ced960372b297a4869621c595 /src/Loader.kt
Basic parser functions
Diffstat (limited to 'src/Loader.kt')
-rw-r--r--src/Loader.kt12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Loader.kt b/src/Loader.kt
new file mode 100644
index 0000000..2161c51
--- /dev/null
+++ b/src/Loader.kt
@@ -0,0 +1,12 @@
+import java.io.File
+import java.io.InputStream
+
+class Loader(path: String) {
+ private val inputStream: InputStream = File(path).inputStream()
+ private val inputString = inputStream.bufferedReader().use { it.readText() }
+
+ // TODO: Add preprocessor managing imports
+ fun load(): String {
+ return inputString
+ }
+} \ No newline at end of file