AST/ANTLR3 and object model intellisense / autocomplete

This is similar to another question I’ve seen posted, but that seemed to be more about updating object model from the code.

I’m more interested in the following.
I’d like to have AST/ANTLR parser running in the bg, and have intellisense driven off more than just keyword highlighting and auto completion. (adding additional keywords, and knowing what subproperties of variables defined elsewhere etc).

I was wondering if there was any examples of codemirror doing anything like this so I could see how to add some more intelligent autocompletion/intellisense to my webapp.

Appreciate the pointers… again, this isn’t a question about how to determine what keywords or what properites these obejcts will have, its more examples of codemirror working in such a fashion.

The Tern demo pretty much works like this, though the relevant code is deep inside the Tern project. It keeps an AST of the code around, parsed with Acorn on which it does analysis, and re-parses the file when it was changed and a new query is made.

@ronnyek - would love to hear about your progress on this! Keep us posted!