lang: interfaces, ast: Add debug methods for graphing scope
This can occasionally help in our debugging of the scope graph. Co-authored-by: Samuel Gélineau <gelisam@gmail.com>
This commit is contained in:
@@ -187,3 +187,8 @@ func (obj *ExprAny) Value() (types.Value, error) {
|
||||
}
|
||||
return obj.V, nil
|
||||
}
|
||||
|
||||
// ScopeGraph adds nodes and vertices to the supplied graph.
|
||||
func (obj *ExprAny) ScopeGraph(g *pgraph.Graph) {
|
||||
g.AddVertex(obj)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user