From a4e2fe2447dfb260249df76e2cfb7f6358a9694f Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Wulfman Date: Fri, 17 Apr 2020 20:39:30 +0200 Subject: [PATCH] WIP:handling parsing errors --- src/passes/12-compiler/compiler_program.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/passes/12-compiler/compiler_program.ml b/src/passes/12-compiler/compiler_program.ml index 8c7168231..30069fe07 100644 --- a/src/passes/12-compiler/compiler_program.ml +++ b/src/passes/12-compiler/compiler_program.ml @@ -484,7 +484,8 @@ and translate_expression (expr:expression) (env:environment) : michelson result ] ) | E_raw_michelson (code, type_anno) -> - let (code, _e) = Michelson_parser.V1.parse_expression ~check:false code in + let code = trace_tzresult (simple_error "lol") @@ + Tezos_micheline.Micheline_parser.no_parsing_error @@ Michelson_parser.V1.parse_expression ~check:false code in let code = Tezos_micheline.Micheline.root code.expanded in let%bind ty = Compiler_type.type_ type_anno in return @@ i_push ty code