tree-sitter/spec/runtime/helpers/tree_helpers.h
2015-06-18 17:03:17 -07:00

22 lines
585 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);
#endif // HELPERS_TREE_HELPERS_H_