-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Utils.Ast_io. #268
Comments
Hi @arozovyk, the AST exploration feature for VSCode is super cool, thanks for working on that! For me it's ok to expose
Is that what you need? |
Hi, @pitag-ha, thanks for replying! Your comment made me remember that I wanted to add support for So basically i will need the whole And i feel like everything that i need (modulo stuff that you mentionned i.e. let read_bin fn =
In_channel.with_file fn ~f:(from_channel ~input_kind:Necessarily_binary ) Plus If that's not an option for some reason, maybe simplify the match read_magic ch with Error s -> Error (*?*)
| Ok s -> (
match Find_version.from_magic s with
| Intf (module Input_version : OCaml_version) ->
let _ : string = input_value ch in
let ast = input_value ch in
let module Input_to_ppxlib = Convert (Input_version) (Js) in
Intf_or_impl.Intf (Input_to_ppxlib.copy_signature ast)
| Impl (module Input_version : OCaml_version) ->
let _ : string = input_value ch in
let ast = input_value ch in
let module Input_to_ppxlib = Convert (Input_version) (Js) in
Intf_or_impl.Impl (Input_to_ppxlib.copy_structure ast)
| Unknown -> Error (*?*) can be done? Please tell me what do you think. |
Yes, that sounds like a good idea to me.
Do you mean the whole |
Do you want to implement that and open a PR? |
I think we can close this now. |
Indeed. Thanks! |
Hi, i'm currently working on AST exploration features for VSCode extension: vscode-ocaml-platform, and i would like to use the
Utils.Ast_io.read
function in order to get the tranformed AST value from.pp.ml.
(which i do locally this way: link).Would it be possible to expose this module ?
The text was updated successfully, but these errors were encountered: