diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-15 14:22:11 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-15 14:22:11 -0400 |
| commit | f51acef40e8297d7bd41b774413aa8331ca946ed (patch) | |
| tree | 56aa02541d60beb3ece496fed2c11afd3ae942f3 /examples/tomodeps | |
| parent | 7a2653501310825e02d99d51fb4b9f1aacc75214 (diff) | |
Overhaul of Path so it uses root and array of components instead of
stringly typed
Diffstat (limited to 'examples/tomodeps')
| -rw-r--r-- | examples/tomodeps/tomodeps.tm | 6 |
1 files changed, 3 insertions, 3 deletions
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): |
