diff options
author | Ralph Amissah <ralph@amissah.com> | 2016-06-23 00:55:33 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-04 14:48:18 -0400 |
commit | a87a80c4528ce1bfd0090b425f4194eddf33699c (patch) | |
tree | deac30591c1617e66a7543015e42a802a80ab61a /src/sdp.d | |
parent | step5 sdlang used for config files and doc headers (diff) |
step5.1 headers sdlang (like native headers) converted to json for common internal formatdoc-reform_v0.0.5
Diffstat (limited to 'src/sdp.d')
-rwxr-xr-x | src/sdp.d | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -8,6 +8,7 @@ import compile_time_info, // sdp/compile_time_info.d ao_abstract_doc_source, // sdp/ao_abstract_doc_source.d ao_defaults, // sdp/ao_defaults.d + ao_header_extract, // sdp/ao_header_extract.d ao_read_config_files, // sdp/ao_read_config_files.d ao_read_source_files, // sdp/ao_read_source_files.d ao_output_debugs, // sdp/ao_output_debugs.d @@ -98,6 +99,8 @@ mixin RgxInit; void main(string[] args) { mixin SiSUheaderSkel; + mixin SiSUheaderExtractNative; + mixin SiSUheaderExtractSDLang; mixin SiSUbiblio; mixin SiSUrgxInitFlags; mixin SiSUconfiguration; @@ -107,6 +110,7 @@ void main(string[] args) { mixin SiSUoutputHub; mixin ScreenTxtColors; auto raw = MarkupRaw(); + auto head_native = HeaderDocMetadataAndMakeNativeToJson(); auto headsdl = HeaderExtractSDL(); auto abs = Abstraction(); auto dbg = SDPoutputDebugs(); @@ -266,9 +270,14 @@ void main(string[] args) { writeln(header_and_content_tuple.length); writeln(sourcefile_content[0]); } - /+ ↓ headers metadata & make sdlang +/ - auto header_sdlang = headsdl.headerSDLang(header); - /+ ↓ porcess document, return abstraction as tuple +/ + // Tuple!(JSONValue[string], JSONValue[string]) header_make_and_meta_tuple; + auto header_make_and_meta_tuple = (match(header, rgx.native_header_meta_title)) + ? (head_native.headerContentJSON(header)) + : (headsdl.headerSDLangToJSON(header)); + static assert(!isTypeTuple!(header_make_and_meta_tuple)); + JSONValue[string] dochead_make_json = header_make_and_meta_tuple[0]; + JSONValue[string] dochead_meta_json = header_make_and_meta_tuple[1]; + /+ ↓ process document, return abstraction as tuple +/ auto t = abs.abstract_doc_source(sourcefile_content); static assert(!isTypeTuple!(t)); auto doc_ao_contents = t[0]; // contents ~ endnotes ~ bookindex; |