From f51acef40e8297d7bd41b774413aa8331ca946ed Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 15 Mar 2025 14:22:11 -0400 Subject: Overhaul of Path so it uses root and array of components instead of stringly typed --- examples/tomodeps/tomodeps.tm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/tomodeps') diff --git a/examples/tomodeps/tomodeps.tm b/examples/tomodeps/tomodeps.tm index 93e3eb42..279e5051 100644 --- a/examples/tomodeps/tomodeps.tm +++ b/examples/tomodeps/tomodeps.tm @@ -36,7 +36,7 @@ func _build_dependency_graph(dep:Dependency, dependencies:@{Dependency,{Dependen dir := (~/.local/share/tomo/installed/$module) module_deps := @{:Dependency} visited := @{:Path} - unvisited := @{f:resolved() for f in dir:files() if f:ends_with(".tm")} + unvisited := @{f:resolved() for f in dir:files() if f:extension() == ".tm"} while unvisited.length > 0: file := unvisited.items[-1] unvisited:remove(file) @@ -66,9 +66,9 @@ func _printable_name(dep:Dependency -> Text): is File(f): f = f:relative() if f:exists(): - return "$(f.text)" + return Text(f) else: - return "$(\x1b)[31;1m$(f.text) (not found)$(\x1b)[m" + return "$(\x1b)[31;1m$(f) (not found)$(\x1b)[m" func _draw_tree(dep:Dependency, dependencies:{Dependency,{Dependency}}, already_printed:@{Dependency}, prefix="", is_last=yes): if already_printed:has(dep): -- cgit v1.2.3