aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_conf_make_meta.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/ao_conf_make_meta.d')
-rw-r--r--src/sdp/ao_conf_make_meta.d52
1 files changed, 30 insertions, 22 deletions
diff --git a/src/sdp/ao_conf_make_meta.d b/src/sdp/ao_conf_make_meta.d
index 5c043a2..40c68ea 100644
--- a/src/sdp/ao_conf_make_meta.d
+++ b/src/sdp/ao_conf_make_meta.d
@@ -10,29 +10,37 @@
+/
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;
}
}