fix completion on labels
Ignore-this: 51218052e237139196e90f8cd995348 darcs-hash:20110731120210-c41ad-99dd4db54d70b68cff3b4579df23761a0680d409
This commit is contained in:
parent
3e6d20c5e0
commit
3b22daa6ee
|
@ -150,10 +150,10 @@ let parse_label tokens =
|
||||||
skip tokens "[" []
|
skip tokens "[" []
|
||||||
| (Symbol, _, _, _) :: _ ->
|
| (Symbol, _, _, _) :: _ ->
|
||||||
Some (Fun, longident_of_list acc_uidents, acc_methods)
|
Some (Fun, longident_of_list acc_uidents, acc_methods)
|
||||||
| _ :: tokens ->
|
|
||||||
search tokens
|
|
||||||
| [] ->
|
| [] ->
|
||||||
Some (Fun, longident_of_list acc_uidents, acc_methods)
|
Some (Fun, longident_of_list acc_uidents, acc_methods)
|
||||||
|
| _ ->
|
||||||
|
search tokens
|
||||||
and loop_methods acc tokens =
|
and loop_methods acc tokens =
|
||||||
match tokens with
|
match tokens with
|
||||||
| ((Lident | Uident), _, _, id) :: _ when String_set.mem id !UTop.keywords ->
|
| ((Lident | Uident), _, _, id) :: _ when String_set.mem id !UTop.keywords ->
|
||||||
|
@ -172,10 +172,10 @@ let parse_label tokens =
|
||||||
loop_methods (id :: acc) tokens
|
loop_methods (id :: acc) tokens
|
||||||
| (Lident, _, _, id) :: tokens ->
|
| (Lident, _, _, id) :: tokens ->
|
||||||
loop_uidents [id] acc tokens
|
loop_uidents [id] acc tokens
|
||||||
| _ :: tokens ->
|
|
||||||
search tokens
|
|
||||||
| [] ->
|
| [] ->
|
||||||
None
|
None
|
||||||
|
| _ ->
|
||||||
|
search tokens
|
||||||
and search tokens =
|
and search tokens =
|
||||||
match tokens with
|
match tokens with
|
||||||
| ((Lident | Uident), _, _, id) :: _ when String_set.mem id !UTop.keywords ->
|
| ((Lident | Uident), _, _, id) :: _ when String_set.mem id !UTop.keywords ->
|
||||||
|
|
Loading…
Reference in New Issue