package p5scm
Scheme via camlp5
Install
Dune Dependency
Authors
Maintainers
Sources
0.3.1.tar.gz
md5=9c7351531eb896d4b8fb49f5f76ccc90
sha512=e515523be854b5fa41e66357ef20282458a90240f29eb0e6075f55bbd6d4dbb24d91cb09d3389f77ac00530408825d7aef46c1133e1a35fce69113464c050eed
doc/src/p5scm.lib/trans.ml.html
Source file trans.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
(* The MIT License Copyright (c) 2021 Jason D. Nielsen <drjdnielsen@gmail.com> *) let add_nl str = str ^ "\n" let scm_to_mlast str = let mlast, _ = Pa_scheme.pa_sch str in List.map fst mlast let scm_to_tp str = Ast2pt.phrase (List.hd (scm_to_mlast str)) let scm_to_tp_lst str = List.map Ast2pt.phrase (scm_to_mlast str) let scm_to_struct str = Ast2pt.implem "-" (scm_to_mlast str) let scm_to_ml str = let mlast, _ = Pa_scheme.pa_sch str in let strml = List.map Pr_o.pr_o (List.map fst mlast) in let out = String.concat "" (List.map add_nl strml) in out ^ ";;\n" let scm_to_struct_to_ml str = let stast = scm_to_struct str in let out = Pprintast.string_of_structure stast in out ^ ";;\n" let scm_to_bin str = let mlast, status = Pa_scheme.pa_sch str in let phr = match status with | None -> failwith "No location provied!" | Some loc -> mlast, loc in Pr_dump.pr_dump phr let scm_to_bin_file str fname = let mlast, status = Pa_scheme.pa_sch str in let phr = match status with | None -> failwith "No location provied!" | Some loc -> mlast, loc in Pcaml.output_file := Some fname; Pr_dump.pr_dump phr
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>