Add plain C API for compiling a JSON grammar
This commit is contained in:
parent
36870bfced
commit
b69e19c525
6 changed files with 369 additions and 0 deletions
|
|
@ -54,6 +54,12 @@ class GrammarError {
|
|||
|
||||
std::pair<std::string, const GrammarError *> compile(const Grammar &,
|
||||
std::string);
|
||||
struct CompileResult {
|
||||
const char *code;
|
||||
const char *error_message;
|
||||
};
|
||||
|
||||
extern "C" CompileResult compile(const char *input);
|
||||
|
||||
} // namespace tree_sitter
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue