comparison tools/AstPrinter.d @ 163:362265427838

Fixes to types for constructor and also removed DFunction's from DStruct, DClass and DInterface
author Anders Johnsen <skabet@gmail.com>
date Tue, 22 Jul 2008 16:50:47 +0200
parents 57b0b4464a0b
children 01c2c49775ef
comparison
equal deleted inserted replaced
162:0f38f1a0f06f 163:362265427838
38 switch(decl.declType) 38 switch(decl.declType)
39 { 39 {
40 case DeclType.FuncDecl: 40 case DeclType.FuncDecl:
41 auto funcDecl = cast(FuncDecl)decl; 41 auto funcDecl = cast(FuncDecl)decl;
42 printBeginLine(); 42 printBeginLine();
43 if(printAtt) printAttribute(decl.att); 43 if (printAtt) printAttribute(decl.att);
44 printIdentifier(funcDecl.returnType); 44 if (funcDecl.identifier.get != "this")
45 space; 45 {
46 printIdentifier(funcDecl.returnType);
47 space;
48 }
46 printIdentifier(funcDecl.identifier); 49 printIdentifier(funcDecl.identifier);
47 printFuncArgs(funcDecl); 50 printFuncArgs(funcDecl);
48 printOpenBrace(); 51 printOpenBrace();
49 foreach(stmt ; funcDecl.statements) 52 foreach(stmt ; funcDecl.statements)
50 printStatement(stmt); 53 printStatement(stmt);