aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/preprocess.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/preprocess.c b/src/preprocess.c
index 1d5a42a..385a43e 100644
--- a/src/preprocess.c
+++ b/src/preprocess.c
@@ -498,16 +498,13 @@ static void pplexer_tokenize_all(PpLexer* ppl) {
tok->kind = TokenKind_literal_str;
tok->value.string = builder.buf;
} else if (isdigit(c)) {
+ // TODO: implement tokenization of pp-number.
StrBuilder builder;
strbuilder_init(&builder);
- while (isdigit(infile_peek_char(ppl->src))) {
+ while (isalnum(infile_peek_char(ppl->src))) {
strbuilder_append_char(&builder, infile_peek_char(ppl->src));
infile_next_char(ppl->src);
}
- // Skip integer suffix.
- while (isalpha(infile_peek_char(ppl->src))) {
- infile_next_char(ppl->src);
- }
tok->kind = TokenKind_literal_int;
tok->value.integer = atoi(builder.buf);
} else if (isalpha(c) || c == '_') {