diff --git a/src/passes/1-parser/reasonligo/Parser.mly b/src/passes/1-parser/reasonligo/Parser.mly index 23deaf776..223d35c65 100644 --- a/src/passes/1-parser/reasonligo/Parser.mly +++ b/src/passes/1-parser/reasonligo/Parser.mly @@ -320,6 +320,8 @@ core_pattern: | "_" { PWild $1 } | unit { PUnit $1 } | "" { PInt $1 } +| "" { PNat $1 } +| "" { PBytes $1 } | "true" { PTrue $1 } | "false" { PFalse $1 } | "" { PString $1 } @@ -424,7 +426,8 @@ fun_expr: {p.value with inside = arg_to_pattern p.value.inside} in PPar {p with value} | EUnit u -> PUnit u - | e -> raise (SyntaxError.Error (WrongFunctionArguments e)) + | e -> let open! SyntaxError + in raise (Error (WrongFunctionArguments e)) in let fun_args_to_pattern = function EAnnot { @@ -453,7 +456,8 @@ fun_expr: in arg_to_pattern (fst fun_args), bindings | EUnit e -> arg_to_pattern (EUnit e), [] - | e -> raise (SyntaxError.Error (WrongFunctionArguments e)) + | e -> let open! SyntaxError + in raise (Error (WrongFunctionArguments e)) in let binders = fun_args_to_pattern $1 in let f = {kwd_fun; @@ -601,7 +605,7 @@ comp_expr_level: | cat_expr_level { $1 } cat_expr_level: - bin_op(add_expr_level, "++", add_expr_level) { EString (Cat $1) } + bin_op(add_expr_level, "++", cat_expr_level) { EString (Cat $1) } | add_expr_level { $1 } add_expr_level: @@ -682,6 +686,7 @@ common_expr: "" { EArith (Int $1) } | "" { EArith (Mutez $1) } | "" { EArith (Nat $1) } +| "" { EBytes $1 } | "" | module_field { EVar $1 } | projection { EProj $1 } | "" { EString (String $1) }