| 1 | // prebuilt/asdl/runtime.mycpp.h: GENERATED by mycpp
|
| 2 |
|
| 3 | #ifndef ASDL_RUNTIME_MYCPP_H
|
| 4 | #define ASDL_RUNTIME_MYCPP_H
|
| 5 |
|
| 6 | #include "_gen/asdl/hnode.asdl.h"
|
| 7 | #include "_gen/display/pretty.asdl.h"
|
| 8 | #include "cpp/data_lang.h"
|
| 9 | #include "mycpp/runtime.h"
|
| 10 |
|
| 11 | #include "_gen/display/pretty.asdl.h"
|
| 12 |
|
| 13 | using pretty_asdl::doc; // ad hoc
|
| 14 |
|
| 15 | namespace runtime { // forward declare
|
| 16 | class TraversalState;
|
| 17 | }
|
| 18 |
|
| 19 | namespace format { // forward declare
|
| 20 | }
|
| 21 |
|
| 22 | namespace runtime { // declare
|
| 23 |
|
| 24 | extern int NO_SPID;
|
| 25 | hnode::Record* NewRecord(BigStr* node_type);
|
| 26 | hnode::Leaf* NewLeaf(BigStr* s, hnode_asdl::color_t e_color);
|
| 27 | class TraversalState {
|
| 28 | public:
|
| 29 | TraversalState();
|
| 30 | Dict<int, bool>* seen{};
|
| 31 | Dict<int, int>* ref_count{};
|
| 32 |
|
| 33 | static constexpr ObjHeader obj_header() {
|
| 34 | return ObjHeader::ClassScanned(2, sizeof(TraversalState));
|
| 35 | }
|
| 36 |
|
| 37 | DISALLOW_COPY_AND_ASSIGN(TraversalState)
|
| 38 | };
|
| 39 |
|
| 40 | extern BigStr* TRUE_STR;
|
| 41 | extern BigStr* FALSE_STR;
|
| 42 |
|
| 43 | } // declare namespace runtime
|
| 44 |
|
| 45 | namespace format { // declare
|
| 46 |
|
| 47 | int _HNodeCount(hnode_asdl::hnode_t* h);
|
| 48 | int _DocCount(pretty_asdl::doc_t* d);
|
| 49 | void _HNodePrettyPrint(bool perf_stats, bool doc_debug, hnode_asdl::hnode_t* node, mylib::Writer* f, int max_width = 80);
|
| 50 | void HNodePrettyPrint(hnode_asdl::hnode_t* node, mylib::Writer* f, int max_width = 80);
|
| 51 |
|
| 52 | } // declare namespace format
|
| 53 |
|
| 54 | #endif // ASDL_RUNTIME_MYCPP_H
|