aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_read_config_files.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-11-02 10:27:19 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commit98314b3de50e356568524708951ca507c80b3af2 (patch)
tree9dac05207a3690ce25927eed79791d1df1fdbab0 /src/sdp/ao_read_config_files.d
parent0.8.0 the document parts (& org babel tangle) (diff)
cleaning (one hash key renamed)
Diffstat (limited to 'src/sdp/ao_read_config_files.d')
-rw-r--r--src/sdp/ao_read_config_files.d35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/sdp/ao_read_config_files.d b/src/sdp/ao_read_config_files.d
index 013acdd..34b858b 100644
--- a/src/sdp/ao_read_config_files.d
+++ b/src/sdp/ao_read_config_files.d
@@ -6,22 +6,13 @@
template SiSUconfigIn() {
private import
std.exception,
- // std.regex,
std.stdio,
std.utf,
std.conv : to;
- // private import
- // ao_rgx; // ao_defaults.d
- // mixin RgxInit;
- // auto rgx = Rgx();
private
struct ConfigIn {
private import std.file;
final private string readInConfigFile(string conf_sdl) {
- // enforce(
- // exists(fn_src)!=0,
- // "file not found"
- // );
string[] possible_config_path_locations = [
environment["PWD"] ~ "/.sisu",
environment["PWD"] ~ "/_sisu",
@@ -35,7 +26,6 @@ template SiSUconfigIn() {
pth,
conf_sdl,
);
- // writeln(conf_file);
try {
if (exists(conf_file)) {
debug(configfile) {
@@ -46,25 +36,8 @@ template SiSUconfigIn() {
}
}
catch (ErrnoException ex) {
- //// Handle errors
- // switch(ex.errno) {
- // case EPERM:
- // case EACCES:
- // // Permission denied
- // break;
- // case ENOENT:
- // // File does not exist
- // break;
- // default:
- // // Handle other errors
- // break;
- // }
}
- // catch (UTFException ex) {
- // // Handle validation errors
- // }
catch (FileException ex) {
- // Handle errors
}
}
return config_file_str;
@@ -83,20 +56,12 @@ template SiSUconfigSDLang() {
}
catch(ParseException e) {
stderr.writeln("SDLang problem with content for ", conf_sdl_filename);
- // Error messages of the form:
- // myFile.sdl(5:28): Error: Invalid integer suffix.
stderr.writeln(e.msg);
}
debug(sdlang) {
- // Value is a std.variant.Algebraic
Value output_dir_structure_by = sdl_root_conf.tags["output_dir_structure_by"][0].values[0];
assert(output_dir_structure_by.type == typeid(string));
writeln(output_dir_structure_by);
- // Tag person = sdl_root_conf.namespaces["myNamespace"].tags["person"][0];
- // writeln("Name: ", person.attributes["name"][0].value);
- //
- // int age = person.tags["age"][0].values[0].get!int();
- // writeln("Age: ", age);
writeln("conf SDL:");
writeln(sdl_root_conf.toSDLDocument());
}