Generated parsers no longer export a parser constructor function. They now export an opaque Language object which can be set on Documents directly. This way, the logic for constructing parsers lives entirely in the runtime. The Languages are just structs which have no load-time dependency on the runtime
16 lines
207 B
C
16 lines
207 B
C
#ifndef RUNTIME_LEXER_H_
|
|
#define RUNTIME_LEXER_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "tree_sitter/parser.h"
|
|
|
|
TSLexer ts_lexer_make();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // RUNTIME_LEXER_H_
|