aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-10-24 17:16:00 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-10-24 17:16:00 +0200
commit0be88deef5e9ace1323cf8adc474bf2e4ada9153 (patch)
treeb6a80558e07921f4fe337e53ec0100ebf66144ce
parent5f1dd4c401110d6b10350c847805c6923fa09de5 (diff)
Fixing a location bug with "?" and "$".
-rw-r--r--parsing/lexer.ml44
1 files changed, 2 insertions, 2 deletions
diff --git a/parsing/lexer.ml4 b/parsing/lexer.ml4
index db6816a70..cfea8793a 100644
--- a/parsing/lexer.ml4
+++ b/parsing/lexer.ml4
@@ -495,7 +495,7 @@ let rec next_token = parser bp
| [< '' ' | '\t' | '\n' |'\r' as c; s >] ->
comm_loc bp; push_char c; next_token s
| [< ''$' as c; t = parse_after_special c bp >] ep ->
- comment_stop bp; (t, (ep, bp))
+ comment_stop bp; (t, (bp, ep))
| [< ''.' as c; t = parse_after_special c bp; s >] ep ->
comment_stop bp;
(* We enforce that "." should either be part of a larger keyword,
@@ -514,7 +514,7 @@ let rec next_token = parser bp
in
comment_stop bp; between_com := new_between_com; t
| [< ''?'; s >] ep ->
- let t = parse_after_qmark bp s in comment_stop bp; (t, (ep, bp))
+ let t = parse_after_qmark bp s in comment_stop bp; (t, (bp, ep))
| [< ' ('a'..'z' | 'A'..'Z' | '_' as c);
len = ident_tail (store 0 c); s >] ep ->
let id = get_buff len in