tree-sitter/spec/runtime/helpers/tree_helpers.h
2015-07-31 15:47:48 -07:00

23 lines
651 B
C++

#ifndef HELPERS_TREE_HELPERS_H_
#define HELPERS_TREE_HELPERS_H_
#include "runtime/tree.h"
#include <vector>
#include <string>
extern const char *symbol_names[12];
TSTree ** tree_array(std::vector<TSTree *> trees);
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);
std::ostream &operator<<(std::ostream &stream, const TSTree *tree);
std::ostream &operator<<(std::ostream &stream, const TSNode ref);
#endif // HELPERS_TREE_HELPERS_H_