tree-sitter/spec/runtime/helpers/spy_reader.h
Max Brunsfeld a3a7546450 In SpyReader, store entire strings read, not individual chunks
Makes assertions easier to write. We don't need to assert
that the strings were read chunk by chunk.
2014-03-18 13:23:00 -07:00

19 lines
382 B
C++

#ifndef HELPERS_SPY_READER_H_
#define HELPERS_SPY_READER_H_
#include <string>
#include <vector>
#include "tree_sitter/runtime.h"
class SpyReader {
public:
SpyReader(std::string content, size_t chunk_size);
std::string content;
size_t position;
size_t chunk_size;
ts_input input;
std::vector<std::string> strings_read;
};
#endif // HELPERS_SPY_READER_H_