diff dmd/parse.c @ 139:0ab29b838084 trunk

[svn r143] Fixed: a few bugs in debug information, still only line info, but should be correct files now :) Fixed: tango.io.Console seems to be working now.
author lindquist
date Tue, 22 Jan 2008 00:01:16 +0100
parents 70d6113eeb8c
children 5acec6b2eef8
line wrap: on
line diff
--- a/dmd/parse.c	Fri Jan 18 20:13:19 2008 +0100
+++ b/dmd/parse.c	Tue Jan 22 00:01:16 2008 +0100
@@ -1219,13 +1219,12 @@
 
 TemplateParameters *Parser::parseTemplateParameterList()
 {
-    TemplateParameters *tpl;
+    TemplateParameters *tpl = new TemplateParameters();
 
     if (token.value != TOKlparen)
     {   error("parenthesized TemplateParameterList expected following TemplateIdentifier");
 	goto Lerr;
     }
-    tpl = new TemplateParameters();
     nextToken();
 
     // Get array of TemplateParameters
@@ -1309,7 +1308,7 @@
 		if (!tp_ident)
 		{
 		    error("no identifier for template value parameter");
-		    goto Lerr;
+		    tp_ident = new Identifier("error", TOKidentifier);
 		}
 		if (token.value == TOKcolon)	// : CondExpression
 		{
@@ -1330,10 +1329,8 @@
 	}
     }
     check(TOKrparen);
+Lerr:
     return tpl;
-
-Lerr:
-    return NULL;
 }
 
 /******************************************