[cfe-dev] c++ templates
Sebastian Redl
sebastian.redl at getdesigned.at
Thu Nov 13 15:16:52 PST 2008
Andrew Sutton wrote:
>
>
> Attached is a very (VERY) preliminary stab at the beginning of
> template parsing for clang. It's not complete, it doesn't do
> anything, there's no AST stuff, I haven't even considered
> scopes and name resolution, etc., etc. It just recognizes
> "template <...>". I had hoped to spend some spare time, an
> hour or so a day (whenever possible) to continue working on
> this. Please bear in mind that a) I've never worked on a real
> compiler before and b) I probably don't fully understand the
> requirements of what I'm working on.
>
Then you're just like me when I started on Clang :-) You'll learn, but
you picked a particularly bad piece of C++ to start.
Although, parsing templates is the easy part. Parsing and expanding
their use is what's really hard.
Your code looks good for a start. Of course, there's a lot missing, but
what's there seems reasonable.
Sebastian
More information about the cfe-dev
mailing list