From 737b165990168fdfc3911d542ec741e6a8b7a1c3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 25 Jul 2017 04:02:26 -0400 Subject: meta_abstraction, mark some functions pure --- org/meta_abstraction.org | 12 ++++++------ src/sdp/meta/metadoc_from_src.d | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index 1050db7..678462b 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -231,7 +231,7 @@ enum DomTags { none, open, close, close_and_open, open_still, } #+name: abs_top_init_struct #+BEGIN_SRC d -auto obj_heading_ancestors(O)( +pure auto obj_heading_ancestors(O)( O obj, string[] lv_ancestors_txt, ) { @@ -290,7 +290,7 @@ auto obj_heading_ancestors(O)( #+name: abs_top_init_struct #+BEGIN_SRC d -auto obj_dom_set_markup_tags(O)( +pure auto obj_dom_set_markup_tags(O)( O obj, int[] dom, int lev @@ -340,7 +340,7 @@ auto obj_dom_set_markup_tags(O)( #+name: abs_top_init_struct #+BEGIN_SRC d -auto obj_dom_set_collapsed_tags(O)( +pure auto obj_dom_set_collapsed_tags(O)( O obj, int[] dom, int lev @@ -4398,7 +4398,7 @@ auto table_substantive_munge_special(O,T)( #+name: meta_emitters_ocn #+BEGIN_SRC d -struct OCNemitter { +pure struct OCNemitter { int obj_cite_number, obj_cite_number_; int ocn_emitter(int ocn_status_flag) in { assert(ocn_status_flag <= 3); } @@ -6668,7 +6668,7 @@ struct NodeStructureMetadata { #+name: abs_functions_assertions #+BEGIN_SRC d -auto assertions_doc_structure(O,Lv)( +pure void assertions_doc_structure(O,Lv)( O an_object, Lv lv ) { @@ -6853,7 +6853,7 @@ auto assertions_doc_structure(O,Lv)( #+name: abs_functions_assertions #+BEGIN_SRC d -auto assertions_flag_types_block_status_none_or_closed(T)(T type) { +pure void assertions_flag_types_block_status_none_or_closed(T)(T type) { debug(asserts) { static assert(is(typeof(type) == int[string])); } diff --git a/src/sdp/meta/metadoc_from_src.d b/src/sdp/meta/metadoc_from_src.d index 8e9a8e4..0484cae 100644 --- a/src/sdp/meta/metadoc_from_src.d +++ b/src/sdp/meta/metadoc_from_src.d @@ -74,7 +74,7 @@ template SiSUdocAbstraction() { int[] dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; int[] dom_collapsed_buffer = [ 0, 0, 0, 0, 0, 0, 0, 0, 0,]; enum DomTags { none, open, close, close_and_open, open_still, } - auto obj_heading_ancestors(O)( + pure auto obj_heading_ancestors(O)( O obj, string[] lv_ancestors_txt, ) { @@ -127,7 +127,7 @@ template SiSUdocAbstraction() { } return obj; } - auto obj_dom_set_markup_tags(O)( + pure auto obj_dom_set_markup_tags(O)( O obj, int[] dom, int lev @@ -171,7 +171,7 @@ template SiSUdocAbstraction() { obj.dom_markedup = dom.dup; return obj; } - auto obj_dom_set_collapsed_tags(O)( + pure auto obj_dom_set_collapsed_tags(O)( O obj, int[] dom, int lev @@ -3489,7 +3489,7 @@ template SiSUdocAbstraction() { } /+ abstraction functions ↑ +/ /+ ↓ abstraction function emitters +/ - struct OCNemitter { + pure struct OCNemitter { int obj_cite_number, obj_cite_number_; int ocn_emitter(int ocn_status_flag) in { assert(ocn_status_flag <= 3); } @@ -5366,7 +5366,7 @@ template SiSUdocAbstraction() { } /+ abstraction functions emitters ↑ +/ /+ ↓ abstraction functions assertions +/ - auto assertions_doc_structure(O,Lv)( + pure void assertions_doc_structure(O,Lv)( O an_object, Lv lv ) { @@ -5545,7 +5545,7 @@ template SiSUdocAbstraction() { break; } } - auto assertions_flag_types_block_status_none_or_closed(T)(T type) { + pure void assertions_flag_types_block_status_none_or_closed(T)(T type) { debug(asserts) { static assert(is(typeof(type) == int[string])); } -- cgit v1.2.3