ParsingEnvironment??

Andreas Pakulat apaku at gmx.de
Sat Feb 9 08:24:36 UTC 2008


On 09.02.08 02:20:22, David Nolden wrote:
> On Friday 08 February 2008 23:53:06 Andreas Pakulat wrote:
> > Hi,
> >
> > so python support is back with a (hopefully) more easily usable AST.
> >
> > I have again started to look into DUChain and such things and one thing
> > I crossed is this whole ParsingEnvironment stuff. And I'm wondering: How
> > do I handle this for Python.
> >
> > I mean, I currently don't see any need for having the same file parsed
> > in different environment (as opposed to C++ where different macros can
> > be active). Should I just stick with KUrl for identifying a file and
> > creating HashedString and IdentifiedFile instances from that on the fly
> > when the API needs it?
> >
> 
> There is a lot that you can simply ignore with languages that don't have a 
> preprocessor. The whole ParsingEnvironment stuff is one of them. ;)

Ok, makes the whole stuff a bit more typing work though as I only carry
around a KUrl. Thats why I asked actually, to find an easy way to use
the EnvironmentFile so I don't have to type

IdentifiedFile(HashedString(m_url.path()));

> You can simply address your files by using IdentifiedFile(fileName, 0) or 
> similar, and construct all your HashedString file-names using 
> KUrl::prettyUrl() as needed(ond of course also the opposite direction 
> wherever necessary).

Uhm, prettyUrl()? I think either url() or path() (If I only support
local filepaths) is better, as prettyUrl is intended for user display,
not for programatic usage.

> > Andreas, who'd like to see 2 or 3 people sit down and work over DUChain
> > docs and C++ code comments :)
> 
> Hackathon is coming ;)

Btw: Haven't seen any replies from you in the mails, are you coming?

Andreas

-- 
If you learn one useless thing every day, in a single year you'll learn
365 useless things.




More information about the KDevelop-devel mailing list