From 37e96dbda5ee7b599c3659008c94907fdc8425a2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 1 Mar 2025 16:53:58 -0500 Subject: Change `lang.text_content` to `lang.text` --- examples/base64/base64.tm | 4 ++-- examples/ini/ini.tm | 2 +- examples/tomodeps/tomodeps.tm | 4 ++-- examples/wrap/wrap.tm | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/base64/base64.tm b/examples/base64/base64.tm index 6979b157..4e4cc8b1 100644 --- a/examples/base64/base64.tm +++ b/examples/base64/base64.tm @@ -65,7 +65,7 @@ lang Base64: return Text.from_bytes(b64:decode_bytes() or return none) func decode_bytes(b64:Base64 -> [Byte]?): - bytes := b64.text_content:bytes() + bytes := b64.text:bytes() output := &[Byte(0) for _ in bytes.length/4 * 3] src := Int64(1) dest := Int64(1) @@ -94,4 +94,4 @@ func main(input=(/dev/stdin), decode=no): say(b:decode_text()!) else: text := input:read()! - say(Base64.parse(text)!.text_content) + say(Base64.parse(text)!.text) diff --git a/examples/ini/ini.tm b/examples/ini/ini.tm index 46c25860..9b27e8cb 100644 --- a/examples/ini/ini.tm +++ b/examples/ini/ini.tm @@ -7,7 +7,7 @@ _HELP := " " func parse_ini(path:Path -> {Text,{Text,Text}}): - text := path:read() or exit("Could not read INI file: $\[31;1]$(path.text_content)$\[]") + text := path:read() or exit("Could not read INI file: $\[31;1]$(path.text)$\[]") sections := @{:Text,@{Text,Text}} current_section := @{:Text,Text} diff --git a/examples/tomodeps/tomodeps.tm b/examples/tomodeps/tomodeps.tm index 3ff48f98..48c026e9 100644 --- a/examples/tomodeps/tomodeps.tm +++ b/examples/tomodeps/tomodeps.tm @@ -66,9 +66,9 @@ func _printable_name(dep:Dependency -> Text): is File(f): f = f:relative() if f:exists(): - return "$(f.text_content)" + return "$(f.text)" else: - return "$(\x1b)[31;1m$(f.text_content) (not found)$(\x1b)[m" + return "$(\x1b)[31;1m$(f.text) (not found)$(\x1b)[m" func _draw_tree(dep:Dependency, dependencies:{Dependency,{Dependency}}, already_printed:@{Dependency}, prefix="", is_last=yes): if already_printed:has(dep): diff --git a/examples/wrap/wrap.tm b/examples/wrap/wrap.tm index b6cf1403..94d752bd 100644 --- a/examples/wrap/wrap.tm +++ b/examples/wrap/wrap.tm @@ -82,7 +82,7 @@ func main(files:[Path], width=80, inplace=no, min_split=3, rewrap=yes, hyphen=UN files = [(/dev/stdin)] for file in files: - text := file:read() or exit("Could not read file: $(file.text_content)") + text := file:read() or exit("Could not read file: $(file.text)") if rewrap: text = unwrap(text) -- cgit v1.2.3