aboutsummaryrefslogtreecommitdiffhomepage
path: root/parsing/g_vernac.ml4
diff options
context:
space:
mode:
Diffstat (limited to 'parsing/g_vernac.ml4')
-rw-r--r--parsing/g_vernac.ml420
1 files changed, 10 insertions, 10 deletions
diff --git a/parsing/g_vernac.ml4 b/parsing/g_vernac.ml4
index 7a3a2ace1..c8101875d 100644
--- a/parsing/g_vernac.ml4
+++ b/parsing/g_vernac.ml4
@@ -102,7 +102,7 @@ GEXTEND Gram
;
located_vernac:
- [ [ v = vernac -> !@loc, v ] ]
+ [ [ v = vernac -> Loc.tag ~loc:!@loc v ] ]
;
END
@@ -542,8 +542,8 @@ GEXTEND Gram
starredidentref:
[ [ i = identref -> SsSingl i
| i = identref; "*" -> SsFwdClose(SsSingl i)
- | "Type" -> SsSingl (!@loc, Id.of_string "Type")
- | "Type"; "*" -> SsFwdClose (SsSingl (!@loc, Id.of_string "Type")) ]]
+ | "Type" -> SsSingl (Loc.tag ~loc:!@loc @@ Id.of_string "Type")
+ | "Type"; "*" -> SsFwdClose (SsSingl (Loc.tag ~loc:!@loc @@ Id.of_string "Type")) ]]
;
ssexpr:
[ "35"
@@ -720,7 +720,7 @@ GEXTEND Gram
;
argument_spec: [
[ b = OPT "!"; id = name ; s = OPT scope ->
- snd id, not (Option.is_empty b), Option.map (fun x -> !@loc, x) s
+ snd id, not (Option.is_empty b), Option.map (fun x -> Loc.tag ~loc:!@loc x) s
]
];
(* List of arguments implicit status, scope, modifiers *)
@@ -733,7 +733,7 @@ GEXTEND Gram
| "/" -> [`Slash]
| "("; items = LIST1 argument_spec; ")"; sc = OPT scope ->
let f x = match sc, x with
- | None, x -> x | x, None -> Option.map (fun y -> !@loc, y) x
+ | None, x -> x | x, None -> Option.map (fun y -> Loc.tag ~loc:!@loc y) x
| Some _, Some _ -> error "scope declared twice" in
List.map (fun (name,recarg_like,notation_scope) ->
`Id { name=name; recarg_like=recarg_like;
@@ -741,7 +741,7 @@ GEXTEND Gram
implicit_status = NotImplicit}) items
| "["; items = LIST1 argument_spec; "]"; sc = OPT scope ->
let f x = match sc, x with
- | None, x -> x | x, None -> Option.map (fun y -> !@loc, y) x
+ | None, x -> x | x, None -> Option.map (fun y -> Loc.tag ~loc:!@loc y) x
| Some _, Some _ -> error "scope declared twice" in
List.map (fun (name,recarg_like,notation_scope) ->
`Id { name=name; recarg_like=recarg_like;
@@ -749,7 +749,7 @@ GEXTEND Gram
implicit_status = Implicit}) items
| "{"; items = LIST1 argument_spec; "}"; sc = OPT scope ->
let f x = match sc, x with
- | None, x -> x | x, None -> Option.map (fun y -> !@loc, y) x
+ | None, x -> x | x, None -> Option.map (fun y -> Loc.tag ~loc:!@loc y) x
| Some _, Some _ -> error "scope declared twice" in
List.map (fun (name,recarg_like,notation_scope) ->
`Id { name=name; recarg_like=recarg_like;
@@ -782,7 +782,7 @@ GEXTEND Gram
[ [ name = pidentref; sup = OPT binders ->
(let ((loc,id),l) = name in ((loc, Name id),l)),
(Option.default [] sup)
- | -> ((!@loc, Anonymous), None), [] ] ]
+ | -> ((Loc.tag ~loc:!@loc Anonymous), None), [] ] ]
;
hint_info:
[ [ "|"; i = OPT natural; pat = OPT constr_pattern ->
@@ -1149,8 +1149,8 @@ GEXTEND Gram
| IDENT "only"; IDENT "parsing" -> SetOnlyParsing
| IDENT "compat"; s = STRING ->
SetCompatVersion (Coqinit.get_compat_version s)
- | IDENT "format"; s1 = [s = STRING -> (!@loc,s)];
- s2 = OPT [s = STRING -> (!@loc,s)] ->
+ | IDENT "format"; s1 = [s = STRING -> Loc.tag ~loc:!@loc s];
+ s2 = OPT [s = STRING -> Loc.tag ~loc:!@loc s] ->
begin match s1, s2 with
| (_,k), Some s -> SetFormat(k,s)
| s, None -> SetFormat ("text",s) end