Natools

Diff
Login

Differences From Artifact [cff366157d]:

To Artifact [7b55adc7b9]:


46
47
48
49
50
51
52





























53
   procedure Next (Object : in out Descriptor'Class) is
      Discarded : Events.Event;
      pragma Unreferenced (Discarded);
   begin
      Next (Object, Discarded);
   end Next;






























end Natools.S_Expressions;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
   procedure Next (Object : in out Descriptor'Class) is
      Discarded : Events.Event;
      pragma Unreferenced (Discarded);
   begin
      Next (Object, Discarded);
   end Next;


   procedure Close_Current_List (Object : in out Descriptor'Class) is
      Level : Natural := 0;
      Event : Events.Event := Object.Current_Event;
   begin
      if Object.Current_Event in Events.Error | Events.End_Of_Input then
         return;
      end if;

      loop
         Object.Next (Event);

         case Event is
            when Events.Error | Events.End_Of_Input =>
               exit;

            when Events.Open_List =>
               Level := Level + 1;

            when Events.Close_List =>
               exit when Level = 0;
               Level := Level - 1;

            when Events.Add_Atom =>
               null;
         end case;
      end loop;
   end Close_Current_List;

end Natools.S_Expressions;