diff options
author | c+1 | 2023-05-18 17:57:56 -0400 |
---|---|---|
committer | c+1 | 2023-05-18 17:57:56 -0400 |
commit | f6ae20caf8191f78eea90edfb17f316db8f8c6b5 (patch) | |
tree | 076bec3d50cb23b11f1240d0926f5f8d42b57cc4 /src/include/token.h | |
parent | 9c78e75eb59da9c7fb8fbdd5b536ab1b22727859 (diff) |
finished the lexer, for real this time
Diffstat (limited to 'src/include/token.h')
-rw-r--r-- | src/include/token.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/include/token.h b/src/include/token.h index 45154f4..f7a166f 100644 --- a/src/include/token.h +++ b/src/include/token.h @@ -16,7 +16,8 @@ typedef struct TOKEN_STRUC { TOKEN_DIRECTIVE, // #DIRECTIVE; TOKEN_FN_APPLY, // . TOKEN_LIST_DELIM, // , - TOKEN_DEF_ARGS_DELIM, // : + TOKEN_DEF_TAGS_DELIM, // : + TOKEN_DEF, // def:def TOKEN_BLOCK_DELIM_START, // { TOKEN_BLOCK_DELIM_END, // } TOKEN_NAMESPACE_DELIM, // / @@ -28,6 +29,8 @@ typedef struct TOKEN_STRUC { char* value; } token_t; +token_t* token_init(int type, char* val); + char TOKEN_DEFNAME_FIRST_CHAR_ALLOWED_CHARS[] = "abcdefghijklmnopqrstuvwxyz_"; // chars that can begin a var name int TOKEN_DEFNAME_FIRST_CHAR_ALLOWED_CHARS_LEN = 27; // maximum efficiency! char TOKEN_DEFNAME_SPLIT_CHAR_ALLOWED_CHARS[] = "1234567890_-"; // chars that can be in the rest of the var name, |