MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / visit

Method visit

src/ast/ast_typedecl.cpp:157–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 }
156
157 TypeDeclPtr TypeDecl::visit ( Visitor & vis ) {
158 if ( baseType==Type::typeDecl || baseType==Type::typeMacro ) {
159 for ( size_t i=0, is=dimExpr.size(); i!=is; ++i ) {
160 if ( dimExpr[i] ) {
161 dimExpr[i] = dimExpr[i]->visit(vis);
162 }
163 }
164 } else {
165 for ( size_t i=0, is=dim.size(); i!=is; ++i ) {
166 if ( dim[i]==TypeDecl::dimConst ) {
167 if ( i<dimExpr.size() && dimExpr[i] ) {
168 dimExpr[i] = dimExpr[i]->visit(vis);
169 }
170 }
171 }
172 }
173 if ( firstType ) {
174 vis.preVisit(firstType);
175 firstType = firstType->visit(vis);
176 }
177 if ( secondType ) {
178 vis.preVisit(secondType);
179 secondType = secondType->visit(vis);
180 }
181 for ( auto & argType : argTypes ) {
182 vis.preVisit(argType);
183 argType = argType->visit(vis);
184 }
185 return this;
186 }
187
188 void TypeDecl::applyRefToRef ( const TypeDeclPtr & TT, bool topLevel ) {
189 if ( topLevel && TT->ref && TT->isRefType() ) {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
preVisitMethod · 0.45

Tested by

no test coverage detected