28 lines
566 B
Julia
Raw Normal View History

"""
show(io::IO, n::Node)
Print a short string representation of the node to io.
"""
function show(io::IO, n::Node)
return print(io, "Node(", task(n), ")")
end
"""
show(io::IO, e::Edge)
Print a short string representation of the edge to io.
"""
function show(io::IO, e::Edge)
2023-08-25 10:48:22 +02:00
return print(io, "Edge(", e.edge[1], ", ", e.edge[2], ")")
end
2023-09-05 12:14:41 +02:00
"""
to_var_name(id::UUID)
Return the uuid as a string usable as a variable name in code generation.
"""
function to_var_name(id::UUID)
str = "_" * replace(string(id), "-" => "_")
return str
2023-09-05 12:14:41 +02:00
end