Make negative operator test pass
This commit is contained in:
parent
b3993d0db9
commit
102ffda7c3
@ -49,17 +49,6 @@ module Errors = struct
|
|||||||
] in
|
] in
|
||||||
error ~data title message
|
error ~data title message
|
||||||
|
|
||||||
let unsupported_arith_op expr =
|
|
||||||
let title () = "arithmetic expressions" in
|
|
||||||
let message () =
|
|
||||||
Format.asprintf "this arithmetic operator is not supported yet" in
|
|
||||||
let expr_loc = Raw.expr_to_region expr in
|
|
||||||
let data = [
|
|
||||||
("expr_loc",
|
|
||||||
fun () -> Format.asprintf "%a" Location.pp_lift @@ expr_loc)
|
|
||||||
] in
|
|
||||||
error ~data title message
|
|
||||||
|
|
||||||
let untyped_fun_param var =
|
let untyped_fun_param var =
|
||||||
let title () = "function parameter" in
|
let title () = "function parameter" in
|
||||||
let message () =
|
let message () =
|
||||||
@ -425,8 +414,7 @@ let rec simpl_expression :
|
|||||||
let n = Z.to_int @@ snd @@ n in
|
let n = Z.to_int @@ snd @@ n in
|
||||||
return @@ e_literal ~loc (Literal_mutez n)
|
return @@ e_literal ~loc (Literal_mutez n)
|
||||||
)
|
)
|
||||||
| EArith _ as e ->
|
| EArith (Neg e) -> simpl_unop "NEG" e
|
||||||
fail @@ unsupported_arith_op e
|
|
||||||
| EString (String s) -> (
|
| EString (String s) -> (
|
||||||
let (s , loc) = r_split s in
|
let (s , loc) = r_split s in
|
||||||
let s' =
|
let s' =
|
||||||
|
Loading…
Reference in New Issue
Block a user