diff sema/AstAction.d @ 82:06dda301ea61 new_gen

Can declare outside functions and call c-functions
author Anders Johnsen <skabet@gmail.com>
date Fri, 02 May 2008 19:51:58 +0200
parents 110c7e1c4ca2
children 9e90694f5da0
line wrap: on
line diff
--- a/sema/AstAction.d	Fri May 02 18:23:33 2008 +0200
+++ b/sema/AstAction.d	Fri May 02 19:51:58 2008 +0200
@@ -63,7 +63,10 @@
     override void addFuncArg(DeclT func, Id type, Id name)
     {
         FuncDecl fd = cast(FuncDecl)func;
-        fd.addParam(new Identifier(type.tok), new Identifier(name.tok));
+        if(name)
+            fd.addParam(new Identifier(type.tok), new Identifier(name.tok));
+        else
+            fd.addParam(new Identifier(type.tok));
     }
 
     override DeclT actOnEndOfFunction(DeclT func, StmtT stmts)