Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test and fix for issue #6: indentation after let-open

  • Loading branch information...
commit 2038cef5ac100e78ff9eb68fd0f96d0d096bbffc 1 parent 6eb2ae1
@AltGr AltGr authored
Showing with 9 additions and 1 deletion.
  1. +4 −1 src/block.ml
  2. +5 −0 tests/let-open.ml
View
5 src/block.ml
@@ -347,7 +347,6 @@ let rec update_path t stream tok =
match tok.token with
| SEMISEMI -> append KNone L 0 (unwind_top t.path)
- | OPEN -> append KOpen L 2 (unwind_top t.path)
| INCLUDE -> append KInclude L 2 (unwind_top t.path)
| EXCEPTION -> append KException L 2 (unwind_top t.path)
| BEGIN -> append KBegin L 2 t.path
@@ -365,6 +364,10 @@ let rec update_path t stream tok =
| WHEN -> append KWhen L 4 t.path
| SIG -> append KSig L 2 t.path
+ | OPEN when last_token t = Some LET -> append KOpen L 2 t.path
+
+ | OPEN -> append KOpen L 2 (unwind_top t.path)
+
| LET when close_top_let t.last ->
append KLet L 4 (unwind_top t.path)
View
5 tests/let-open.ml
@@ -0,0 +1,5 @@
+
+let _ =
+ (* ... *)
+ let open Option in
+ indented_line
Please sign in to comment.
Something went wrong with that request. Please try again.