Permalink
Browse files

small fixes

lwt_try / finally and indent of a first match case without bar when i_with>=2
  • Loading branch information...
1 parent ef63598 commit e2cecb8692c3e0e6201e2a1a86ed36ed1e6b6188 @AltGr AltGr committed Mar 20, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/approx_lexer.mll
  2. +2 −2 src/indentBlock.ml
View
@@ -112,7 +112,7 @@ let syntax_extensions = [
"match_lwt", MATCH;
"try_lwt", TRY;
"while_lwt", WHILE;
- "finally", BAR; (* -- no equivalence for this one, this is a hack ! *)
+ "finally", WITH; (* -- no equivalence for this one, this is a hack ! *)
];
"mll", [
"rule", LET;
View
@@ -484,11 +484,11 @@ let rec update_path config t stream tok =
| _ -> path
in
let before_append_atom = function
- | {k=KWith(KTry|KMatch as m); pad}::_ as path ->
+ | {k=KWith(KTry|KMatch as m)}::_ as path ->
(* Special case: 'match with' and no bar for the 1st case:
we append a virtual bar for alignment *)
let p =
- append (KBar m) L ~pad:(max 2 pad) path
+ append (KBar m) L ~pad:2 path
in
if not starts_line then
let t = max 0 (t.toff + tok.offset - 2) in

0 comments on commit e2cecb8

Please sign in to comment.