#include "cddefs.h"
#include "coll.h"
#include "intstack.h"
+#include "scopedefs.h"
#include "symdefs.h"
#include "tgttrans.h"
#include "xmalloc.h"
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 {
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 {
}
/* Enter a new scope */
- SymEnterLevel (&Name, ST_PROC, AddrSize, Sym);
+ SymEnterLevel (&Name, SCOPE_SCOPE, AddrSize, Sym);
/* Free memory for Name */
SB_Done (&Name);
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);
ErrorSkip ("Unknown struct");
return;
}
- if (GetSymTabType (Struct) != ST_STRUCT) {
+ if (GetSymTabType (Struct) != SCOPE_STRUCT) {
ErrorSkip ("Not a struct");
return;
}