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