DUChain: How should we support case insensitive functions?

Milian Wolff mail at milianw.de
Thu Aug 20 20:09:19 UTC 2009


David Nolden, 20.08.2009:
> Am Donnerstag 20 August 2009 17:53:59 schrieb Milian Wolff:
> > Just did a bit more thinking:
> >
> > It would be good if we could support case-insensitivity in at least
> > functions like
> > DUContext::findDeclararations, DUContext::findLocalDeclarations,
> > PersistentSymbolTable::declarations etc. pp.
> >
> > That way I could make uses case insensitive without the need to copy too
> > much code. And I don't want to make the declarationbuilder save
> > everything in lowercase, as then camelcase'd functions etc. would be
> > all-lowercase after code-completion.
>
> Hey.. I don't have much time right now, I am working hard for my speech I
> will hold tomorrow, and then I will be on vacation for a week, so don't
> expect too much input from me in that time. :)

No problem, thanks for replying at all :) And I'll... let me just say it in 
German: Ich werd dir die Daumen drücken. Viel Erfolg!

> But generally, I don't see how we could allow case-insensitive search in
> the duchain. That is simply not possible in any even half-efficient way, as
> the searching is done through the IndexedString indices.

Yeah I pretty much thought so, but couldn't come up with something better. 
But:

> So I guess the best way would be: Create some additional declaration type,
> maybe a template like TemplateDeclaration, where you can attach an
> additional "pretty" string to each declaration. That would be the 'with
> case' string then in php, while internally everything would have a
> lower-case identity.
>
> Then before printing something to the user, you will have have to
> "prettify" it before showing by using the 'pretty' string instead of the
> identity, much like the C++ support does (It leaves out template default
> parameters, resolves typedefs when necessary, etc.).

Sounds great, thanks for the hint. Have a nice vacation. Oh and btw.: Does 
that mean you are done with your thesis?

-- 
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/20090820/e9cfd3aa/attachment.sig>


More information about the KDevelop-devel mailing list