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
23 lines
348 B
C
23 lines
348 B
C
#ifndef HELPERS_DUMMY_LANGUAGE_H_
|
|
#define HELPERS_DUMMY_LANGUAGE_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "tree_sitter/runtime.h"
|
|
#include "tree_sitter/parser.h"
|
|
|
|
enum {
|
|
dummy_sym1 = 2,
|
|
dummy_sym2 = 3,
|
|
dummy_sym3 = 4,
|
|
};
|
|
|
|
extern TSLanguage *dummy_language;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // HELPERS_DUMMY_LANGUAGE_H_
|