| 1 |
|
| 2 |
private with Ada.Strings.Unbounded; |
| 3 |
|
| 4 |
package Predicate2.Source_Reference is |
| 5 |
|
| 6 |
type Object is tagged private; |
| 7 |
|
| 8 |
subtype Source_Reference is Object; |
| 9 |
|
| 10 |
function "<" (Left, Right : Object) return Boolean; |
| 11 |
|
| 12 |
Undefined : constant Object; |
| 13 |
|
| 14 |
private |
| 15 |
|
| 16 |
use Ada.Strings.Unbounded; |
| 17 |
|
| 18 |
type Object is tagged record |
| 19 |
Line : Natural; |
| 20 |
Column : Natural; |
| 21 |
Filename : Unbounded_String; |
| 22 |
end record |
| 23 |
with Dynamic_Predicate => Filename /= Null_Unbounded_String; |
| 24 |
|
| 25 |
function "<" (Left, Right : Object) return Boolean is |
| 26 |
(Left.Filename < Right.Filename |
| 27 |
or else |
| 28 |
(Left.Filename = Right.Filename and then Left.Line < Right.Line)); |
| 29 |
|
| 30 |
Undefined : constant Object := |
| 31 |
(0, 0, To_Unbounded_String ("@")); |
| 32 |
|
| 33 |
end Predicate2.Source_Reference; |