aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_conf_make_meta_sdlang.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/ao_conf_make_meta_sdlang.d')
-rw-r--r--src/sdp/ao_conf_make_meta_sdlang.d30
1 files changed, 23 insertions, 7 deletions
diff --git a/src/sdp/ao_conf_make_meta_sdlang.d b/src/sdp/ao_conf_make_meta_sdlang.d
index 5ced761..801df7e 100644
--- a/src/sdp/ao_conf_make_meta_sdlang.d
+++ b/src/sdp/ao_conf_make_meta_sdlang.d
@@ -11,7 +11,10 @@ template SiSUheaderExtractSDLang() {
mixin SiSUregisters;
mixin RgxInit;
auto rgx = Rgx();
- private auto sdlangToAAmake(string[string][string] conf, Tag conf_sdlang) {
+ private auto sdlangToAAmake(C,Tag)(C conf, Tag conf_sdlang) {
+ debug(asserts){
+ static assert(is(typeof(conf) == string[string][string]));
+ }
foreach (maintag, subtags; conf) {
foreach (subtag, content; subtags) {
if (!(conf_sdlang.maybe.tags[maintag].empty)) {
@@ -28,11 +31,11 @@ template SiSUheaderExtractSDLang() {
}
return conf;
}
- private auto configSettingsSDLangToAAmake(Tag conf_sdlang) {
+ private auto configSettingsSDLangToAAmake(Tag)(Tag conf_sdlang) {
auto conf = sdlangToAAmake(conf_aa, conf_sdlang);
return conf;
}
- private auto documentMakeSDLangToAAmake(Tag document_make_sdlang) {
+ private auto documentMakeSDLangToAAmake(Tag)(Tag document_make_sdlang) {
auto dochead_make = sdlangToAAmake(make_aa, document_make_sdlang);
/+
/+ dochead +/
@@ -171,7 +174,10 @@ template SiSUheaderExtractSDLang() {
+/
return dochead_make;
}
- final private auto headerMakeSDLang(in string src_header) {
+ final private auto headerMakeSDLang(Hs)(Hs src_header) {
+ debug(asserts){
+ static assert(is(typeof(src_header) == string));
+ }
scope(failure) {
stderr.writefln(
"%s\n%s\n%s:%s failed here:\n src_header: %s",
@@ -197,7 +203,10 @@ template SiSUheaderExtractSDLang() {
}
return sdl_root_header;
}
- private auto headerSDLangGet(in char[] src_header) {
+ private auto headerSDLangGet(Hs)(Hs src_header) {
+ debug(asserts){
+ static assert(is(typeof(src_header) == char[]));
+ }
char[][] source_header_arr =
split(cast(char[]) src_header, rgx.newline_eol_delimiter);
char[] header_clean;
@@ -220,7 +229,10 @@ template SiSUheaderExtractSDLang() {
}
return header_sdlang; // sdlang.ast.Tag
}
- private auto headerSDLangToAAmake(Tag header_sdlang, string[string][string] dochead_make) {
+ private auto headerSDLangToAAmake(Tag,Ma)(Tag header_sdlang, Ma dochead_make) {
+ debug(asserts){
+ static assert(is(typeof(dochead_make) == string[string][string]));
+ }
dochead_make = sdlangToAAmake(dochead_make, header_sdlang);
auto dochead_meta = sdlangToAAmake(meta_aa, header_sdlang);
if (dochead_meta["title"]["main"].empty) {
@@ -252,7 +264,11 @@ template SiSUheaderExtractSDLang() {
static assert(t.length==2);
return t;
}
- private auto headerSDLangToAA(char[] header_sdlang_src, string[string][string] conf_doc_make_aa) {
+ private auto headerSDLangToAA(Hs,Ma)(Hs header_sdlang_src, Ma conf_doc_make_aa) {
+ debug(asserts){
+ static assert(is(typeof(header_sdlang_src) == char[]));
+ static assert(is(typeof(conf_doc_make_aa) == string[string][string]));
+ }
auto header_sdlang_tag = headerSDLangGet(header_sdlang_src); // sdlang.ast.Tag
auto header_aa_tuple = headerSDLangToAAmake(header_sdlang_tag, conf_doc_make_aa);
return header_aa_tuple;