reader: add a few more read errors and read_err_to_cstr

This commit is contained in:
2026-02-05 04:06:27 +00:00
parent 1e451c57e8
commit 75daad53ea

View File

@@ -8,13 +8,18 @@
#ifndef READER_H
#define READER_H
#include <alisp/lisp.h>
#include <alisp/stream.h>
typedef enum
{
READ_OK = 0,
READ_ERR_OK = 0,
READ_ERR_EOF,
READ_ERR_UNKNOWN_CHAR,
} read_err_t;
const char *read_err_to_cstr(read_err_t);
// Attempt to read an expression from the stream, storing it in a pointer,
// returning any errors if failed.
read_err_t read(sys_t *, stream_t *, lisp_t **);