Start adding code generation
This commit is contained in:
@@ -27,3 +27,18 @@ function get_exit_node(graph::DAG)
|
||||
end
|
||||
@assert false "The given graph has no exit node! It is either empty or not acyclic!"
|
||||
end
|
||||
|
||||
"""
|
||||
get_entry_nodes(graph::DAG)
|
||||
|
||||
Return a vector of the graph's entry nodes.
|
||||
"""
|
||||
function get_entry_nodes(graph::DAG)
|
||||
result = Vector{Node}()
|
||||
for node in graph.nodes
|
||||
if (is_entry_node(node))
|
||||
push!(result, node)
|
||||
end
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
Reference in New Issue
Block a user