diff options
author | kdx <kikoodx@paranoici.org> | 2023-06-13 15:38:48 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-06-13 15:38:48 +0200 |
commit | cd20e8bb36f6ef65bea0e062c66867cb80568152 (patch) | |
tree | 65a50752ac50478897939e2a35d6c35c3e81700b /src | |
parent | dea6dce494e9c403f1f9e2178cd8c7d0aad79738 (diff) | |
download | golem-cd20e8bb36f6ef65bea0e062c66867cb80568152.tar.gz |
comment with 🗿
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -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; |