diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2024-03-12 22:39:09 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2024-03-12 22:56:34 -0400 |
commit | e9e17be24eba558c30fcdc41ea5bb9a1da7fd4e7 (patch) | |
tree | 1ed3c4b528b0a8e54d0eb9babc391e562578c7b4 /org/default_misc.org | |
parent | nix flake & env upkeep (diff) |
mark modules as @safe: (& identify what is not)
Diffstat (limited to 'org/default_misc.org')
-rw-r--r-- | org/default_misc.org | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/org/default_misc.org b/org/default_misc.org index fd5681f..22a9781 100644 --- a/org/default_misc.org +++ b/org/default_misc.org @@ -29,6 +29,7 @@ default settings +/ module doc_reform.meta.defaults; +@safe: <<meta_defaults_template_node>> <<meta_defaults_template_curate_metadata>> <<meta_defaults_template_biblio>> @@ -42,7 +43,7 @@ module doc_reform.meta.defaults; #+NAME: meta_defaults_template_node #+BEGIN_SRC d template spineNode() { - @safe static string[string] node_metadata_heading_str() { + static string[string] node_metadata_heading_str() { string[string] _node = [ "is" : "", "ocn" : "", @@ -53,7 +54,7 @@ template spineNode() { ]; return _node; } - @safe static int[string] node_metadata_heading_int() { + static int[string] node_metadata_heading_int() { int[string] _node = [ "ocn" : 0, // decide whether to use or keep? "ptr_doc_object" : 0, @@ -66,7 +67,7 @@ template spineNode() { ]; return _node; } - @safe static string[string] node_metadata_para_str() { + static string[string] node_metadata_para_str() { string[string] _node = [ "is" : "", "ocn" : "", @@ -74,7 +75,7 @@ template spineNode() { ]; return _node; } - @safe static int[string] node_metadata_para_int() { + static int[string] node_metadata_para_int() { int[string] _node = [ "ocn" : 0, "indent_base" : 0, @@ -91,7 +92,7 @@ template spineNode() { #+NAME: meta_defaults_template_curate_metadata #+BEGIN_SRC d template spineCurateMetadata() { - @safe auto spineCurateMetadata() { + auto spineCurateMetadata() { struct _Curate { struct Curate { string title = ""; @@ -131,7 +132,7 @@ template spineCurateMetadata() { template spineBiblio() { // required: deemed_author (author || editor); year; fulltitle; struct BibJsnStr { - @safe static auto biblio_entry_tags_jsonstr() { + static auto biblio_entry_tags_jsonstr() { string x = `{ "is" : "", "sortby_deemed_author_year_title" : "", @@ -179,6 +180,7 @@ template spineBiblio() { default settings +/ module doc_reform.io_out.defaults; +@safe: <<defaults_template_init_flags>> <<defaults_template_markup>> <<defaults_template_language_codes>> @@ -273,7 +275,7 @@ template InternalMarkup() { template spineLanguageCodes() { /+ language codes +/ struct Lang { - @safe static string[string][string] codes() { + static string[string][string] codes() { auto _lang_codes = [ "am": [ "c": "am", "n": "Amharic", "t": "Amharic", "xlp": "amharic" ], "bg": [ "c": "bg", "n": "Bulgarian", "t": "Български (Bəlgarski)", "xlp": "bulgarian" ], @@ -340,15 +342,15 @@ template spineLanguageCodes() { ]; return _lang_codes; } - @safe static string[] code_arr_ptr() { + static string[] code_arr_ptr() { string[] _lang_codes = ["am", "bg", "bn", "br", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fi", "fr", "ga", "gl", "he", "hi", "hr", "hy", "ia", "is", "it", "ja", "ko", "la", "lo", "lt", "lv", "ml", "mr", "nl", "no", "nn", "oc", "pl", "pt", "pt_BR", "ro", "ru", "sa", "se", "sk", "sl", "sq", "sr", "sv", "ta", "te", "th", "tk", "tr", "uk", "ur", "us", "vi", "zh", "en", "xx",]; return _lang_codes; } - @safe static string[] code_arr() { + static string[] code_arr() { string[] _lang_codes = ["am", "bg", "bn", "br", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fi", "fr", "ga", "gl", "he", "hi", "hr", "hy", "ia", "is", "it", "ja", "ko", "la", "lo", "lt", "lv", "ml", "mr", "nl", "no", "nn", "oc", "pl", "pt", "pt_BR", "ro", "ru", "sa", "se", "sk", "sl", "sq", "sr", "sv", "ta", "te", "th", "tk", "tr", "uk", "ur", "vi", "zh"]; return _lang_codes; } - @safe static auto codes_() { + static auto codes_() { return "(" ~ join(code_arr,"|") ~ ")"; } static auto codes_regex() { |