MCPcopy Create free account
hub / github.com/KDE/kdevelop / encounterFieldMember

Method encounterFieldMember

plugins/qmljs/duchain/expressionvisitor.cpp:384–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384void ExpressionVisitor::encounterFieldMember(const QString& name)
385{
386 if (QmlJS::isPrototypeIdentifier(name)) {
387 // "prototype" is transparent: "object.prototype.foo" = "object.foo", and
388 // "function.prototype" should point to "function".
389 m_prototypeDepth = 2;
390 return;
391 }
392
393 DeclarationPointer declaration = lastDeclaration();
394 DUContext* context = QmlJS::getInternalContext(declaration);
395
396 if (context) {
397 encounter(name, context);
398 } else {
399 encounterNothing();
400 }
401}
402
403void ExpressionVisitor::encounterObjectAtLocation(const QmlJS::AST::SourceLocation& location)
404{

Callers

nothing calls this directly

Calls 3

isPrototypeIdentifierFunction · 0.85
lastDeclarationFunction · 0.85
getInternalContextFunction · 0.85

Tested by

no test coverage detected