feat: enhance compiler
- Add comments and test for it - Add semicolon as required end of some expressions - Add new arguments parser - Add multi-file compilation - Add colors in output
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define FZL_READER_H
|
||||
|
||||
#include <compiler/fzl_token.h>
|
||||
#include <compiler/utils/fzl_linked.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
@@ -19,16 +20,16 @@ typedef struct
|
||||
fzl_reader_ll_t *first;
|
||||
fzl_reader_ll_t *last;
|
||||
|
||||
fzl_linked_t *linked;
|
||||
|
||||
char *source;
|
||||
size_t size;
|
||||
|
||||
size_t position;
|
||||
size_t line_start;
|
||||
size_t line_n;
|
||||
} fzl_reader_t;
|
||||
|
||||
// Allocate new reader
|
||||
fzl_reader_t *fzl_mkreader(char *source);
|
||||
fzl_reader_t *fzl_mkreader(fzl_linked_t *linked);
|
||||
|
||||
// Read source file
|
||||
int fzl_read(fzl_reader_t *reader);
|
||||
|
||||
Reference in New Issue
Block a user