Work on named scopes
git-svn-id: svn://svn.cc65.org/cc65/trunk@2592 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -60,17 +60,11 @@ SymEntry* SymList = 0; /* List of all symbol table entries */
|
||||
|
||||
|
||||
|
||||
SymEntry* NewSymEntry (const char* Name)
|
||||
SymEntry* NewSymEntry (unsigned Name)
|
||||
/* Allocate a symbol table entry, initialize and return it */
|
||||
{
|
||||
SymEntry* S;
|
||||
unsigned Len;
|
||||
|
||||
/* Get the length of the name */
|
||||
Len = strlen (Name);
|
||||
|
||||
/* Allocate memory */
|
||||
S = xmalloc (sizeof (SymEntry) + Len);
|
||||
SymEntry* S = xmalloc (sizeof (SymEntry));
|
||||
|
||||
/* Initialize the entry */
|
||||
S->Left = 0;
|
||||
@@ -80,8 +74,9 @@ SymEntry* NewSymEntry (const char* Name)
|
||||
S->Pos = CurPos;
|
||||
S->Flags = 0;
|
||||
S->V.Expr = 0;
|
||||
S->ExprRefs = AUTO_COLLECTION_INITIALIZER;
|
||||
memset (S->ConDesPrio, 0, sizeof (S->ConDesPrio));
|
||||
memcpy (S->Name, Name, Len+1);
|
||||
S->Name = Name;
|
||||
|
||||
/* Insert it into the list of all entries */
|
||||
S->List = SymList;
|
||||
@@ -92,4 +87,4 @@ SymEntry* NewSymEntry (const char* Name)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user