mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-03 03:32:37 +00:00
Initial Demo001 code for tour of language
This commit is contained in:
@@ -371,18 +371,18 @@ void tokenizer_skip_whitespace(Tokenizer *t) {
|
||||
if (t->read_curr[0] == '/') { // Line comment //
|
||||
while (t->curr_rune != '\n')
|
||||
advance_to_next_rune(t);
|
||||
} else if (t->read_curr[0] == '*') { // (Nested) Block comment /**/
|
||||
} else if (t->read_curr[0] == '{') { // (Nested) Block comment /{}/
|
||||
isize comment_scope = 1;
|
||||
for (;;) {
|
||||
advance_to_next_rune(t);
|
||||
if (t->curr_rune == '/') {
|
||||
advance_to_next_rune(t);
|
||||
if (t->curr_rune == '*') {
|
||||
if (t->curr_rune == '{') {
|
||||
advance_to_next_rune(t);
|
||||
comment_scope++;
|
||||
}
|
||||
}
|
||||
if (t->curr_rune == '*') {
|
||||
if (t->curr_rune == '}') {
|
||||
advance_to_next_rune(t);
|
||||
if (t->curr_rune == '/') {
|
||||
advance_to_next_rune(t);
|
||||
|
||||
Reference in New Issue
Block a user