aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/ao_read_source_files.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdp/ao_read_source_files.d')
-rw-r--r--src/sdp/ao_read_source_files.d57
1 files changed, 2 insertions, 55 deletions
diff --git a/src/sdp/ao_read_source_files.d b/src/sdp/ao_read_source_files.d
index ef9b8b4..4d766b2 100644
--- a/src/sdp/ao_read_source_files.d
+++ b/src/sdp/ao_read_source_files.d
@@ -36,59 +36,6 @@ template SiSUmarkupRaw() {
}
}
private
- struct HeaderExtractSDL {
- final private auto headerMakeSDLang(in string src_header) {
- scope(failure) {
- stderr.writefln(
- "%s\n%s\n%s:%s failed here:\n src_header: %s",
- __MODULE__, __FUNCTION__,
- __FILE__, __LINE__,
- src_header,
- );
- }
- Tag sdl_root_header;
- try {
- sdl_root_header = parseSource(src_header);
- }
- catch(SDLangParseException e) {
- stderr.writeln("SDLang problem with this document header:");
- stderr.writeln(src_header);
- // Error messages of the form:
- // myFile.sdl(5:28): Error: Invalid integer suffix.
- stderr.writeln(e.msg);
- }
- debug(sdlang) {
- // // Value is a std.variant.Algebraic
- // Value output_dir_structure_by = sdl_root_header.tags["output_dir_structure_by"][0].values[0];
- // assert(output_dir_structure_by.type == typeid(string));
- // writeln(output_dir_structure_by);
-
- // Tag person = sdl_root_header.namespaces["myNamespace"].tags["person"][0];
- // writeln("Name: ", person.attributes["name"][0].value);
- //
- // int age = person.tags["age"][0].values[0].get!int();
- // writeln("Age: ", age);
-
- writeln("header SDL:");
- writeln(sdl_root_header.toSDLDocument());
- }
- return sdl_root_header;
- }
- private auto headerSDLang(in char[] src_header) {
- char[][] source_header_arr =
- split(cast(char[]) src_header, rgx.line_delimiter);
- char[] header_clean;
- foreach(header_line; source_header_arr) {
- if (!match(header_line, rgx.comments)) {
- header_clean ~= header_line ~ "\n";
- // writeln(header_line);
- }
- }
- // writeln(header_clean); // consider
- auto header_sdlang=headerMakeSDLang(to!string(header_clean));
- return header_sdlang;
- }
- }
struct MarkupRawUnit {
private import std.file;
// enum State { off, on }
@@ -205,14 +152,14 @@ template SiSUmarkupRaw() {
contents_insert ~= line;
} else if (
(type1["header_make"] == 1)
- && matchFirst(line, rgx.header_sub)
+ && matchFirst(line, rgx.native_header_sub)
) {
type1["header_make"] = 1;
type1["header_meta"] = 0;
// cont_dynamic_array ~= "% " ~ line;
} else if (
(type1["header_meta"] == 1)
- && matchFirst(line, rgx.header_sub)
+ && matchFirst(line, rgx.native_header_sub)
) {
type1["header_meta"] = 1;
type1["header_make"] = 0;