-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
phpparsejob.h
64 lines (46 loc) · 1.73 KB
/
phpparsejob.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
SPDX-FileCopyrightText: 2007 Piyush verma <piyush.verma@gmail.com>
SPDX-FileCopyrightText: 2009 Niko Sams <niko.sams@gmail.com>
SPDX-FileCopyrightText: 2010 Milian Wolff <mail@milianw.de>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef PHP_PARSEJOB_H
#define PHP_PARSEJOB_H
#include <language/backgroundparser/parsejob.h>
#include <language/duchain/problem.h>
#include <QStringList>
#include <ktexteditor/range.h>
#include <language/duchain/topducontext.h>
namespace Php
{
struct AstNode;
class LanguageSupport;
class EditorIntegrator;
class ParseJob : public KDevelop::ParseJob
{
Q_OBJECT
public:
enum {
Rescheduled = KDevelop::TopDUContext::LastFeature
};
explicit ParseJob(const KDevelop::IndexedString& url, KDevelop::ILanguageSupport* LanguageSupport);
~ParseJob() override;
void setParentJob(ParseJob *job);
protected:
LanguageSupport* php() const;
void run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread) override;
private:
ParseJob *m_parentJob; ///< parent job if this one is an include
/**
* Checks if a parent job parses already \p document. Used to prevent
* endless recursions in include statements
*/
bool hasParentDocument(const KDevelop::IndexedString &document);
/// create a problem pointer for the current document
KDevelop::ProblemPointer createProblem(const QString &description, AstNode* node,
EditorIntegrator * editor, KDevelop::IProblem::Source source,
KDevelop::IProblem::Severity severity = KDevelop::IProblem::Error);
};
}
#endif
// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on; auto-insert-doxygen on