File tree Expand file tree Collapse file tree 8 files changed +674
-10
lines changed
Expand file tree Collapse file tree 8 files changed +674
-10
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -248,7 +248,6 @@ and interpret_style settings ctx str body =
248248and interpret_render settings ctx str ~filename ~render_ctx ~body =
249249 if filename = Settings. style_tag then interpret_style settings ctx str body
250250 else
251- (* File.write "logs/body.txt" (Batteries.dump body); *)
252251 let ast = ast_from_file settings filename in
253252 let val_ctx = Values. unwrap_render_context ~outer_ctx: ctx ~render_ctx in
254253 let _, rendered_text = interpret settings val_ctx " " ast in
Original file line number Diff line number Diff line change 11(library
22 (public_name liquid_std)
3- (libraries base core stdio re2 calendar base64 sha liquid_syntax
3+ (libraries base core stdio re2 calendar base64 sha str liquid_syntax
44 liquid_parser)
55 (preprocess
66 (pps bisect_ppx --conditional)))
Original file line number Diff line number Diff line change @@ -11,14 +11,13 @@ homepage: "https://github.com/benfaerber/liquid-ml"
1111bug-reports: "https://github.com/benfaerber/liquid-ml/issues"
1212dev-repo: "git+https://github.com/benfaerber/liquid-ml.git"
1313license: "MIT"
14- depends: [
14+ depends: [
1515 "ocaml" { >= "4.11" }
1616 "dune" { >= "2.5" }
1717 "base" { >= "v0.15.0" }
18- "core" { >= "v0.15.0" }
19- "stdio" { >= "v0.10.0" }
18+ "core" { >= "v0.15.0" }
19+ "stdio" { >= "v0.10.0" }
2020 "re2" { >= "v0.13.0" }
21- "batteries" { >= "3.1.0" }
2221 "calendar" { >= "3.0.0"}
2322]
2423build: [
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ let block_token_as_string = show_block_token
88let operator_as_string = show_operator
99let lex_value_as_string = show_lex_value
1010let lex_combiner_as_string = show_lex_combiner
11- let dump x = x |> Batteries. dump |> Stdio. print_endline
11+
12+ (* Generic debug printer - for any type with a show function *)
13+ let dump show_fn x = x |> show_fn |> Stdio. print_endline
1214
1315let remove_nl text =
1416 let exp = Re2. create_exn " \n " in
Original file line number Diff line number Diff line change 11(library
22 (public_name liquid_syntax)
3- (libraries base core stdio batteries re2 calendar ppx_deriving.runtime)
3+ (libraries base core stdio re2 calendar ppx_deriving.runtime)
44 (preprocess
55 (pps ppx_deriving.show bisect_ppx --conditional)))
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ type ast =
140140
141141let list_of_range = function
142142 | LexRange (start , stop ) ->
143- Batteries. ( -- ) start stop |> Batteries.List. of_enum
143+ List. range start ( stop + 1 )
144144 | _ -> raise (Failure " This is not a range!" )
145145
146146let liq_list_of_range r =
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ let ( != ) = Stdlib.( != )
66let ( > ) = Stdlib. ( > )
77let ( < ) = Stdlib. ( < )
88let ( ~/ ) = Re2. create_exn
9- let range x = Batteries. ( -- ) 0 x |> Batteries.List. of_enum
9+ let range x = List. range 0 (x + 1 )
1010let sub_prefix text x = String. sub text ~pos: 0 ~len: x
1111let sub_suffix text x = String. sub text ~pos: x ~len: (String. length text - x)
1212let sub_list lst start_i end_i = List. sub lst ~pos: start_i ~len: (end_i - start_i)
You can’t perform that action at this time.
0 commit comments