diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-11 00:45:52 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-11 00:45:52 -0400 |
| commit | e095c7fb6429dd448c24f69a92f3cb4ebee8a8b0 (patch) | |
| tree | a77608d08fc3ac77f7d4a02ecbac510c571079d2 /examples | |
| parent | 8885d1fdcb84bb569247fd7d55d55f4695945145 (diff) | |
Add a few colorful escapes
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/colorful/colorful.tm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/colorful/colorful.tm b/examples/colorful/colorful.tm index ca34c298..bcc95eb8 100644 --- a/examples/colorful/colorful.tm +++ b/examples/colorful/colorful.tm @@ -11,6 +11,9 @@ lang Colorful: text = text:replace_all({$/@/="@(at)", $/(/="@(lparen)", $/)/="@(rparen)"}) return Colorful.without_escaping(text) + convert(i:Int -> Colorful): return Colorful.without_escaping("$i") + convert(n:Num -> Colorful): return Colorful.without_escaping("$n") + func for_terminal(c:Colorful -> Text): return CSI ++ "m" ++ _for_terminal(c, _TermState()) |
