From 218764073c8c82c57a80d9547b4d6dbefa496b13 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 7 Sep 2016 11:18:55 -0400 Subject: screen output, just use writeln etc. keep simple --- src/sdp/ao_abstract_doc_source.d | 75 ++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 41 deletions(-) (limited to 'src/sdp/ao_abstract_doc_source.d') diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d index 0ef486e..616d124 100644 --- a/src/sdp/ao_abstract_doc_source.d +++ b/src/sdp/ao_abstract_doc_source.d @@ -137,13 +137,6 @@ template SiSUdocAbstraction() { ); return 0; } - int tell_l(string color, in char[] line) { - writefln( - "* %s", - line - ); - return 0; - } string[string] obj_cite_number_poem = [ "start" : "", "end" : "" @@ -296,7 +289,7 @@ template SiSUdocAbstraction() { // blocks closed, unless followed by book index debug(check) { // block writeln(__LINE__); - tell_l("red", line); + writeln(line); } assert( matchFirst(line, rgx.book_index) @@ -314,7 +307,7 @@ template SiSUdocAbstraction() { if (auto m = matchFirst(line, rgx.comment)) { /+ matched comment +/ debug(comment) { - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; contents_the_objects ~= @@ -352,14 +345,14 @@ template SiSUdocAbstraction() { } else if (line_occur["heading"] > State.off) { /+ heading +/ debug(heading) { // heading - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; ++line_occur["heading"]; } else if (line_occur["para"] > State.off) { /+ paragraph +/ debug(para) { - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line; ++line_occur["para"]; @@ -412,7 +405,7 @@ template SiSUdocAbstraction() { ); // track previous heading and make assertions debug(objectrelated1) { // check - tell_l("blue", line); + writeln(line); // writeln(an_object["obj"]); // writeln(contents_am[counter]["obj_cite_number"], " ", contents_am[counter]["obj"]); // writeln(m.hit, "\n"); @@ -498,7 +491,7 @@ template SiSUdocAbstraction() { } /+ ← closed: loop markup document/text line by line +/ /+ ↓ post loop markup document/text +/ debug(objectrelated2) { // check - tell_l("blue", line); + writeln(line); // writeln(__FILE__, ":", __LINE__); // writeln(counter); // // contents_am[0..counter] @@ -658,13 +651,13 @@ template SiSUdocAbstraction() { if (matchFirst(line, rgx.obj_cite_number_off_block)) { type["obj_cite_number_status_multi_obj"] = TriState.on; debug(ocnoff) { - tell_l("fuchsia", line); + writeln(line); } } if (matchFirst(line, rgx.obj_cite_number_off_block_dh)) { type["obj_cite_number_status_multi_obj"] = TriState.closing; debug(ocnoff) { - tell_l("fuchsia", line); + writeln(line); } } } else { @@ -687,7 +680,7 @@ template SiSUdocAbstraction() { type["obj_cite_number_status_multi_obj"] = TriState.off; type["obj_cite_number_status"] = TriState.off; debug(ocnoff) { - tell_l("green", line); + writeln(line); } } } @@ -846,28 +839,28 @@ template SiSUdocAbstraction() { if (type["curly_code"] == TriState.on) { if (matchFirst(line, rgx.block_curly_code_close)) { debug(code) { // code (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["code"] = TriState.closing; type["curly_code"] = TriState.off; } else { debug(code) { // code (curly) line - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // code (curly) line } } else if (type["tic_code"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(code) { // code (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["code"] = TriState.closing; type["tic_code"] = TriState.off; } else { debug(code) { // code (tic) line - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // code (tic) line } @@ -1211,28 +1204,28 @@ template SiSUdocAbstraction() { if (type["curly_group"] == State.on) { if (matchFirst(line, rgx.block_curly_group_close)) { debug(group) { // group (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["group"] = TriState.closing; type["curly_group"] = TriState.off; } else { debug(group) { // group - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build group array (or string) } } else if (type["tic_group"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(group) { // group (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["group"] = TriState.closing; type["tic_group"] = TriState.off; } else { debug(group) { // group - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build group array (or string) } @@ -1247,28 +1240,28 @@ template SiSUdocAbstraction() { if (type["curly_block"] == TriState.on) { if (matchFirst(line, rgx.block_curly_block_close)) { debug(block) { // block (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["block"] = TriState.closing; type["curly_block"] = TriState.off; } else { debug(block) { // block - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build block array (or string) } } else if (type["tic_block"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(block) { // block (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["block"] = TriState.closing; type["tic_block"] = TriState.off; } else { debug(block) { // block - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build block array (or string) } @@ -1279,28 +1272,28 @@ template SiSUdocAbstraction() { if (type["curly_quote"] == TriState.on) { if (matchFirst(line, rgx.block_curly_quote_close)) { debug(quote) { // quote (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["quote"] = TriState.closing; type["curly_quote"] = TriState.off; } else { debug(quote) { // quote - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build quote array (or string) } } else if (type["tic_quote"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(quote) { // quote (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["quote"] = TriState.closing; type["tic_quote"] = TriState.off; } else { debug(quote) { // quote - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build quote array (or string) } @@ -1311,28 +1304,28 @@ template SiSUdocAbstraction() { if (type["curly_table"] == TriState.on) { if (matchFirst(line, rgx.block_curly_table_close)) { debug(table) { // table (curly) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["table"] = TriState.closing; type["curly_table"] = TriState.off; } else { debug(table) { // table - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build table array (or string) } } else if (type["tic_table"] == TriState.on) { if (matchFirst(line, rgx.block_tic_close)) { debug(table) { // table (tic) close - tell_l("blue", line); + writeln(line); } type["blocks"] = TriState.closing; type["table"] = TriState.closing; type["tic_table"] = TriState.off; } else { debug(table) { // table - tell_l("blue", line); + writeln(line); } an_object["obj"] ~= line ~= "\n"; // build table array (or string) } @@ -1870,7 +1863,7 @@ template SiSUdocAbstraction() { debug(heading) { // heading // writeln(m.captures[1], " ", m.captures[2], "\n"); // figure inclusion of post capture text // writeln(m.hit, "\n"); - tell_l("yellow", strip(line)); + writeln(strip(line)); } } } @@ -1888,7 +1881,7 @@ template SiSUdocAbstraction() { // (fl ag_type["heading"] = true) && if (auto m = matchFirst(line, rgx.para_indent)) { debug(paraindent) { // para indent - tell_l("blue", line); + writeln(line); } type["para"] = State.on; an_object["obj"] ~= line ~= "\n"; @@ -1897,7 +1890,7 @@ template SiSUdocAbstraction() { bullet = false; } else if (matchFirst(line, rgx.para_bullet)) { debug(parabullet) { // para bullet - tell_l("blue", line); + writeln(line); } type["para"] = State.on; an_object["obj"] ~= line; @@ -1906,7 +1899,7 @@ template SiSUdocAbstraction() { bullet = true; } else if (auto m = matchFirst(line, rgx.para_indent_hang)) { debug(paraindenthang) { // para indent hang - tell_l("blue", line); + writeln(line); } type["para"] = State.on; an_object["obj"] ~= line; @@ -1915,7 +1908,7 @@ template SiSUdocAbstraction() { bullet = false; } else if (auto m = matchFirst(line, rgx.para_bullet_indent)) { debug(parabulletindent) { // para bullet indent - tell_l("blue", line); + writeln(line); } type["para"] = State.on; an_object["obj"] ~= line; -- cgit v1.2.3