Remove singleton inductive type
This commit is contained in:
parent
e2c831a231
commit
36ec771adf
@ -406,8 +406,7 @@ and lhs =
|
||||
Path of path
|
||||
| MapPath of map_lookup reg
|
||||
|
||||
and rhs =
|
||||
Expr of expr
|
||||
and rhs = expr
|
||||
|
||||
and loop =
|
||||
While of while_loop reg
|
||||
@ -757,8 +756,7 @@ let lhs_to_region : lhs -> Region.t = function
|
||||
Path path -> path_to_region path
|
||||
| MapPath {region; _} -> region
|
||||
|
||||
let rhs_to_region = function
|
||||
Expr e -> expr_to_region e
|
||||
let rhs_to_region = expr_to_region
|
||||
|
||||
let selection_to_region = function
|
||||
FieldName {region; _}
|
||||
|
@ -390,8 +390,7 @@ and lhs =
|
||||
Path of path
|
||||
| MapPath of map_lookup reg
|
||||
|
||||
and rhs =
|
||||
Expr of expr
|
||||
and rhs = expr
|
||||
|
||||
and loop =
|
||||
While of while_loop reg
|
||||
|
@ -591,7 +591,7 @@ assignment:
|
||||
in {region; value}}
|
||||
|
||||
rhs:
|
||||
expr { Expr $1 }
|
||||
expr { $1 }
|
||||
|
||||
lhs:
|
||||
path { Path $1 }
|
||||
|
@ -309,8 +309,7 @@ and print_assignment {value; _} =
|
||||
print_token assign ":=";
|
||||
print_rhs rhs
|
||||
|
||||
and print_rhs = function
|
||||
Expr e -> print_expr e
|
||||
and print_rhs e = print_expr e
|
||||
|
||||
and print_lhs = function
|
||||
Path path -> print_path path
|
||||
|
@ -780,9 +780,7 @@ and simpl_single_instruction : Raw.single_instr -> (_ -> expression result) resu
|
||||
)
|
||||
| Assign a -> (
|
||||
let (a , loc) = r_split a in
|
||||
let%bind value_expr = match a.rhs with
|
||||
| Expr e -> simpl_expression e
|
||||
in
|
||||
let%bind value_expr = simpl_expression a.rhs in
|
||||
match a.lhs with
|
||||
| Path path -> (
|
||||
let (name , path') = simpl_path path in
|
||||
|
Loading…
Reference in New Issue
Block a user