summaryrefslogtreecommitdiff
path: root/software/literary/data.html
diff options
context:
space:
mode:
Diffstat (limited to 'software/literary/data.html')
-rwxr-xr-xsoftware/literary/data.html71
1 files changed, 31 insertions, 40 deletions
diff --git a/software/literary/data.html b/software/literary/data.html
index 0019f3e..66ecb30 100755
--- a/software/literary/data.html
+++ b/software/literary/data.html
@@ -9,51 +9,42 @@
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link rel="manifest" href="/favicon/site.webmanifest">
-<script src="/js/bg.js"></script>
-<title></title>
-<meta name="description" content="" />
-<meta http-equiv="last-modified" content="" />
+<title>data.lp &mdash; DistressNetwork°</title>
+<meta http-equiv="last-modified" content="2022-04-01 10:35:03-04:00" />
+<style>h3,.lp-ref {font-family: neue-haas-grotesk-text, var(--fs-sans); font-size: 1rem; font-weight: normal; font-style: italic;} h3 {margin: 1rem;}</style>
</head>
<body>
-<header>
-<div class="bomber"></div>
-<hr>
-<div class="identcontainer">
-<div class="ident"><time datetime=""></time>––––<a href="https://distress.network">DistressNetwork°</a></div>
-<img class="headerlogo" src="/media/distressnetwork-b.svg" alt="">
-</div>
-</header>
<div class="contentlevel">
<main>
-<div class="leading"></div>
+<div class="leading">data.lp</div>
<hr>
<p>This file contains the various data processing-related constants and functions referenced by the tangling and weaving processes.</p>
<h3 id="section">*:</h3>
-<pre><code>@= Imports =@
+<pre><code><span class="lp-ref">(Imports)</span>
-@= Processing limits =@
+<span class="lp-ref">(Processing limits)</span>
-@= Formatting keywords =@
+<span class="lp-ref">(Formatting keywords)</span>
-@= Configuration keywords =@
+<span class="lp-ref">(Configuration keywords)</span>
-@= Data structure types =@
+<span class="lp-ref">(Data structure types)</span>
-@= Error set =@
+<span class="lp-ref">(Error set)</span>
-@= Line splitting function =@
+<span class="lp-ref">(Line splitting function)</span>
-@= Configuration searching function =@
+<span class="lp-ref">(Configuration searching function)</span>
-@= Section searching function =@
+<span class="lp-ref">(Section searching function)</span>
-@= Parsing functions =@
+<span class="lp-ref">(Parsing functions)</span>
-@= Code generation functions =@
+<span class="lp-ref">(Code generation functions)</span>
-@= Text generation function =@
+<span class="lp-ref">(Text generation function)</span>
</code></pre>
<h2 id="constants">Constants</h2>
@@ -173,7 +164,7 @@ pub const LineRange = struct {
var buffer = std.ArrayList([]const u8).init(alloc);
defer buffer.deinit();
- @= Split file at each newline =@
+ <span class="lp-ref">(Split file at each newline)</span>
return buffer.toOwnedSlice();
}
@@ -212,7 +203,7 @@ while (iterator.next()) |line| {
return error.NotFound;
}
-@= Auxiliary formatting function =@
+<span class="lp-ref">(Auxiliary formatting function)</span>
</code></pre>
<p>If the declaration is found, its contained format string is split along instances of the section name escape sequence, and each substring has its instances of the newline escape sequence replaced with a literal newline.</p>
@@ -256,7 +247,7 @@ while (iterator.next()) |line| {
var sections = std.ArrayList(Section).init(alloc);
defer sections.deinit();
- @= Main parsing routine =@
+ <span class="lp-ref">(Main parsing routine)</span>
return sections.toOwnedSlice();
}
@@ -265,7 +256,7 @@ fn parse_code(lines: [][]const u8, index: u32, alloc: Allocator) !CodeReturn {
var content = std.ArrayList(Content).init(alloc);
defer content.deinit();
- @= Code parsing subroutine =@
+ <span class="lp-ref">(Code parsing subroutine)</span>
return CodeReturn{ .content = content.toOwnedSlice(), .index = i + 1 };
}
@@ -289,9 +280,9 @@ fn parse_code(lines: [][]const u8, index: u32, alloc: Allocator) !CodeReturn {
while (i &#60; lines.len) {
const line = lines[i];
if (std.mem.startsWith(u8, line, k_start)) {
- @= Add new section =@
+ <span class="lp-ref">(Add new section)</span>
} else if (std.mem.startsWith(u8, line, k_add)) {
- @= Append to section =@
+ <span class="lp-ref">(Append to section)</span>
} else if (std.mem.eql(u8, line, k_end)) {
log(.err, "line {d}: unexpected section end", .{i + 1});
return error.UnexpectedEnd;
@@ -343,11 +334,11 @@ while (i &#60; lines.len) {
log(.err, "line {d}: unexpected section start", .{i + 1});
return error.UnexpectedStart;
} else if (std.mem.startsWith(u8, std.mem.trimLeft(u8, line, " \t"), k_ref)) {
- @= Add reference =@
+ <span class="lp-ref">(Add reference)</span>
} else if (std.mem.eql(u8, line, k_end)) {
break;
} else {
- @= Add literal range =@
+ <span class="lp-ref">(Add literal range)</span>
}
}
</code></pre>
@@ -402,10 +393,10 @@ fn codegen_main(lines: [][]const u8, list: []Section, index: usize, depth: u8, a
log(.debug, "generating section '{s}'", .{section.name});
for (section.content) |content| switch (content) {
.literal =&#62; |range| {
- @= Append literal range =@
+ <span class="lp-ref">(Append literal range)</span>
},
.reference =&#62; |name| {
- @= Resolve reference =@
+ <span class="lp-ref">(Resolve reference)</span>
},
};
@@ -445,7 +436,7 @@ try buffer.appendSlice(code);
var buffer = std.ArrayList([]const u8).init(alloc);
defer buffer.deinit();
- @= Process configuration declarations =@
+ <span class="lp-ref">(Process configuration declarations)</span>
var current_name: []const u8 = undefined;
for (lines) |line| {
@@ -455,13 +446,13 @@ try buffer.appendSlice(code);
or std.mem.startsWith(u8, line, kc_ref)) {
continue;
} else if (std.mem.startsWith(u8, line, k_start)) {
- @= Format starting command =@
+ <span class="lp-ref">(Format starting command)</span>
} else if (std.mem.startsWith(u8, line, k_add)) {
- @= Format appending command =@
+ <span class="lp-ref">(Format appending command)</span>
} else if (std.mem.startsWith(u8, line, k_end)) {
- @= Format ending command =@
+ <span class="lp-ref">(Format ending command)</span>
} else if (std.mem.startsWith(u8, std.mem.trimLeft(u8, line, " \t"), k_ref)) {
- @= Format reference command =@
+ <span class="lp-ref">(Format reference command)</span>
} else {
try buffer.append(line);
}