aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing/egramml.ml
diff options
context:
space:
mode:
authorGravatar Maxime Dénès <mail@maximedenes.fr>2017-05-17 19:18:49 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-05-17 19:18:49 +0200
commit9f11adda4bff194a3c6a66d573ce7001d4399886 (patch)
treebe4fde28322ff1c71d2be4bb836390b1d7ffba96 /parsing/egramml.ml
parent6d770156669dd9868ae7623b8f4302866e2cc8c7 (diff)
parentb82f27726f5ae891689e3b958323c2a61d4c154b (diff)
Merge PR#633: An extension of EXTEND and notations to make standard parsing tricks available to users
Diffstat (limited to 'parsing/egramml.ml')
-rw-r--r--parsing/egramml.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/parsing/egramml.ml b/parsing/egramml.ml
index 97a3e89a5..984957589 100644
--- a/parsing/egramml.ml
+++ b/parsing/egramml.ml
@@ -17,7 +17,7 @@ open Vernacexpr
type 's grammar_prod_item =
| GramTerminal of string
| GramNonTerminal :
- Loc.t * 'a raw_abstract_argument_type * ('s, 'a) symbol -> 's grammar_prod_item
+ Loc.t * 'a raw_abstract_argument_type option * ('s, 'a) symbol -> 's grammar_prod_item
type 'a ty_arg = ('a -> raw_generic_argument)
@@ -38,7 +38,7 @@ let rec ty_rule_of_gram = function
AnyTyRule r
| GramNonTerminal (_, t, tok) :: rem ->
let AnyTyRule rem = ty_rule_of_gram rem in
- let inj = Some (fun obj -> Genarg.in_gen t obj) in
+ let inj = Option.map (fun t obj -> Genarg.in_gen t obj) t in
let r = TyNext (rem, tok, inj) in
AnyTyRule r