lang: lex: add finally keyword
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#ifndef IVY_LANG_LEX_H_
|
||||
#define IVY_LANG_LEX_H_
|
||||
|
||||
#include <blue/core/queue.h>
|
||||
#include <ivy/line-source.h>
|
||||
#include <ivy/misc.h>
|
||||
#include <ivy/status.h>
|
||||
#include <blue/core/queue.h>
|
||||
|
||||
enum ivy_token_type {
|
||||
IVY_TOK_NONE = 0,
|
||||
@@ -33,6 +33,7 @@ enum ivy_keyword {
|
||||
IVY_KW_TRY,
|
||||
IVY_KW_THROW,
|
||||
IVY_KW_CATCH,
|
||||
IVY_KW_FINALLY,
|
||||
IVY_KW_IF,
|
||||
IVY_KW_THEN,
|
||||
IVY_KW_AND,
|
||||
|
||||
@@ -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_FINALLY, "finally"),
|
||||
LEX_TOKEN_DEF(IVY_KW_UNDERSTANDS, "understands"),
|
||||
LEX_TOKEN_DEF(IVY_KW_IF, "if"),
|
||||
LEX_TOKEN_DEF(IVY_KW_THEN, "then"),
|
||||
@@ -1115,6 +1116,7 @@ const char *ivy_keyword_to_string(enum ivy_keyword keyword)
|
||||
ENUM_STR(IVY_KW_TRY);
|
||||
ENUM_STR(IVY_KW_THROW);
|
||||
ENUM_STR(IVY_KW_CATCH);
|
||||
ENUM_STR(IVY_KW_FINALLY);
|
||||
ENUM_STR(IVY_KW_IF);
|
||||
ENUM_STR(IVY_KW_THEN);
|
||||
ENUM_STR(IVY_KW_AND);
|
||||
|
||||
Reference in New Issue
Block a user