This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
14
unikernel/duniverse/ppx_sexp_conv/expander/fresh_name.ml
Normal file
14
unikernel/duniverse/ppx_sexp_conv/expander/fresh_name.ml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
open! Base
|
||||
open Ppxlib
|
||||
open Ast_builder.Default
|
||||
|
||||
type t =
|
||||
{ loc : location
|
||||
; unique_name : string
|
||||
}
|
||||
|
||||
let create string ~loc = { loc; unique_name = gen_symbol ~prefix:string () }
|
||||
let of_string_loc { loc; txt } = create txt ~loc
|
||||
let to_string_loc { loc; unique_name } = { loc; txt = unique_name }
|
||||
let expression { loc; unique_name } = evar unique_name ~loc
|
||||
let pattern { loc; unique_name } = pvar unique_name ~loc
|
||||
Loading…
Add table
Add a link
Reference in a new issue