File: wat_preprocess.mli

package info (click to toggle)
js-of-ocaml 6.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 37,932 kB
  • sloc: ml: 135,957; javascript: 58,364; ansic: 437; makefile: 422; sh: 12; perl: 4
file content (27 lines) | stat: -rw-r--r-- 843 bytes parent folder | download | duplicates (2)
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
type value =
  | Bool of bool
  | String of string
  | Version of int * int * int

val value_equal : value -> value -> bool

val f : variables:(string * value) list -> filename:string -> contents:string -> string

type source =
  | Binary  (** Binary file (skipped by the preprocessor) *)
  | File  (** Not read yet *)
  | Contents of string  (** File contents to preprocess *)

type input =
  { module_name : string
        (** Name under which the module should be imported (used to fill the [Binary.link_input] record) *)
  ; file : string  (** File originally containing the module *)
  ; source : source
        (** Information about the file, including possibly the already read file contents *)
  }

val with_preprocessed_files :
     variables:(string * value) list
  -> inputs:input list
  -> (Binaryen.link_input list -> 'a)
  -> 'a