Skip to content

Commit

Permalink
fixing is_infix
Browse files Browse the repository at this point in the history
  • Loading branch information
brabalan committed Jul 12, 2017
1 parent cd95489 commit f75fecc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js_of_ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ let is_infix f args = match args with
| _ :: [] | [] -> false
| x :: xs ->
let open Location in
let f_loc = (f.exp_loc.loc_start, f.exp_loc.loc_end) in
let args_loc = (x.exp_loc.loc_start, x.exp_loc.loc_end) in
if fst args_loc < fst f_loc then true else false
let open Lexing in
if f.exp_loc.loc_ghost then false else
if x.exp_loc.loc_ghost then false else
x.exp_loc.loc_end.pos_lnum < f.exp_loc.loc_start.pos_lnum ||
x.exp_loc.loc_end.pos_cnum < f.exp_loc.loc_start.pos_cnum

exception Map_fields_elements_mismatch_number_args

Expand Down

0 comments on commit f75fecc

Please sign in to comment.