aboutsummaryrefslogtreecommitdiff
path: root/src/compiler/lexer/lexer.c
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2024-09-18 21:28:58 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2024-09-18 21:28:58 +0330
commit7b735783ed9711d47411794d7d2051ffd3ade646 (patch)
treef24571f006c960f19b12399d70753a9792cc29e5 /src/compiler/lexer/lexer.c
parentd6ba30b94a24607bce5db5e706eb20cc051a98f0 (diff)
added README.md
some code clean up
Diffstat (limited to 'src/compiler/lexer/lexer.c')
-rw-r--r--src/compiler/lexer/lexer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/compiler/lexer/lexer.c b/src/compiler/lexer/lexer.c
index 35631f5..5c7c256 100644
--- a/src/compiler/lexer/lexer.c
+++ b/src/compiler/lexer/lexer.c
@@ -75,9 +75,7 @@ Nodes lexer(char const *restrict str) {
push_if_not_empty(&nodes, &nodes_size, &nodes_inserted, &node, str, i,
TOKEN_NONE);
break;
- }
-
- if (c == '/') {
+ } else if (c == '/') {
const char follow = str[i + 1];
if (follow == '/') {
push_if_not_empty(&nodes, &nodes_size, &nodes_inserted, &node, str, i,
@@ -280,7 +278,6 @@ bool isOperator(char c) {
bool isSymbol(char c) { return c == '#'; }
-
Token getKeyword(char const *strBegin, char const *strEnd) {
const size_t strSize = strEnd - strBegin;