clemos/haxe-sublime2-bundle — pull request #10 by elsassph (2011-11-30 21:59:15+00:00)
Title: Completion bug after coma character

Falls back to nearest dot if present.

ie.
addEventListener(Event.ADDED_TO_STAGE,

PS: this context detection is much too rudimentary, and really to make it correctly is going to be very tricky. I'd suggest to look how it's done in FlashDevelop code - although far from being perfect it's what you can achieve efficiently without AST.

First disambiguate the coma itself:
http://code.google.com/p/flashdevelop/source/browse/trunk/FD4/External/Plugins/ASCompletion/Completion/ASComplete.cs#3058

Second, find the actual function call (they can be imbricated):
http://code.google.com/p/flashdevelop/source/browse/trunk/FD4/External/Plugins/ASCompletion/Completion/ASComplete.cs#1510