Allows referencing a scope not yet created.
Use the "::" syntax at the start of the symbol to force creating a scope if it does not exists yet. Fixes issue #479.
This commit is contained in:
@@ -136,10 +136,10 @@ SymTable* ParseScopedIdent (StrBuf* Name, StrBuf* FullName)
|
|||||||
SB_Append (FullName, Name);
|
SB_Append (FullName, Name);
|
||||||
|
|
||||||
/* Search for the child scope */
|
/* Search for the child scope */
|
||||||
Scope = SymFindScope (Scope, Name, SYM_FIND_EXISTING);
|
Scope = SymFindScope (Scope, Name, SYM_ALLOC_NEW);
|
||||||
if (Scope == 0) {
|
if (Scope == 0) {
|
||||||
/* Scope not found */
|
/* Scope not found */
|
||||||
Error ("No such scope: `%m%p'", FullName);
|
Error ("Can't create scope: `%m%p'", FullName);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user