2014-07-30 23:40:02 -07:00
|
|
|
#ifndef RUNTIME_PARSER_H_
|
|
|
|
|
#define RUNTIME_PARSER_H_
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "runtime/stack.h"
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
TSLexer lexer;
|
|
|
|
|
TSStack stack;
|
2014-10-09 14:02:03 -07:00
|
|
|
TSStack right_stack;
|
|
|
|
|
size_t total_chars;
|
2014-07-30 23:40:02 -07:00
|
|
|
TSTree *lookahead;
|
|
|
|
|
const TSLanguage *language;
|
|
|
|
|
} TSParser;
|
|
|
|
|
|
2014-10-13 01:02:12 -07:00
|
|
|
TSParser ts_parser_make();
|
2014-07-30 23:40:02 -07:00
|
|
|
void ts_parser_destroy(TSParser *);
|
2014-10-17 17:52:54 -07:00
|
|
|
TSDebugger ts_parser_get_debugger(const TSParser *);
|
|
|
|
|
void ts_parser_set_debugger(TSParser *, TSDebugger);
|
2014-08-09 01:03:55 -07:00
|
|
|
const TSTree *ts_parser_parse(TSParser *, TSInput, TSInputEdit *);
|
2014-07-30 23:40:02 -07:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif // RUNTIME_PARSER_H_
|