feat: implement file writer
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef FZL_WRITER_H
|
||||
#define FZL_WRITER_H
|
||||
|
||||
#include <compiler/fzl_walker.h>
|
||||
#include <compiler/utils/fzl_const_pool.h>
|
||||
|
||||
// File writer descriptor
|
||||
typedef struct
|
||||
{
|
||||
const char *filepath;
|
||||
} fzl_writer_t;
|
||||
|
||||
// Allocate writer
|
||||
fzl_writer_t *fzl_mkwriter(const char *filepath);
|
||||
|
||||
// Write out a file
|
||||
int fzl_write(fzl_writer_t *writer, fzl_walker_t *walker);
|
||||
|
||||
// Get last writer error message
|
||||
char *fzl_writer_geterror();
|
||||
|
||||
// Free writer
|
||||
void fzl_freewriter(fzl_writer_t *writer);
|
||||
|
||||
#endif // FZL_WRITER_H
|
||||
Reference in New Issue
Block a user