summaryrefslogtreecommitdiffstats
path: root/src/poem/elements/verse
diff options
context:
space:
mode:
authorRory Dudley2024-06-30 20:09:26 -0600
committerRory Dudley2024-06-30 20:09:26 -0600
commitb8338719e2cc2138bc67c10ad56fb707f5e3b546 (patch)
treec27c2dc3a6dc7491da94e47eaad4530e855d17f1 /src/poem/elements/verse
parente23e4a036008a6f3a3356d48434615a05dcc17e0 (diff)
downloaddwarvish-b8338719e2cc2138bc67c10ad56fb707f5e3b546.tar.gz
Add/update doc comments
This patch update a ton of the documentation comments throughout the codebase, refactoring some areas, and adding new comments to others.
Diffstat (limited to 'src/poem/elements/verse')
-rw-r--r--src/poem/elements/verse/logic.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/poem/elements/verse/logic.rs b/src/poem/elements/verse/logic.rs
index f5efdee..e7ed4df 100644
--- a/src/poem/elements/verse/logic.rs
+++ b/src/poem/elements/verse/logic.rs
@@ -1,3 +1,17 @@
+/// Spawn a program
+///
+/// This macro provides a common interface for running system programs,
+/// as well as built-in shell commands. This is possible, since the
+/// shell's homebrew facilities for running built-ins mimic the
+/// interface of [std::process::Command]. See
+/// [crate::poem::anthology::Anthology] for the implementation details.
+///
+/// First, the macro sets the arguments for the command. Next, it
+/// determines the whether or not text should be piped in/out of the
+/// command. The process is spawned, then it determines what to do based
+/// on the [crate::poem::elements::verse::Verse]'s meter (wait, fork to
+/// background, or capture STDOUT). Finally, the macro performs any IO
+/// functions (i.e. writing/appending STDOUT or STDERR to a file).
#[macro_export]
macro_rules! incant {
($verb:expr, $command:expr, $out:expr, $pids:expr, $env:expr, $self:expr) => {{