diff options
Diffstat (limited to 'org/ao_conf_make_meta.org')
-rw-r--r-- | org/ao_conf_make_meta.org | 75 |
1 files changed, 48 insertions, 27 deletions
diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org index 4205af7..12dfbbe 100644 --- a/org/ao_conf_make_meta.org +++ b/org/ao_conf_make_meta.org @@ -29,30 +29,38 @@ +/ template SiSUheaderExtractHub() { private import - std.regex; + std.exception, + std.regex, + std.stdio, + std.traits, + std.typecons, + std.utf, + std.conv : to; + private import sdlang; private import - ao_rgx; - struct SiSUheaderExtractHub { - mixin SiSUheaderExtractNative; - mixin SiSUheaderExtractSDLang; - auto rgx = Rgx(); - private auto SiSUheaderExtractHub(Src, DocMake)( - Src header_src, - DocMake conf_doc_make_aa - ) { - debug(asserts){ - static assert(is(typeof(header_src) == char[])); - static assert(is(typeof(conf_doc_make_aa) == string[string][string])); - } - auto head_native = HeaderDocMetadataAndMakeNativeToAA(); - auto head_sdlang = HeaderExtractSDL(); - auto header_make_and_meta_tuple = (match(header_src, rgx.native_header_meta_title)) - ? (head_native.headerNativeToAA(header_src)) - : (head_sdlang.headerSDLangToAA(header_src, conf_doc_make_aa)); - static assert(!isTypeTuple!(header_make_and_meta_tuple)); - static assert(header_make_and_meta_tuple.length==2); - return header_make_and_meta_tuple; + ao_rgx, + ao_conf_make_meta_native, + ao_conf_make_meta_sdlang; + mixin SiSUrgxInit; + mixin SiSUheaderExtractNative; + mixin SiSUheaderExtractSDLang; + auto rgx = Rgx(); + auto SiSUheaderExtractHub(Src, DocMake)( + Src header_src, + DocMake conf_doc_make_aa + ) { + debug(asserts){ + static assert(is(typeof(header_src) == char[])); + static assert(is(typeof(conf_doc_make_aa) == string[string][string])); } + auto head_native = HeaderDocMetadataAndMakeNativeToAA(); + auto head_sdlang = HeaderExtractSDL(); + auto header_make_and_meta_tuple = (match(header_src, rgx.native_header_meta_title)) + ? (head_native.headerNativeToAA(header_src)) + : (head_sdlang.headerSDLangToAA(header_src, conf_doc_make_aa)); + static assert(!isTypeTuple!(header_make_and_meta_tuple)); + static assert(header_make_and_meta_tuple.length==2); + return header_make_and_meta_tuple; } } #+END_SRC @@ -68,10 +76,15 @@ template SiSUheaderExtractNative() { private import std.exception, std.regex, + std.stdio, + std.string, + std.traits, + std.typecons, std.utf, std.conv : to; private import - ao_rgx; + ao_rgx, + ao_defaults; struct HeaderDocMetadataAndMakeNativeToAA { mixin SiSUregisters; mixin SiSUrgxInitFlags; @@ -93,9 +106,17 @@ template SiSUheaderExtractNative() { +/ template SiSUheaderExtractSDLang() { private import - std.regex; + std.exception, + std.regex, + std.stdio, + std.string, + std.traits, + std.typecons, + std.utf, + std.conv : to; private import - ao_rgx; + ao_rgx, + ao_defaults; struct HeaderExtractSDL { mixin SiSUregisters; mixin SiSUrgxInit; @@ -679,8 +700,8 @@ private auto headerSDLangGet(Hs)(Hs src_header) { writeln("--------------"); Value test = header_sdlang.tags["title"][0].values[0]; assert(test == typeid(string)); - writeln(header_sdlang.maybe.tags["title"]); - writeln(header_sdlang.maybe.tags["title"][0].maybe.attributes["subtitle"]); + // writeln(header_sdlang.maybe.tags["title"]); + // writeln(header_sdlang.maybe.tags["title"][0].maybe.attributes["subtitle"]); } return header_sdlang; // sdlang.ast.Tag } |