DEADSOFTWARE

Исправлены опережающие объявления локальных типов-записей, добавлены модули Oberon...
[dsw-obn.git] / src / oberon.c
index 58823246bde98fb0e9ebedd171d7fe24e85659c4..04eaf8c8fd29e32e6b5318db2981e64d2a02b2cd 100644 (file)
@@ -2631,9 +2631,8 @@ oberon_field_list(oberon_context_t * ctx, oberon_type_t * rec, oberon_scope_t *
 static void
 oberon_type_record_body(oberon_context_t * ctx, oberon_type_t * rec)
 {
-       oberon_scope_t * modscope = ctx -> mod -> decl; 
        oberon_scope_t * oldscope = ctx -> decl;
-       ctx -> decl = modscope;
+       ctx -> decl = oldscope;
 
        if(ctx -> token == LPAREN)
        {
@@ -2674,11 +2673,11 @@ oberon_type_record_body(oberon_context_t * ctx, oberon_type_t * rec)
        this_scope -> parent = NULL;
        this_scope -> parent_type = rec;
 
-       oberon_field_list(ctx, rec, modscope);
+       oberon_field_list(ctx, rec, oldscope);
        while(ctx -> token == SEMICOLON)
        {
                oberon_assert_token(ctx, SEMICOLON);
-               oberon_field_list(ctx, rec, modscope);
+               oberon_field_list(ctx, rec, oldscope);
        }
 
        rec -> scope = this_scope;