diff --git a/src/passes/1-parser/reasonligo/Parser.mly b/src/passes/1-parser/reasonligo/Parser.mly index 896eaabc4..74417ee1e 100644 --- a/src/passes/1-parser/reasonligo/Parser.mly +++ b/src/passes/1-parser/reasonligo/Parser.mly @@ -453,8 +453,15 @@ fun_expr(right_expr): ) | EAnnot {region; value = {inside = EVar v, colon, typ; _}} -> Scoping.check_reserved_name v; - let value = {pattern = PVar v; colon; type_expr = typ} - in PTyped {region; value} + let value = {pattern = PVar v; colon; type_expr = typ} in + PPar { + value = { + lpar = Region.ghost; + rpar = Region.ghost; + inside = PTyped {region; value} + }; + region + } | EPar p -> let value = {p.value with inside = arg_to_pattern p.value.inside} @@ -655,7 +662,6 @@ disj_expr_level: | par(tuple(disj_expr_level)) type_annotation_simple? { let region = nsepseq_to_region expr_to_region $1.value.inside in let tuple = ETuple {value=$1.value.inside; region} in - let tuple = EPar {$1 with value = {$1.value with inside=tuple}} in let region = match $2 with Some (_,s) -> cover $1.region (type_expr_to_region s)