summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreudoxia <uplink@distress.network>2022-05-02 12:23:42 -0400
committereudoxia <uplink@distress.network>2022-05-02 12:23:42 -0400
commit3fa27d49be472c28d0c4eaed776804e39c7f8bee (patch)
treee19bbb83e62a400dee1672df1c5195bf7c116ff1
parent1785c8cc4eb8a60c530a551471f1d5ddf0538e1a (diff)
section searching iterates forwards
-rw-r--r--data.lp1
-rwxr-xr-xdoc/data.html1
-rw-r--r--doc/freestanding/data.html1
-rwxr-xr-xdoc/usage.md3
-rw-r--r--src/data.zig1
5 files changed, 1 insertions, 6 deletions
diff --git a/data.lp b/data.lp
index 8b362ae..a65daf6 100644
--- a/data.lp
+++ b/data.lp
@@ -202,7 +202,6 @@ fn search(list: []Section, name: []const u8) !usize {
log(.err, "section '{s}' not found", .{name});
return error.NotFound;
}
-// TODO return last match instead?
@.
## Parsing
diff --git a/doc/data.html b/doc/data.html
index 3453250..9fddef4 100755
--- a/doc/data.html
+++ b/doc/data.html
@@ -243,7 +243,6 @@ while (iterator.next()) |line| {
log(.err, "section '{s}' not found", .{name});
return error.NotFound;
}
-// TODO return last match instead?
</code></pre>
<h2 id="parsing">Parsing</h2>
diff --git a/doc/freestanding/data.html b/doc/freestanding/data.html
index 63946cb..05bc7cf 100644
--- a/doc/freestanding/data.html
+++ b/doc/freestanding/data.html
@@ -255,7 +255,6 @@ while (iterator.next()) |line| {
log(.err, "section &#39;{s}&#39; not found", .{name});
return error.NotFound;
}
-&#47;&#47; TODO return last match instead?
</code></pre>
<h2 id="parsing">Parsing</h2>
diff --git a/doc/usage.md b/doc/usage.md
index 3a5bd0d..0cc9632 100755
--- a/doc/usage.md
+++ b/doc/usage.md
@@ -8,7 +8,7 @@ This tool consists of two programs, `tangle` and `weave`, both of which accept a
## Usage
-These programs are intended to be intermediary text processing functions, used as components within build automation routines or shell scripts. The build processes for this tool itself, `build.sh` and `gen_freestanding.sh`, serve as example use cases.
+These programs are intended to be intermediary text processing functions, used as components within build automation routines or shell scripts. The build processes for this tool itself, `build.sh` and `gen-freestanding.sh`, serve as example use cases.
# Dependencies
@@ -94,4 +94,3 @@ The source code of this tool is rendered as a set of literate program documents,
# Future Work
- The treatment of whitespace within formatting and configuration commands is currently rather strict, as no trimming of leading or trailing whitespace around the command contents is applied. This may be changed for the sake of convenience, at the expense of added parsing complexity.
-- In a document with duplicate section names, references to such sections are resolved to the section with that name which appears first within the document. It may be more useful to have these resolve to the matching section which appears last in the document instead, which would permit some amount of name reuse.
diff --git a/src/data.zig b/src/data.zig
index b1a342c..0340a82 100644
--- a/src/data.zig
+++ b/src/data.zig
@@ -89,7 +89,6 @@ fn search(list: []Section, name: []const u8) !usize {
log(.err, "section '{s}' not found", .{name});
return error.NotFound;
}
-// TODO return last match instead?
const CommandType = enum { start, add, end, ref, none };