tree-sitter/include/tree_sitter/compiler.h
2016-02-05 12:23:54 -08:00

30 lines
615 B
C

#ifndef TREE_SITTER_COMPILER_H_
#define TREE_SITTER_COMPILER_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
TSCompileErrorTypeNone,
TSCompileErrorTypeInvalidGrammar,
TSCompileErrorTypeInvalidRegex,
TSCompileErrorTypeUndefinedSymbol,
TSCompileErrorTypeInvalidUbiquitousToken,
TSCompileErrorTypeLexConflict,
TSCompileErrorTypeParseConflict,
} TSCompileErrorType;
typedef struct {
char *code;
char *error_message;
TSCompileErrorType error_type;
} TSCompileResult;
TSCompileResult ts_compile_grammar(const char *input);
#ifdef __cplusplus
}
#endif
#endif // TREE_SITTER_COMPILER_H_