Some changes to get around the negative test errors.

This commit is contained in:
Sander Spies 2020-03-27 16:29:50 +01:00
parent 3c65eafa7b
commit 1ac6835726
2 changed files with 1241 additions and 1218 deletions

View File

@ -652,6 +652,19 @@ let_expr(right_expr):
disj_expr_level: disj_expr_level:
disj_expr disj_expr
| conj_expr_level { $1 } | conj_expr_level { $1 }
| "_" type_annotation_simple {
let (colon, type_expr) = $2 in
EAnnot {
value = {
inside = (
EVar { value = "_"; region = $1 }, colon, type_expr
);
lpar = Region.ghost;
rpar = Region.ghost;
};
region = Region.ghost;
}
}
| par(tuple(disj_expr_level)) type_annotation_simple? { | par(tuple(disj_expr_level)) type_annotation_simple? {
let region = $1.region in let region = $1.region in
let tuple = ETuple {value=$1.value.inside; region} in let tuple = ETuple {value=$1.value.inside; region} in
@ -782,7 +795,6 @@ common_expr:
| "<nat>" { EArith (Nat $1) } | "<nat>" { EArith (Nat $1) }
| "<bytes>" { EBytes $1 } | "<bytes>" { EBytes $1 }
| "<ident>" | module_field { EVar $1 } | "<ident>" | module_field { EVar $1 }
| "_" { EVar {value = "_"; region = $1} }
| projection { EProj $1 } | projection { EProj $1 }
| update_record { EUpdate $1 } | update_record { EUpdate $1 }
| "<string>" { EString (String $1) } | "<string>" { EString (String $1) }

File diff suppressed because it is too large Load Diff