2014-06-08 16:31:45 -07:00
|
|
|
#ifndef HELPERS_TREE_HELPERS_H_
|
|
|
|
|
#define HELPERS_TREE_HELPERS_H_
|
|
|
|
|
|
2014-09-02 22:17:04 -07:00
|
|
|
#include "runtime/tree.h"
|
2014-06-03 13:19:49 -07:00
|
|
|
#include <vector>
|
2015-05-25 20:44:23 -07:00
|
|
|
#include <string>
|
2014-06-03 13:19:49 -07:00
|
|
|
|
2015-06-03 09:44:13 -07:00
|
|
|
extern const char *symbol_names[12];
|
|
|
|
|
|
2014-06-28 18:45:22 -07:00
|
|
|
TSTree ** tree_array(std::vector<TSTree *> trees);
|
2014-06-08 16:31:45 -07:00
|
|
|
|
2015-05-25 20:44:23 -07:00
|
|
|
struct EqualsTree {
|
|
|
|
|
EqualsTree(const TSTree *expected, const char **symbol_names);
|
|
|
|
|
bool Matches(const TSTree *actual) const;
|
|
|
|
|
const TSTree *expected;
|
|
|
|
|
const char **symbol_names;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
std::ostream &operator<<(std::ostream &stream, const EqualsTree &matcher);
|
2015-06-03 09:44:13 -07:00
|
|
|
std::ostream &operator<<(std::ostream &stream, const TSTree *tree);
|
2015-05-25 20:44:23 -07:00
|
|
|
|
2014-07-17 23:29:11 -07:00
|
|
|
#endif // HELPERS_TREE_HELPERS_H_
|