From 0245c394af1a4a1400f87916bd10c398005f40da Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 14 Jun 2016 22:52:15 -0400 Subject: step4 some additional work --- src/sdp/ao_read_source_files.d | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/sdp/ao_read_source_files.d') diff --git a/src/sdp/ao_read_source_files.d b/src/sdp/ao_read_source_files.d index a5ca084..9bfaa05 100644 --- a/src/sdp/ao_read_source_files.d +++ b/src/sdp/ao_read_source_files.d @@ -103,11 +103,11 @@ template SiSUmarkupRaw() { if (type1["curly_code"] == 1) { type1["header_make"] = 0; type1["header_metadata"] = 0; - if (auto m = match(line, rgx.block_curly_code_close)) { + if (matchFirst(line, rgx.block_curly_code_close)) { type1["curly_code"] = 0; } contents_insert ~= line; - } else if (auto m = match(line, rgx.block_curly_code_open)) { + } else if (matchFirst(line, rgx.block_curly_code_open)) { type1["curly_code"] = 1; type1["header_make"] = 0; type1["header_metadata"] = 0; @@ -115,25 +115,25 @@ template SiSUmarkupRaw() { } else if (type1["tic_code"] == 1) { type1["header_make"] = 0; type1["header_metadata"] = 0; - if (auto m = match(line, rgx.block_tic_close)) { + if (matchFirst(line, rgx.block_tic_close)) { type1["tic_code"] = 0; } contents_insert ~= line; - } else if (auto m = match(line, rgx.block_tic_code_open)) { + } else if (matchFirst(line, rgx.block_tic_code_open)) { type1["tic_code"] = 1; type1["header_make"] = 0; type1["header_metadata"] = 0; contents_insert ~= line; } else if ( (type1["header_make"] == 1) - && match(line, rgx.header_sub) + && matchFirst(line, rgx.header_sub) ) { type1["header_make"] = 1; type1["header_metadata"] = 0; // cont_dynamic_array ~= "% " ~ line; } else if ( (type1["header_metadata"] == 1) - && match(line, rgx.header_sub) + && matchFirst(line, rgx.header_sub) ) { type1["header_metadata"] = 1; type1["header_make"] = 0; @@ -193,11 +193,11 @@ template SiSUmarkupRaw() { if (type["curly_code"] == 1) { type["header_make"] = 0; type["header_metadata"] = 0; - if (auto m = match(line, rgx.block_curly_code_close)) { + if (matchFirst(line, rgx.block_curly_code_close)) { type["curly_code"] = 0; } contents ~= line; - } else if (auto m = match(line, rgx.block_curly_code_open)) { + } else if (matchFirst(line, rgx.block_curly_code_open)) { type["curly_code"] = 1; type["header_make"] = 0; type["header_metadata"] = 0; @@ -205,30 +205,30 @@ template SiSUmarkupRaw() { } else if (type["tic_code"] == 1) { type["header_make"] = 0; type["header_metadata"] = 0; - if (auto m = match(line, rgx.block_tic_close)) { + if (matchFirst(line, rgx.block_tic_close)) { type["tic_code"] = 0; } contents ~= line; - } else if (auto m = match(line, rgx.block_tic_code_open)) { + } else if (matchFirst(line, rgx.block_tic_code_open)) { type["tic_code"] = 1; type["header_make"] = 0; type["header_metadata"] = 0; contents ~= line; } else if ( (type["header_make"] == 1) - && match(line, rgx.header_sub) + && matchFirst(line, rgx.header_sub) ) { contents ~= line; } else if ( (type["header_metadata"] == 1) - && match(line, rgx.header_sub) + && matchFirst(line, rgx.header_sub) ) { contents ~= line; - } else if (auto m = match(line, rgx.header_make)) { + } else if (matchFirst(line, rgx.header_make)) { type["header_make"] = 1; type["header_metadata"] = 0; contents ~= line; - } else if (auto m = match(line, rgx.header_metadata)) { + } else if (matchFirst(line, rgx.header_metadata)) { type["header_make"] = 0; type["header_metadata"] = 1; contents ~= line; -- cgit v1.2.3