tree-sitter/include/tree_sitter/compiler.h

31 lines
627 B
C
Raw Normal View History

2014-03-09 22:05:17 -07:00
#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 {
const char *code;
const char *error_message;
TSCompileErrorType error_type;
} TSCompileResult;
TSCompileResult ts_compile_grammar(const char *input);
#ifdef __cplusplus
}
#endif
2014-03-09 22:05:17 -07:00
#endif // TREE_SITTER_COMPILER_H_