Highlight the locals.

This commit is contained in:
Roberto Raggi
2009-06-24 16:40:30 +02:00
parent 83939c7958
commit 0481176ea7
5 changed files with 170 additions and 10 deletions

View File

@@ -367,19 +367,17 @@ QByteArray Snapshot::preprocessedCode(const QString &source, const QString &file
Document::Ptr Snapshot::documentFromSource(const QByteArray &preprocessedCode,
const QString &fileName) const
{
if (Document::Ptr thisDocument = value(fileName)) {
FastPreprocessor pp(*this);
Document::Ptr newDoc = Document::create(fileName);
FastPreprocessor pp(*this);
Document::Ptr newDoc = Document::create(fileName);
if (Document::Ptr thisDocument = value(fileName)) {
newDoc->_includes = thisDocument->_includes;
newDoc->_definedMacros = thisDocument->_definedMacros;
newDoc->setSource(preprocessedCode);
newDoc->parse();
return newDoc;
}
return Document::Ptr();
newDoc->setSource(preprocessedCode);
newDoc->parse();
return newDoc;
}
QSharedPointer<NamespaceBinding> Snapshot::globalNamespaceBinding(Document::Ptr doc) const