| 366 | } |
| 367 | |
| 368 | BfProtection BfDefBuilder::GetProtection(BfAstNode* protectionNode) |
| 369 | { |
| 370 | if (auto tokenPair = BfNodeDynCast<BfTokenPairNode>(protectionNode)) |
| 371 | { |
| 372 | return BfProtection_ProtectedInternal; |
| 373 | } |
| 374 | else if (auto protectionToken = BfNodeDynCast<BfTokenNode>(protectionNode)) |
| 375 | { |
| 376 | if (protectionToken->GetToken() == BfToken_Public) |
| 377 | return BfProtection_Public; |
| 378 | if (protectionToken->GetToken() == BfToken_Protected) |
| 379 | return BfProtection_Protected; |
| 380 | if (protectionToken->GetToken() == BfToken_Internal) |
| 381 | return BfProtection_Internal; |
| 382 | return BfProtection_Private; |
| 383 | } |
| 384 | |
| 385 | if (mCurTypeDef->mTypeCode == BfTypeCode_Interface) |
| 386 | return BfProtection_Public; |
| 387 | else |
| 388 | return BfProtection_Private; |
| 389 | } |
| 390 | |
| 391 | void BfDefBuilder::Visit(BfConstructorDeclaration* ctorDeclaration) |
| 392 | { |
no test coverage detected