diff --git a/experimental/frisch/extension_points.txt b/experimental/frisch/extension_points.txt index 193220d2b..47bb78d4e 100644 --- a/experimental/frisch/extension_points.txt +++ b/experimental/frisch/extension_points.txt @@ -110,7 +110,6 @@ alternative syntax for attributes and/or extensions: where KW can stand for: - (module assert begin for @@ -427,4 +426,4 @@ let fetch_users dbh = -- Macaque -let names view = [%view {name = t.name}, t <- !view] +let names view = [%view {name = t.name}, t <- !view]" diff --git a/parsing/parser.mly b/parsing/parser.mly index c69ef1c19..244639604 100644 --- a/parsing/parser.mly +++ b/parsing/parser.mly @@ -1181,12 +1181,12 @@ simple_expr: { mkexp (Pexp_override [])} | simple_expr SHARP label { mkexp(Pexp_send($1, $3)) } - | LPAREN MODULE ext_attributes module_expr RPAREN - { mkexp_attrs (Pexp_pack $4) $3 } - | LPAREN MODULE ext_attributes module_expr COLON package_type RPAREN - { mkexp_attrs (Pexp_constraint (ghexp (Pexp_pack $4), - Some (ghtyp (Ptyp_package $6)), None)) $3 } - | LPAREN MODULE ext_attributes module_expr COLON error + | LPAREN MODULE module_expr RPAREN + { mkexp (Pexp_pack $3) } + | LPAREN MODULE module_expr COLON package_type RPAREN + { mkexp (Pexp_constraint (ghexp (Pexp_pack $3), + Some (ghtyp (Ptyp_package $5)), None)) } + | LPAREN MODULE module_expr COLON error { unclosed "(" 1 ")" 5 } | extension { mkexp (Pexp_extension $1) }