diff options
| author | Emilio Jesus Gallego Arias | 2019-02-11 01:08:18 +0100 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-02-11 01:08:18 +0100 |
| commit | aa66e4b3e58699db5af904e14247c73744398732 (patch) | |
| tree | 739a35038b5922f2e9c47b3026322c63e69498b7 /lib | |
| parent | f8f27d0f5a39c8c55b33e31a73500a2e054b6764 (diff) | |
| parent | 1e4d643b8bb0f516651294d8881711720e349b85 (diff) | |
Merge PR #9478: Remove the comment fields of locations.
Reviewed-by: ejgallego
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/loc.ml | 9 | ||||
| -rw-r--r-- | lib/loc.mli | 2 |
2 files changed, 3 insertions, 8 deletions
diff --git a/lib/loc.ml b/lib/loc.ml index c08648911b..66b7a7da70 100644 --- a/lib/loc.ml +++ b/lib/loc.ml @@ -22,19 +22,17 @@ type t = { bol_pos_last : int; (** position of the beginning of end line *) bp : int; (** start position *) ep : int; (** end position *) - comm : string; (** start comment *) - ecomm : string (** end comment *) } let create fname line_nb bol_pos bp ep = { fname = fname; line_nb = line_nb; bol_pos = bol_pos; line_nb_last = line_nb; bol_pos_last = bol_pos; bp = bp; ep = ep; - comm = ""; ecomm = "" } +} let make_loc (bp, ep) = { fname = ToplevelInput; line_nb = -1; bol_pos = 0; line_nb_last = -1; bol_pos_last = 0; bp = bp; ep = ep; - comm = ""; ecomm = "" } +} let mergeable loc1 loc2 = loc1.fname = loc2.fname @@ -50,7 +48,7 @@ let merge loc1 loc2 = line_nb_last = loc2.line_nb_last; bol_pos_last = loc2.bol_pos_last; bp = loc1.bp; ep = loc2.ep; - comm = loc1.comm; ecomm = loc2.comm } + } else loc1 else if loc2.ep < loc1.ep then { fname = loc2.fname; @@ -59,7 +57,6 @@ let merge loc1 loc2 = line_nb_last = loc1.line_nb_last; bol_pos_last = loc1.bol_pos_last; bp = loc2.bp; ep = loc1.ep; - comm = loc2.comm; ecomm = loc1.comm } else loc2 diff --git a/lib/loc.mli b/lib/loc.mli index c46311b639..23df1ebd9a 100644 --- a/lib/loc.mli +++ b/lib/loc.mli @@ -22,8 +22,6 @@ type t = { bol_pos_last : int; (** position of the beginning of end line *) bp : int; (** start position *) ep : int; (** end position *) - comm : string; (** start comment *) - ecomm : string (** end comment *) } (** {5 Location manipulation} *) |
