| 3157 | }; |
| 3158 | |
| 3159 | void BfAutoComplete::CheckResult(BfAstNode* node, const BfTypedValue& typedValue) |
| 3160 | { |
| 3161 | if (mResolveType != BfResolveType_GetResultString) |
| 3162 | return; |
| 3163 | |
| 3164 | if (!IsAutocompleteNode(node)) |
| 3165 | return; |
| 3166 | |
| 3167 | if (!typedValue.mValue.IsConst()) |
| 3168 | return; |
| 3169 | if (typedValue.mType->IsPointer()) |
| 3170 | return; |
| 3171 | if (typedValue.mType->IsObject()) |
| 3172 | return; |
| 3173 | |
| 3174 | BfAutocompleteNodeChecker autocompleteNodeChecker(this); |
| 3175 | autocompleteNodeChecker.VisitChildNoRef(node); |
| 3176 | if (!autocompleteNodeChecker.mSelected) |
| 3177 | return; |
| 3178 | |
| 3179 | String constStr = ConstantToString(mModule->mBfIRBuilder, typedValue); |
| 3180 | if (!constStr.IsEmpty()) |
| 3181 | { |
| 3182 | mResultString = ":"; |
| 3183 | mResultString += constStr; |
| 3184 | AddResultTypeKind(typedValue.mType); |
| 3185 | } |
| 3186 | else |
| 3187 | { |
| 3188 | SetResultStringType(typedValue.mType); |
| 3189 | } |
| 3190 | } |
| 3191 | |
| 3192 | void BfAutoComplete::CheckLocalDef(BfAstNode* identifierNode, BfLocalVariable* varDecl) |
| 3193 | { |
no test coverage detected