Natools

Diff
Login

Differences From Artifact [53e712c6b3]:

To Artifact [a1983f5e7e]:


403
404
405
406
407
408
409
410

411
412
413


414
415
416
417



418
419

420
421
422
423
424


425
426
427
428
429
430
431
432
403
404
405
406
407
408
409

410



411
412




413
414
415


416





417
418

419
420
421
422
423
424
425







-
+
-
-
-
+
+
-
-
-
-
+
+
+
-
-
+
-
-
-
-
-
+
+
-







      Previous_Level : constant Natural
        := Lockable.Current_Level (Object.Stack);
   begin
      Lockable.Pop_Level (Object.Stack, State);
      State := Lockable.Null_State;
      Object.Locked := False;

      if Finish then
      if Finish and Object.Position /= null then
         declare
            Event : Events.Event := Object.Current_Event;
         begin
         if Object.Position.Kind = List_Node and then Object.Opening then
            Object.Opening := False;
            loop
               case Event is
                  when Events.Add_Atom | Events.Open_List =>
                     null;
         end if;
         pragma Assert (not Object.Opening);

                  when Events.Close_List =>
                     exit when Object.Absolute_Level < Previous_Level;
         for I in 1 .. Object.Absolute_Level - Previous_Level + 1 loop
                  when Events.Error | Events.End_Of_Input =>
                     exit;
               end case;
               Object.Next (Event);
            end loop;
            Object.Position := Object.Position.Parent;
         end loop;
         end;
      end if;

      Object.Locked
        := Object.Absolute_Level < Lockable.Current_Level (Object.Stack);
   end Unlock;

end Natools.S_Expressions.Generic_Caches;