aboutsummaryrefslogtreecommitdiff
path: root/include/typdown.h
blob: abf395d4619733ae0867b7e799c4f2cc41a3c65e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);

struct typdown_Document typdown_parse(char *);
void typdown_free(struct typdown_Document);
char * typdown_renderHTML(struct typdown_Document, uint8_t *);