From 79aff1a5b0224e5d3368aed03b4144cf144da327 Mon Sep 17 00:00:00 2001 From: Daniel Serpell Date: Sun, 13 Dec 2020 20:03:17 -0300 Subject: [PATCH] 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. --- src/ca65/symbol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ca65/symbol.c b/src/ca65/symbol.c index 3b06fd1a2..4ae1a3e41 100644 --- a/src/ca65/symbol.c +++ b/src/ca65/symbol.c @@ -136,10 +136,10 @@ SymTable* ParseScopedIdent (StrBuf* Name, StrBuf* FullName) SB_Append (FullName, Name); /* Search for the child scope */ - Scope = SymFindScope (Scope, Name, SYM_FIND_EXISTING); + Scope = SymFindScope (Scope, Name, SYM_ALLOC_NEW); if (Scope == 0) { /* Scope not found */ - Error ("No such scope: '%m%p'", FullName); + Error ("Can't create scope: '%m%p'", FullName); return 0; }