Playing with the QML/JS plugin

Sven Brauch svenbrauch at googlemail.com
Tue Apr 8 13:50:54 UTC 2014


Hi,

On Tuesday 08 April 2014 15:33:43 Denis Steckelmacher wrote:
> I will try to follow the "standard"
> architecture for my code.
Yeah, I think that makes sense, except if there is a good reason to deviate 
from it.

> 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
> very important for Javascript, as there are very big files like jQuery
> that use nested functions and expressions everywhere)
You *should* not run into non-O(n) situations if you take care where you call 
which visitor. Unless you use ExpressionVisitor inside ExpressionVisitor. 
Which you can do, but then you can avoid non-O(n) situations too by just not 
calling the default visitor's visit() function on the node you already visited 
with the extra expression visitor (not sure if I'm making sense here).

> I'm starting to very much like developing language support plugins!
That's the spirit! :)

Cheers,
Sven


More information about the KDevelop-devel mailing list