Initial Demo001 code for tour of language

This commit is contained in:
Ginger Bill
2016-08-19 15:35:48 +01:00
parent ddb15e73c0
commit 745237459a
7 changed files with 582 additions and 38 deletions

View File

@@ -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);