OILS / _gen / core / value.asdl.cc View on Github | oilshell.org

1258 lines, 880 significant
1// _gen/core/value.asdl.cc is generated by asdl_main.py
2
3#include "_gen/core/value.asdl.h"
4#include <assert.h>
5#include "prebuilt/asdl/runtime.mycpp.h" // generated code uses wrappers here
6#include "_gen/frontend/syntax.asdl.h" // "use" in ASDL
7#include "_gen/core/runtime.asdl.h" // "use" in ASDL
8
9// Generated code uses these types
10using hnode_asdl::hnode;
11using hnode_asdl::Field;
12using hnode_asdl::color_e;
13
14
15namespace value_asdl {
16
17
18hnode_t* IntBox::PrettyTree(Dict<int, bool>* seen) {
19 seen = seen ? seen : Alloc<Dict<int, bool>>();
20 int heap_id = ObjectId(this);
21 if (dict_contains(seen, heap_id)) {
22 return Alloc<hnode::AlreadySeen>(heap_id);
23 }
24 seen->set(heap_id, true);
25 hnode::Record* out_node = runtime::NewRecord(StrFromC("IntBox"));
26 List<Field*>* L = out_node->fields;
27
28 hnode_t* x0 = Alloc<hnode::Leaf>(str(this->i), color_e::OtherConst);
29 L->append(Alloc<Field>(StrFromC("i"), x0));
30
31 return out_node;
32}
33
34
35hnode_t* ProcDefaults::PrettyTree(Dict<int, bool>* seen) {
36 seen = seen ? seen : Alloc<Dict<int, bool>>();
37 int heap_id = ObjectId(this);
38 if (dict_contains(seen, heap_id)) {
39 return Alloc<hnode::AlreadySeen>(heap_id);
40 }
41 seen->set(heap_id, true);
42 hnode::Record* out_node = runtime::NewRecord(StrFromC("ProcDefaults"));
43 List<Field*>* L = out_node->fields;
44
45 if (this->for_word != nullptr) { // List
46 hnode::Array* x0 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
47 for (ListIter<value_t*> it(this->for_word); !it.Done(); it.Next()) {
48 value_t* i0 = it.Value();
49 hnode_t* h = (i0 == nullptr) ? Alloc<hnode::Leaf>(StrFromC("_"),
50 color_e::OtherConst) : i0->PrettyTree(seen);
51 x0->children->append(h);
52 }
53 L->append(Alloc<Field>(StrFromC("for_word"), x0));
54 }
55
56 if (this->for_typed != nullptr) { // List
57 hnode::Array* x1 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
58 for (ListIter<value_t*> it(this->for_typed); !it.Done(); it.Next()) {
59 value_t* i1 = it.Value();
60 hnode_t* h = (i1 == nullptr) ? Alloc<hnode::Leaf>(StrFromC("_"),
61 color_e::OtherConst) : i1->PrettyTree(seen);
62 x1->children->append(h);
63 }
64 L->append(Alloc<Field>(StrFromC("for_typed"), x1));
65 }
66
67 if (this->for_named) { // Dict
68 auto m = Alloc<hnode::Leaf>(StrFromC("Dict"), color_e::OtherConst);
69 hnode::Array* x2 = Alloc<hnode::Array>(NewList<hnode_t*>({m}));
70 for (DictIter<BigStr*, value_t*> it(this->for_named); !it.Done();
71 it.Next()) {
72 auto k2 = it.Key();
73 auto v2 = it.Value();
74 x2->children->append(runtime::NewLeaf(k2, color_e::StringConst));
75 x2->children->append(v2->PrettyTree(seen));
76 }
77 L->append(Alloc<Field>(StrFromC ("for_named"), x2));
78 }
79
80 if (this->for_block) { // Optional
81 hnode_t* x3 = this->for_block->PrettyTree(seen);
82 L->append(Alloc<Field>(StrFromC("for_block"), x3));
83 }
84
85 return out_node;
86}
87
88
89hnode_t* LeftName::PrettyTree(Dict<int, bool>* seen) {
90 seen = seen ? seen : Alloc<Dict<int, bool>>();
91 int heap_id = ObjectId(this);
92 if (dict_contains(seen, heap_id)) {
93 return Alloc<hnode::AlreadySeen>(heap_id);
94 }
95 seen->set(heap_id, true);
96 hnode::Record* out_node = runtime::NewRecord(StrFromC("LeftName"));
97 List<Field*>* L = out_node->fields;
98
99 hnode_t* x0 = runtime::NewLeaf(this->name, color_e::StringConst);
100 L->append(Alloc<Field>(StrFromC("name"), x0));
101
102 hnode_t* x1 = this->blame_loc->PrettyTree(seen);
103 L->append(Alloc<Field>(StrFromC("blame_loc"), x1));
104
105 return out_node;
106}
107
108BigStr* y_lvalue_str(int tag, bool dot) {
109 char buf[32];
110 const char* v = nullptr;
111 switch (tag) {
112 case y_lvalue_e::Local:
113 v = "Local"; break;
114 case y_lvalue_e::Container:
115 v = "Container"; break;
116 default:
117 assert(0);
118 }
119 if (dot) {
120 snprintf(buf, 32, "y_lvalue.%s", v);
121 return StrFromC(buf);
122 } else {
123 return StrFromC(v);
124 }
125}
126
127hnode_t* y_lvalue__Container::PrettyTree(Dict<int, bool>* seen) {
128 seen = seen ? seen : Alloc<Dict<int, bool>>();
129 int heap_id = ObjectId(this);
130 if (dict_contains(seen, heap_id)) {
131 return Alloc<hnode::AlreadySeen>(heap_id);
132 }
133 seen->set(heap_id, true);
134 hnode::Record* out_node = runtime::NewRecord(y_lvalue_str(this->tag()));
135 List<Field*>* L = out_node->fields;
136
137 hnode_t* x0 = this->obj->PrettyTree(seen);
138 L->append(Alloc<Field>(StrFromC("obj"), x0));
139
140 hnode_t* x1 = this->index->PrettyTree(seen);
141 L->append(Alloc<Field>(StrFromC("index"), x1));
142
143 return out_node;
144}
145
146
147hnode_t* y_lvalue_t::PrettyTree(Dict<int, bool>* seen) {
148 switch (this->tag()) {
149 case y_lvalue_e::Local: {
150 LeftName* obj = static_cast<LeftName*>(this);
151 return obj->PrettyTree(seen);
152 }
153 case y_lvalue_e::Container: {
154 y_lvalue__Container* obj = static_cast<y_lvalue__Container*>(this);
155 return obj->PrettyTree(seen);
156 }
157 default:
158 assert(0);
159 }
160}
161BigStr* sh_lvalue_str(int tag, bool dot) {
162 char buf[32];
163 const char* v = nullptr;
164 switch (tag) {
165 case sh_lvalue_e::Var:
166 v = "Var"; break;
167 case sh_lvalue_e::Indexed:
168 v = "Indexed"; break;
169 case sh_lvalue_e::Keyed:
170 v = "Keyed"; break;
171 default:
172 assert(0);
173 }
174 if (dot) {
175 snprintf(buf, 32, "sh_lvalue.%s", v);
176 return StrFromC(buf);
177 } else {
178 return StrFromC(v);
179 }
180}
181
182hnode_t* sh_lvalue__Indexed::PrettyTree(Dict<int, bool>* seen) {
183 seen = seen ? seen : Alloc<Dict<int, bool>>();
184 int heap_id = ObjectId(this);
185 if (dict_contains(seen, heap_id)) {
186 return Alloc<hnode::AlreadySeen>(heap_id);
187 }
188 seen->set(heap_id, true);
189 hnode::Record* out_node = runtime::NewRecord(sh_lvalue_str(this->tag()));
190 List<Field*>* L = out_node->fields;
191
192 hnode_t* x0 = runtime::NewLeaf(this->name, color_e::StringConst);
193 L->append(Alloc<Field>(StrFromC("name"), x0));
194
195 hnode_t* x1 = Alloc<hnode::Leaf>(str(this->index), color_e::OtherConst);
196 L->append(Alloc<Field>(StrFromC("index"), x1));
197
198 hnode_t* x2 = this->blame_loc->PrettyTree(seen);
199 L->append(Alloc<Field>(StrFromC("blame_loc"), x2));
200
201 return out_node;
202}
203
204
205hnode_t* sh_lvalue__Keyed::PrettyTree(Dict<int, bool>* seen) {
206 seen = seen ? seen : Alloc<Dict<int, bool>>();
207 int heap_id = ObjectId(this);
208 if (dict_contains(seen, heap_id)) {
209 return Alloc<hnode::AlreadySeen>(heap_id);
210 }
211 seen->set(heap_id, true);
212 hnode::Record* out_node = runtime::NewRecord(sh_lvalue_str(this->tag()));
213 List<Field*>* L = out_node->fields;
214
215 hnode_t* x0 = runtime::NewLeaf(this->name, color_e::StringConst);
216 L->append(Alloc<Field>(StrFromC("name"), x0));
217
218 hnode_t* x1 = runtime::NewLeaf(this->key, color_e::StringConst);
219 L->append(Alloc<Field>(StrFromC("key"), x1));
220
221 hnode_t* x2 = this->blame_loc->PrettyTree(seen);
222 L->append(Alloc<Field>(StrFromC("blame_loc"), x2));
223
224 return out_node;
225}
226
227
228hnode_t* sh_lvalue_t::PrettyTree(Dict<int, bool>* seen) {
229 switch (this->tag()) {
230 case sh_lvalue_e::Var: {
231 LeftName* obj = static_cast<LeftName*>(this);
232 return obj->PrettyTree(seen);
233 }
234 case sh_lvalue_e::Indexed: {
235 sh_lvalue__Indexed* obj = static_cast<sh_lvalue__Indexed*>(this);
236 return obj->PrettyTree(seen);
237 }
238 case sh_lvalue_e::Keyed: {
239 sh_lvalue__Keyed* obj = static_cast<sh_lvalue__Keyed*>(this);
240 return obj->PrettyTree(seen);
241 }
242 default:
243 assert(0);
244 }
245}
246BigStr* eggex_ops_str(int tag, bool dot) {
247 char buf[32];
248 const char* v = nullptr;
249 switch (tag) {
250 case eggex_ops_e::No:
251 v = "No"; break;
252 case eggex_ops_e::Yes:
253 v = "Yes"; break;
254 default:
255 assert(0);
256 }
257 if (dot) {
258 snprintf(buf, 32, "eggex_ops.%s", v);
259 return StrFromC(buf);
260 } else {
261 return StrFromC(v);
262 }
263}
264
265eggex_ops__No* eggex_ops::No = &geggex_ops__No.obj;
266
267GcGlobal<eggex_ops__No> geggex_ops__No =
268 { ObjHeader::Global(eggex_ops_e::No) };
269
270hnode_t* eggex_ops__No::PrettyTree(Dict<int, bool>* seen) {
271 seen = seen ? seen : Alloc<Dict<int, bool>>();
272 int heap_id = ObjectId(this);
273 if (dict_contains(seen, heap_id)) {
274 return Alloc<hnode::AlreadySeen>(heap_id);
275 }
276 seen->set(heap_id, true);
277 hnode::Record* out_node = runtime::NewRecord(eggex_ops_str(this->tag()));
278 return out_node;
279}
280
281
282hnode_t* eggex_ops__Yes::PrettyTree(Dict<int, bool>* seen) {
283 seen = seen ? seen : Alloc<Dict<int, bool>>();
284 int heap_id = ObjectId(this);
285 if (dict_contains(seen, heap_id)) {
286 return Alloc<hnode::AlreadySeen>(heap_id);
287 }
288 seen->set(heap_id, true);
289 hnode::Record* out_node = runtime::NewRecord(eggex_ops_str(this->tag()));
290 List<Field*>* L = out_node->fields;
291
292 if (this->convert_funcs != nullptr) { // List
293 hnode::Array* x0 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
294 for (ListIter<value_t*> it(this->convert_funcs); !it.Done(); it.Next()) {
295 value_t* i0 = it.Value();
296 hnode_t* h = (i0 == nullptr) ? Alloc<hnode::Leaf>(StrFromC("_"),
297 color_e::OtherConst) : i0->PrettyTree(seen);
298 x0->children->append(h);
299 }
300 L->append(Alloc<Field>(StrFromC("convert_funcs"), x0));
301 }
302
303 if (this->convert_toks != nullptr) { // List
304 hnode::Array* x1 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
305 for (ListIter<syntax_asdl::Token*> it(this->convert_toks); !it.Done();
306 it.Next()) {
307 syntax_asdl::Token* i1 = it.Value();
308 hnode_t* h = (i1 == nullptr) ? Alloc<hnode::Leaf>(StrFromC("_"),
309 color_e::OtherConst) : i1->PrettyTree(seen);
310 x1->children->append(h);
311 }
312 L->append(Alloc<Field>(StrFromC("convert_toks"), x1));
313 }
314
315 if (this->capture_names != nullptr) { // List
316 hnode::Array* x2 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
317 for (ListIter<BigStr*> it(this->capture_names); !it.Done(); it.Next()) {
318 BigStr* i2 = it.Value();
319 x2->children->append(runtime::NewLeaf(i2, color_e::StringConst));
320 }
321 L->append(Alloc<Field>(StrFromC("capture_names"), x2));
322 }
323
324 return out_node;
325}
326
327
328hnode_t* eggex_ops_t::PrettyTree(Dict<int, bool>* seen) {
329 switch (this->tag()) {
330 case eggex_ops_e::No: {
331 eggex_ops__No* obj = static_cast<eggex_ops__No*>(this);
332 return obj->PrettyTree(seen);
333 }
334 case eggex_ops_e::Yes: {
335 eggex_ops__Yes* obj = static_cast<eggex_ops__Yes*>(this);
336 return obj->PrettyTree(seen);
337 }
338 default:
339 assert(0);
340 }
341}
342
343hnode_t* RegexMatch::PrettyTree(Dict<int, bool>* seen) {
344 seen = seen ? seen : Alloc<Dict<int, bool>>();
345 int heap_id = ObjectId(this);
346 if (dict_contains(seen, heap_id)) {
347 return Alloc<hnode::AlreadySeen>(heap_id);
348 }
349 seen->set(heap_id, true);
350 hnode::Record* out_node = runtime::NewRecord(StrFromC("RegexMatch"));
351 List<Field*>* L = out_node->fields;
352
353 hnode_t* x0 = runtime::NewLeaf(this->s, color_e::StringConst);
354 L->append(Alloc<Field>(StrFromC("s"), x0));
355
356 if (this->indices != nullptr) { // List
357 hnode::Array* x1 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
358 for (ListIter<int> it(this->indices); !it.Done(); it.Next()) {
359 int i1 = it.Value();
360 x1->children->append(Alloc<hnode::Leaf>(str(i1), color_e::OtherConst));
361 }
362 L->append(Alloc<Field>(StrFromC("indices"), x1));
363 }
364
365 hnode_t* x2 = this->ops->PrettyTree(seen);
366 L->append(Alloc<Field>(StrFromC("ops"), x2));
367
368 return out_node;
369}
370
371BigStr* regex_match_str(int tag, bool dot) {
372 char buf[32];
373 const char* v = nullptr;
374 switch (tag) {
375 case regex_match_e::No:
376 v = "No"; break;
377 case regex_match_e::Yes:
378 v = "Yes"; break;
379 default:
380 assert(0);
381 }
382 if (dot) {
383 snprintf(buf, 32, "regex_match.%s", v);
384 return StrFromC(buf);
385 } else {
386 return StrFromC(v);
387 }
388}
389
390regex_match__No* regex_match::No = &gregex_match__No.obj;
391
392GcGlobal<regex_match__No> gregex_match__No =
393 { ObjHeader::Global(regex_match_e::No) };
394
395hnode_t* regex_match__No::PrettyTree(Dict<int, bool>* seen) {
396 seen = seen ? seen : Alloc<Dict<int, bool>>();
397 int heap_id = ObjectId(this);
398 if (dict_contains(seen, heap_id)) {
399 return Alloc<hnode::AlreadySeen>(heap_id);
400 }
401 seen->set(heap_id, true);
402 hnode::Record* out_node = runtime::NewRecord(regex_match_str(this->tag()));
403 return out_node;
404}
405
406
407hnode_t* regex_match_t::PrettyTree(Dict<int, bool>* seen) {
408 switch (this->tag()) {
409 case regex_match_e::No: {
410 regex_match__No* obj = static_cast<regex_match__No*>(this);
411 return obj->PrettyTree(seen);
412 }
413 case regex_match_e::Yes: {
414 RegexMatch* obj = static_cast<RegexMatch*>(this);
415 return obj->PrettyTree(seen);
416 }
417 default:
418 assert(0);
419 }
420}
421
422hnode_t* Dict_::PrettyTree(Dict<int, bool>* seen) {
423 seen = seen ? seen : Alloc<Dict<int, bool>>();
424 int heap_id = ObjectId(this);
425 if (dict_contains(seen, heap_id)) {
426 return Alloc<hnode::AlreadySeen>(heap_id);
427 }
428 seen->set(heap_id, true);
429 hnode::Record* out_node = runtime::NewRecord(StrFromC("Dict_"));
430 List<Field*>* L = out_node->fields;
431
432 if (this->d) { // Dict
433 auto m = Alloc<hnode::Leaf>(StrFromC("Dict"), color_e::OtherConst);
434 hnode::Array* x0 = Alloc<hnode::Array>(NewList<hnode_t*>({m}));
435 for (DictIter<BigStr*, value_t*> it(this->d); !it.Done(); it.Next()) {
436 auto k0 = it.Key();
437 auto v0 = it.Value();
438 x0->children->append(runtime::NewLeaf(k0, color_e::StringConst));
439 x0->children->append(v0->PrettyTree(seen));
440 }
441 L->append(Alloc<Field>(StrFromC ("d"), x0));
442 }
443
444 if (this->prototype) { // Optional
445 hnode_t* x1 = this->prototype->PrettyTree(seen);
446 L->append(Alloc<Field>(StrFromC("prototype"), x1));
447 }
448
449 return out_node;
450}
451
452BigStr* value_str(int tag, bool dot) {
453 char buf[32];
454 const char* v = nullptr;
455 switch (tag) {
456 case value_e::Interrupted:
457 v = "Interrupted"; break;
458 case value_e::Stdin:
459 v = "Stdin"; break;
460 case value_e::Undef:
461 v = "Undef"; break;
462 case value_e::Str:
463 v = "Str"; break;
464 case value_e::BashArray:
465 v = "BashArray"; break;
466 case value_e::SparseArray:
467 v = "SparseArray"; break;
468 case value_e::BashAssoc:
469 v = "BashAssoc"; break;
470 case value_e::Null:
471 v = "Null"; break;
472 case value_e::Bool:
473 v = "Bool"; break;
474 case value_e::Int:
475 v = "Int"; break;
476 case value_e::Float:
477 v = "Float"; break;
478 case value_e::List:
479 v = "List"; break;
480 case value_e::Dict:
481 v = "Dict"; break;
482 case value_e::Eggex:
483 v = "Eggex"; break;
484 case value_e::Match:
485 v = "Match"; break;
486 case value_e::Expr:
487 v = "Expr"; break;
488 case value_e::Command:
489 v = "Command"; break;
490 case value_e::Block:
491 v = "Block"; break;
492 case value_e::Place:
493 v = "Place"; break;
494 case value_e::Module:
495 v = "Module"; break;
496 case value_e::IO:
497 v = "IO"; break;
498 case value_e::Guts:
499 v = "Guts"; break;
500 case value_e::BuiltinFunc:
501 v = "BuiltinFunc"; break;
502 case value_e::BoundFunc:
503 v = "BoundFunc"; break;
504 case value_e::Proc:
505 v = "Proc"; break;
506 case value_e::Func:
507 v = "Func"; break;
508 case value_e::Slice:
509 v = "Slice"; break;
510 case value_e::Range:
511 v = "Range"; break;
512 default:
513 assert(0);
514 }
515 if (dot) {
516 snprintf(buf, 32, "value.%s", v);
517 return StrFromC(buf);
518 } else {
519 return StrFromC(v);
520 }
521}
522
523value__Interrupted* value::Interrupted = &gvalue__Interrupted.obj;
524
525GcGlobal<value__Interrupted> gvalue__Interrupted =
526 { ObjHeader::Global(value_e::Interrupted) };
527
528value__Stdin* value::Stdin = &gvalue__Stdin.obj;
529
530GcGlobal<value__Stdin> gvalue__Stdin =
531 { ObjHeader::Global(value_e::Stdin) };
532
533value__Undef* value::Undef = &gvalue__Undef.obj;
534
535GcGlobal<value__Undef> gvalue__Undef =
536 { ObjHeader::Global(value_e::Undef) };
537
538value__Null* value::Null = &gvalue__Null.obj;
539
540GcGlobal<value__Null> gvalue__Null =
541 { ObjHeader::Global(value_e::Null) };
542
543hnode_t* value__Interrupted::PrettyTree(Dict<int, bool>* seen) {
544 seen = seen ? seen : Alloc<Dict<int, bool>>();
545 int heap_id = ObjectId(this);
546 if (dict_contains(seen, heap_id)) {
547 return Alloc<hnode::AlreadySeen>(heap_id);
548 }
549 seen->set(heap_id, true);
550 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
551 return out_node;
552}
553
554
555hnode_t* value__Stdin::PrettyTree(Dict<int, bool>* seen) {
556 seen = seen ? seen : Alloc<Dict<int, bool>>();
557 int heap_id = ObjectId(this);
558 if (dict_contains(seen, heap_id)) {
559 return Alloc<hnode::AlreadySeen>(heap_id);
560 }
561 seen->set(heap_id, true);
562 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
563 return out_node;
564}
565
566
567hnode_t* value__Undef::PrettyTree(Dict<int, bool>* seen) {
568 seen = seen ? seen : Alloc<Dict<int, bool>>();
569 int heap_id = ObjectId(this);
570 if (dict_contains(seen, heap_id)) {
571 return Alloc<hnode::AlreadySeen>(heap_id);
572 }
573 seen->set(heap_id, true);
574 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
575 return out_node;
576}
577
578
579hnode_t* value__Str::PrettyTree(Dict<int, bool>* seen) {
580 seen = seen ? seen : Alloc<Dict<int, bool>>();
581 int heap_id = ObjectId(this);
582 if (dict_contains(seen, heap_id)) {
583 return Alloc<hnode::AlreadySeen>(heap_id);
584 }
585 seen->set(heap_id, true);
586 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
587 List<Field*>* L = out_node->fields;
588
589 hnode_t* x0 = runtime::NewLeaf(this->s, color_e::StringConst);
590 L->append(Alloc<Field>(StrFromC("s"), x0));
591
592 return out_node;
593}
594
595
596hnode_t* value__BashArray::PrettyTree(Dict<int, bool>* seen) {
597 seen = seen ? seen : Alloc<Dict<int, bool>>();
598 int heap_id = ObjectId(this);
599 if (dict_contains(seen, heap_id)) {
600 return Alloc<hnode::AlreadySeen>(heap_id);
601 }
602 seen->set(heap_id, true);
603 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
604 List<Field*>* L = out_node->fields;
605
606 if (this->strs != nullptr) { // List
607 hnode::Array* x0 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
608 for (ListIter<BigStr*> it(this->strs); !it.Done(); it.Next()) {
609 BigStr* i0 = it.Value();
610 x0->children->append(runtime::NewLeaf(i0, color_e::StringConst));
611 }
612 L->append(Alloc<Field>(StrFromC("strs"), x0));
613 }
614
615 return out_node;
616}
617
618
619hnode_t* value__SparseArray::PrettyTree(Dict<int, bool>* seen) {
620 seen = seen ? seen : Alloc<Dict<int, bool>>();
621 int heap_id = ObjectId(this);
622 if (dict_contains(seen, heap_id)) {
623 return Alloc<hnode::AlreadySeen>(heap_id);
624 }
625 seen->set(heap_id, true);
626 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
627 List<Field*>* L = out_node->fields;
628
629 if (this->d) { // Dict
630 auto m = Alloc<hnode::Leaf>(StrFromC("Dict"), color_e::OtherConst);
631 hnode::Array* x0 = Alloc<hnode::Array>(NewList<hnode_t*>({m}));
632 for (DictIter<mops::BigInt, BigStr*> it(this->d); !it.Done(); it.Next()) {
633 auto k0 = it.Key();
634 auto v0 = it.Value();
635 x0->children->append(Alloc<hnode::Leaf>(mops::ToStr(k0),
636 color_e::OtherConst));
637 x0->children->append(runtime::NewLeaf(v0, color_e::StringConst));
638 }
639 L->append(Alloc<Field>(StrFromC ("d"), x0));
640 }
641
642 hnode_t* x1 = Alloc<hnode::Leaf>(mops::ToStr(this->max_index),
643 color_e::OtherConst);
644 L->append(Alloc<Field>(StrFromC("max_index"), x1));
645
646 return out_node;
647}
648
649
650hnode_t* value__BashAssoc::PrettyTree(Dict<int, bool>* seen) {
651 seen = seen ? seen : Alloc<Dict<int, bool>>();
652 int heap_id = ObjectId(this);
653 if (dict_contains(seen, heap_id)) {
654 return Alloc<hnode::AlreadySeen>(heap_id);
655 }
656 seen->set(heap_id, true);
657 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
658 List<Field*>* L = out_node->fields;
659
660 if (this->d) { // Dict
661 auto m = Alloc<hnode::Leaf>(StrFromC("Dict"), color_e::OtherConst);
662 hnode::Array* x0 = Alloc<hnode::Array>(NewList<hnode_t*>({m}));
663 for (DictIter<BigStr*, BigStr*> it(this->d); !it.Done(); it.Next()) {
664 auto k0 = it.Key();
665 auto v0 = it.Value();
666 x0->children->append(runtime::NewLeaf(k0, color_e::StringConst));
667 x0->children->append(runtime::NewLeaf(v0, color_e::StringConst));
668 }
669 L->append(Alloc<Field>(StrFromC ("d"), x0));
670 }
671
672 return out_node;
673}
674
675
676hnode_t* value__Null::PrettyTree(Dict<int, bool>* seen) {
677 seen = seen ? seen : Alloc<Dict<int, bool>>();
678 int heap_id = ObjectId(this);
679 if (dict_contains(seen, heap_id)) {
680 return Alloc<hnode::AlreadySeen>(heap_id);
681 }
682 seen->set(heap_id, true);
683 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
684 return out_node;
685}
686
687
688hnode_t* value__Bool::PrettyTree(Dict<int, bool>* seen) {
689 seen = seen ? seen : Alloc<Dict<int, bool>>();
690 int heap_id = ObjectId(this);
691 if (dict_contains(seen, heap_id)) {
692 return Alloc<hnode::AlreadySeen>(heap_id);
693 }
694 seen->set(heap_id, true);
695 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
696 List<Field*>* L = out_node->fields;
697
698 hnode_t* x0 = Alloc<hnode::Leaf>(this->b ? runtime::TRUE_STR :
699 runtime::FALSE_STR, color_e::OtherConst);
700 L->append(Alloc<Field>(StrFromC("b"), x0));
701
702 return out_node;
703}
704
705
706hnode_t* value__Int::PrettyTree(Dict<int, bool>* seen) {
707 seen = seen ? seen : Alloc<Dict<int, bool>>();
708 int heap_id = ObjectId(this);
709 if (dict_contains(seen, heap_id)) {
710 return Alloc<hnode::AlreadySeen>(heap_id);
711 }
712 seen->set(heap_id, true);
713 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
714 List<Field*>* L = out_node->fields;
715
716 hnode_t* x0 = Alloc<hnode::Leaf>(mops::ToStr(this->i), color_e::OtherConst);
717 L->append(Alloc<Field>(StrFromC("i"), x0));
718
719 return out_node;
720}
721
722
723hnode_t* value__Float::PrettyTree(Dict<int, bool>* seen) {
724 seen = seen ? seen : Alloc<Dict<int, bool>>();
725 int heap_id = ObjectId(this);
726 if (dict_contains(seen, heap_id)) {
727 return Alloc<hnode::AlreadySeen>(heap_id);
728 }
729 seen->set(heap_id, true);
730 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
731 List<Field*>* L = out_node->fields;
732
733 hnode_t* x0 = Alloc<hnode::Leaf>(str(this->f), color_e::OtherConst);
734 L->append(Alloc<Field>(StrFromC("f"), x0));
735
736 return out_node;
737}
738
739
740hnode_t* value__List::PrettyTree(Dict<int, bool>* seen) {
741 seen = seen ? seen : Alloc<Dict<int, bool>>();
742 int heap_id = ObjectId(this);
743 if (dict_contains(seen, heap_id)) {
744 return Alloc<hnode::AlreadySeen>(heap_id);
745 }
746 seen->set(heap_id, true);
747 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
748 List<Field*>* L = out_node->fields;
749
750 if (this->items != nullptr) { // List
751 hnode::Array* x0 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
752 for (ListIter<value_t*> it(this->items); !it.Done(); it.Next()) {
753 value_t* i0 = it.Value();
754 hnode_t* h = (i0 == nullptr) ? Alloc<hnode::Leaf>(StrFromC("_"),
755 color_e::OtherConst) : i0->PrettyTree(seen);
756 x0->children->append(h);
757 }
758 L->append(Alloc<Field>(StrFromC("items"), x0));
759 }
760
761 return out_node;
762}
763
764
765hnode_t* value__Eggex::PrettyTree(Dict<int, bool>* seen) {
766 seen = seen ? seen : Alloc<Dict<int, bool>>();
767 int heap_id = ObjectId(this);
768 if (dict_contains(seen, heap_id)) {
769 return Alloc<hnode::AlreadySeen>(heap_id);
770 }
771 seen->set(heap_id, true);
772 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
773 List<Field*>* L = out_node->fields;
774
775 hnode_t* x0 = this->spliced->PrettyTree(seen);
776 L->append(Alloc<Field>(StrFromC("spliced"), x0));
777
778 hnode_t* x1 = runtime::NewLeaf(this->canonical_flags, color_e::StringConst);
779 L->append(Alloc<Field>(StrFromC("canonical_flags"), x1));
780
781 if (this->convert_funcs != nullptr) { // List
782 hnode::Array* x2 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
783 for (ListIter<value_t*> it(this->convert_funcs); !it.Done(); it.Next()) {
784 value_t* i2 = it.Value();
785 hnode_t* h = (i2 == nullptr) ? Alloc<hnode::Leaf>(StrFromC("_"),
786 color_e::OtherConst) : i2->PrettyTree(seen);
787 x2->children->append(h);
788 }
789 L->append(Alloc<Field>(StrFromC("convert_funcs"), x2));
790 }
791
792 if (this->convert_toks != nullptr) { // List
793 hnode::Array* x3 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
794 for (ListIter<syntax_asdl::Token*> it(this->convert_toks); !it.Done();
795 it.Next()) {
796 syntax_asdl::Token* i3 = it.Value();
797 hnode_t* h = (i3 == nullptr) ? Alloc<hnode::Leaf>(StrFromC("_"),
798 color_e::OtherConst) : i3->PrettyTree(seen);
799 x3->children->append(h);
800 }
801 L->append(Alloc<Field>(StrFromC("convert_toks"), x3));
802 }
803
804 if (this->as_ere) { // Optional
805 hnode_t* x4 = runtime::NewLeaf(this->as_ere, color_e::StringConst);
806 L->append(Alloc<Field>(StrFromC("as_ere"), x4));
807 }
808
809 if (this->capture_names != nullptr) { // List
810 hnode::Array* x5 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
811 for (ListIter<BigStr*> it(this->capture_names); !it.Done(); it.Next()) {
812 BigStr* i5 = it.Value();
813 x5->children->append(runtime::NewLeaf(i5, color_e::StringConst));
814 }
815 L->append(Alloc<Field>(StrFromC("capture_names"), x5));
816 }
817
818 return out_node;
819}
820
821
822hnode_t* value__Expr::PrettyTree(Dict<int, bool>* seen) {
823 seen = seen ? seen : Alloc<Dict<int, bool>>();
824 int heap_id = ObjectId(this);
825 if (dict_contains(seen, heap_id)) {
826 return Alloc<hnode::AlreadySeen>(heap_id);
827 }
828 seen->set(heap_id, true);
829 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
830 List<Field*>* L = out_node->fields;
831
832 hnode_t* x0 = this->e->PrettyTree(seen);
833 L->append(Alloc<Field>(StrFromC("e"), x0));
834
835 return out_node;
836}
837
838
839hnode_t* value__Command::PrettyTree(Dict<int, bool>* seen) {
840 seen = seen ? seen : Alloc<Dict<int, bool>>();
841 int heap_id = ObjectId(this);
842 if (dict_contains(seen, heap_id)) {
843 return Alloc<hnode::AlreadySeen>(heap_id);
844 }
845 seen->set(heap_id, true);
846 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
847 List<Field*>* L = out_node->fields;
848
849 hnode_t* x0 = this->c->PrettyTree(seen);
850 L->append(Alloc<Field>(StrFromC("c"), x0));
851
852 return out_node;
853}
854
855
856hnode_t* value__Block::PrettyTree(Dict<int, bool>* seen) {
857 seen = seen ? seen : Alloc<Dict<int, bool>>();
858 int heap_id = ObjectId(this);
859 if (dict_contains(seen, heap_id)) {
860 return Alloc<hnode::AlreadySeen>(heap_id);
861 }
862 seen->set(heap_id, true);
863 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
864 List<Field*>* L = out_node->fields;
865
866 hnode_t* x0 = this->block->PrettyTree(seen);
867 L->append(Alloc<Field>(StrFromC("block"), x0));
868
869 return out_node;
870}
871
872
873hnode_t* value__Place::PrettyTree(Dict<int, bool>* seen) {
874 seen = seen ? seen : Alloc<Dict<int, bool>>();
875 int heap_id = ObjectId(this);
876 if (dict_contains(seen, heap_id)) {
877 return Alloc<hnode::AlreadySeen>(heap_id);
878 }
879 seen->set(heap_id, true);
880 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
881 List<Field*>* L = out_node->fields;
882
883 hnode_t* x0 = this->lval->PrettyTree(seen);
884 L->append(Alloc<Field>(StrFromC("lval"), x0));
885
886 if (this->frame) { // Dict
887 auto m = Alloc<hnode::Leaf>(StrFromC("Dict"), color_e::OtherConst);
888 hnode::Array* x1 = Alloc<hnode::Array>(NewList<hnode_t*>({m}));
889 for (DictIter<BigStr*, runtime_asdl::Cell*> it(this->frame); !it.Done();
890 it.Next()) {
891 auto k1 = it.Key();
892 auto v1 = it.Value();
893 x1->children->append(runtime::NewLeaf(k1, color_e::StringConst));
894 x1->children->append(v1->PrettyTree(seen));
895 }
896 L->append(Alloc<Field>(StrFromC ("frame"), x1));
897 }
898
899 return out_node;
900}
901
902
903hnode_t* value__Module::PrettyTree(Dict<int, bool>* seen) {
904 seen = seen ? seen : Alloc<Dict<int, bool>>();
905 int heap_id = ObjectId(this);
906 if (dict_contains(seen, heap_id)) {
907 return Alloc<hnode::AlreadySeen>(heap_id);
908 }
909 seen->set(heap_id, true);
910 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
911 List<Field*>* L = out_node->fields;
912
913 if (this->defs) { // Dict
914 auto m = Alloc<hnode::Leaf>(StrFromC("Dict"), color_e::OtherConst);
915 hnode::Array* x0 = Alloc<hnode::Array>(NewList<hnode_t*>({m}));
916 for (DictIter<BigStr*, value_t*> it(this->defs); !it.Done(); it.Next()) {
917 auto k0 = it.Key();
918 auto v0 = it.Value();
919 x0->children->append(runtime::NewLeaf(k0, color_e::StringConst));
920 x0->children->append(v0->PrettyTree(seen));
921 }
922 L->append(Alloc<Field>(StrFromC ("defs"), x0));
923 }
924
925 return out_node;
926}
927
928
929hnode_t* value__IO::PrettyTree(Dict<int, bool>* seen) {
930 seen = seen ? seen : Alloc<Dict<int, bool>>();
931 int heap_id = ObjectId(this);
932 if (dict_contains(seen, heap_id)) {
933 return Alloc<hnode::AlreadySeen>(heap_id);
934 }
935 seen->set(heap_id, true);
936 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
937 List<Field*>* L = out_node->fields;
938
939 hnode_t* x0 = Alloc<hnode::External>(this->cmd_ev);
940 L->append(Alloc<Field>(StrFromC("cmd_ev"), x0));
941
942 hnode_t* x1 = Alloc<hnode::External>(this->prompt_ev);
943 L->append(Alloc<Field>(StrFromC("prompt_ev"), x1));
944
945 return out_node;
946}
947
948
949hnode_t* value__Guts::PrettyTree(Dict<int, bool>* seen) {
950 seen = seen ? seen : Alloc<Dict<int, bool>>();
951 int heap_id = ObjectId(this);
952 if (dict_contains(seen, heap_id)) {
953 return Alloc<hnode::AlreadySeen>(heap_id);
954 }
955 seen->set(heap_id, true);
956 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
957 List<Field*>* L = out_node->fields;
958
959 hnode_t* x0 = Alloc<hnode::External>(this->vm);
960 L->append(Alloc<Field>(StrFromC("vm"), x0));
961
962 return out_node;
963}
964
965
966hnode_t* value__BuiltinFunc::PrettyTree(Dict<int, bool>* seen) {
967 seen = seen ? seen : Alloc<Dict<int, bool>>();
968 int heap_id = ObjectId(this);
969 if (dict_contains(seen, heap_id)) {
970 return Alloc<hnode::AlreadySeen>(heap_id);
971 }
972 seen->set(heap_id, true);
973 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
974 List<Field*>* L = out_node->fields;
975
976 hnode_t* x0 = Alloc<hnode::External>(this->callable);
977 L->append(Alloc<Field>(StrFromC("callable"), x0));
978
979 return out_node;
980}
981
982
983hnode_t* value__BoundFunc::PrettyTree(Dict<int, bool>* seen) {
984 seen = seen ? seen : Alloc<Dict<int, bool>>();
985 int heap_id = ObjectId(this);
986 if (dict_contains(seen, heap_id)) {
987 return Alloc<hnode::AlreadySeen>(heap_id);
988 }
989 seen->set(heap_id, true);
990 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
991 List<Field*>* L = out_node->fields;
992
993 hnode_t* x0 = this->me->PrettyTree(seen);
994 L->append(Alloc<Field>(StrFromC("me"), x0));
995
996 hnode_t* x1 = this->func->PrettyTree(seen);
997 L->append(Alloc<Field>(StrFromC("func"), x1));
998
999 return out_node;
1000}
1001
1002
1003hnode_t* value__Proc::PrettyTree(Dict<int, bool>* seen) {
1004 seen = seen ? seen : Alloc<Dict<int, bool>>();
1005 int heap_id = ObjectId(this);
1006 if (dict_contains(seen, heap_id)) {
1007 return Alloc<hnode::AlreadySeen>(heap_id);
1008 }
1009 seen->set(heap_id, true);
1010 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
1011 List<Field*>* L = out_node->fields;
1012
1013 hnode_t* x0 = runtime::NewLeaf(this->name, color_e::StringConst);
1014 L->append(Alloc<Field>(StrFromC("name"), x0));
1015
1016 hnode_t* x1 = this->name_tok->PrettyTree(seen);
1017 L->append(Alloc<Field>(StrFromC("name_tok"), x1));
1018
1019 hnode_t* x2 = this->sig->PrettyTree(seen);
1020 L->append(Alloc<Field>(StrFromC("sig"), x2));
1021
1022 hnode_t* x3 = this->body->PrettyTree(seen);
1023 L->append(Alloc<Field>(StrFromC("body"), x3));
1024
1025 if (this->defaults) { // Optional
1026 hnode_t* x4 = this->defaults->PrettyTree(seen);
1027 L->append(Alloc<Field>(StrFromC("defaults"), x4));
1028 }
1029
1030 hnode_t* x5 = Alloc<hnode::Leaf>(this->sh_compat ? runtime::TRUE_STR :
1031 runtime::FALSE_STR, color_e::OtherConst);
1032 L->append(Alloc<Field>(StrFromC("sh_compat"), x5));
1033
1034 return out_node;
1035}
1036
1037
1038hnode_t* value__Func::PrettyTree(Dict<int, bool>* seen) {
1039 seen = seen ? seen : Alloc<Dict<int, bool>>();
1040 int heap_id = ObjectId(this);
1041 if (dict_contains(seen, heap_id)) {
1042 return Alloc<hnode::AlreadySeen>(heap_id);
1043 }
1044 seen->set(heap_id, true);
1045 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
1046 List<Field*>* L = out_node->fields;
1047
1048 hnode_t* x0 = runtime::NewLeaf(this->name, color_e::StringConst);
1049 L->append(Alloc<Field>(StrFromC("name"), x0));
1050
1051 hnode_t* x1 = this->parsed->PrettyTree(seen);
1052 L->append(Alloc<Field>(StrFromC("parsed"), x1));
1053
1054 if (this->pos_defaults != nullptr) { // List
1055 hnode::Array* x2 = Alloc<hnode::Array>(Alloc<List<hnode_t*>>());
1056 for (ListIter<value_t*> it(this->pos_defaults); !it.Done(); it.Next()) {
1057 value_t* i2 = it.Value();
1058 hnode_t* h = (i2 == nullptr) ? Alloc<hnode::Leaf>(StrFromC("_"),
1059 color_e::OtherConst) : i2->PrettyTree(seen);
1060 x2->children->append(h);
1061 }
1062 L->append(Alloc<Field>(StrFromC("pos_defaults"), x2));
1063 }
1064
1065 if (this->named_defaults) { // Dict
1066 auto m = Alloc<hnode::Leaf>(StrFromC("Dict"), color_e::OtherConst);
1067 hnode::Array* x3 = Alloc<hnode::Array>(NewList<hnode_t*>({m}));
1068 for (DictIter<BigStr*, value_t*> it(this->named_defaults); !it.Done();
1069 it.Next()) {
1070 auto k3 = it.Key();
1071 auto v3 = it.Value();
1072 x3->children->append(runtime::NewLeaf(k3, color_e::StringConst));
1073 x3->children->append(v3->PrettyTree(seen));
1074 }
1075 L->append(Alloc<Field>(StrFromC ("named_defaults"), x3));
1076 }
1077
1078 if (this->module_) { // Dict
1079 auto m = Alloc<hnode::Leaf>(StrFromC("Dict"), color_e::OtherConst);
1080 hnode::Array* x4 = Alloc<hnode::Array>(NewList<hnode_t*>({m}));
1081 for (DictIter<BigStr*, runtime_asdl::Cell*> it(this->module_); !it.Done();
1082 it.Next()) {
1083 auto k4 = it.Key();
1084 auto v4 = it.Value();
1085 x4->children->append(runtime::NewLeaf(k4, color_e::StringConst));
1086 x4->children->append(v4->PrettyTree(seen));
1087 }
1088 L->append(Alloc<Field>(StrFromC ("module_"), x4));
1089 }
1090
1091 return out_node;
1092}
1093
1094
1095hnode_t* value__Slice::PrettyTree(Dict<int, bool>* seen) {
1096 seen = seen ? seen : Alloc<Dict<int, bool>>();
1097 int heap_id = ObjectId(this);
1098 if (dict_contains(seen, heap_id)) {
1099 return Alloc<hnode::AlreadySeen>(heap_id);
1100 }
1101 seen->set(heap_id, true);
1102 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
1103 List<Field*>* L = out_node->fields;
1104
1105 if (this->lower) { // Optional
1106 hnode_t* x0 = this->lower->PrettyTree(seen);
1107 L->append(Alloc<Field>(StrFromC("lower"), x0));
1108 }
1109
1110 if (this->upper) { // Optional
1111 hnode_t* x1 = this->upper->PrettyTree(seen);
1112 L->append(Alloc<Field>(StrFromC("upper"), x1));
1113 }
1114
1115 return out_node;
1116}
1117
1118
1119hnode_t* value__Range::PrettyTree(Dict<int, bool>* seen) {
1120 seen = seen ? seen : Alloc<Dict<int, bool>>();
1121 int heap_id = ObjectId(this);
1122 if (dict_contains(seen, heap_id)) {
1123 return Alloc<hnode::AlreadySeen>(heap_id);
1124 }
1125 seen->set(heap_id, true);
1126 hnode::Record* out_node = runtime::NewRecord(value_str(this->tag()));
1127 List<Field*>* L = out_node->fields;
1128
1129 hnode_t* x0 = Alloc<hnode::Leaf>(str(this->lower), color_e::OtherConst);
1130 L->append(Alloc<Field>(StrFromC("lower"), x0));
1131
1132 hnode_t* x1 = Alloc<hnode::Leaf>(str(this->upper), color_e::OtherConst);
1133 L->append(Alloc<Field>(StrFromC("upper"), x1));
1134
1135 return out_node;
1136}
1137
1138
1139hnode_t* value_t::PrettyTree(Dict<int, bool>* seen) {
1140 switch (this->tag()) {
1141 case value_e::Interrupted: {
1142 value__Interrupted* obj = static_cast<value__Interrupted*>(this);
1143 return obj->PrettyTree(seen);
1144 }
1145 case value_e::Stdin: {
1146 value__Stdin* obj = static_cast<value__Stdin*>(this);
1147 return obj->PrettyTree(seen);
1148 }
1149 case value_e::Undef: {
1150 value__Undef* obj = static_cast<value__Undef*>(this);
1151 return obj->PrettyTree(seen);
1152 }
1153 case value_e::Str: {
1154 value__Str* obj = static_cast<value__Str*>(this);
1155 return obj->PrettyTree(seen);
1156 }
1157 case value_e::BashArray: {
1158 value__BashArray* obj = static_cast<value__BashArray*>(this);
1159 return obj->PrettyTree(seen);
1160 }
1161 case value_e::SparseArray: {
1162 value__SparseArray* obj = static_cast<value__SparseArray*>(this);
1163 return obj->PrettyTree(seen);
1164 }
1165 case value_e::BashAssoc: {
1166 value__BashAssoc* obj = static_cast<value__BashAssoc*>(this);
1167 return obj->PrettyTree(seen);
1168 }
1169 case value_e::Null: {
1170 value__Null* obj = static_cast<value__Null*>(this);
1171 return obj->PrettyTree(seen);
1172 }
1173 case value_e::Bool: {
1174 value__Bool* obj = static_cast<value__Bool*>(this);
1175 return obj->PrettyTree(seen);
1176 }
1177 case value_e::Int: {
1178 value__Int* obj = static_cast<value__Int*>(this);
1179 return obj->PrettyTree(seen);
1180 }
1181 case value_e::Float: {
1182 value__Float* obj = static_cast<value__Float*>(this);
1183 return obj->PrettyTree(seen);
1184 }
1185 case value_e::List: {
1186 value__List* obj = static_cast<value__List*>(this);
1187 return obj->PrettyTree(seen);
1188 }
1189 case value_e::Dict: {
1190 Dict_* obj = static_cast<Dict_*>(this);
1191 return obj->PrettyTree(seen);
1192 }
1193 case value_e::Eggex: {
1194 value__Eggex* obj = static_cast<value__Eggex*>(this);
1195 return obj->PrettyTree(seen);
1196 }
1197 case value_e::Match: {
1198 RegexMatch* obj = static_cast<RegexMatch*>(this);
1199 return obj->PrettyTree(seen);
1200 }
1201 case value_e::Expr: {
1202 value__Expr* obj = static_cast<value__Expr*>(this);
1203 return obj->PrettyTree(seen);
1204 }
1205 case value_e::Command: {
1206 value__Command* obj = static_cast<value__Command*>(this);
1207 return obj->PrettyTree(seen);
1208 }
1209 case value_e::Block: {
1210 value__Block* obj = static_cast<value__Block*>(this);
1211 return obj->PrettyTree(seen);
1212 }
1213 case value_e::Place: {
1214 value__Place* obj = static_cast<value__Place*>(this);
1215 return obj->PrettyTree(seen);
1216 }
1217 case value_e::Module: {
1218 value__Module* obj = static_cast<value__Module*>(this);
1219 return obj->PrettyTree(seen);
1220 }
1221 case value_e::IO: {
1222 value__IO* obj = static_cast<value__IO*>(this);
1223 return obj->PrettyTree(seen);
1224 }
1225 case value_e::Guts: {
1226 value__Guts* obj = static_cast<value__Guts*>(this);
1227 return obj->PrettyTree(seen);
1228 }
1229 case value_e::BuiltinFunc: {
1230 value__BuiltinFunc* obj = static_cast<value__BuiltinFunc*>(this);
1231 return obj->PrettyTree(seen);
1232 }
1233 case value_e::BoundFunc: {
1234 value__BoundFunc* obj = static_cast<value__BoundFunc*>(this);
1235 return obj->PrettyTree(seen);
1236 }
1237 case value_e::Proc: {
1238 value__Proc* obj = static_cast<value__Proc*>(this);
1239 return obj->PrettyTree(seen);
1240 }
1241 case value_e::Func: {
1242 value__Func* obj = static_cast<value__Func*>(this);
1243 return obj->PrettyTree(seen);
1244 }
1245 case value_e::Slice: {
1246 value__Slice* obj = static_cast<value__Slice*>(this);
1247 return obj->PrettyTree(seen);
1248 }
1249 case value_e::Range: {
1250 value__Range* obj = static_cast<value__Range*>(this);
1251 return obj->PrettyTree(seen);
1252 }
1253 default:
1254 assert(0);
1255 }
1256}
1257
1258} // namespace value_asdl