aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_abstract_doc_source.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/ao_abstract_doc_source.d')
-rw-r--r--src/sdp/ao_abstract_doc_source.d32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d
index db814ac..c7e5a13 100644
--- a/src/sdp/ao_abstract_doc_source.d
+++ b/src/sdp/ao_abstract_doc_source.d
@@ -1,5 +1,6 @@
-/+
- document abstraction
+/++
+ document abstraction:
+ abstraction of sisu markup for downstream processing
ao_abstract_doc_source.d
+/
template SiSUdocAbstraction() {
@@ -14,10 +15,6 @@ template SiSUdocAbstraction() {
/+ ↓ abstraction mixins +/
mixin ObjectSetter;
mixin InternalMarkup;
- // // mixin SiSUrgxInitFlags;
- // // mixin AssertionsOnBlocks;
- // mixin SiSUbiblio; // issue
- // mixin SiSUheader;
/+ ↓ abstraction struct init +/
/+ initialize +/
auto rgx = Rgx();
@@ -106,7 +103,6 @@ template SiSUdocAbstraction() {
is_
);
}
- // mixin SiSUdocAbstractionFunctions;
/+ ↓ abstract marked up document +/
auto abstract_doc_source(
char[][] markup_sourcefile_content,
@@ -129,7 +125,6 @@ template SiSUdocAbstraction() {
"para" : 0,
];
auto type = flags_type_init;
- mixin ScreenTxtColors;
void tell_lo(int obj_cite_number, in char[] line) {
writefln(
"* %s %s",
@@ -201,10 +196,9 @@ template SiSUdocAbstraction() {
}
line = replaceAll(line, rgx.true_dollar, "$$$$");
// dollar represented as $$ needed to stop submatching on $
- // (substitutions using ${identifiers} must take into account (e.g. happen earlier))
+ // (substitutions using ${identifiers} must take into account (i.e. happen earlier))
debug(source) { // source lines
writeln(line);
- // writeln(scr_txt_marker["green"], line);
}
debug(srclines) {
if (!line.empty) { // source lines, not empty
@@ -1870,16 +1864,13 @@ template SiSUdocAbstraction() {
/+ abstraction functions ↑ +/
/+ ↓ abstraction function emitters +/
struct OCNemitter {
- // class OCNemitter : AssertOCN {
int obj_cite_number, obj_cite_number_;
int obj_cite_number_emitter(int obj_cite_number_status_flag)
in { assert(obj_cite_number_status_flag <= 2); }
body {
- if (obj_cite_number_status_flag == 0) {
- obj_cite_number=++obj_cite_number_;
- } else {
- obj_cite_number=0;
- }
+ obj_cite_number=(obj_cite_number_status_flag == 0)
+ ? ++obj_cite_number_
+ : 0;
assert(obj_cite_number >= 0);
return obj_cite_number;
}
@@ -1887,7 +1878,6 @@ template SiSUdocAbstraction() {
}
}
struct ObjAttributes {
- // class ObjAttributes : AssertObjAttributes {
string[string] obj_txt;
string para_and_blocks(string obj_txt_in)
in { }
@@ -2417,14 +2407,11 @@ template SiSUdocAbstraction() {
}
}
struct ObjAttrib {
- // struct ObjAttrib : AssertObjAttrib {
- // auto sink = appender!(char[])();
auto attrib = ObjAttributes();
string[string] obj_attrib;
string obj_attributes(string obj_is_, string obj_raw, string node)
in { }
body {
- // string s = "{ \"language\": \"D\", \"rating\": 3.14, \"code\": \"42\" }";
scope(exit) {
// destroy(obj_is_);
destroy(obj_raw);
@@ -2488,9 +2475,7 @@ template SiSUdocAbstraction() {
obj_attrib["json"] = oa_j.toString();
debug(structattrib) {
if (oa_j["is"].str() == "heading") {
- // writeln(__LINE__);
writeln(obj_attrib["json"]);
- // writeln(node);
writeln(
"is: ", oa_j["is"].str(),
"; obj_cite_number: ", oa_j["obj_cite_number"].integer()
@@ -2504,7 +2489,6 @@ template SiSUdocAbstraction() {
}
}
struct BookIndexNuggetHash {
- // class BookIndexNuggetHash : AssertBookIndexNuggetHash {
string main_term, sub_term, sub_term_bits;
int obj_cite_number_offset, obj_cite_number_endpoint;
string[] obj_cite_numbers;
@@ -2859,7 +2843,6 @@ template SiSUdocAbstraction() {
++mkn;
foreach (endnote; endnotes_) {
attrib="";
- attrib="";
// endnotes ~=
// set_abstract_object.contents_para(
// obj,
@@ -2957,7 +2940,6 @@ template SiSUdocAbstraction() {
}
}
struct NodeStructureMetadata {
- // class NodeStructureMetadata : AssertNodeJSON {
int lv, lv0, lv1, lv2, lv3, lv4, lv5, lv6, lv7;
int obj_cite_number;
int[string] p_; // p_ parent_