add ligo_string in simple_utils
This commit is contained in:
parent
2db55ae965
commit
f6ff6b85c4
@ -14,4 +14,4 @@ module Tree = Tree
|
|||||||
module Region = Region
|
module Region = Region
|
||||||
module Pos = Pos
|
module Pos = Pos
|
||||||
module Var = Var
|
module Var = Var
|
||||||
|
module Ligo_string = X_string
|
||||||
|
11
vendors/ligo-utils/simple-utils/x_string.ml
vendored
Normal file
11
vendors/ligo-utils/simple-utils/x_string.ml
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
type t =
|
||||||
|
Standard of string
|
||||||
|
| Verbatim of string
|
||||||
|
|
||||||
|
let pp ppf = function
|
||||||
|
Standard s -> Format.fprintf ppf "%S" s
|
||||||
|
| Verbatim v -> Format.fprintf ppf "{|%s|}" v
|
||||||
|
|
||||||
|
let extract = function
|
||||||
|
Standard s -> s
|
||||||
|
| Verbatim v -> v
|
11
vendors/ligo-utils/simple-utils/x_string.mli
vendored
Normal file
11
vendors/ligo-utils/simple-utils/x_string.mli
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
(*
|
||||||
|
Ligo_string represent string as they are writen in a ligo program,
|
||||||
|
delimited either with double quotes (standard) or with `{|...|}` (Varbatim)
|
||||||
|
*)
|
||||||
|
|
||||||
|
type t =
|
||||||
|
Standard of string
|
||||||
|
| Verbatim of string
|
||||||
|
|
||||||
|
val pp : Format.formatter -> t -> unit
|
||||||
|
val extract : t -> string
|
Loading…
Reference in New Issue
Block a user