Skip to content

Commit

Permalink
list sub types in import completion
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Feb 19, 2015
1 parent e01fbc4 commit c51a363
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions parser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,12 @@ and parse_import s p1 =
let rec loop acc =
match s with parser
| [< '(Dot,p) >] ->
if is_resuming p then raise (TypePath (List.rev (List.map fst acc),None));
let resume() =
match acc with
| (n,_) :: l when n.[0] >= 'A' && n.[0] <= 'Z' -> raise (TypePath (List.rev (List.map fst l),Some (n,false)));
| _ -> raise (TypePath (List.rev (List.map fst acc),None));
in
if is_resuming p then resume();
(match s with parser
| [< '(Const (Ident k),p) >] ->
loop ((k,p) :: acc)
Expand All @@ -653,7 +658,7 @@ and parse_import s p1 =
p2, List.rev acc, IAll
| [< '(Binop OpOr,_) when do_resume() >] ->
set_resume p;
raise (TypePath (List.rev (List.map fst acc),None))
resume()
| [< >] ->
serror());
| [< '(Semicolon,p2) >] ->
Expand Down

0 comments on commit c51a363

Please sign in to comment.