Commit d47fe379 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-05-10 18:33:35 by cvscast] Empty log message

Original author: cvscast
Date: 2003-05-10 18:34:32+00:00
parent 02a96b54
......@@ -38,7 +38,8 @@ let cst_nil = Cst (Types.Atom Sequence.nil_atom)
let seq_of_string pos s =
let s = Encodings.Utf8.mk s in
(* What about locations when input file is not Utf8 ? *)
(* What about locations when input file is not Utf8 ?
Or when using special characters in string ! *)
let (pos,_) = pos in
let rec aux pos i j =
if Encodings.Utf8.equal_index i j then []
......@@ -46,7 +47,7 @@ let seq_of_string pos s =
let (c,i) = Encodings.Utf8.next s i in
((pos,pos+1),c)::(aux (pos+1) i j)
in
aux pos (Encodings.Utf8.start_index s) (Encodings.Utf8.end_index s)
aux (pos + 1) (Encodings.Utf8.start_index s) (Encodings.Utf8.end_index s)
exception Error of string
let error (i,j) s = Location.raise_loc i j (Error s)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment