OILS / prebuilt / asdl / runtime.mycpp.h View on Github | oils.pub

54 lines, 32 significant
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
13using pretty_asdl::doc; // ad hoc
14
15namespace runtime { // forward declare
16 class TraversalState;
17}
18
19namespace format { // forward declare
20}
21
22namespace runtime { // declare
23
24extern int NO_SPID;
25hnode::Record* NewRecord(BigStr* node_type);
26hnode::Leaf* NewLeaf(BigStr* s, hnode_asdl::color_t e_color);
27class 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
40extern BigStr* TRUE_STR;
41extern BigStr* FALSE_STR;
42
43} // declare namespace runtime
44
45namespace format { // declare
46
47int _HNodeCount(hnode_asdl::hnode_t* h);
48int _DocCount(pretty_asdl::doc_t* d);
49void _HNodePrettyPrint(bool perf_stats, bool doc_debug, hnode_asdl::hnode_t* node, mylib::Writer* f, int max_width = 80);
50void 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