From d582b4a66f5fc746b4d1e2935c5400df072df055 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 18 Feb 2017 12:16:33 -0500 Subject: 0.13.2 ref scope (return) --- src/sdp/abstraction_summary.d | 4 +- src/sdp/ao_abstract_doc_source.d | 156 ++++++++++++++++++------------------- src/sdp/ao_conf_make_meta_native.d | 14 ++-- src/sdp/ao_doc_debugs.d | 14 ++-- src/sdp/output_epub.d | 4 +- src/sdp/output_html.d | 8 +- src/sdp/output_xhtmls.d | 12 +-- 7 files changed, 106 insertions(+), 106 deletions(-) (limited to 'src') diff --git a/src/sdp/abstraction_summary.d b/src/sdp/abstraction_summary.d index 75faf0e..4a9fc80 100644 --- a/src/sdp/abstraction_summary.d +++ b/src/sdp/abstraction_summary.d @@ -1,7 +1,7 @@ template SiSUabstractionSummary() { auto SiSUabstractionSummary(S,T)( - auto ref const S doc_abstraction, - auto ref T doc_matters, + auto return ref const S doc_abstraction, + auto return ref T doc_matters, ) { import ao_defaults, diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d index a0dccbe..0775daf 100644 --- a/src/sdp/ao_abstract_doc_source.d +++ b/src/sdp/ao_abstract_doc_source.d @@ -88,8 +88,8 @@ template SiSUdocAbstraction() { int[] dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; enum DomTags { none, open, close, close_and_open, open_still, } void heading_ancestors(O)( - auto ref O obj, - ref string[] lv_ancestors, + auto return ref O obj, + return ref string[] lv_ancestors, ) { switch (obj.heading_lev_markup) { case 0: @@ -1594,9 +1594,9 @@ template SiSUdocAbstraction() { an_object.remove("bookindex_nugget"); } auto _common_reset_(L,O,T)( - ref L line_occur, - ref O an_object, - ref T type + return ref L line_occur, + return ref O an_object, + return ref T type ) { debug(asserts){ static assert(is(typeof(line_occur) == int[string])); @@ -1610,8 +1610,8 @@ template SiSUdocAbstraction() { object_reset(an_object); } void _check_ocn_status_(L,T)( - L line, - ref T type + L line, + return ref T type ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -1659,9 +1659,9 @@ template SiSUdocAbstraction() { } } void _start_block_(L,T,N)( - L line, - ref T type, - N obj_cite_number_poem + L line, + return ref T type, + N obj_cite_number_poem ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -1809,9 +1809,9 @@ template SiSUdocAbstraction() { } } void _code_block_(L,O,T)( - ref L line, - ref O an_object, - ref T type + return ref L line, + return ref O an_object, + return ref T type ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -1872,11 +1872,11 @@ template SiSUdocAbstraction() { return btm[abr]; } void _biblio_block_( - char[] line, - ref int[string] type, - ref int bib_entry, - ref string biblio_entry_str_json, - ref string[] biblio_arr_json + char[] line, + return ref int[string] type, + return ref int bib_entry, + return ref string biblio_entry_str_json, + return ref string[] biblio_arr_json ) { mixin SiSUbiblio; auto jsn = BibJsnStr(); @@ -1996,11 +1996,11 @@ template SiSUdocAbstraction() { // void _poem_block_(L,O,T,C,N,Ma)( L line, - ref O an_object, - ref T type, - ref C cntr, - N obj_cite_number_poem, - Ma dochead_make_aa, + return ref O an_object, + return ref T type, + return ref C cntr, + N obj_cite_number_poem, + Ma dochead_make_aa, ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -2197,9 +2197,9 @@ template SiSUdocAbstraction() { } } void _group_block_(L,O,T)( - ref L line, - ref O an_object, - ref T type + return ref L line, + return ref O an_object, + return ref T type ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -2238,9 +2238,9 @@ template SiSUdocAbstraction() { } } void _block_block_(L,O,T)( - ref L line, - ref O an_object, - ref T type + return ref L line, + return ref O an_object, + return ref T type ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -2279,9 +2279,9 @@ template SiSUdocAbstraction() { } } void _quote_block_(L,O,T)( - ref L line, - ref O an_object, - ref T type + return ref L line, + return ref O an_object, + return ref T type ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -2320,9 +2320,9 @@ template SiSUdocAbstraction() { } } void _table_block_(L,O,T)( - ref L line, - ref O an_object, - ref T type + return ref L line, + return ref O an_object, + return ref T type ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -2363,15 +2363,15 @@ template SiSUdocAbstraction() { void _block_flag_line_empty_(B)( B bookindex_extract_hash, char[] line, - ref string[string] an_object, - ref ObjGenericComposite[] the_document_body_section, - ref string[][string][string] bookindex_unordered_hashes, - ref int obj_cite_number, - ref ObjGenericComposite _comp_obj_heading, - ref int cntr, - ref int[string] type, - string[string] obj_cite_number_poem, - string[string][string] dochead_make_aa, + return ref string[string] an_object, + return ref ObjGenericComposite[] the_document_body_section, + return ref string[][string][string] bookindex_unordered_hashes, + return ref int obj_cite_number, + return ref ObjGenericComposite _comp_obj_heading, + return ref int cntr, + return ref int[string] type, + string[string] obj_cite_number_poem, + string[string][string] dochead_make_aa, ) { // line.empty, post contents, empty variables --------------- assert( @@ -2583,10 +2583,10 @@ template SiSUdocAbstraction() { } auto _book_index_(L,I,O,T,B)( L line, - ref I book_idx_tmp, - ref O an_object, - ref T type, - B opt_action_bool, + return ref I book_idx_tmp, + return ref O an_object, + return ref T type, + B opt_action_bool, ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -2641,9 +2641,9 @@ template SiSUdocAbstraction() { auto _heading_found_(L,X,H,R,T)( L line, X dochead_make_identify_unmarked_headings, - ref H heading_match_str, - ref R heading_match_rgx, - ref T type + return ref H heading_match_str, + return ref R heading_match_rgx, + return ref T type ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -2733,8 +2733,8 @@ template SiSUdocAbstraction() { auto _heading_make_set_(L,C,R,T)( L line, C line_occur, - ref R heading_match_rgx, - ref T type + return ref R heading_match_rgx, + return ref T type ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -2793,14 +2793,14 @@ template SiSUdocAbstraction() { } } auto _heading_matched_(L,C,O,K,Lv,Lc,T,Me)( - ref L line, - ref C line_occur, - ref O an_object, - ref K an_object_key, - ref Lv lv, - ref Lc collapsed_lev, - ref T type, - ref Me dochead_meta_aa, + return ref L line, + return ref C line_occur, + return ref O an_object, + return ref K an_object_key, + return ref Lv lv, + return ref Lc collapsed_lev, + return ref T type, + return ref Me dochead_meta_aa, ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -2947,13 +2947,13 @@ template SiSUdocAbstraction() { } } auto _para_match_(L,O,K,I,B,T,C)( - ref L line, - ref O an_object, - ref K an_object_key, - ref I indent, - ref B bullet, - ref T type, - ref C line_occur, + return ref L line, + return ref O an_object, + return ref K an_object_key, + return ref I indent, + return ref B bullet, + return ref T type, + return ref C line_occur, ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -3413,12 +3413,12 @@ template SiSUdocAbstraction() { return heading_toc_; }; auto table_of_contents_gather_headings(O,Ma,Ts,Ta,X,Toc)( - O obj_, - Ma dochead_make_aa, - Ts segment_anchor_tag_that_object_belongs_to, - Ta _anchor_tag, - ref X lev4_subtoc, - Toc the_table_of_contents_section, + O obj_, + Ma dochead_make_aa, + Ts segment_anchor_tag_that_object_belongs_to, + Ta _anchor_tag, + return ref X lev4_subtoc, + Toc the_table_of_contents_section, ) in { debug(asserts){ @@ -4456,8 +4456,8 @@ template SiSUdocAbstraction() { /+ +/ struct Bibliography { public JSONValue[] _bibliography_(Bi,BJ)( - ref Bi biblio_unsorted_incomplete, - ref BJ bib_arr_json + return ref Bi biblio_unsorted_incomplete, + return ref BJ bib_arr_json ) in { debug(asserts){ @@ -4488,8 +4488,8 @@ template SiSUdocAbstraction() { return biblio_sorted__; } final private JSONValue[] _biblio_unsorted_complete_(Bi,BJ)( - Bi biblio_unordered, - ref BJ bib_arr_json + Bi biblio_unordered, + return ref BJ bib_arr_json ) { debug(asserts){ static assert(is(typeof(biblio_unordered) == string[])); diff --git a/src/sdp/ao_conf_make_meta_native.d b/src/sdp/ao_conf_make_meta_native.d index a5e60ef..08a7d9f 100644 --- a/src/sdp/ao_conf_make_meta_native.d +++ b/src/sdp/ao_conf_make_meta_native.d @@ -215,10 +215,10 @@ template SiSUheaderExtractNative() { return t; } private auto native_header_extract(L,Lo,O,T)( - L line, - ref Lo line_occur, - ref O an_object, - ref T type + L line, + return ref Lo line_occur, + return ref O an_object, + return ref T type ) { debug(asserts){ static assert(is(typeof(line) == char[])); @@ -259,9 +259,9 @@ template SiSUheaderExtractNative() { return an_object; } auto header_reset_states_common(Lo,O,T)( - ref Lo line_occur, - ref O an_object, - ref T type + return ref Lo line_occur, + return ref O an_object, + return ref T type ) { debug(asserts){ static assert(is(typeof(line_occur) == int[string])); diff --git a/src/sdp/ao_doc_debugs.d b/src/sdp/ao_doc_debugs.d index feb7de4..2c0da82 100644 --- a/src/sdp/ao_doc_debugs.d +++ b/src/sdp/ao_doc_debugs.d @@ -23,8 +23,8 @@ template SiSUdebugs() { std.utf, std.conv : to; auto SiSUdebugs(S,T)( - auto ref const S contents, - auto ref T doc_matters, + auto return ref const S contents, + auto return ref T doc_matters, ) { mixin SiSUrgxInit; mixin InternalMarkup; @@ -580,8 +580,8 @@ template SiSUdebugs() { } debug(checkdoc) { void out_segnames(S,T)( - auto ref const S contents, - auto ref T doc_matters, + auto return ref const S contents, + auto return ref T doc_matters, ) { foreach (key; doc_matters.keys_seq_seg) { if (contents[key].length > 1) { @@ -596,7 +596,7 @@ template SiSUdebugs() { } debug(checkdoc) { void out_toc(S)( - auto ref const S contents, + auto return ref const S contents, string key, ) { if (contents[key].length > 1) { @@ -614,7 +614,7 @@ template SiSUdebugs() { } debug(checkdoc) { void out_endnotes(S)( - auto ref const S contents, + auto return ref const S contents, string key, ) { if (contents[key].length > 1) { @@ -630,7 +630,7 @@ template SiSUdebugs() { } debug(checkdoc) { void out_bookindex(S)( - auto ref const S contents, + auto return ref const S contents, string key, ) { if (contents[key].length > 1) { diff --git a/src/sdp/output_epub.d b/src/sdp/output_epub.d index bc28776..ca11828 100644 --- a/src/sdp/output_epub.d +++ b/src/sdp/output_epub.d @@ -158,8 +158,8 @@ template outputEPub() { } void outputEPub(D,I)( - auto ref const D doc_abstraction, - auto ref I doc_matters, + auto return ref const D doc_abstraction, + auto return ref I doc_matters, ) { mixin SiSUrgxInit; auto xhtml_format = outputXHTMLs(); diff --git a/src/sdp/output_html.d b/src/sdp/output_html.d index b98be41..9b8fc86 100644 --- a/src/sdp/output_html.d +++ b/src/sdp/output_html.d @@ -24,8 +24,8 @@ template outputHTML() { mixin outputXHTMLs; void scroll(D,I)( - auto ref const D doc_abstraction, - auto ref I doc_matters, + auto return ref const D doc_abstraction, + auto return ref I doc_matters, ) { mixin SiSUrgxInit; auto xhtml_format = outputXHTMLs(); @@ -185,8 +185,8 @@ template outputHTML() { } } void seg(D,I)( - auto ref const D doc_abstraction, - auto ref I doc_matters, + auto return ref const D doc_abstraction, + auto return ref I doc_matters, ) { mixin SiSUrgxInit; auto rgx = Rgx(); diff --git a/src/sdp/output_xhtmls.d b/src/sdp/output_xhtmls.d index 4288ab8..6a4c3a3 100644 --- a/src/sdp/output_xhtmls.d +++ b/src/sdp/output_xhtmls.d @@ -99,7 +99,7 @@ template outputXHTMLs() { return o; } auto toc(O)( - auto ref const O obj, + auto return ref const O obj, ) { string o; o = format(q"¶
@@ -115,7 +115,7 @@ template outputXHTMLs() { return o; } auto heading(O)( - auto ref const O obj, + auto return ref const O obj, ) { auto tags = _xhtml_anchor_tags(obj.anchor_tags); string o; @@ -154,7 +154,7 @@ template outputXHTMLs() { return o; } auto para(O)( - auto ref const O obj, + auto return ref const O obj, ) { auto tags = _xhtml_anchor_tags(obj.anchor_tags); string o; @@ -190,7 +190,7 @@ template outputXHTMLs() { return o; } auto nugget(O)( - auto ref const O obj, + auto return ref const O obj, ) { string o; if (obj.obj_cite_number.empty) { @@ -219,7 +219,7 @@ template outputXHTMLs() { return o; } auto endnote(O)( - auto ref const O obj, + auto return ref const O obj, ) { string o; o = format(q"¶

@@ -233,7 +233,7 @@ template outputXHTMLs() { return o; } auto code(O)( - auto ref const O obj, + auto return ref const O obj, ) { string o; if (obj.obj_cite_number.empty) { -- cgit v1.2.3