Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

lang_nw: CE

  • Loading branch information...
commit a761f75d707c69bb8159ccb421b714ace57a65d5 1 parent 450e8ec
pad authored
Showing with 10 additions and 12 deletions.
  1. +0 −1  lang_nw/parsing/ast_nw.ml
  2. +10 −11 lang_nw/parsing/parse_nw.ml
View
1  lang_nw/parsing/ast_nw.ml
@@ -1,5 +1,4 @@
type info = Parse_info.info
-
type toplevel = unit
View
21 lang_nw/parsing/parse_nw.ml
@@ -25,7 +25,7 @@ module PI = Parse_info
(* Prelude *)
(*****************************************************************************)
-(* Lots of copy paste with my other parsers (e.g. PHP, C, sql) but
+(* Lots of copy paste with my other parsers (e.g. C++, PHP, sql) but
* copy paste is sometimes ok.
*)
@@ -62,7 +62,7 @@ let lexbuf_to_strpos lexbuf =
(*****************************************************************************)
let tokens2 file =
- let table = Common.full_charpos_to_pos_large file in
+ let table = PI.full_charpos_to_pos_large file in
Common.with_open_infile file (fun chan ->
let lexbuf = Lexing.from_channel chan in
@@ -85,14 +85,13 @@ let tokens2 file =
if !Flag.debug_lexer then Common.pr2_gen tok;
let tok = tok +> TH.visitor_info_of_tok (fun ii ->
- { ii with PI.pinfo=
- (* could assert pinfo.filename = file ? *)
- match PI.pinfo_of_info ii with
- | PI.OriginTok pi ->
- PI.OriginTok
- (Common.complete_parse_info_large file table pi)
- | _ -> raise Todo
-
+ { ii with PI.token=
+ (* could assert pinfo.filename = file ? *)
+ match PI.pinfo_of_info ii with
+ | PI.OriginTok pi ->
+ PI.OriginTok
+ (PI.complete_parse_info_large file table pi)
+ | _ -> raise Todo
})
in
if TH.is_eof tok
@@ -103,7 +102,7 @@ let tokens2 file =
with
| Lexer_nw.Lexical s ->
failwith ("lexical error " ^ s ^ "\n =" ^
- (Common.error_message file (lexbuf_to_strpos lexbuf)))
+ (PI.error_message file (lexbuf_to_strpos lexbuf)))
| e -> raise e
)
Please sign in to comment.
Something went wrong with that request. Please try again.