Natools

Check-in [53eb91b3c5]
Login
Overview
Comment:s_expressions-generic_caches: return End_Of_Input instead of Error, to fix behaviour of empty cursors
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 53eb91b3c531ff4d84b1d087cc9a51aee546d2cb
User & Date: nat on 2014-02-26 22:52:58
Other Links: manifest | tags
Context
2014-02-27
20:01
s_expressions-test_tools: add a Context argument to helper procedures check-in: f4b78c09f0 user: nat tags: trunk
2014-02-26
22:52
s_expressions-generic_caches: return End_Of_Input instead of Error, to fix behaviour of empty cursors check-in: 53eb91b3c5 user: nat tags: trunk
2014-02-25
19:45
s_expressions-generic_caches: fix exception in empty Cursor assignment (though I don't understand what was wrong) check-in: eade42f305 user: nat tags: trunk
Changes

Modified src/natools-s_expressions-generic_caches.adb from [233b7de8f5] to [3373c2a61e].

316
317
318
319
320
321
322
323

324
325
326
327
328
329
330
316
317
318
319
320
321
322

323
324
325
326
327
328
329
330







-
+









   overriding procedure Next
     (Object : in out Cursor;
      Event : out Events.Event) is
   begin
      if Object.Position = null then
         Event := Events.Error;
         Event := Events.End_Of_Input;
         return;
      end if;

      if Object.Opening then
         pragma Assert (Object.Position.Kind = List_Node);
         if Object.Position.Child = null then
            Object.Opening := False;