diff options
author | Ralph Amissah <ralph@amissah.com> | 2017-09-07 16:54:23 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:14 -0400 |
commit | 4ff01a81f048c0b496cc03627324b69b7aebd368 (patch) | |
tree | acc9ff9a86b696b294980ef051de56c95bd9a045 /src/sdp/meta/conf_make_meta.d | |
parent | sqlite, introduced, far to go (diff) |
0.19.0 conf make meta, composite struct, instead of associative array
* remove conf make meta associative arrays,
including native doc header (which revisit)
Diffstat (limited to 'src/sdp/meta/conf_make_meta.d')
-rw-r--r-- | src/sdp/meta/conf_make_meta.d | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/sdp/meta/conf_make_meta.d b/src/sdp/meta/conf_make_meta.d index 140b6ba..27c03bb 100644 --- a/src/sdp/meta/conf_make_meta.d +++ b/src/sdp/meta/conf_make_meta.d @@ -9,7 +9,7 @@ program internally. Moved to associative array. +/ module sdp.meta.conf_make_meta; -template docHeaderMakeAndMetaTupExtractAndConvertToAA() { +static template docHeaderMakeAndMetaTupExtractAndConvertToStruct() { import std.exception, std.regex, @@ -20,30 +20,19 @@ template docHeaderMakeAndMetaTupExtractAndConvertToAA() { std.conv : to; import sdlang; import - sdp.meta.conf_make_meta_native, sdp.meta.conf_make_meta_sdlang, sdp.meta.rgx; mixin SiSUrgxInit; - mixin SiSUheaderExtractNative; mixin SiSUextractSDLang; static auto rgx = Rgx(); - auto docHeaderMakeAndMetaTupExtractAndConvertToAA(DocMake, Src)( - DocMake conf_doc_make_aa, + auto docHeaderMakeAndMetaTupExtractAndConvertToStruct(CCm, Src)( + CCm conf_composite_make, Src header_src, ) { - 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 header_sdlang_tag = (!(header_src.match(rgx.native_header_meta_title))) ? extractSDL().docHeaderSDLtagGet(header_src) // sdlang.ast.Tag : null; - auto header_make_and_meta_tuple = (header_src.match(rgx.native_header_meta_title)) - ? (head_native.headerNativeToAA(header_src)) - : (extractSDL().docHeaderSDLtoAA(conf_doc_make_aa, header_sdlang_tag)); - static assert(!isTypeTuple!(header_make_and_meta_tuple)); - static assert(header_make_and_meta_tuple.length==2); - return header_make_and_meta_tuple; + auto header_make_and_meta_struct = extractSDL().docSDLtoStruct(conf_composite_make, header_sdlang_tag); + return header_make_and_meta_struct; } } |