Skip to content

Commit

Permalink
fixing is_infix
Browse files Browse the repository at this point in the history
  • Loading branch information
brabalan committed Oct 9, 2017
1 parent f75fecc commit acc2e70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js_of_ast.ml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ let is_infix f args = match args with
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
x.exp_loc.loc_start.pos_lnum < f.exp_loc.loc_start.pos_lnum ||
(x.exp_loc.loc_start.pos_lnum = f.exp_loc.loc_start.pos_lnum &&
x.exp_loc.loc_start.pos_cnum < f.exp_loc.loc_start.pos_cnum)

exception Map_fields_elements_mismatch_number_args

Expand Down
2 changes: 2 additions & 0 deletions tests/arith.ml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
let myadd x y = x +. y

let subst x = x-1

0 comments on commit acc2e70

Please sign in to comment.