Changeset View
Changeset View
Standalone View
Standalone View
parser/parsesession.cpp
Show All 26 Lines | |||||
27 | #include <QFile> | 27 | #include <QFile> | ||
28 | #include <QTextCodec> | 28 | #include <QTextCodec> | ||
29 | 29 | | |||
30 | #include <KLocalizedString> | 30 | #include <KLocalizedString> | ||
31 | 31 | | |||
32 | #include <interfaces/icore.h> | 32 | #include <interfaces/icore.h> | ||
33 | #include <interfaces/ilanguagecontroller.h> | 33 | #include <interfaces/ilanguagecontroller.h> | ||
34 | #include <interfaces/icompletionsettings.h> | 34 | #include <interfaces/icompletionsettings.h> | ||
35 | #include <language/editor/documentrange.h> | ||||
35 | 36 | | |||
36 | namespace Php | 37 | namespace Php | ||
37 | { | 38 | { | ||
38 | 39 | | |||
39 | ParseSession::ParseSession() | 40 | ParseSession::ParseSession() | ||
40 | : m_debug(false), | 41 | : m_debug(false), | ||
41 | m_pool(new KDevPG::MemoryPool()), | 42 | m_pool(new KDevPG::MemoryPool()), | ||
42 | m_tokenStream(new TokenStream()) | 43 | m_tokenStream(new TokenStream()) | ||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Line(s) | |||||
129 | { | 130 | { | ||
130 | Parser* parser = createParser(); | 131 | Parser* parser = createParser(); | ||
131 | StartAst* phpAst; | 132 | StartAst* phpAst; | ||
132 | bool matched = parser->parseStart(&phpAst); | 133 | bool matched = parser->parseStart(&phpAst); | ||
133 | if (matched) { | 134 | if (matched) { | ||
134 | qCDebug(PARSER) << "Successfully parsed"; | 135 | qCDebug(PARSER) << "Successfully parsed"; | ||
135 | *ast = phpAst; | 136 | *ast = phpAst; | ||
136 | } else { | 137 | } else { | ||
137 | *ast = 0; | 138 | *ast = nullptr; | ||
138 | parser->expectedSymbol(AstNode::StartKind, QStringLiteral("start")); | 139 | parser->expectedSymbol(AstNode::StartKind, QStringLiteral("start")); | ||
139 | qCDebug(PARSER) << "Couldn't parse content"; | 140 | qCDebug(PARSER) << "Couldn't parse content"; | ||
140 | } | 141 | } | ||
141 | m_problems << parser->problems(); | 142 | m_problems << parser->problems(); | ||
142 | delete parser; | 143 | delete parser; | ||
143 | return matched; | 144 | return matched; | ||
144 | } | 145 | } | ||
145 | 146 | | |||
Show All 33 Lines |