void FunctionDeclaration::setPrototypeContext(KDevelop::DUContext* context) { DUCHAIN_D_DYNAMIC(FunctionDeclaration); d->m_prototypeContext = KDevelop::IndexedDUContext(context); // HACK: Also set the internal function context of this function to "context", // so that importing functions work (DUContext::Import::context(), when // given a FunctionDeclaration, returns its internalFunctionContext) if (context->type() == KDevelop::DUContext::Function) { // NOTE: type != Function when the internal context of an object is assigned // to one of its members. Skipping this hack is not a problem in that // case because one never writes: // o.member = function(){}; var v = new o.member(); setInternalFunctionContext(context); } }
void VariableDeclaration::setSuperglobal(bool superglobal) { DUCHAIN_D_DYNAMIC(VariableDeclaration); d->m_isSuperglobal = superglobal; }
void VariableDeclaration::setVariadic(bool variadic) { DUCHAIN_D_DYNAMIC(VariableDeclaration); d->m_isVariadic = variadic; }