Added o65 symbol export capability

git-svn-id: svn://svn.cc65.org/cc65/trunk@1127 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2001-12-01 17:14:12 +00:00
parent ebbd68673b
commit 90ca5c1af9
5 changed files with 147 additions and 44 deletions

View File

@@ -833,6 +833,10 @@ static void ParseO65 (void)
case CFGTOK_EXPORT:
/* We expect an identifier */
CfgAssureIdent ();
/* Check if the export symbol is also defined as an import. */
if (O65GetImport (O65FmtDesc, CfgSVal) != 0) {
CfgError ("Exported symbol `%s' cannot be an import", CfgSVal);
}
/* Check if we have this symbol defined already. The entry
* routine will check this also, but we get a more verbose
* error message when checking it here.
@@ -847,15 +851,19 @@ static void ParseO65 (void)
case CFGTOK_IMPORT:
/* We expect an identifier */
CfgAssureIdent ();
/* Check if we have this symbol defined already. The entry
* routine will check this also, but we get a more verbose
* error message when checking it here.
*/
if (O65GetImport (O65FmtDesc, CfgSVal) != 0) {
CfgError ("Duplicate imported symbol: `%s'", CfgSVal);
}
/* Insert the symbol into the table */
O65SetImport (O65FmtDesc, CfgSVal);
/* Check if the imported symbol is also defined as an export. */
if (O65GetExport (O65FmtDesc, CfgSVal) != 0) {
CfgError ("Imported symbol `%s' cannot be an export", CfgSVal);
}
/* Check if we have this symbol defined already. The entry
* routine will check this also, but we get a more verbose
* error message when checking it here.
*/
if (O65GetImport (O65FmtDesc, CfgSVal) != 0) {
CfgError ("Duplicate imported symbol: `%s'", CfgSVal);
}
/* Insert the symbol into the table */
O65SetImport (O65FmtDesc, CfgSVal);
break;
case CFGTOK_TYPE: