diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-11-20 12:26:59 +0100 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-11-22 22:47:57 +0100 |
commit | ce418aea93a6396412de57aded0ff092bec7596b (patch) | |
tree | f5ed6b63390ba472a5b20e0ff6ef5398f30db41e /grammar | |
parent | eb91ccaf236bc9a60a1e216b76a0a42980c072a7 (diff) |
[plugin] Encapsulate modifiers to vernac commands.
This is a continuation on #6183 and another step towards a more
functional interpretation of commands.
In particular, this should allow us to remove the locality hack.
Diffstat (limited to 'grammar')
-rw-r--r-- | grammar/vernacextend.mlp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grammar/vernacextend.mlp b/grammar/vernacextend.mlp index 12308bede..ae8fe4da2 100644 --- a/grammar/vernacextend.mlp +++ b/grammar/vernacextend.mlp @@ -173,11 +173,11 @@ EXTEND [ [ "["; s = STRING; l = LIST0 args; "]"; d = OPT deprecation; c = OPT classifier; "->"; "["; e = Pcaml.expr; "]" -> let () = if s = "" then failwith "Command name is empty." in - let b = <:expr< fun loc -> ( let () = $e$ in fun st -> st ) >> in + let b = <:expr< fun ~atts ~st -> ( let () = $e$ in st ) >> in { r_head = Some s; r_patt = l; r_class = c; r_branch = b; r_depr = d; } | "[" ; "-" ; l = LIST1 args ; "]" ; d = OPT deprecation; c = OPT classifier; "->"; "["; e = Pcaml.expr; "]" -> - let b = <:expr< fun loc -> ( let () = $e$ in fun st -> st ) >> in + let b = <:expr< fun ~atts ~st -> ( let () = $e$ in st ) >> in { r_head = None; r_patt = l; r_class = c; r_branch = b; r_depr = d; } ] ] ; |