diff options
| author | peter <peter@pmikkelsen.com> | 2026-08-21 10:55:30 +0000 |
|---|---|---|
| committer | peter <peter@pmikkelsen.com> | 2026-08-21 10:55:30 +0000 |
| commit | 8af7b7fc0a8dbe3502a7cd43c6a10fdcc6013677 (patch) | |
| tree | 68f2456a9f31044ca088a26a2c3306c98e6cce2b /src/include | |
| parent | 86feda786f115cb4468957f00b8968b986ed7c54 (diff) | |
Start working on the scanner.
For now, all that is implemented is some functionality which imports UTF-8 into the
memory managed by aplwc, after checking that the data is in fact valid UTF-8.
FossilOrigin-Name: c861e88777d8180cb7b37c11fc7016a900f9d5821a7e3c8e8aab54118d2fca94
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/aplwc.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/include/aplwc.h b/src/include/aplwc.h index d4d101c..75d9485 100644 --- a/src/include/aplwc.h +++ b/src/include/aplwc.h @@ -7,17 +7,24 @@ enum aplwc_rc { APLWC_OK, APLWC_OUT_OF_MEMORY, + APLWC_NOT_YET_IMPLEMENTED, + APLWC_INVALID_UTF8, - APLWC_RC_LAST = APLWC_OUT_OF_MEMORY + APLWC_RC_LAST = APLWC_INVALID_UTF8 }; struct aplwc; +struct aplwc_line; enum aplwc_rc aplwc_new(struct aplwc **, uint8_t *, size_t); void aplwc_destroy(struct aplwc *); const char *aplwc_errstr_rc(enum aplwc_rc); const char *aplwc_errstr(struct aplwc *); +enum aplwc_rc aplwc_last_error(struct aplwc *); +struct aplwc_line *aplwc_read(struct aplwc *, const char *); +void aplwc_free_line(struct aplwc_line *); +enum aplwc_rc aplwc_eval(struct aplwc_line *); -#define APLWC_MIN_MEM (128) +#define APLWC_MIN_MEM (64) #endif /* APLWC_H */ |