This change adds a --dot option to the eval command, which will simply output the MuGL graph using the DOT language. This allows you to use tools like Graphviz to inspect the resulting graph, including using the `dot` command to generate images (like PNGs and whatnot). For example, the simple MuGL program: class C extends mu.Resource {...} class B extends mu.Resource {...} class A extends mu.Resource { private b: B; private c: C; constructor() { this.b = new B(); this.c = new C(); } } let a = new A(); Results in the following DOT file, from `mu eval --dot`: strict digraph { Resource0 [label="A"]; Resource0 -> {Resource1 Resource2} Resource1 [label="B"]; Resource2 [label="C"]; } Eventually the auto-generated ResourceN identifiers will go away in favor of using true object monikers (marapongo/mu#76). |
||
---|---|---|
.. | ||
rt | ||
alloc.go | ||
eval.go | ||
scope.go | ||
unwind.go |