summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml5
-rw-r--r--camlp4/Camlp4Parsers/Camlp4QuotationCommon.ml4
-rw-r--r--camlp4/examples/lambda_quot_expr.ml (renamed from camlp4/examples/lambda_quot_o.ml)0
3 files changed, 3 insertions, 6 deletions
diff --git a/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml b/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml
index 9feaaec6e..aa9680650 100644
--- a/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml
+++ b/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml
@@ -671,7 +671,7 @@ Very old (no more supported) syntax:
| `ANTIQUOT ("exp"|""|"anti" as n) s ->
<:expr< $anti:mk_anti ~c:"expr" n s$ >>
| `ANTIQUOT ("`bool" as n) s ->
- <:expr< $anti:mk_anti n s$ >>
+ <:expr< $id:<:ident< $anti:mk_anti n s$ >>$ >>
| `ANTIQUOT ("tup" as n) s ->
<:expr< $tup: <:expr< $anti:mk_anti ~c:"expr" n s$ >>$ >>
| `ANTIQUOT ("seq" as n) s ->
@@ -830,7 +830,7 @@ Very old (no more supported) syntax:
[ `ANTIQUOT (""|"pat"|"anti" as n) s ->
<:patt< $anti:mk_anti ~c:"patt" n s$ >>
| `ANTIQUOT ("tup" as n) s -> <:patt< ($tup:<:patt< $anti:mk_anti ~c:"patt" n s$ >>$) >>
- | `ANTIQUOT ("`bool" as n) s -> <:patt< $anti:mk_anti n s$ >>
+ | `ANTIQUOT ("`bool" as n) s -> <:patt< $id:<:ident< $anti:mk_anti n s$ >>$ >>
| i = ident -> <:patt< $id:i$ >>
| s = a_INT -> <:patt< $int:s$ >>
| s = a_INT32 -> <:patt< $int32:s$ >>
@@ -911,7 +911,6 @@ Very old (no more supported) syntax:
<:patt< $anti:mk_anti ~c:"patt" n s$ >>
| `ANTIQUOT ("tup" as n) s ->
<:patt< ($tup:<:patt< $anti:mk_anti ~c:"patt" n s$ >>$) >>
- | `ANTIQUOT ("`bool" as n) s -> <:patt< $anti:mk_anti n s$ >>
| `QUOTATION x -> Quotation.expand _loc x Quotation.DynAst.patt_tag
| "("; ")" -> <:patt< () >>
| "("; p = SELF; ")" -> p
diff --git a/camlp4/Camlp4Parsers/Camlp4QuotationCommon.ml b/camlp4/Camlp4Parsers/Camlp4QuotationCommon.ml
index 2c0861438..934978963 100644
--- a/camlp4/Camlp4Parsers/Camlp4QuotationCommon.ml
+++ b/camlp4/Camlp4Parsers/Camlp4QuotationCommon.ml
@@ -93,9 +93,7 @@ module Make (Syntax : Sig.Camlp4Syntax)
| "`flo" -> <:expr< string_of_float $e$ >>
| "`str" -> <:expr< Ast.safe_string_escaped $e$ >>
| "`chr" -> <:expr< Char.escaped $e$ >>
- | "`bool" ->
- <:expr< if $e$ then $ME.meta_expr _loc <:expr<True>>$
- else $ME.meta_expr _loc <:expr<False>>$ >>
+ | "`bool" -> <:expr< Ast.IdUid $mloc _loc$ (if $e$ then "True" else "False") >>
| "liststr_item" -> <:expr< Ast.stSem_of_list $e$ >>
| "listsig_item" -> <:expr< Ast.sgSem_of_list $e$ >>
| "listclass_sig_item" -> <:expr< Ast.cgSem_of_list $e$ >>
diff --git a/camlp4/examples/lambda_quot_o.ml b/camlp4/examples/lambda_quot_expr.ml
index 3b51f47f5..3b51f47f5 100644
--- a/camlp4/examples/lambda_quot_o.ml
+++ b/camlp4/examples/lambda_quot_expr.ml