ligo/src/passes/03-self_ast_imperative/self_ast_imperative.ml

30 lines
868 B
OCaml
Raw Normal View History

2019-09-24 13:54:34 +02:00
open Trace
module Errors = Errors
2019-09-24 13:54:34 +02:00
2020-02-21 17:07:48 +01:00
let all_expression_mapper = [
2019-09-24 13:54:34 +02:00
Tezos_type_annotation.peephole_expression ;
None_variant.peephole_expression ;
Literals.peephole_expression ;
]
2020-02-21 17:07:48 +01:00
let all_type_expression_mapper = [
Entrypoints_length_limit.peephole_type_expression ;
2020-02-21 17:07:48 +01:00
]
let all_exp = List.map (fun el -> Helpers.Expression el) all_expression_mapper
let all_ty = List.map (fun el -> Helpers.Type_expression el) all_type_expression_mapper
2019-09-24 13:54:34 +02:00
let all_program =
2020-02-21 17:07:48 +01:00
let all_p = List.map Helpers.map_program all_exp in
let all_p2 = List.map Helpers.map_program all_ty in
bind_chain (List.append all_p all_p2)
2019-09-24 13:54:34 +02:00
let all_expression =
2020-02-21 17:07:48 +01:00
let all_p = List.map Helpers.map_expression all_expression_mapper in
2019-09-24 13:54:34 +02:00
bind_chain all_p
let map_expression = Helpers.map_expression
let fold_expression = Helpers.fold_expression
2019-12-04 18:30:52 +01:00
let fold_map_expression = Helpers.fold_map_expression