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) --- org/ao_conf_make_meta.org | 14 ++-- org/ao_debugs.org | 14 ++-- org/ao_doc_abstraction.org | 156 ++++++++++++++++++++++----------------------- org/output.org | 24 +++---- org/sdp.org | 6 +- 5 files changed, 107 insertions(+), 107 deletions(-) (limited to 'org') diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org index dc45daf..040df50 100644 --- a/org/ao_conf_make_meta.org +++ b/org/ao_conf_make_meta.org @@ -635,10 +635,10 @@ body { #+name: ao_markup_header_extract_native #+BEGIN_SRC d 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[])); @@ -685,9 +685,9 @@ private auto native_header_extract(L,Lo,O,T)( #+name: ao_markup_header_extract_native #+BEGIN_SRC d 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/org/ao_debugs.org b/org/ao_debugs.org index 7a63a3a..16efa26 100644 --- a/org/ao_debugs.org +++ b/org/ao_debugs.org @@ -23,8 +23,8 @@ template SiSUdebugs() { <> 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; @@ -133,8 +133,8 @@ debug(dumpdoc) { #+BEGIN_SRC d 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) { @@ -156,7 +156,7 @@ debug(checkdoc) { #+BEGIN_SRC d debug(checkdoc) { void out_toc(S)( - auto ref const S contents, + auto return ref const S contents, string key, ) { if (contents[key].length > 1) { @@ -180,7 +180,7 @@ debug(checkdoc) { #+BEGIN_SRC d debug(checkdoc) { void out_endnotes(S)( - auto ref const S contents, + auto return ref const S contents, string key, ) { if (contents[key].length > 1) { @@ -202,7 +202,7 @@ debug(checkdoc) { #+BEGIN_SRC d 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/org/ao_doc_abstraction.org b/org/ao_doc_abstraction.org index b3f31c0..69093b6 100644 --- a/org/ao_doc_abstraction.org +++ b/org/ao_doc_abstraction.org @@ -241,8 +241,8 @@ enum DomTags { none, open, close, close_and_open, open_still, } #+name: abs_top_init_struct #+BEGIN_SRC d 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: @@ -2094,9 +2094,9 @@ auto object_reset(O)(ref O an_object) { #+name: abs_functions_header_set_common #+BEGIN_SRC d 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])); @@ -2116,8 +2116,8 @@ auto _common_reset_(L,O,T)( #+name: abs_functions_ocn_status #+BEGIN_SRC d 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[])); @@ -2173,9 +2173,9 @@ void _check_ocn_status_(L,T)( #+name: abs_functions_block #+BEGIN_SRC d 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[])); @@ -2348,9 +2348,9 @@ void _start_block_(L,T,N)( #+name: abs_functions_block_code #+BEGIN_SRC d 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[])); @@ -2484,11 +2484,11 @@ final string biblio_tag_map_(A)(A abr) { #+name: abs_functions_block_biblio #+BEGIN_SRC d 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(); @@ -2615,11 +2615,11 @@ why extra object stuff only in poem/verse? #+BEGIN_SRC d 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[])); @@ -2822,9 +2822,9 @@ void _poem_block_(L,O,T,C,N,Ma)( #+name: abs_functions_block_group #+BEGIN_SRC d 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[])); @@ -2869,9 +2869,9 @@ void _group_block_(L,O,T)( #+name: abs_functions_block_block #+BEGIN_SRC d 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[])); @@ -2916,9 +2916,9 @@ void _block_block_(L,O,T)( #+name: abs_functions_block_quote #+BEGIN_SRC d 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[])); @@ -2963,9 +2963,9 @@ void _quote_block_(L,O,T)( #+name: abs_functions_block_table #+BEGIN_SRC d 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[])); @@ -3012,15 +3012,15 @@ void _table_block_(L,O,T)( 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( @@ -3238,10 +3238,10 @@ void _block_flag_line_empty_(B)( #+BEGIN_SRC d 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[])); @@ -3303,9 +3303,9 @@ auto _book_index_(L,I,O,T,B)( 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[])); @@ -3401,8 +3401,8 @@ auto _heading_found_(L,X,H,R,T)( 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[])); @@ -3467,14 +3467,14 @@ auto _heading_make_set_(L,C,R,T)( #+name: abs_functions_heading #+BEGIN_SRC d 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[])); @@ -3627,13 +3627,13 @@ auto _heading_matched_(L,C,O,K,Lv,Lc,T,Me)( #+name: abs_functions_para #+BEGIN_SRC d 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[])); @@ -4123,12 +4123,12 @@ struct ObjInlineMarkup { 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){ @@ -5370,8 +5370,8 @@ struct Bibliography { #+name: ao_emitters_bibliography #+BEGIN_SRC d 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){ @@ -5408,8 +5408,8 @@ struct Bibliography { #+name: ao_emitters_bibliography #+BEGIN_SRC d 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/org/output.org b/org/output.org index 9853d50..b77449d 100644 --- a/org/output.org +++ b/org/output.org @@ -395,7 +395,7 @@ auto tail() { #+name: xhtml_format_objects #+BEGIN_SRC d auto toc(O)( - auto ref const O obj, + auto return ref const O obj, ) { string o; o = format(q"¶
@@ -417,7 +417,7 @@ auto toc(O)( #+name: xhtml_format_objects #+BEGIN_SRC d auto heading(O)( - auto ref const O obj, + auto return ref const O obj, ) { auto tags = _xhtml_anchor_tags(obj.anchor_tags); string o; @@ -462,7 +462,7 @@ auto heading(O)( #+name: xhtml_format_objects #+BEGIN_SRC d auto para(O)( - auto ref const O obj, + auto return ref const O obj, ) { auto tags = _xhtml_anchor_tags(obj.anchor_tags); string o; @@ -504,7 +504,7 @@ auto para(O)( #+name: xhtml_format_objects #+BEGIN_SRC d auto nugget(O)( - auto ref const O obj, + auto return ref const O obj, ) { string o; if (obj.obj_cite_number.empty) { @@ -539,7 +539,7 @@ auto nugget(O)( #+name: xhtml_format_objects #+BEGIN_SRC d auto endnote(O)( - auto ref const O obj, + auto return ref const O obj, ) { string o; o = format(q"¶

@@ -559,7 +559,7 @@ auto endnote(O)( #+name: xhtml_format_objects_code #+BEGIN_SRC d auto code(O)( - auto ref const O obj, + auto return ref const O obj, ) { string o; if (obj.obj_cite_number.empty) { @@ -609,8 +609,8 @@ template outputHTML() { #+name: output_html_scroll #+BEGIN_SRC d 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(); @@ -783,8 +783,8 @@ void scroll_write_output(Fn,C)( #+name: output_html_seg #+BEGIN_SRC d 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(); @@ -2495,8 +2495,8 @@ obj.segment_anchor_tag, // lev < 4 [no link]; lev == 4 [filename] markup.xhtml #+name: output_epub_xhtml_seg #+BEGIN_SRC d 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/org/sdp.org b/org/sdp.org index b0ff78c..c745741 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -23,7 +23,7 @@ struct Version { int minor; int patch; } -enum ver = Version(0, 13, 1); +enum ver = Version(0, 13, 2); #+END_SRC * 1. sdp (sisu document parser) :sdp: @@ -610,8 +610,8 @@ auto doc_matters = DocumentMatters(); #+BEGIN_SRC d :tangle ../src/sdp/abstraction_summary.d 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, ) { <> mixin InternalMarkup; -- cgit v1.2.3