summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser_helper.ml
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-12-15 15:18:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-12-15 15:18:25 +0000
commit4dbce6d83dbfd9ebefed80f9b735ad2a3359172c (patch)
tree83ba7c2c80130217ad0c62196cc272fedf66b847 /perl_checker.src/parser_helper.ml
parentc6c569d99bb09a9e19556b1d597016986bdef6ad (diff)
downloadperl_checker-4dbce6d83dbfd9ebefed80f9b735ad2a3359172c.tar
perl_checker-4dbce6d83dbfd9ebefed80f9b735ad2a3359172c.tar.gz
perl_checker-4dbce6d83dbfd9ebefed80f9b735ad2a3359172c.tar.bz2
perl_checker-4dbce6d83dbfd9ebefed80f9b735ad2a3359172c.tar.xz
perl_checker-4dbce6d83dbfd9ebefed80f9b735ad2a3359172c.zip
update "faking a normal lexbuf" code for new ocaml's parsing.ml
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r--perl_checker.src/parser_helper.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml
index ba30b58..a07ad38 100644
--- a/perl_checker.src/parser_helper.ml
+++ b/perl_checker.src/parser_helper.ml
@@ -897,9 +897,9 @@ let rec list2tokens l =
match !rl with
| [] -> internal_error "list2tokens"
| ((start, end_), e) :: l ->
- lexbuf.Lexing.lex_abs_pos <- 0 ;
- lexbuf.Lexing.lex_start_pos <- start ;
- lexbuf.Lexing.lex_curr_pos <- end_ ;
+ (* HACK: fake a normal lexbuf *)
+ lexbuf.Lexing.lex_start_p <- { Lexing.dummy_pos with Lexing.pos_cnum = start } ;
+ lexbuf.Lexing.lex_curr_p <- { Lexing.dummy_pos with Lexing.pos_cnum = end_ } ;
rl := l ; e
let parse_tokens parse tokens lexbuf_opt =