package reason
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Reason: Syntax & Toolchain for OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
reason-3.17.3.tbz
sha256=01c4591b8213ad8c71b6e9f1d180eabd200d441936ee27fe9f99646b75f9865c
sha512=f167097b3254fbf400bb816275f84157a0a9c691ebc877861e80b1c32c7e2ebc553e0a6a0ef073ec89c2c20ce80c42959dc89811e49712edd0c1fe6dce4a90e9
doc/src/reason.refmt-lib/printer_maker.ml.html
Source file printer_maker.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89open Reason type 'a parser_result = { ast : 'a ; comments : Reason_comment.t list ; parsed_as_ml : bool ; parsed_as_intf : bool } type parse_itype = [ `ML | `Reason | `Binary | `BinaryReason | `Auto ] type print_itype = [ `ML | `Reason | `Binary | `BinaryReason | `AST | `None ] exception Invalid_config of string module type PRINTER = sig type t val parse : use_stdin:bool -> parse_itype -> string -> (t * Reason_comment.t list) * bool val print : print_itype -> string -> bool -> out_channel -> Format.formatter -> t * Reason_comment.t list -> unit end let err s = raise (Invalid_config s) let prepare_output_file = function | Some name -> open_out_bin name | None -> set_binary_mode_out stdout true; stdout let close_output_file output_file output_chan = match output_file with Some _ -> close_out output_chan | None -> () let ocamlBinaryParser use_stdin filename = let module Ast_io = Ppxlib__.Utils.Ast_io in let input_source = match use_stdin with true -> Ast_io.Stdin | false -> File filename in match Ast_io.read input_source ~input_kind:Necessarily_binary with | Error _ -> assert false | Ok { ast = Impl ast; _ } -> { ast = Obj.magic ast ; comments = [] ; parsed_as_ml = true ; parsed_as_intf = false } | Ok { ast = Intf ast; _ } -> { ast = Obj.magic ast ; comments = [] ; parsed_as_ml = true ; parsed_as_intf = true } let reasonBinaryParser use_stdin filename = let chan = match use_stdin with | true -> stdin | false -> let file_chan = open_in_bin filename in seek_in file_chan 0; file_chan in let _, _, ast, comments, parsed_as_ml, parsed_as_intf = input_value chan in { ast; comments; parsed_as_ml; parsed_as_intf }
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>