On Feb 9, 2009, at 12:58 PM, Douglas Gregor wrote:


On Feb 9, 2009, at 12:05 PM, Sebastian Redl wrote:

Douglas Gregor wrote:
Author: dgregor
Date: Mon Feb  9 12:46:07 2009
New Revision: 64153

URL: http://llvm.org/viewvc/llvm-project?rev=64153&view=rev
Log:
Start processing template-ids as types when the template-name refers
to a class template. For example, the template-id 'vector<int>' now
has a nice, sugary type in the type system. What we can do now:

- Parse template-ids like 'vector<int>' (where 'vector' names a
  class template) and form proper types for them in the type system.
- Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly,
  using (sadly) a bool in the parser to tell it whether '>' should
  be treated as an operator or not.

I suppose it can't be helped.

The only other option I can think of would be to pass it as a boolean
flag down the stack... that's almost worse :)

Naive question: is this just a matter of parsing the expression starting at the right precedence level?

-Chris
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to