summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kdx@42l.fr>2023-01-22 05:36:05 +0100
committerkdx <kdx@42l.fr>2023-01-22 05:36:05 +0100
commit8e142cd9e0f5a05c36025624e6c4897951f3e775 (patch)
tree9636620e54a4b536a019a8c0394535803b2701aa
parent3483cc605f6b952d30191fd2f79bdb0e658e0b0f (diff)
downloadgolem-8e142cd9e0f5a05c36025624e6c4897951f3e775.tar.gz
lexer todolist
-rw-r--r--README.md56
-rw-r--r--Token.c1
-rw-r--r--Token.h1
-rw-r--r--lexer.c1
4 files changed, 52 insertions, 7 deletions
diff --git a/README.md b/README.md
index 9e20dd9..29a6b52 100644
--- a/README.md
+++ b/README.md
@@ -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]` `//`
diff --git a/Token.c b/Token.c
index 3d273a2..a406332 100644
--- a/Token.c
+++ b/Token.c
@@ -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";
diff --git a/Token.h b/Token.h
index 7b4aa20..1767829 100644
--- a/Token.h
+++ b/Token.h
@@ -21,7 +21,6 @@ enum {
TOK_MODULO,
TOK_STAR,
/* double char toks */
- TOK_INCREMENT,
TOK_COMP_EQ,
TOK_COMP_NEQ,
TOK_COMMENT,
diff --git a/lexer.c b/lexer.c
index dd97785..e45f949 100644
--- a/lexer.c
+++ b/lexer.c
@@ -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;