Mercurial > projects > dil
comparison src/dil/ast/Types.d @ 835:451ede0105e0
Applied minor fixes and tidied some code up a bit.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Tue, 12 Aug 2008 02:59:11 +0200 |
parents | bcb74c9b895c |
children |
comparison
equal
deleted
inserted
replaced
834:8bcf482b2062 | 835:451ede0105e0 |
---|---|
75 /// "typeof" "(" Expression ")" or$(BR) | 75 /// "typeof" "(" Expression ")" or$(BR) |
76 /// "typeof" "(" "return" ")" (D2.0) | 76 /// "typeof" "(" "return" ")" (D2.0) |
77 class TypeofType : TypeNode | 77 class TypeofType : TypeNode |
78 { | 78 { |
79 Expression e; | 79 Expression e; |
80 /// "typeof" "(" Expression ")" | |
80 this(Expression e) | 81 this(Expression e) |
81 { | 82 { |
82 this(); | 83 this(); |
83 addChild(e); | 84 addChild(e); |
84 this.e = e; | 85 this.e = e; |
85 } | 86 } |
86 | 87 |
87 // For D2.0: "typeof" "(" "return" ")" | 88 /// For D2.0: "typeof" "(" "return" ")" |
88 this() | 89 this() |
89 { | 90 { |
90 mixin(set_kind); | 91 mixin(set_kind); |
91 } | 92 } |
92 | 93 |
94 /// Returns true if this is a "typeof(return)". | |
93 bool isTypeofReturn() | 95 bool isTypeofReturn() |
94 { | 96 { |
95 return e is null; | 97 return e is null; |
96 } | 98 } |
97 | 99 |