aboutsummaryrefslogtreecommitdiff
path: root/source/ini.d
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-05-27 01:24:20 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-05-27 01:24:20 -0400
commit921eb00c131fe0c6f0834f2556e7597424a3ba49 (patch)
tree04acf5223dd4978013d75d8f85e811e0756852c2 /source/ini.d
parent97ebb43d26d3e452f6ac8995f212ba971aefc231 (diff)
downloaddm-921eb00c131fe0c6f0834f2556e7597424a3ba49.tar.gz
Better testing
Diffstat (limited to 'source/ini.d')
-rw-r--r--source/ini.d27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/ini.d b/source/ini.d
new file mode 100644
index 0000000..c23f080
--- /dev/null
+++ b/source/ini.d
@@ -0,0 +1,27 @@
+module ini;
+
+import std.stdio;
+import std.file;
+import std.array;
+
+
+struct Section_t {
+ string name;
+ string[string][] pairs;
+}
+
+class ConfigParser {
+ File file;
+ string[string][] pairs;
+ int[] section_pos;
+
+ this(File file) {
+ this.file = file;
+ }
+
+ auto _parse() {
+ foreach (line; this.file.byLine) {
+ writeln("-> " ~ line);
+ }
+ }
+}