added postfix, break and return parsing
This commit is contained in:
parent
37356facc2
commit
1be3bf0659
9 changed files with 115 additions and 13 deletions
2
lexer.c
2
lexer.c
|
|
@ -400,7 +400,7 @@ lexer *lexer_init(char *source, usize size, arena *arena)
|
|||
trie_insert(keywords, lex->allocator, "if", TOKEN_IF);
|
||||
trie_insert(keywords, lex->allocator, "else", TOKEN_ELSE);
|
||||
trie_insert(keywords, lex->allocator, "switch", TOKEN_SWITCH);
|
||||
trie_insert(keywords, lex->allocator, "case", TOKEN_CASE);
|
||||
trie_insert(keywords, lex->allocator, "break", TOKEN_BREAK);
|
||||
trie_insert(keywords, lex->allocator, "do", TOKEN_DO);
|
||||
trie_insert(keywords, lex->allocator, "defer", TOKEN_DEFER);
|
||||
trie_insert(keywords, lex->allocator, "return", TOKEN_RETURN);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue