apfl/src/repl.h

22 lines
408 B
C
Raw Normal View History

#ifndef APFL_REPL_H
#define APFL_REPL_H
#include "apfl.h"
enum repl_result {
REPL_OK = 0,
REPL_MORE_INPUT = 1,
REPL_ERR = 2,
REPL_FATAL = 3,
};
typedef struct repl_data *repl;
repl repl_new(struct apfl_allocator);
void repl_set_w_out(repl, struct apfl_io_writer);
void repl_set_w_err(repl, struct apfl_io_writer);
enum repl_result repl_run(repl, char *);
void repl_destroy(repl);
#endif