From aa71c826a39ab3436ca3931f5a3a10375636f114 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 12 Oct 2015 06:50:27 +0000 Subject: [PATCH] cpp: fixes git-svn-id: svn://ultimatepp.org/upp/trunk@9006 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CppBase/Parser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uppsrc/CppBase/Parser.cpp b/uppsrc/CppBase/Parser.cpp index d8a7f68ab..d75b41c9a 100644 --- a/uppsrc/CppBase/Parser.cpp +++ b/uppsrc/CppBase/Parser.cpp @@ -692,7 +692,7 @@ String Parser::ReadType(Decla& d, const String& tname, const String& tparam) d.type = StructDeclaration(tname, tparam); return String(); } - Key(tk_typename) || Key(tk_struct) || Key(tk_class) || Key(tk_union) || Key(tk_enum); + Key(tk_typename) || Key(tk_struct) || Key(tk_class) || Key(tk_union) || Key(tk_enum) || Key(tk_template); if(Key(tk_bool) || Key(tk_float) || Key(tk_double) || Key(tk_void)) return Null; bool sgn = Key(tk_signed) || Key(tk_unsigned); @@ -736,6 +736,7 @@ String Parser::ReadType(Decla& d, const String& tname, const String& tparam) else { if(Key(t_dblcolon)) d.type << "::"; + Key(tk_typename) || Key(tk_template); Check(lex.IsId(), "Name expected"); while(lex.IsId()) { d.type << TType(); @@ -750,6 +751,7 @@ String Parser::ReadType(Decla& d, const String& tname, const String& tparam) d.type << "::"; if(Key('~')) cs = true; + Key(tk_typename) || Key(tk_template); } else break;