diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-05-04 16:31:51 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-05-04 16:31:51 +0200 |
| commit | 308c8893d9706318e8e756069f40c1435a70df91 (patch) | |
| tree | 5dd53a179f3b76d5638d300a3a9713fa37a42275 /include/typdown.h | |
| parent | 4d151a25403e734ab3724d3bda21e29c396cd147 (diff) | |
feat(lib): return multiple errors
Diffstat (limited to 'include/typdown.h')
| -rw-r--r-- | include/typdown.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/typdown.h b/include/typdown.h index 8de37d8..abf395d 100644 --- a/include/typdown.h +++ b/include/typdown.h @@ -1,8 +1,20 @@ #pragma once #include <stdint.h> +#include <stdlib.h> + +struct typdown_Error { + uint8_t code; + struct {size_t beg; size_t end;} location; +}; + +struct typdown_Document { + void *root; + struct typdown_Error *errors; + size_t errors_len; +}; char * typdown_getErrorString(uint8_t); -void * typdown_parse(char *, uint8_t *); -void typdown_free(void *); -char * typdown_renderHTML(void *, uint8_t *); +struct typdown_Document typdown_parse(char *); +void typdown_free(struct typdown_Document); +char * typdown_renderHTML(struct typdown_Document, uint8_t *); |
