tree-sitter/spec/runtime/helpers/tree_helpers.h

23 lines
585 B
C
Raw Normal View History

2014-06-08 16:31:45 -07:00
#ifndef HELPERS_TREE_HELPERS_H_
#define HELPERS_TREE_HELPERS_H_
#include "runtime/tree.h"
#include <vector>
2015-05-25 20:44:23 -07:00
#include <string>
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_