implemented labels and goto parsing
This commit is contained in:
parent
1be3bf0659
commit
1ca6f024ee
7 changed files with 71 additions and 17 deletions
3
lexer.c
3
lexer.c
|
|
@ -394,8 +394,7 @@ lexer *lexer_init(char *source, usize size, arena *arena)
|
|||
trie_insert(keywords, lex->allocator, "struct", TOKEN_STRUCT);
|
||||
trie_insert(keywords, lex->allocator, "enum", TOKEN_ENUM);
|
||||
trie_insert(keywords, lex->allocator, "union", TOKEN_UNION);
|
||||
trie_insert(keywords, lex->allocator, "while", TOKEN_WHILE);
|
||||
trie_insert(keywords, lex->allocator, "for", TOKEN_FOR);
|
||||
trie_insert(keywords, lex->allocator, "loop", TOKEN_LOOP);
|
||||
trie_insert(keywords, lex->allocator, "goto", TOKEN_GOTO);
|
||||
trie_insert(keywords, lex->allocator, "if", TOKEN_IF);
|
||||
trie_insert(keywords, lex->allocator, "else", TOKEN_ELSE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue