About contextbuilder
Milian Wolff
mail at milianw.de
Mon Mar 8 13:52:09 UTC 2010
Victor Vicente de Carvalho, 08.03.2010:
> > You can either use your generic AST node, or if you only ever have one
> > node which specifies an identifier, you can make your builder more type
> > safe by using the type of that node which gives you the identifier.
>
> After reading the pages you sent me the things are getting more clear,
> thanks. I'm trying to implement an language plugin for erlang, which is
> functional and dynamically typed. So in my case the contextbuilder will be
> just for my functions?
Use the context builder to mark ranges of code that make up a "context". I
don't know erlang, but if it is a functional language without any OOP features
than yes, only function probably have their own contexts (in addition to the
global TopDUContext making up a file).
> and about declaration builder? I can just give the
> "meaning" of my declaration or it is specting something more "real"?
I'm not sure about this one as I don't know Erlang, yet what I can tell from
my (very limited) experience with Haskell:
Use declarations for functions, their arguments and type definitions. You
probably don't have anything like "local variables" and the like, yet it's
useful to jump to arguments, typedefs etc. pp.
> More helpful stuff:
> > http://api.kde.org/extragear-api/sdk-
> >
> > apidocs/kdevplatform/language/duchain/html/classKDevelop_1_1AbstractConte
> > xtBuilder.html#_details
> >
> > http://api.kde.org/extragear-api/sdk-
> > apidocs/kdevplatform/language/duchain/html/Implementing.html
>
> Thanks again, they were very helpful :)
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100308/7aa36df0/attachment.sig>
More information about the KDevelop-devel
mailing list