ref: c7320a49a942fc3380f433853c4bbdc640c92737
parent: 8d9a896166bee57c3ab851b9d18df0f053327531
author: ISSOtm <[email protected]>
date: Tue Mar 10 09:49:55 EDT 2020
Deprecate `GLOBAL` and `XDEF` They're basically synonyms for `EXPORT`, and the latter isn't even documented!
--- a/src/asm/asmy.y
+++ b/src/asm/asmy.y
@@ -564,7 +564,7 @@
%token T_POP_INCLUDE T_POP_PRINTF T_POP_PRINTT T_POP_PRINTV T_POP_PRINTI
%token T_POP_IF T_POP_ELIF T_POP_ELSE T_POP_ENDC
-%token T_POP_EXPORT T_POP_GLOBAL
+%token T_POP_EXPORT T_POP_GLOBAL T_POP_XDEF
%token T_POP_DB T_POP_DS T_POP_DW T_POP_DL
%token T_POP_SECTION
%token T_POP_RB
@@ -735,7 +735,6 @@
| else
| endc
| export
- | global
| { nPCOffset = 0; } db
| { nPCOffset = 0; } dw
| { nPCOffset = 0; } dl
@@ -950,27 +949,23 @@
}
;
-export : T_POP_EXPORT export_list
+export : export_token export_list
;
-export_list : export_list_entry
- | export_list_entry comma export_list
-;
-
-export_list_entry : scoped_id
- {
- sym_Export($1);
+export_token : T_POP_EXPORT
+ | T_POP_GLOBAL {
+ warning(WARNING_OBSOLETE, "`GLOBAL` is a deprecated synonym for `EXPORT`");
}
+ | T_POP_XDEF {
+ warning(WARNING_OBSOLETE, "`XDEF` is a deprecated synonym for `EXPORT`");
+ }
;
-global : T_POP_GLOBAL global_list
+export_list : export_list_entry
+ | export_list_entry comma export_list
;
-global_list : global_list_entry
- | global_list_entry comma global_list
-;
-
-global_list_entry : scoped_id
+export_list_entry : scoped_id
{
sym_Export($1);
}
--- a/src/asm/globlex.c
+++ b/src/asm/globlex.c
@@ -476,7 +476,7 @@
{"printv", T_POP_PRINTV},
{"printf", T_POP_PRINTF},
{"export", T_POP_EXPORT},
- {"xdef", T_POP_EXPORT},
+ {"xdef", T_POP_XDEF},
{"global", T_POP_GLOBAL},
{"ds", T_POP_DS},
{"db", T_POP_DB},