Playing with the QML/JS plugin
steckdenis at yahoo.fr
Tue Apr 8 13:33:43 UTC 2014
I'll rebase my code on master (that is to say, using ExpressionVisitor).
Now that I understand how types are created and assigned, where contexts
must be opened and closed, etc, I will try to follow the "standard"
architecture for my code.
I'll also try to add some sort of caching in ExpressionVisitor (maybe by
keeping the QHash<Node, AbstractType::Ptr> of ParseSession), in order to
have its nice look-ahead behavior while keeping a O(n) complexity (it's
that use nested functions and expressions everywhere)
On 04/08/2014 10:24 AM, Sven Brauch wrote:
>> The only problem that may arise is that I must create the empty context
>> at the declaration of v, but I need to add imported contexts to it
>> afterward. Is it possible to call DUContext::addImportedParentContext on
>> a context that already has a parent? (I've read that I need to check
>> TopDUContext::isInChain or something like that)
> Yes, as far as I'm aware you can add parent contexts at any time.
> The idea you described sounds clever, but I can't judge from my head if it
> would work or not. You would have to try it. ;)
Wonderful. This and the fact that the type of a declaration can be
changed allow many interesting on which I will work in the coming days!
I'm starting to very much like developing language support plugins!
More information about the KDevelop-devel