diff --git a/main/share/gb_reserved.h b/main/share/gb_reserved.h index 3f2a95b17..84173680a 100644 --- a/main/share/gb_reserved.h +++ b/main/share/gb_reserved.h @@ -84,7 +84,8 @@ enum { RSJ_READ, RSJ_DATATYPE, RSJ_OPTIONAL, - RSJ_BYREF + RSJ_BYREF, + RSJ_ERROR }; #define RES_is_operator(value) (COMP_res_info[value].flag & RSF_OP) diff --git a/main/share/gb_reserved_keyword.h b/main/share/gb_reserved_keyword.h index b832a09ab..a6acfaf13 100644 --- a/main/share/gb_reserved_keyword.h +++ b/main/share/gb_reserved_keyword.h @@ -105,7 +105,7 @@ COMP_INFO COMP_res_info[] = { "Stop" }, { "Quit" }, { "Raise", RSF_IDENT|RSF_EVENT }, - { "Error" }, + { "Error", 0, 0, RSJ_ERROR }, { "Super", 0, 0, RSJ_ME }, { "Enum", 0, 0, RSJ_CONST }, { "Let" }, diff --git a/main/share/gbc_read_temp.h b/main/share/gbc_read_temp.h index 34bbaad39..d2b0d8b21 100644 --- a/main/share/gbc_read_temp.h +++ b/main/share/gbc_read_temp.h @@ -318,7 +318,7 @@ static void add_identifier() { static void *jump[] = { &&__OTHERS, &&__ME_NEW_LAST_SUPER, &&__CLASS, &&__STRUCT, &&__SUB_PROCEDURE_FUNCTION, &&__CONST_EXTERN_ENUM, &&__READ, - &&__DATATYPE, &&__OPTIONAL, &&__BYREF + &&__DATATYPE, &&__OPTIONAL, &&__BYREF, &&__ERROR }; last_next_ident = (flag & RSF_IDENT) != 0; @@ -379,6 +379,10 @@ static void add_identifier() can_be_reserved = FALSE; break; + __ERROR: + can_be_reserved = canres_car[car] && !last_next_ident; + break; + __OTHERS: if (!canres_car[car]) can_be_reserved = FALSE;