diff options
Diffstat (limited to 'include')
| -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 *); |
