comparison trunk/src/dil/Module.d @ 516:433d51c18524

Renamed template Cast to TryCast.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Fri, 14 Dec 2007 22:43:44 +0100
parents 7cb97346bc6f
children f203c5248d0b
comparison
equal deleted inserted replaced
515:7cb97346bc6f 516:433d51c18524
47 this.root = parser.start(); 47 this.root = parser.start();
48 48
49 if (root.children.length) 49 if (root.children.length)
50 { 50 {
51 // moduleDecl will be null if first node can't be cast to ModuleDeclaration. 51 // moduleDecl will be null if first node can't be cast to ModuleDeclaration.
52 this.moduleDecl = Cast!(ModuleDeclaration)(root.children[0]); 52 this.moduleDecl = TryCast!(ModuleDeclaration)(root.children[0]);
53 if (moduleDecl) 53 if (moduleDecl)
54 { 54 {
55 this.setFQN(moduleDecl.getFQN()); 55 this.setFQN(moduleDecl.getFQN());
56 } 56 }
57 else 57 else