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:
@@ -4,7 +4,7 @@
|
||||
#include <string.h>
|
||||
|
||||
fzl_token_t *fzl_mktoken(const fzl_toktype_t type, size_t line, size_t col,
|
||||
void *value, size_t value_len)
|
||||
void *value, size_t value_len, char *filename)
|
||||
{
|
||||
char *valholder = malloc(value_len + 1);
|
||||
memcpy(valholder, value, value_len);
|
||||
@@ -17,6 +17,7 @@ fzl_token_t *fzl_mktoken(const fzl_toktype_t type, size_t line, size_t col,
|
||||
token->store_value = value_len > 0;
|
||||
token->value = valholder;
|
||||
token->value_sz = value_len;
|
||||
token->filename = filename;
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user