fix completion on labels

Ignore-this: 51218052e237139196e90f8cd995348

darcs-hash:20110731120210-c41ad-99dd4db54d70b68cff3b4579df23761a0680d409
This commit is contained in:
Jeremie Dimino 2011-07-31 14:02:10 +02:00
parent 3e6d20c5e0
commit 3b22daa6ee
1 changed files with 4 additions and 4 deletions

View File

@ -150,10 +150,10 @@ let parse_label tokens =
skip tokens "[" []
| (Symbol, _, _, _) :: _ ->
Some (Fun, longident_of_list acc_uidents, acc_methods)
| _ :: tokens ->
search tokens
| [] ->
Some (Fun, longident_of_list acc_uidents, acc_methods)
| _ ->
search tokens
and loop_methods acc tokens =
match tokens with
| ((Lident | Uident), _, _, id) :: _ when String_set.mem id !UTop.keywords ->
@ -172,10 +172,10 @@ let parse_label tokens =
loop_methods (id :: acc) tokens
| (Lident, _, _, id) :: tokens ->
loop_uidents [id] acc tokens
| _ :: tokens ->
search tokens
| [] ->
None
| _ ->
search tokens
and search tokens =
match tokens with
| ((Lident | Uident), _, _, id) :: _ when String_set.mem id !UTop.keywords ->