diff --git a/src/proto_alpha/lib_client/michelson_v1_parser.ml b/src/proto_alpha/lib_client/michelson_v1_parser.ml index 799058ff8..69be0c3fa 100644 --- a/src/proto_alpha/lib_client/michelson_v1_parser.ml +++ b/src/proto_alpha/lib_client/michelson_v1_parser.ml @@ -61,11 +61,9 @@ let expand_all source ast errors = let parse_toplevel ?check source = let tokens, lexing_errors = Micheline_parser.tokenize source in let asts, parsing_errors = Micheline_parser.parse_toplevel ?check tokens in - let ast = match asts with - | [ ast ] -> ast - | asts -> - let start = min_point asts and stop = max_point asts in - Seq ({ start ; stop }, asts, None) in + let ast = + let start = min_point asts and stop = max_point asts in + Seq ({ start ; stop }, asts, None) in expand_all source ast (lexing_errors @ parsing_errors) let parse_expression ?check source = diff --git a/src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml b/src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml index eccf0e502..25c1ae9d1 100644 --- a/src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml +++ b/src/proto_alpha/lib_client_commands/client_proto_programs_commands.ml @@ -148,7 +148,7 @@ let commands () = ~details:(not no_print_source) ~parsed ~show_source:(not no_print_source) ppf errors) () >>= fun () -> - return () + cctxt#error "syntax error in program" ) ; command ~group ~desc: "Ask the node to typecheck a data expression." diff --git a/src/proto_alpha/lib_protocol/src/script_ir_translator.ml b/src/proto_alpha/lib_protocol/src/script_ir_translator.ml index d7a307124..f7e595e04 100644 --- a/src/proto_alpha/lib_protocol/src/script_ir_translator.ml +++ b/src/proto_alpha/lib_protocol/src/script_ir_translator.ml @@ -2240,6 +2240,7 @@ and parse_contract and parse_toplevel : Script.expr -> (Script.node * Script.node * Script.node) tzresult = fun toplevel -> + record_trace (Ill_typed_contract (toplevel, [])) @@ match root toplevel with | Int (loc, _) -> error (Invalid_kind (loc, [ Seq_kind ], Int_kind)) | String (loc, _) -> error (Invalid_kind (loc, [ Seq_kind ], String_kind))