]> git.sur5r.net Git - cc65/blobdiff - src/ca65/pseudo.c
Renamed variables for better readability.
[cc65] / src / ca65 / pseudo.c
index c1736d9da8de257cda90d7883a51344fe30a2373..3a2e391d39796aa600a99d896c3c4ff0a46b5c12 100644 (file)
@@ -47,6 +47,7 @@
 #include "cddefs.h"
 #include "coll.h"
 #include "intstack.h"
+#include "scopedefs.h"
 #include "symdefs.h"
 #include "tgttrans.h"
 #include "xmalloc.h"
@@ -816,7 +817,7 @@ static void DoEnd (void)
 static void DoEndProc (void)
 /* Leave a lexical level */
 {
-    if (GetCurrentSymTabType () != ST_PROC) {
+    if (CurrentScope->Type != SCOPE_SCOPE || CurrentScope->Label == 0) {
         /* No local scope */
         ErrorSkip ("No open .PROC");
     } else {
@@ -829,7 +830,7 @@ static void DoEndProc (void)
 static void DoEndScope (void)
 /* Leave a lexical level */
 {
-    if ( GetCurrentSymTabType () != ST_SCOPE) {
+    if (CurrentScope->Type != SCOPE_SCOPE || CurrentScope->Label != 0) {
         /* No local scope */
         ErrorSkip ("No open .SCOPE");
     } else {
@@ -1538,7 +1539,7 @@ static void DoProc (void)
     }
 
     /* Enter a new scope */
-    SymEnterLevel (&Name, ST_PROC, AddrSize, Sym);
+    SymEnterLevel (&Name, SCOPE_SCOPE, AddrSize, Sym);
 
     /* Free memory for Name */
     SB_Done (&Name);
@@ -1665,7 +1666,7 @@ static void DoScope (void)
     AddrSize = OptionalAddrSize ();
 
     /* Enter the new scope */
-    SymEnterLevel (&Name, ST_SCOPE, AddrSize, 0);
+    SymEnterLevel (&Name, SCOPE_SCOPE, AddrSize, 0);
 
     /* Free memory for Name */
     SB_Done (&Name);
@@ -1759,7 +1760,7 @@ static void DoTag (void)
         ErrorSkip ("Unknown struct");
         return;
     }
-    if (GetSymTabType (Struct) != ST_STRUCT) {
+    if (GetSymTabType (Struct) != SCOPE_STRUCT) {
         ErrorSkip ("Not a struct");
         return;
     }