lang: lex: add definitions for some missing symbols and keywords

This commit is contained in:
2024-11-27 22:28:17 +00:00
parent 5af2692555
commit c7e3cea9b9
2 changed files with 12 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ static struct lex_token_def keywords[] = {
LEX_TOKEN_DEF(IVY_KW_TRY, "try"),
LEX_TOKEN_DEF(IVY_KW_THROW, "throw"),
LEX_TOKEN_DEF(IVY_KW_CATCH, "catch"),
LEX_TOKEN_DEF(IVY_KW_UNDERSTANDS, "understands"),
LEX_TOKEN_DEF(IVY_KW_IF, "if"),
LEX_TOKEN_DEF(IVY_KW_AND, "and"),
LEX_TOKEN_DEF(IVY_KW_OR, "or"),
@@ -85,6 +86,7 @@ static struct lex_token_def symbols[] = {
LEX_TOKEN_DEF(IVY_SYM_PIPE_EQUAL, "|="),
LEX_TOKEN_DEF(IVY_SYM_PERCENT_EQUAL, "%="),
LEX_TOKEN_DEF(IVY_SYM_CARET_EQUAL, "^="),
LEX_TOKEN_DEF(IVY_SYM_BANG_EQUAL, "!="),
LEX_TOKEN_DEF(IVY_SYM_HASH, "#"),
LEX_TOKEN_DEF(IVY_SYM_BANG, "!"),
LEX_TOKEN_DEF(IVY_SYM_PIPE, "|"),