Refactor parser error messages
- move message generation to TSParseError, so that Parser doesn’t need to import <string>, and can be compiled as plain C.
This commit is contained in:
parent
f342067293
commit
7a3092b765
9 changed files with 91 additions and 90 deletions
|
|
@ -12,14 +12,13 @@ extern "C" {
|
|||
typedef int TSState;
|
||||
typedef struct TSStackEntry TSStackEntry;
|
||||
typedef struct TSParser {
|
||||
TSTree *tree;
|
||||
const char *input;
|
||||
const char *error_message;
|
||||
size_t position;
|
||||
TSTree *lookahead_node;
|
||||
TSState lex_state;
|
||||
TSStackEntry *stack;
|
||||
size_t stack_size;
|
||||
TSParseResult result;
|
||||
} TSParser;
|
||||
|
||||
TSParser TSParserMake(const char *input);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue