mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-09-19 19:19:05 +01:00
ff31971bd3
This removes Printer's legacy behaviour of generating an ID for each node as it gets printed. This old method meant that if new nodes were added to or removed from a graph, every ID after the new/removed node would change. Now IDs are stable so it is easier to follow specific nodes through multiple transformation passes in CodeGen.
30 lines
784 B
C++
30 lines
784 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
#include "oi/type_graph/Types.h"
|
|
|
|
namespace oi::detail::type_graph {
|
|
class Pass;
|
|
class TypeGraph;
|
|
} // namespace oi::detail::type_graph
|
|
|
|
using namespace oi::detail;
|
|
|
|
void check(const type_graph::TypeGraph& typeGraph,
|
|
std::string_view expected,
|
|
std::string_view comment);
|
|
|
|
void test(type_graph::Pass pass,
|
|
std::string_view input,
|
|
std::string_view expectedAfter);
|
|
|
|
void testNoChange(type_graph::Pass pass, std::string_view input);
|
|
|
|
type_graph::Container getVector(type_graph::NodeId id = 0);
|
|
type_graph::Container getMap(type_graph::NodeId id = 0);
|
|
type_graph::Container getList(type_graph::NodeId id = 0);
|
|
type_graph::Container getPair(type_graph::NodeId id = 0);
|