From: Stefan S. <se...@sy...> - 2004-07-17 14:02:42
|
Grzegorz Jakacki wrote: > It is worse. 'f<1>(0)' will always parse as a template, even if 'f' is > an int variable. :-( > >> Could I simply add ';' >> and ',' to the list of symbols potentially following the template args ? > > > AFAICS it will not break things further. > >> May be I should have a look into the new C++ parser used in gcc 3.4... > > > Honest parsing of templates requires parser to be able to tell if an > identifier is a template in current scope and this is how gcc does it > (gcc/gcc/cp/parser.c, see cp_parser_lookup_name()). Ah, now I understand again ! So, the solution is to add a type dictionary ('Environment' ?) to the Parser and then let the 'isTypeSpecifier' use that instead of just detecting built-in types. Right ? Stefan |