X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fca65%2Fpseudo.c;h=3a2e391d39796aa600a99d896c3c4ff0a46b5c12;hb=115db5974355a73ae486019c78779d24049e6513;hp=e900f88615ec4cc385fc419d1864e2ad13271ab6;hpb=4191eb771878e678121e22748475e81778d0e820;p=cc65 diff --git a/src/ca65/pseudo.c b/src/ca65/pseudo.c index e900f8861..3a2e391d3 100644 --- a/src/ca65/pseudo.c +++ b/src/ca65/pseudo.c @@ -817,7 +817,7 @@ static void DoEnd (void) static void DoEndProc (void) /* Leave a lexical level */ { - if (GetCurrentSymTabType () != SCOPETYPE_PROC) { + if (CurrentScope->Type != SCOPE_SCOPE || CurrentScope->Label == 0) { /* No local scope */ ErrorSkip ("No open .PROC"); } else { @@ -830,7 +830,7 @@ static void DoEndProc (void) static void DoEndScope (void) /* Leave a lexical level */ { - if ( GetCurrentSymTabType () != SCOPETYPE_SCOPE) { + if (CurrentScope->Type != SCOPE_SCOPE || CurrentScope->Label != 0) { /* No local scope */ ErrorSkip ("No open .SCOPE"); } else { @@ -1539,7 +1539,7 @@ static void DoProc (void) } /* Enter a new scope */ - SymEnterLevel (&Name, SCOPETYPE_PROC, AddrSize, Sym); + SymEnterLevel (&Name, SCOPE_SCOPE, AddrSize, Sym); /* Free memory for Name */ SB_Done (&Name); @@ -1666,7 +1666,7 @@ static void DoScope (void) AddrSize = OptionalAddrSize (); /* Enter the new scope */ - SymEnterLevel (&Name, SCOPETYPE_SCOPE, AddrSize, 0); + SymEnterLevel (&Name, SCOPE_SCOPE, AddrSize, 0); /* Free memory for Name */ SB_Done (&Name); @@ -1760,7 +1760,7 @@ static void DoTag (void) ErrorSkip ("Unknown struct"); return; } - if (GetSymTabType (Struct) != SCOPETYPE_STRUCT) { + if (GetSymTabType (Struct) != SCOPE_STRUCT) { ErrorSkip ("Not a struct"); return; }