Parse errors are reported, but not highlighted yet · scummos/kdevelop-python@28a162e · GitHub
Skip to content

Commit 28a162e

Browse files
committed
Parse errors are reported, but not highlighted yet
1 parent c406271 commit 28a162e

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎parser/astbuilder.cpp‎

Lines changed: 8 additions & 4 deletions

‎pythonparsejob.cpp‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ void ParseJob::run()
121121
ParsingEnvironmentFile *file = new ParsingEnvironmentFile(document());
122122
IndexedString langstring("python");
123123
file->setLanguage(langstring);
124-
m_top = new TopDUContext(document(), RangeInRevision(0, 0, INT_MAX, INT_MAX), file);
125-
DUChain::self()->addDocumentChain(m_top);
124+
m_duContext = new TopDUContext(document(), RangeInRevision(0, 0, INT_MAX, INT_MAX), file);
125+
m_duContext->setType(KDevelop::DUContext::Global);
126+
DUChain::self()->addDocumentChain(m_duContext);
126127
}
127128

128129
// 2) parse
@@ -144,7 +145,7 @@ void ParseJob::run()
144145

145146
editor.setParseSession(m_session);
146147

147-
m_duContext = builder.build(filename, m_ast);
148+
m_duContext = builder.build(filename, m_ast, m_duContext);
148149
setDuChain(m_duContext);
149150

150151
UseBuilder usebuilder( &editor );

‎pythonparsejob.h‎

Lines changed: 0 additions & 1 deletion

0 commit comments

Comments
 (0)