Removed obsolete code.

This commit is contained in:
Roberto Raggi
2010-05-10 10:14:49 +02:00
parent 702909372d
commit dca2e82160

View File

@@ -282,15 +282,6 @@ public:
_workingCopy(workingCopy)
{ }
DeprecatedLookupContext lookupContext(unsigned line, unsigned column) const
{ return lookupContext(_doc->findSymbolAt(line, column)); }
DeprecatedLookupContext lookupContext(Symbol *symbol) const
{
DeprecatedLookupContext context(symbol, Document::create(QLatin1String("<none>")), _doc, _snapshot);
return context;
}
void operator()(Document::Ptr doc)
{
_doc = doc;
@@ -300,37 +291,6 @@ public:
if (_workingCopy.contains(doc->fileName()))
mode = Document::FullCheck;
if (doc->isParsed() && mode == Document::FastCheck) {
TranslationUnit *unit = doc->translationUnit();
MemoryPool *pool = unit->memoryPool();
Parser parser(unit);
Semantic semantic(unit);
Namespace *globalNamespace = doc->control()->newNamespace(0);
doc->setGlobalNamespace(globalNamespace);
Scope *globals = globalNamespace->members();
while (parser.LA()) {
unsigned start_declaration = parser.cursor();
DeclarationAST *declaration = 0;
if (parser.parseDeclaration(declaration)) {
semantic.check(declaration, globals);
} else {
doc->translationUnit()->error(start_declaration, "expected a declaration");
parser.rewind(start_declaration + 1);
parser.skipUntilDeclaration();
}
parser.clearTemplateArgumentList();
pool->reset();
}
} else {
doc->parse();
doc->check(mode);
if (mode == Document::FullCheck) {
@@ -343,7 +303,6 @@ public:
checkUndefinedSymbols(doc->translationUnit()->ast()); // ### FIXME
}
}
doc->releaseTranslationUnit();