aboutsummaryrefslogtreecommitdiff
path: root/examples/tomodeps/tomodeps.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-10-09 13:26:28 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-10-09 13:26:28 -0400
commit074cf22ad462eafe963e4a749b2b74cab51211a1 (patch)
treee1d7f938f2d949cc5dcf67ca648f200663e36562 /examples/tomodeps/tomodeps.tm
parent47fca946065508cff4151a32b3008c161983fd9d (diff)
Change function syntax from `func(args)->ret` to `func(args -> ret)`
Diffstat (limited to 'examples/tomodeps/tomodeps.tm')
-rw-r--r--examples/tomodeps/tomodeps.tm6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/tomodeps/tomodeps.tm b/examples/tomodeps/tomodeps.tm
index 9418ba6f..907734a0 100644
--- a/examples/tomodeps/tomodeps.tm
+++ b/examples/tomodeps/tomodeps.tm
@@ -9,7 +9,7 @@ _HELP := "
enum Dependency(File(path:Path), Module(name:Text))
-func _get_file_dependencies(file:Path)->{Dependency}:
+func _get_file_dependencies(file:Path -> {Dependency}):
if not file:is_file():
!! Could not read file: $file
return {:Dependency}
@@ -55,12 +55,12 @@ func _build_dependency_graph(dep:Dependency, dependencies:&{Dependency:{Dependen
for dep2 in dep_deps:
_build_dependency_graph(dep2, dependencies)
-func get_dependency_graph(dep:Dependency)->{Dependency:{Dependency}}:
+func get_dependency_graph(dep:Dependency -> {Dependency:{Dependency}}):
graph := {:Dependency:{Dependency}}
_build_dependency_graph(dep, &graph)
return graph
-func _printable_name(dep:Dependency)->Text:
+func _printable_name(dep:Dependency -> Text):
when dep is Module(module):
return "$(\x1b)[34;1m$module$(\x1b)[m"
is File(f):