feat: add error information in the progress callback
This allows users to bail parsing if an error was *definitely* detected using the progress callback, as all possible stack versions have a non-zero error cost. Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
This commit is contained in:
parent
ca087d2c07
commit
cda634a1c4
9 changed files with 87 additions and 4 deletions
|
|
@ -94,6 +94,7 @@ typedef struct TSInput {
|
|||
typedef struct TSParseState {
|
||||
void *payload;
|
||||
uint32_t current_byte_offset;
|
||||
bool has_error;
|
||||
} TSParseState;
|
||||
|
||||
typedef struct TSParseOptions {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue