[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdevplatform/language/duchain/builders
From:       David Nolden <david.nolden.kde () art-master ! de>
Date:       2009-02-15 14:02:17
Message-ID: 1234706537.749217.27439.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 926486 by zwabel:

Extract the decision whether a context should be put into the symbol-table into a \
virtual function, so it can be manipulated in language-specific ways


 M  +11 -1     abstractcontextbuilder.h  


--- trunk/KDE/kdevplatform/language/duchain/builders/abstractcontextbuilder.h \
#926485:926486 @@ -786,7 +786,7 @@
         if (!identifier.isEmpty())
           ret->setLocalScopeIdentifier(identifier);
 
-        ret->setInSymbolTable(type == DUContext::Class || type == \
DUContext::Namespace || type == DUContext::Global || type == DUContext::Helper || \
type == DUContext::Enum); +        setInSymbolTable(ret);
 
 //         if( recompiling() )
 //           kDebug() << "created new context while recompiling for " << \
identifier.toString() << "(" << ret->range().textRange() << ")"; @@ -798,6 +798,16 @@
     return ret;
   }
 
+  ///This function should call context->setInSymbolTable(..) with an appropriate \
decision. The duchain is write-locked when this is called. +  virtual void \
setInSymbolTable(DUContext* context) { +    \
if(!context->parentContext()->inSymbolTable()) { +      \
context->setInSymbolTable(false); +      return;
+    }
+    DUContext::ContextType type = context->type();
+    context->setInSymbolTable(type == DUContext::Class || type == \
DUContext::Namespace || type == DUContext::Global || type == DUContext::Helper || \
type == DUContext::Enum);     +  }
+
 private:
 
   Identifier m_identifier;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic