summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/main.c b/src/main.c
index a76d098..622ced0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -130,20 +130,15 @@ tokenize(char *p)
Token *cur = &head;
while (*p != '\0') {
- if (*p == '/' && p[1] == '/') {
+ /* comment */
+ if (strncmp(p, "//", 2) == 0 ||
+ strncmp(p, "🗿", strlen("🗿")) == 0)
+ {
while (*p != '\0' && *p != '\n')
p++;
continue;
}
- if (*p == '#') {
- char *q = p + 1;
- while (*p != '\n' && *p != '\0') {
- p += 1;
- }
- printf("%.*s\n", (int)(p - q), q);
- }
-
if (isspace(*p)) {
p++;
continue;