Skip to content

Commit

Permalink
Selfhost: Parse comments
Browse files Browse the repository at this point in the history
  • Loading branch information
N00byEdge committed Oct 4, 2023
1 parent 4f35f7d commit 3269235
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions selfhost/tokenizer.n
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,15 @@ fn init() void {
if(context.peek(1) == '=') {
context.add_token_advance(.@"/=", 2);
}
else if(context.peek(1) == '/') {
loop {
const ch = context.peek(0);
if(ch == 0 || ch == '\n') {
return;
}
context.advance(1);
}
}
else {
context.add_token_advance(.@"/", 1);
}
Expand Down

0 comments on commit 3269235

Please sign in to comment.