|
@@ -669,6 +669,8 @@ and parse_type_path_or_const plt = parser
|
|
|
(* we can't allow (expr) here *)
|
|
|
| [< '(BkOpen,p1); e = parse_array_decl p1 >] -> TPExpr (e)
|
|
|
| [< t = parse_complex_type >] -> TPType t
|
|
|
+ | [< '(Unop op,p1); '(Const c,p2) >] -> TPExpr (make_unop op (EConst c,p2) p1)
|
|
|
+ | [< '(Binop OpSub,p1); '(Const c,p2) >] -> TPExpr (make_unop Neg (EConst c,p2) p1)
|
|
|
| [< '(Const c,p) >] -> TPExpr (EConst c,p)
|
|
|
| [< '(Kwd True,p) >] -> TPExpr (EConst (Ident "true"),p)
|
|
|
| [< '(Kwd False,p) >] -> TPExpr (EConst (Ident "false"),p)
|