From 921eb00c131fe0c6f0834f2556e7597424a3ba49 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 27 May 2019 01:24:20 -0400 Subject: Better testing --- source/ini.d | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 source/ini.d (limited to 'source/ini.d') 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); + } + } +} -- cgit