diff options
author | kdx <kdx@42l.fr> | 2023-01-22 05:36:05 +0100 |
---|---|---|
committer | kdx <kdx@42l.fr> | 2023-01-22 05:36:05 +0100 |
commit | 8e142cd9e0f5a05c36025624e6c4897951f3e775 (patch) | |
tree | 9636620e54a4b536a019a8c0394535803b2701aa | |
parent | 3483cc605f6b952d30191fd2f79bdb0e658e0b0f (diff) | |
download | golem-8e142cd9e0f5a05c36025624e6c4897951f3e775.tar.gz |
lexer todolist
-rw-r--r-- | README.md | 56 | ||||
-rw-r--r-- | Token.c | 1 | ||||
-rw-r--r-- | Token.h | 1 | ||||
-rw-r--r-- | lexer.c | 1 |
4 files changed, 52 insertions, 7 deletions
@@ -67,7 +67,55 @@ It's sheer simplicity makes it easily expandable. I fucking wanted to make it. -## When? - -I don't know, I progress on GOLEM to procrastinate on important work so -probably soon lol +## Project state + +`[ ]` lexer +* `[x]` word +* `[x]` decimal litteral +* `[ ]` hexadecimal litteral +* `[ ]` binary litteral +* `[ ]` char litteral +* `[x]` string litteral +* `[x]` `var` +* `[x]` `const` +* `[x]` `fn` +* `[ ]` `if` +* `[ ]` `else` +* `[ ]` `while` +* `[x]` `(` +* `[x]` `)` +* `[x]` `{` +* `[x]` `}` +* `[x]` `[` +* `[x]` `]` +* `[x]` `:` +* `[x]` `;` +* `[x]` `=` +* `[ ]` `+=` +* `[ ]` `-=` +* `[ ]` `*=` +* `[ ]` `/=` +* `[ ]` `%=` +* `[ ]` `&=` +* `[ ]` `|=` +* `[ ]` `^=` +* `[ ]` `+` +* `[ ]` `-` +* `[ ]` `*` +* `[ ]` `/` +* `[ ]` `%` +* `[ ]` `&` +* `[ ]` `|` +* `[ ]` `^` +* `[ ]` `~` +* `[ ]` `$` +* `[ ]` `!` +* `[x]` `==` +* `[x]` `!=` +* `[x]` `<` +* `[ ]` `>` +* `[ ]` `<=` +* `[ ]` `>=` +* `[ ]` `||` +* `[ ]` `&&` +* `[x]` `//` @@ -40,7 +40,6 @@ const char *token_type_str(unsigned int type) case TOK_COMP_LESS: return "TOK_COMP_LESS"; case TOK_MODULO: return "TOK_MODULO"; case TOK_STAR: return "TOK_STAR"; - case TOK_INCREMENT: return "TOK_INCREMENT"; case TOK_COMP_EQ: return "TOK_COMP_EQ"; case TOK_COMP_NEQ: return "TOK_COMP_NEQ"; case TOK_KW_CONST: return "TOK_KW_CONST"; @@ -21,7 +21,6 @@ enum { TOK_MODULO, TOK_STAR, /* double char toks */ - TOK_INCREMENT, TOK_COMP_EQ, TOK_COMP_NEQ, TOK_COMMENT, @@ -40,7 +40,6 @@ static unsigned int one_wide_tok(const char *s) static unsigned int two_wide_tok(const char *s) { switch (PAIR(s[0], s[1])) { - case PAIR('+', '+'): return TOK_INCREMENT; case PAIR('=', '='): return TOK_COMP_EQ; case PAIR('!', '='): return TOK_COMP_NEQ; case PAIR('/', '/'): return TOK_COMMENT; |