mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
util review
This commit is contained in:
parent
d512b27e2c
commit
137fb8c552
@ -12,8 +12,7 @@
|
||||
or implied. See the License for the specific language governing permissions and limitations under
|
||||
the License. *)
|
||||
|
||||
type t = { code_pos : Lexing.position * Lexing.position; [@opaque] law_pos : string list }
|
||||
[@@deriving show]
|
||||
type t = { code_pos : Lexing.position * Lexing.position; law_pos : string list }
|
||||
|
||||
let from_lpos (p : Lexing.position * Lexing.position) : t = { code_pos = p; law_pos = [] }
|
||||
|
||||
@ -168,7 +167,7 @@ let retrieve_loc_text (pos : t) : string =
|
||||
else Cli.print_with_style blue_style "%*s+-+ " (spaces + (2 * i) - 1) ""))
|
||||
with Sys_error _ -> "Location:" ^ to_string pos
|
||||
|
||||
type 'a marked = 'a * t [@@deriving show]
|
||||
type 'a marked = 'a * t
|
||||
|
||||
let no_pos : t =
|
||||
let zero_pos =
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
(** Source code position *)
|
||||
|
||||
type t [@@deriving show]
|
||||
type t
|
||||
(** A position in the source code is a file, as well as begin and end location of the form col:line *)
|
||||
|
||||
(** Custom visitor for the [Pos.marked] type *)
|
||||
@ -58,7 +58,7 @@ val retrieve_loc_text : t -> string
|
||||
|
||||
(**{2 AST markings}*)
|
||||
|
||||
type 'a marked = 'a * t [@@deriving show]
|
||||
type 'a marked = 'a * t
|
||||
(** Everything related to the source code should keep its position stored, to improve error messages *)
|
||||
|
||||
val no_pos : t
|
||||
|
Loading…
Reference in New Issue
Block a user