1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// SPDX-FileCopyrightText: Copyright 2026 olav@occy.org
// SPDX-License-Identifier: MPL-2.0
//! Pipa is a tiny, pipe-y template language,
//! made for the wonderfully whimsical world of humans-typing-text.
//! Almost everything is optional and almost nothing is type-safe.
//! It's do-what-i-mean all-the-way-down, at least in theory.
//!
//! For now, you'll find very few docs beyond this point.
//! Many items of questionable general utility are simply hidden.
//! Still more a ballpit of curios than, you know, serious software.
//! However, let me know if you find anything useful that should be exposed or explained.
//! It's mostly just a time thing.
//!
//! ```
//! // Values can be Bytes, Lists, or Maps.
//! // List and Map punctuation is optional.
//!
//! {set my-bytes "beep"}
//! {set my-list [1 2 3]}
//! {set my-map {a 4 b 5}}
//! {set my-stuff [{ x: ['y', 10] }]}
//!
//! // No true/false/nil, just empty-or-not.
//! // Use "&&" and "||" and ";" to stop-or-go.
//!
//! {"" && "hello?"} // => ""
//! {[] || "list is empty"} // => "list is empty"
//! {{} && "ternary" || "goodness"} // => "goodness"
//!
//! // Pipes insert their input at the end.
//! // Use _ to insert the input somewhere else.
//! // Concats by default, and <tags> are bytes.
//!
//! {capitalize my-bytes} // => "Beep"
//! {my-bytes | capitalize} // => "Beep"
//! {my-map | first | add _ _} // => 8
//! {my-list | map :(add 1)} // => [2 3 4]
//! {1 2 3 | <i>_</i>} // => "<i>123</i>"
//! ```
pub
/// Evaluate templates, expressions, and keychains.
pub
/// The core value type and its supporting cast.