Just call the C lib 'the library' everywhere, don't call it a 'runtime'

This commit is contained in:
Max Brunsfeld 2019-01-10 15:22:39 -08:00
parent 38417fc8a1
commit 0f2347b318
25 changed files with 57 additions and 95 deletions

View file

@ -1,5 +1,5 @@
#ifndef TREE_SITTER_RUNTIME_H_
#define TREE_SITTER_RUNTIME_H_
#ifndef TREE_SITTER_API_H_
#define TREE_SITTER_API_H_
#ifdef __cplusplus
extern "C" {
@ -153,4 +153,4 @@ uint32_t ts_language_version(const TSLanguage *);
}
#endif
#endif // TREE_SITTER_RUNTIME_H_
#endif // TREE_SITTER_API_H_

View file

@ -1,38 +0,0 @@
#ifndef TREE_SITTER_COMPILER_H_
#define TREE_SITTER_COMPILER_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
typedef enum {
TSCompileErrorTypeNone,
TSCompileErrorTypeInvalidGrammar,
TSCompileErrorTypeInvalidRegex,
TSCompileErrorTypeUndefinedSymbol,
TSCompileErrorTypeInvalidExtraToken,
TSCompileErrorTypeInvalidExternalToken,
TSCompileErrorTypeLexConflict,
TSCompileErrorTypeParseConflict,
TSCompileErrorTypeEpsilonRule,
TSCompileErrorTypeInvalidTokenContents,
TSCompileErrorTypeInvalidRuleName,
TSCompileErrorTypeInvalidWordRule,
} TSCompileErrorType;
typedef struct {
char *code;
char *error_message;
TSCompileErrorType error_type;
} TSCompileResult;
TSCompileResult ts_compile_grammar(const char *input, FILE *log_file);
TSCompileResult ts_compile_property_sheet(const char *input, FILE *log_file);
#ifdef __cplusplus
}
#endif
#endif // TREE_SITTER_COMPILER_H_

View file

@ -13,7 +13,7 @@ extern "C" {
#define ts_builtin_sym_end 0
#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024
#ifndef TREE_SITTER_RUNTIME_H_
#ifndef TREE_SITTER_API_H_
typedef uint16_t TSSymbol;
typedef struct TSLanguage TSLanguage;
#endif