Add alias to ast

This commit is contained in:
2026-04-29 11:18:40 +02:00
parent 3288efdfd7
commit 9035cc639c
6 changed files with 66 additions and 0 deletions
+2
View File
@@ -30,6 +30,7 @@ typedef struct {
static const KeywordMap keywords[] = {
{"module", TOKEN_MODULE},
{"import", TOKEN_IMPORT},
{"alias", TOKEN_ALIAS},
{"void", TOKEN_VOID},
};
@@ -220,6 +221,7 @@ Token tokenstream_next(TokenStream* ts) {
case ']': return create_token(ts, TOKEN_BRACKET_CLOSE, start_text, 1, start_line, start_column, line_start);
case ',': return create_token(ts, TOKEN_COMMA, start_text, 1, start_line, start_column, line_start);
case ';': return create_token(ts, TOKEN_SEMICOLON, start_text, 1, start_line, start_column, line_start);
case '=': return create_token(ts, TOKEN_ASSIGN, start_text, 1, start_line, start_column, line_start);
}
/* Keywords and identifiers */