File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,12 @@ class scope_treet
165
165
// / Walks the current node down to its child.
166
166
void descend_tree ();
167
167
168
+ // / Output scope tree to \p os in dot format.
169
+ void output_dot (std::ostream &os) const
170
+ {
171
+ scope_graph.output_dot (os);
172
+ }
173
+
168
174
private:
169
175
class scope_nodet : public graph_nodet <empty_edget>
170
176
{
@@ -177,6 +183,15 @@ class scope_treet
177
183
178
184
std::optional<codet> destructor_value;
179
185
std::optional<declaration_statet> declaration;
186
+
187
+ std::string dot_attributes (const node_indext &n) const override
188
+ {
189
+ if (!declaration.has_value ())
190
+ return " " ;
191
+
192
+ return id2string (
193
+ declaration->instruction ->decl_symbol ().get_identifier ());
194
+ }
180
195
};
181
196
182
197
grapht<scope_nodet> scope_graph;
You can’t perform that action at this time.
0 commit comments