mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-29 06:17:48 +00:00
Allow local symbols to be referenced
Local symbols can now be referenced outside the scope of their parent, by using the syntax “Parent.Chlid”. - Local symbol names are now stored internally as “Parent.Child”. - The symbol’s scope field no longer forms a linked list of the prior local symbols; it will now always contain the parent. - Add the ability use EXPORT and GLOBAL with local symbols. - Reduce duplication between findsymbol() and findpsymbol(), as well as between sym_AddLocalReloc() and sym_AddReloc().
This commit is contained in:
@@ -587,7 +587,11 @@ label : /* empty */
|
||||
else
|
||||
sym_AddReloc($1);
|
||||
} | T_LABEL ':' ':' {
|
||||
sym_AddReloc($1);
|
||||
if ($1[0] == '.') {
|
||||
sym_AddLocalReloc($1);
|
||||
} else {
|
||||
sym_AddReloc($1);
|
||||
}
|
||||
sym_Export($1);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user