tree-sitter/src/runtime/parser.h

30 lines
527 B
C
Raw Normal View History

#ifndef RUNTIME_PARSER_H_
#define RUNTIME_PARSER_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "runtime/stack.h"
typedef struct {
TSLexer lexer;
TSStack stack;
TSStack right_stack;
size_t total_chars;
int debug;
TSTree *lookahead;
TSTree *next_lookahead;
const TSLanguage *language;
} TSParser;
TSParser ts_parser_make(const TSLanguage *);
void ts_parser_destroy(TSParser *);
2014-08-09 01:03:55 -07:00
const TSTree *ts_parser_parse(TSParser *, TSInput, TSInputEdit *);
#ifdef __cplusplus
}
#endif
#endif // RUNTIME_PARSER_H_