aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/meta/metadoc_from_src.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2020-01-05 20:17:17 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-02-11 13:08:49 -0500
commitde02319cfa7b4bbff8c111bda02be1a7c6591555 (patch)
tree732c11d10bc2699cd1b72d00b3be943284eea130 /src/doc_reform/meta/metadoc_from_src.d
parentreduce use of auto, much with tuples (diff)
dlang safe default imminent, look ahead
- @safe @trusted & @system, reconsider @trusted
Diffstat (limited to 'src/doc_reform/meta/metadoc_from_src.d')
-rw-r--r--src/doc_reform/meta/metadoc_from_src.d246
1 files changed, 123 insertions, 123 deletions
diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d
index 6dbbb22..3c58212 100644
--- a/src/doc_reform/meta/metadoc_from_src.d
+++ b/src/doc_reform/meta/metadoc_from_src.d
@@ -112,7 +112,7 @@ template docAbstraction() {
bool, "has_images_without_dimensions",
);
enum DomTags { none, open, close, close_and_open, open_still, }
- pure ObjGenericComposite obj_heading_ancestors()(
+ @safe pure ObjGenericComposite obj_heading_ancestors()(
ObjGenericComposite obj,
string[] lv_ancestors_txt,
) {
@@ -165,7 +165,7 @@ template docAbstraction() {
}
return obj;
}
- pure ObjGenericComposite obj_dom_structure_set_markup_tags()(
+ @safe pure ObjGenericComposite obj_dom_structure_set_markup_tags()(
ObjGenericComposite obj,
int[] dom,
int lev
@@ -209,7 +209,7 @@ template docAbstraction() {
obj.metainfo.dom_structure_markedup_tags_status = dom.dup;
return obj;
}
- pure ObjGenericComposite obj_dom_set_collapsed_tags()(
+ @safe pure ObjGenericComposite obj_dom_set_collapsed_tags()(
ObjGenericComposite obj,
int[] dom,
int lev
@@ -253,10 +253,10 @@ template docAbstraction() {
obj.metainfo.dom_structure_collapsed_tags_status = dom.dup;
return obj;
}
- static auto ocn_emit(int ocn_status_flag) {
+ @safe static auto ocn_emit(int ocn_status_flag) {
return object_citation_number.ocn_emitter(ocn_status_flag);
}
- static auto inline_markup_faces(L)(L line) {
+ @safe static auto inline_markup_faces(L)(L line) {
static auto rgx = Rgx();
static auto mkup = InlineMarkup();
line = replaceAll!(m => mkup.quote_o ~ m[1] ~ mkup.quote_c)(line, rgx.within_quotes);
@@ -267,7 +267,7 @@ template docAbstraction() {
}
return line;
}
- static string links_and_images()(string obj_txt) {
+ @safe static string links_and_images()(string obj_txt) {
static auto rgx = Rgx();
static auto mkup = InlineMarkup();
if (obj_txt.match(rgx.smid_inline_url_generic)) {
@@ -314,7 +314,7 @@ template docAbstraction() {
ObjGenericComposite comp_obj_heading, comp_obj_location, comp_obj_block, comp_obj_code, comp_obj_poem_ocn, comp_obj_comment;
auto node_construct = NodeStructureMetadata();
enum sObj { content, anchor_tag, notes_reg, notes_star, links, image_no_dimensions }
- string[string][string] inline_para_link_anchor()(
+ @safe string[string][string] inline_para_link_anchor()(
string[string] an_object,
string[string] tag_in_seg,
string[string][string] tag_assoc
@@ -331,7 +331,7 @@ template docAbstraction() {
return tag_assoc;
}
/+ ↓ abstract marked up document +/
- auto docAbstraction(CMM,Opt,Mf) (
+ @system auto docAbstraction(CMM,Opt,Mf) (
char[][] markup_sourcefile_content,
CMM conf_make_meta,
Opt opt_action,
@@ -1487,7 +1487,7 @@ template docAbstraction() {
}
the_document_head_section ~= the_document_body_section[0];
the_document_body_section=the_document_body_section[1..$];
- int[] _get_ancestors_markup(O)(O obj, ref int[] _ancestors_markup) {
+ @safe int[] _get_ancestors_markup(O)(O obj, ref int[] _ancestors_markup) {
if (obj.metainfo.is_a == "heading") {
debug(dom) {
writeln(obj.text);
@@ -1574,7 +1574,7 @@ template docAbstraction() {
}
return _ancestors_markup;
}
- int[] _get_ancestors_collapsed(O)(O obj, ref int[] _ancestors_collapsed) {
+ @safe int[] _get_ancestors_collapsed(O)(O obj, ref int[] _ancestors_collapsed) {
if (obj.metainfo.is_a == "heading") {
if (obj.metainfo.heading_lev_collapsed == 1) {
_ancestors_collapsed = [
@@ -1755,7 +1755,7 @@ template docAbstraction() {
}
html_segnames_ptr_cntr++;
}
- auto get_decendants()(ObjGenericComposite[] document_sections) {
+ @safe auto get_decendants()(ObjGenericComposite[] document_sections) {
int[string] _heading_ocn_decendants;
string[] _ocn_open_key = ["","","","","","","",""];
auto _doc_sect_length = document_sections.length - 1;
@@ -1803,7 +1803,7 @@ template docAbstraction() {
return pairs.sort;
}
string[] _images;
- string[] extract_images()(string content_block) {
+ @safe string[] extract_images()(string content_block) {
string[] images_;
if (auto m = content_block.matchAll(rgx.image)) {
images_ ~= m.captures[1];
@@ -1811,7 +1811,7 @@ template docAbstraction() {
return images_;
}
string[] segnames_0_to_4;
- auto _image_dimensions(O,M)(O obj, M manifested) {
+ @system auto _image_dimensions(O,M)(O obj, M manifested) {
if (obj.has.image_without_dimensions) {
import std.math;
import imageformats;
@@ -1852,7 +1852,7 @@ template docAbstraction() {
}
return obj;
}
- auto _links(O)(O obj) {
+ @safe auto _links(O)(O obj) {
if (auto m = obj.text.match(rgx.inline_link_stow_uri)) {
debug(links) {
writeln("number of link matches to stow: ", (obj.text.match(rgx.inline_link_stow_uri)).count);
@@ -2358,7 +2358,7 @@ template docAbstraction() {
dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
dom_structure_collapsed_tags_status_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,];
- auto doc_has() {
+ @safe auto doc_has() {
struct DocHas_ {
uint inline_links() {
return dochas["inline_links"];
@@ -2416,7 +2416,7 @@ template docAbstraction() {
/+ post loop markup document/text ↑ +/
} /+ ← closed: abstract doc source +/
/+ ↓ abstraction functions +/
- static string[string] object_reset()(string[string] an_object) @safe {
+ @safe static string[string] object_reset()(string[string] an_object) {
an_object.remove("body_nugget");
an_object.remove("substantive");
an_object.remove("is");
@@ -2424,7 +2424,7 @@ template docAbstraction() {
an_object.remove("bookindex_nugget");
return an_object;
}
- void flow_common_reset_()(
+ @system void flow_common_reset_()(
return ref int[string] line_occur,
return ref string[string] an_object,
return ref int[string] obj_type_status,
@@ -2435,10 +2435,10 @@ template docAbstraction() {
obj_type_status["para"] = State.off;
an_object = an_object.object_reset;
}
- static int[string] _check_ocn_status_()(
+ @safe static int[string] _check_ocn_status_()(
char[] line,
int[string] obj_type_status,
- ) @safe {
+ ) {
static auto rgx = Rgx();
if (!(line.empty)
&& (obj_type_status["ocn_status_off_for_multiple_objects"] == OCN_off_block_status.off)
@@ -2494,10 +2494,10 @@ template docAbstraction() {
}
return obj_type_status;
}
- char[] _doc_header_and_make_substitutions_(CMM)(
+ @safe char[] _doc_header_and_make_substitutions_(CMM)(
char[] line,
CMM conf_make_meta,
- ) @safe {
+ ) {
enum Substitute { match, markup, }
if (conf_make_meta.make.substitute) {
foreach(substitution_pair; conf_make_meta.make.substitute) {
@@ -2509,10 +2509,10 @@ template docAbstraction() {
}
return line;
}
- char[] _doc_header_and_make_substitutions_fontface_(CMM)(
+ @safe char[] _doc_header_and_make_substitutions_fontface_(CMM)(
char[] line,
CMM conf_make_meta,
- ) @safe {
+ ) {
enum Substitute { match, markup, }
if ( conf_make_meta.make.bold) {
line = line.replaceAll(
@@ -2534,12 +2534,12 @@ template docAbstraction() {
}
return line;
}
- void flow_txt_block_start()(
+ @safe void flow_txt_block_start()(
char[] line,
return ref int[string] obj_type_status,
return ref uint[string] dochas,
return ref string[string] object_number_poem
- ) @safe {
+ ) {
static auto rgx = Rgx();
if (auto m = line.matchFirst(rgx.block_curly_code_open)) {
dochas["codeblock"]++;
@@ -2720,11 +2720,11 @@ template docAbstraction() {
obj_type_status["tic_table"] = TriState.on;
}
}
- string[string] flow_txt_block_quote()(
+ @safe string[string] flow_txt_block_quote()(
char[] line,
string[string] an_object,
return ref int[string] obj_type_status
- ) @safe {
+ ) {
static auto rgx = Rgx();
if (obj_type_status["curly_quote"] == TriState.on) {
if (line.matchFirst(rgx.block_curly_quote_close)) {
@@ -2759,11 +2759,11 @@ template docAbstraction() {
}
return an_object;
}
- string[string] flow_txt_block_group()(
+ @safe string[string] flow_txt_block_group()(
char[] line,
string[string] an_object,
return ref int[string] obj_type_status
- ) @safe {
+ ) {
static auto rgx = Rgx();
if (obj_type_status["curly_group"] == State.on) {
if (line.matchFirst(rgx.block_curly_group_close)) {
@@ -2798,11 +2798,11 @@ template docAbstraction() {
}
return an_object;
}
- string[string] flow_txt_block_block()(
+ @safe string[string] flow_txt_block_block()(
char[] line,
string[string] an_object,
return ref int[string] obj_type_status
- ) @safe {
+ ) {
static auto rgx = Rgx();
if (obj_type_status["curly_block"] == TriState.on) {
if (line.matchFirst(rgx.block_curly_block_close)) {
@@ -2837,7 +2837,7 @@ template docAbstraction() {
}
return an_object;
}
- string[string] flow_txt_block_poem(CMM)(
+ @safe string[string] flow_txt_block_poem(CMM)(
char[] line,
string[string] an_object,
return ref int[string] obj_type_status,
@@ -2845,7 +2845,7 @@ template docAbstraction() {
string[string] object_number_poem,
CMM conf_make_meta,
string[string] tag_in_seg,
- ) @safe {
+ ) {
static auto rgx = Rgx();
if (obj_type_status["curly_poem"] == TriState.on) {
if (line.matchFirst(rgx.block_curly_poem_close)) {
@@ -3079,11 +3079,11 @@ template docAbstraction() {
}
return an_object;
}
- void flow_txt_block_code()(
+ @safe void flow_txt_block_code()(
char[] line,
return ref string[string] an_object,
return ref int[string] obj_type_status
- ) @safe {
+ ) {
static auto rgx = Rgx();
if (obj_type_status["curly_code"] == TriState.on) {
if (line.matchFirst(rgx.block_curly_code_close)) {
@@ -3121,7 +3121,7 @@ template docAbstraction() {
}
}
}
- string[string] flow_txt_block_table(CMM)(
+ @system string[string] flow_txt_block_table(CMM)(
char[] line,
string[string] an_object,
return ref int[string] obj_type_status,
@@ -3179,7 +3179,7 @@ template docAbstraction() {
}
return an_object;
}
- final string biblio_tag_map()(string abr) {
+ @safe final string biblio_tag_map()(string abr) {
auto btm = [
"au" : "author_raw",
"ed" : "editor_raw",
@@ -3198,7 +3198,7 @@ template docAbstraction() {
];
return btm[abr];
}
- void flow_txt_block_biblio(
+ @system void flow_txt_block_biblio(
char[] line,
return ref int[string] obj_type_status,
return ref int bib_entry,
@@ -3327,7 +3327,7 @@ template docAbstraction() {
header_tag_value="";
}
}
- void flow_table_closed_make_special_notation_table_(N,CMM)(
+ @system void flow_table_closed_make_special_notation_table_(N,CMM)(
char[] line,
return ref string[string] an_object,
return ref ObjGenericComposite[] the_document_body_section,
@@ -3368,7 +3368,7 @@ template docAbstraction() {
processing.remove("verse");
++cntr;
}
- string[string] flow_block_flag_line_empty_(B,N,CMM,Ts)(
+ @system string[string] flow_block_flag_line_empty_(B,N,CMM,Ts)(
char[] line,
string[string] an_object,
B bookindex_extract_hash,
@@ -3678,7 +3678,7 @@ template docAbstraction() {
}
return an_object;
}
- string[string] flow_book_index_(B)(
+ @system string[string] flow_book_index_(B)(
char[] line,
string[string] an_object,
return ref string book_idx_tmp,
@@ -3728,13 +3728,13 @@ template docAbstraction() {
}
return an_object;
}
- string[string] flow_heading_found_()(
+ @safe string[string] flow_heading_found_()(
char[] line,
string[string] heading_match_str,
string[] _make_unmarked_headings,
return ref Regex!(char)[string] heading_match_rgx,
return ref int[string] obj_type_status
- ) @safe {
+ ) {
static auto rgx = Rgx();
if ((_make_unmarked_headings.length > 2)
&& (obj_type_status["make_headings"] == State.off)) { /+ headings found +/
@@ -3809,12 +3809,12 @@ template docAbstraction() {
}
return heading_match_str;
}
- char[] flow_heading_make_set_()(
+ @safe char[] flow_heading_make_set_()(
char[] line,
int[string] line_occur,
return ref Regex!(char)[string] heading_match_rgx,
return ref int[string] obj_type_status
- ) @safe {
+ ) {
if ((obj_type_status["make_headings"] == State.on)
&& ((line_occur["para"] == State.off)
&& (line_occur["heading"] == State.off))
@@ -3865,7 +3865,7 @@ template docAbstraction() {
}
return line;
}
- string[string] flow_heading_matched_(CMM)(
+ @safe string[string] flow_heading_matched_(CMM)(
char[] line,
string[string] an_object,
return ref int[string] line_occur,
@@ -3874,7 +3874,7 @@ template docAbstraction() {
return ref int[string] collapsed_lev,
return ref int[string] obj_type_status,
return ref CMM conf_make_meta,
- ) @safe {
+ ) {
static auto rgx = Rgx();
if (auto m = line.match(rgx.heading)) { /+ heading match +/
++line_occur["heading"];
@@ -4018,7 +4018,7 @@ template docAbstraction() {
}
return an_object;
}
- string[string] flow_para_match_()(
+ @safe string[string] flow_para_match_()(
char[] line,
string[string] an_object,
return ref string an_object_key,
@@ -4026,7 +4026,7 @@ template docAbstraction() {
return ref bool bullet,
return ref int[string] obj_type_status,
return ref int[string] line_occur,
- ) @safe {
+ ) {
static auto rgx = Rgx();
if (line_occur["para"] == State.off) {
line = font_faces_line(line);
@@ -4071,9 +4071,9 @@ template docAbstraction() {
}
return an_object;
}
- char[] font_faces_line()(
+ @safe char[] font_faces_line()(
char[] textline,
- ) @safe {
+ ) {
static auto rgx = Rgx();
static auto mkup = InlineMarkup();
if (textline.match(rgx.inline_faces_line)) {
@@ -4093,10 +4093,10 @@ template docAbstraction() {
}
return textline;
}
- ObjGenericComposite flow_table_instructions(H)(
+ @safe ObjGenericComposite flow_table_instructions(H)(
return ref ObjGenericComposite table_object,
H table_head,
- ) @safe {
+ ) {
static auto rgx = Rgx();
table_object.metainfo.is_of_part = "body";
table_object.metainfo.is_of_section = "body";
@@ -4118,10 +4118,10 @@ template docAbstraction() {
}
return table_object;
}
- ObjGenericComposite flow_table_array_munge(T)(
+ @safe ObjGenericComposite flow_table_array_munge(T)(
return ref ObjGenericComposite table_object,
return ref T table_array,
- ) @safe {
+ ) {
static auto rgx = Rgx();
static auto mng = InlineMarkup();
string _table_substantive;
@@ -4242,7 +4242,7 @@ template docAbstraction() {
comp_obj_block.text = _table_substantive;
return table_object;
}
- ObjGenericComposite flow_table_substantive_munge(T)(
+ @system ObjGenericComposite flow_table_substantive_munge(T)(
return ref ObjGenericComposite table_object,
return ref T table_substantive,
) {
@@ -4258,7 +4258,7 @@ template docAbstraction() {
table_object = table_object.flow_table_array_munge(_table);
return table_object;
}
- ObjGenericComposite flow_table_substantive_munge_special(T)(
+ @system ObjGenericComposite flow_table_substantive_munge_special(T)(
return ref ObjGenericComposite table_object,
return ref T table_substantive,
) {
@@ -4276,11 +4276,11 @@ template docAbstraction() {
}
/+ abstraction functions ↑ +/
/+ ↓ abstraction function emitters +/
- pure struct OCNemitter {
+ @safe pure struct OCNemitter {
int ocn_digit, ocn_object_number, ocn_on_, ocn_off_, ocn_bkidx, ocn_bkidx_;
string object_identifier;
bool ocn_is_off;
- auto ocn_emitter(int ocn_status_flag) @safe {
+ @safe auto ocn_emitter(int ocn_status_flag) {
OCNset ocn;
assert(ocn_status_flag <= OCNstatus.reset);
ocn_object_number = ocn_bkidx = 0;
@@ -4325,7 +4325,7 @@ template docAbstraction() {
}
}
/+ +/
- static struct ObjInlineMarkupMunge {
+ @safe static struct ObjInlineMarkupMunge {
string[string] obj_txt;
int n_foot, n_foot_reg, n_foot_sp_asterisk, n_foot_sp_plus;
string asterisks_, plus_;
@@ -4333,13 +4333,13 @@ template docAbstraction() {
static auto rgx = Rgx();
static auto mkup = InlineMarkup();
int stage_reset_note_numbers = true;
- private auto initialize_note_numbers() @safe {
+ private auto initialize_note_numbers() {
n_foot = 0;
n_foot_reg = 0;
n_foot_sp_asterisk = 0;
n_foot_sp_plus = 0;
}
- static auto images()(string obj_txt_in) @safe {
+ @safe static auto images()(string obj_txt_in) {
static auto mng = InlineMarkup();
/+ url matched +/
obj_txt_in = obj_txt_in.replaceAll(rgx.inline_notes_al_special, ""); // TODO reinstate when special footnotes are implemented
@@ -4369,7 +4369,7 @@ template docAbstraction() {
}
return obj_txt_in;
}
- TxtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) @safe {
+ @safe TxtPlusHasFootnotes footnotes_endnotes_markup_and_number_or_stars()(string obj_txt_in, bool reset_note_numbers) {
/+ endnotes (regular) +/
bool flg_notes_reg = false;
bool flg_notes_star = false;
@@ -4433,10 +4433,10 @@ template docAbstraction() {
);
return t;
}
- private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()(
+ @safe private TxtPlusHasFootnotesUrlsImages object_notes_and_links_()(
string obj_txt_in,
bool reset_note_numbers=false
- ) @safe {
+ ) {
obj_txt_out = "";
bool urls = false;
bool images_without_dimensions = false;
@@ -4496,10 +4496,10 @@ template docAbstraction() {
}
invariant() {
}
- auto munge_heading()(
+ @safe auto munge_heading()(
string obj_txt_in,
bool reset_note_numbers=false
- ) @safe {
+ ) {
obj_txt["munge"] = obj_txt_in
.replaceFirst(rgx.heading, "")
.replaceFirst(rgx.object_number_off_all, "")
@@ -4515,7 +4515,7 @@ template docAbstraction() {
}
invariant() {
}
- auto munge_para()(string obj_txt_in) @safe {
+ @safe auto munge_para()(string obj_txt_in) {
obj_txt["munge"]=(obj_txt_in)
.replaceFirst(rgx.para_attribs, "")
.replaceFirst(rgx.object_number_off_all, "");
@@ -4528,47 +4528,47 @@ template docAbstraction() {
}
return t;
}
- string munge_quote()(string obj_txt_in) @safe {
+ @safe string munge_quote()(string obj_txt_in) {
obj_txt["munge"]=obj_txt_in;
return obj_txt["munge"];
}
invariant() {
}
- auto munge_group(string obj_txt_in) @safe {
+ @safe auto munge_group(string obj_txt_in) {
obj_txt["munge"]=obj_txt_in;
TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
return t;
}
invariant() {
}
- auto munge_block()(string obj_txt_in) @safe {
+ @safe auto munge_block()(string obj_txt_in) {
obj_txt["munge"]=obj_txt_in;
TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
return t;
}
invariant() {
}
- auto munge_verse()(string obj_txt_in) @safe {
+ @safe auto munge_verse()(string obj_txt_in) {
obj_txt["munge"]=obj_txt_in;
TxtPlusHasFootnotesUrlsImages t = object_notes_and_links_(obj_txt["munge"]);
return t;
}
invariant() {
}
- string munge_code()(string obj_txt_in) @safe {
+ @safe string munge_code()(string obj_txt_in) {
obj_txt_in = obj_txt_in.replaceAll(rgx.space, mkup.nbsp);
obj_txt["munge"] = obj_txt_in;
return obj_txt["munge"];
}
invariant() {
}
- string munge_table()(string obj_txt_in) @safe {
+ @safe string munge_table()(string obj_txt_in) {
obj_txt["munge"]=obj_txt_in;
return obj_txt["munge"];
}
invariant() {
}
- string munge_comment()(string obj_txt_in) @safe {
+ @safe string munge_comment()(string obj_txt_in) {
obj_txt["munge"]=obj_txt_in;
return obj_txt["munge"];
}
@@ -4580,12 +4580,12 @@ template docAbstraction() {
static auto munge = ObjInlineMarkupMunge();
string[string] obj_txt;
static string anchor_tag = "";
- TxtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)(
+ @safe TxtAndAnchorTagPlusHasFootnotesUrlsImages obj_inline_markup_and_anchor_tags_and_misc(CMM)(
string[string] obj_,
string obj_key_,
CMM conf_make_meta,
Flag!"_new_doc" _new_doc
- ) @safe {
+ ) {
obj_txt["munge"] = obj_[obj_key_].dup;
obj_txt["munge"] = (obj_["is"].match(ctRegex!(`verse|code`)))
? obj_txt["munge"]
@@ -4673,23 +4673,23 @@ template docAbstraction() {
}
invariant() {
}
- auto _clean_heading_toc_()(
+ @safe auto _clean_heading_toc_()(
char[] heading_toc_,
- ) @safe {
+ ) {
auto m = (cast(char[]) heading_toc_).matchFirst(rgx.heading);
heading_toc_ = (m.post).replaceAll(
rgx.inline_notes_curly_gen,
"");
return heading_toc_;
};
- ObjGenericComposite[] flow_table_of_contents_gather_headings(CMM)(
+ @safe ObjGenericComposite[] flow_table_of_contents_gather_headings(CMM)(
string[string] obj_,
CMM conf_make_meta,
string[string] tag_in_seg,
string _anchor_tag,
return ref string[][string] lev4_subtoc,
ObjGenericComposite[] the_table_of_contents_section,
- ) @safe {
+ ) {
ObjGenericComposite comp_obj_toc;
mixin InternalMarkup;
static auto mkup = InlineMarkup();
@@ -4773,12 +4773,12 @@ template docAbstraction() {
static string heading_number_auto_composite = "";
static string heading_number_auto_composite_segname = "";
static bool[] auto_heading_numbering = [ true, true, true, true];
- static string _configured_auto_heading_numbering_and_segment_anchor_tags(CMM)(
+ @safe static string _configured_auto_heading_numbering_and_segment_anchor_tags(CMM)(
string munge_,
string[string] obj_,
CMM conf_make_meta,
bool _new_doc,
- ) @safe {
+ ) {
if (_new_doc) {
heading_num = [ 0, 0, 0, 0 ];
heading_number_auto_composite = "";
@@ -4917,11 +4917,11 @@ template docAbstraction() {
return munge_;
}
static int heading_num_lev1 = 0;
- static string _make_segment_anchor_tags_if_none_provided()(
+ @safe static string _make_segment_anchor_tags_if_none_provided()(
string munge_,
string lev_,
bool _new_doc
- ) @safe {
+ ) {
if (!(munge_.match(rgx.heading_anchor_tag))) {
if (munge_.match(rgx.heading_identify_anchor_tag)) {
if (auto m = munge_.match(rgx.heading_extract_named_anchor_tag)) {
@@ -4954,11 +4954,11 @@ template docAbstraction() {
/+ +/
struct ObjAttributes {
string[string] _obj_attrib;
- string obj_attributes()(
+ @safe string obj_attributes()(
string obj_is_,
string obj_raw,
ObjGenericComposite _comp_obj_heading,
- ) @safe {
+ ) {
scope(exit) {
destroy(obj_is_);
destroy(obj_raw);
@@ -5017,7 +5017,7 @@ template docAbstraction() {
}
private:
string _obj_attributes;
- string txt_para_and_blocks()(string obj_txt_in) {
+ @safe string txt_para_and_blocks()(string obj_txt_in) {
if (obj_txt_in.matchFirst(rgx.para_bullet)) {
_obj_attributes =" \"bullet\": \"true\","
~ " \"indent_hang\": 0,"
@@ -5041,7 +5041,7 @@ template docAbstraction() {
}
return _obj_attributes;
}
- string txt_heading()(string obj_txt_in) @safe {
+ @safe string txt_heading()(string obj_txt_in) {
_obj_attributes = " \"use\": \"content\","
~ " \"of\": \"para\","
~ " \"is\": \"heading\"";
@@ -5049,7 +5049,7 @@ template docAbstraction() {
}
invariant() {
}
- string txt_para()(string obj_txt_in) @safe {
+ @safe string txt_para()(string obj_txt_in) {
_obj_attributes = " \"use\": \"content\","
~ " \"of\": \"para\","
~ " \"is\": \"para\"";
@@ -5057,7 +5057,7 @@ template docAbstraction() {
}
invariant() {
}
- string txt_quote()(string obj_txt_in) @safe {
+ @safe string txt_quote()(string obj_txt_in) {
_obj_attributes = " \"use\": \"content\","
~ " \"of\": \"block\","
~ " \"is\": \"quote\"";
@@ -5065,7 +5065,7 @@ template docAbstraction() {
}
invariant() {
}
- string txt_group()(string obj_txt_in) @safe {
+ @safe string txt_group()(string obj_txt_in) {
_obj_attributes = " \"use\": \"content\","
~ " \"of\": \"block\","
~ " \"is\": \"group\"";
@@ -5073,7 +5073,7 @@ template docAbstraction() {
}
invariant() {
}
- string txt_block()(string obj_txt_in) @safe {
+ @safe string txt_block()(string obj_txt_in) {
_obj_attributes = " \"use\": \"content\","
~ " \"of\": \"block\","
~ " \"is\": \"block\"";
@@ -5081,7 +5081,7 @@ template docAbstraction() {
}
invariant() {
}
- string txt_verse()(string obj_txt_in) @safe {
+ @safe string txt_verse()(string obj_txt_in) {
_obj_attributes = " \"use\": \"content\","
~ " \"of\": \"block\","
~ " \"is\": \"verse\"";
@@ -5089,7 +5089,7 @@ template docAbstraction() {
}
invariant() {
}
- string txt_code()(string obj_txt_in) @safe {
+ @safe string txt_code()(string obj_txt_in) {
_obj_attributes = " \"use\": \"content\","
~ " \"of\": \"block\","
~ " \"is\": \"code\"";
@@ -5097,7 +5097,7 @@ template docAbstraction() {
}
invariant() {
}
- string txt_table()(string obj_txt_in) @safe {
+ @safe string txt_table()(string obj_txt_in) {
_obj_attributes = " \"use\": \"content\","
~ " \"of\": \"block\","
~ " \"is\": \"table\"";
@@ -5105,7 +5105,7 @@ template docAbstraction() {
}
invariant() {
}
- string txt_comment()(string obj_txt_in) @safe {
+ @safe string txt_comment()(string obj_txt_in) {
_obj_attributes = " \"use\": \"comment\","
~ " \"of\": \"comment\","
~ " \"is\": \"comment\"";
@@ -5113,11 +5113,11 @@ template docAbstraction() {
}
invariant() {
}
- string _set_additional_values_parse_as_json()(
+ @safe string _set_additional_values_parse_as_json()(
string _obj_attrib,
string obj_is_,
ObjGenericComposite _comp_obj_heading,
- ) @safe {
+ ) {
JSONValue oa_j = parseJSON(_obj_attrib);
assert(
(oa_j.type == JSON_TYPE.OBJECT)
@@ -5144,11 +5144,11 @@ template docAbstraction() {
string[] object_numbers;
string[][string][string] bi_hash_nugget;
string[] bi_main_terms_split_arr;
- string[][string][string] bookindex_nugget_hash(N,S)(
+ @safe string[][string][string] bookindex_nugget_hash(N,S)(
string bookindex_section,
N obj_cite_digits,
S tag_in_seg,
- ) @safe {
+ ) {
debug(asserts) {
static assert(is(typeof(obj_cite_digits.object_number) == int));
}
@@ -5214,9 +5214,9 @@ template docAbstraction() {
}
struct BookIndexReportIndent {
int mkn, skn;
- void bookindex_report_indented()(
+ @safe void bookindex_report_indented()(
string[][string][string] bookindex_unordered_hashes
- ) @safe {
+ ) {
auto mainkeys
= bookindex_unordered_hashes.byKey.array.sort().release;
foreach (mainkey; mainkeys) {
@@ -5242,9 +5242,9 @@ template docAbstraction() {
int mkn, skn;
static auto rgx = Rgx();
static auto munge = ObjInlineMarkupMunge();
- void bookindex_write_section()(
+ @safe void bookindex_write_section()(
string[][string][string] bookindex_unordered_hashes
- ) @safe {
+ ) {
auto mainkeys =
bookindex_unordered_hashes.byKey.array
.sort!("toUpper(a) < toUpper(b)", SwapStrategy.stable).release;
@@ -5271,7 +5271,7 @@ template docAbstraction() {
++mkn;
}
}
- auto bookindex_build_abstraction_section(N,B)(
+ @system auto bookindex_build_abstraction_section(N,B)(
string[][string][string] bookindex_unordered_hashes,
N obj_cite_digits,
B opt_action,
@@ -5435,11 +5435,11 @@ template docAbstraction() {
int previous_count;
int mkn;
static auto rgx = Rgx();
- private auto gather_notes_for_endnote_section(
+ @safe private auto gather_notes_for_endnote_section(
ObjGenericComposite[] contents_am,
string[string] tag_in_seg,
int cntr,
- ) @safe {
+ ) {
assert((contents_am[cntr].metainfo.is_a == "para")
|| (contents_am[cntr].metainfo.is_a == "heading")
|| (contents_am[cntr].metainfo.is_a == "quote")
@@ -5515,7 +5515,7 @@ template docAbstraction() {
}
return object_notes;
}
- private auto gathered_notes() @safe {
+ @safe private auto gathered_notes() {
string[][string] endnotes_;
if (object_notes.length > 1) {
endnotes_["notes"] = (object_notes["notes"].split(rgx.break_string))[0..$-1];
@@ -5526,10 +5526,10 @@ template docAbstraction() {
}
return endnotes_;
}
- private auto endnote_objects(N,O)(
+ @safe private auto endnote_objects(N,O)(
N obj_cite_digits,
O opt_action,
- ) @safe {
+ ) {
mixin spineNode;
ObjGenericComposite[] the_endnotes_section;
auto endnotes_ = gathered_notes();
@@ -5639,7 +5639,7 @@ template docAbstraction() {
}
/+ +/
struct Bibliography {
- public JSONValue[] flow_bibliography_()(
+ @system public JSONValue[] flow_bibliography_()(
return ref string[] biblio_unsorted_incomplete,
return ref JSONValue[] bib_arr_json
) {
@@ -5664,7 +5664,7 @@ template docAbstraction() {
}
return biblio_sorted__;
}
- final private JSONValue[] biblio_make_unsorted_array_of_json_objects()(
+ @system final private JSONValue[] biblio_make_unsorted_array_of_json_objects()(
string[] biblio_unordered,
JSONValue[] bib_arr_json
) {
@@ -5692,7 +5692,7 @@ template docAbstraction() {
}
return bib_arr_json.dup;
}
- final private JSONValue[] biblio_sort()(JSONValue[] biblio_unordered) {
+ @system final private JSONValue[] biblio_sort()(JSONValue[] biblio_unordered) {
JSONValue[] biblio_sorted_;
biblio_sorted_
= sort!((a, b){
@@ -5707,7 +5707,7 @@ template docAbstraction() {
}
return biblio_sorted_;
}
- void biblio_debug()(JSONValue[] biblio_sorted) {
+ @system void biblio_debug()(JSONValue[] biblio_sorted) {
debug(biblio0) {
foreach (j; biblio_sorted) {
if (!empty(j["fulltitle"].str)) {
@@ -5723,7 +5723,7 @@ template docAbstraction() {
int obj_cite_digit;
int[string] p_; // p_ parent_
static auto rgx = Rgx();
- ObjGenericComposite node_location_emitter(La,Ta,N)(
+ @safe ObjGenericComposite node_location_emitter(La,Ta,N)(
string lev_markup_number,
string[string] tag_in_seg,
La lev_anchor_tag,
@@ -5732,7 +5732,7 @@ template docAbstraction() {
int cntr_,
int ptr_,
string is_
- ) @safe {
+ ) {
debug(asserts) {
static assert(is(typeof(obj_cite_digits.object_number) == int));
}
@@ -5777,7 +5777,7 @@ template docAbstraction() {
}
invariant() {
}
- ObjGenericComposite node_emitter_heading(Hd,TaL,TA,N,fNr,fNs,fL)(
+ @safe ObjGenericComposite node_emitter_heading(Hd,TaL,TA,N,fNr,fNs,fL)(
string _text,
string lev_markup_number,
string lev_collapsed_number,
@@ -5794,7 +5794,7 @@ template docAbstraction() {
fNr flag_notes_reg,
fNs flag_notes_star,
fL flag_links,
- ) @safe {
+ ) {
debug(asserts) {
static assert(is(typeof(lev) == string));
static assert(is(typeof(obj_cite_digits.object_number) == int));
@@ -5976,10 +5976,10 @@ template docAbstraction() {
}
/+ abstraction functions emitters ↑ +/
/+ ↓ abstraction functions assertions +/
- pure void assertions_doc_structure()(
+ @safe pure void assertions_doc_structure()(
string[string] an_object,
int[string] lv
- ) @safe {
+ ) {
if (lv["h3"] > State.off) {
assert(lv["h0"] > State.off);
assert(lv["h1"] > State.off);
@@ -6151,7 +6151,7 @@ template docAbstraction() {
break;
}
}
- pure void assertions_flag_types_block_status_none_or_closed()(int[string] obj_type_status) @safe {
+ @safe pure void assertions_flag_types_block_status_none_or_closed()(int[string] obj_type_status) {
assert(
(obj_type_status["code"] == TriState.off)
|| (obj_type_status["code"] == TriState.closing),
@@ -6176,7 +6176,7 @@ template docAbstraction() {
/+ abstraction functions assertions ↑ +/
} /+ ← closed: template docAbstraction +/
template docSectKeysSeq() {
- auto docSectKeysSeq(string[][string] document_section_keys_sequenced) @safe {
+ @safe auto docSectKeysSeq(string[][string] document_section_keys_sequenced) {
struct doc_sect_keys_seq {
string[] scroll() {
return document_section_keys_sequenced["scroll"];