diff options
Diffstat (limited to 'src/sdp/ao_conf_make_meta_native.d')
-rw-r--r-- | src/sdp/ao_conf_make_meta_native.d | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/sdp/ao_conf_make_meta_native.d b/src/sdp/ao_conf_make_meta_native.d index 0fdee40..afcd14e 100644 --- a/src/sdp/ao_conf_make_meta_native.d +++ b/src/sdp/ao_conf_make_meta_native.d @@ -187,15 +187,6 @@ template SiSUheaderExtractNative() { case "links": destroy(hm); destroy(hs); - // if (match(hs, rgx.native_subhead_links)) { - // if (dochead_meta[hm][hs]) { - // dochead_meta[hm][hs] = to!string(s.captures[2]); - // } - // } else { - // writeln("not a valid header type:", hm, ":", hs); - // destroy(hm); - // destroy(hs); - // } break; default: break; @@ -224,7 +215,7 @@ template SiSUheaderExtractNative() { type["header_make"] = State.on; type["header_meta"] = State.off; ++line_occur["header_make"]; - an_object["obj"] ~= line ~= "\n"; + an_object["nugget"] ~= line ~= "\n"; } else if (matchFirst(line, rgx.native_header)) { /+ matched header_metadata +/ /+ (generic header match and not previously caught by header_make) +/ debug(header1) { /+ writeln(line); +/ } @@ -232,20 +223,20 @@ template SiSUheaderExtractNative() { type["header_make"] = State.off; type["header_meta"] = State.on; ++line_occur["header_meta"]; - an_object["obj"] ~= line ~= "\n"; + an_object["nugget"] ~= line ~= "\n"; } else if (type["header_make"] == State.on && (line_occur["header_make"] > State.off)) { /+ header_make flag set +/ if (matchFirst(line, rgx.native_header_sub)) { /+ sub-header +/ debug(header1) { /+ writeln(line); +/ } ++line_occur["header_make"]; - an_object["obj"] ~= line ~= "\n"; + an_object["nugget"] ~= line ~= "\n"; } } else if (type["header_meta"] == State.on && (line_occur["header_meta"] > State.off)) { /+ header_metadata flag set +/ if (matchFirst(line, rgx.native_header_sub)) { /+ sub-header +/ debug(header1) { /+ writeln(line); +/ } ++line_occur["header_meta"]; - an_object["obj"] ~= line ~= "\n"; + an_object["nugget"] ~= line ~= "\n"; } } return an_object; @@ -255,13 +246,10 @@ template SiSUheaderExtractNative() { ref string[string] an_object, ref int[string] type ) { - // line_occur["header"] = State.off; line_occur["header_make"] = State.off; line_occur["header_meta"] = State.off; type["header"] = State.off; - // type["header_make"] = State.off; - // type["header_meta"] = State.off; - an_object.remove("obj"); + an_object.remove("nugget"); an_object.remove("is"); an_object.remove("attrib"); } @@ -283,11 +271,8 @@ template SiSUheaderExtractNative() { if (auto m = matchFirst(header_line, rgx.comment)) { /+ matched comment +/ debug(comment) { - // tell_l("blue", header_line); } header_reset_states_common(line_occur, an_object, type); - // type["header_make"] = State.off; - // type["header_meta"] = State.off; } else if ((matchFirst(header_line, rgx.native_header)) || (type["header_make"] == State.on && (line_occur["header_make"] > State.off)) @@ -296,7 +281,7 @@ template SiSUheaderExtractNative() { if (header_line.length == 0) { /+ header_make instructions (current line empty) +/ auto dochead_metadata_and_make = - set_header.header_metadata_and_make_aa(strip(an_object["obj"]), dochead_meta, dochead_make); + set_header.header_metadata_and_make_aa(strip(an_object["nugget"]), dochead_meta, dochead_make); static assert(!isTypeTuple!(dochead_metadata_and_make)); dochead_meta = dochead_metadata_and_make[0]; dochead_make = dochead_metadata_and_make[1]; @@ -309,8 +294,6 @@ template SiSUheaderExtractNative() { } else { an_object = native_header_extract(header_line, line_occur, an_object, type); } - } else { - // writeln(__LINE__); } } auto t = tuple( |