Commit 0a4310d3 authored by Fawzi Mohamed's avatar Fawzi Mohamed

qmljs: added qmljsconstants.h

Moved Document::Language, Import::Type and StaticAnalysis::Severity
enums to qmljsconstants.h and renamed values removing the redundant
part.
Thus the effective length changed little or improved
(Document::QmlLanguage => Language::Qml).

The separate file allows better reuse of enum values without introducing
circular dependencies.

Change-Id: I5186d7c04f5d3f6c289068b919be5ff1ff118326
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent ab717553
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include "qmljsglobal_p.h" #include "qmljsglobal_p.h"
#include "qmljsastfwd_p.h" #include "qmljsastfwd_p.h"
#include "qmljsmemorypool_p.h" #include "qmljsmemorypool_p.h"
#include <qmljs/qmljsconstants.h>
#include <QString> #include <QString>
#include <QSet> #include <QSet>
...@@ -59,21 +60,19 @@ class MemoryPool; ...@@ -59,21 +60,19 @@ class MemoryPool;
class QML_PARSER_EXPORT DiagnosticMessage class QML_PARSER_EXPORT DiagnosticMessage
{ {
public: public:
enum Kind { Warning, Error };
DiagnosticMessage() DiagnosticMessage()
: kind(Error) {} : kind(Severity::Error) {}
DiagnosticMessage(Kind kind, const AST::SourceLocation &loc, const QString &message) DiagnosticMessage(Severity::Enum kind, const AST::SourceLocation &loc, const QString &message)
: kind(kind), loc(loc), message(message) {} : kind(kind), loc(loc), message(message) {}
bool isWarning() const bool isWarning() const
{ return kind == Warning; } { return kind == Severity::Warning; }
bool isError() const bool isError() const
{ return kind == Error; } { return kind == Severity::Error; }
Kind kind; Severity::Enum kind;
AST::SourceLocation loc; AST::SourceLocation loc;
QString message; QString message;
}; };
......
...@@ -289,7 +289,7 @@ case 20: { ...@@ -289,7 +289,7 @@ case 20: {
if (node) { if (node) {
node->importToken = loc(1); node->importToken = loc(1);
} else { } else {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1), diagnostic_messages.append(DiagnosticMessage(Severity::Error, loc(1),
QLatin1String("Expected a qualified name id or a string literal"))); QLatin1String("Expected a qualified name id or a string literal")));
return false; // ### remove me return false; // ### remove me
...@@ -583,7 +583,7 @@ case 78: { ...@@ -583,7 +583,7 @@ case 78: {
case 79: { case 79: {
bool rx = lexer->scanRegExp(Lexer::NoPrefix); bool rx = lexer->scanRegExp(Lexer::NoPrefix);
if (!rx) { if (!rx) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage())); diagnostic_messages.append(DiagnosticMessage(Severity::Error, location(lexer), lexer->errorMessage()));
return false; // ### remove me return false; // ### remove me
} }
...@@ -599,7 +599,7 @@ case 79: { ...@@ -599,7 +599,7 @@ case 79: {
case 80: { case 80: {
bool rx = lexer->scanRegExp(Lexer::EqualPrefix); bool rx = lexer->scanRegExp(Lexer::EqualPrefix);
if (!rx) { if (!rx) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, location(lexer), lexer->errorMessage())); diagnostic_messages.append(DiagnosticMessage(Severity::Error, location(lexer), lexer->errorMessage()));
return false; return false;
} }
...@@ -680,7 +680,7 @@ case 88: { ...@@ -680,7 +680,7 @@ case 88: {
case 89: { case 89: {
if (AST::ArrayMemberExpression *mem = AST::cast<AST::ArrayMemberExpression *>(sym(1).Expression)) { if (AST::ArrayMemberExpression *mem = AST::cast<AST::ArrayMemberExpression *>(sym(1).Expression)) {
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Warning, mem->lbracketToken, diagnostic_messages.append(DiagnosticMessage(Severity::Warning, mem->lbracketToken,
QLatin1String("Ignored annotation"))); QLatin1String("Ignored annotation")));
sym(1).Expression = mem->base; sym(1).Expression = mem->base;
...@@ -691,7 +691,7 @@ case 89: { ...@@ -691,7 +691,7 @@ case 89: {
} else { } else {
sym(1).UiQualifiedId = 0; sym(1).UiQualifiedId = 0;
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, loc(1), diagnostic_messages.append(DiagnosticMessage(Severity::Error, loc(1),
QLatin1String("Expected a qualified name id"))); QLatin1String("Expected a qualified name id")));
return false; // ### recover return false; // ### recover
...@@ -1747,7 +1747,7 @@ case 347: { ...@@ -1747,7 +1747,7 @@ case 347: {
msg = qApp->translate("QmlParser", "Syntax error"); msg = qApp->translate("QmlParser", "Syntax error");
else else
msg = qApp->translate("QmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token])); msg = qApp->translate("QmlParser", "Unexpected token `%1'").arg(QLatin1String(spell[token]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(Severity::Error, token_buffer[0].loc, msg));
action = errorState; action = errorState;
goto _Lcheck_token; goto _Lcheck_token;
...@@ -1775,7 +1775,7 @@ case 347: { ...@@ -1775,7 +1775,7 @@ case 347: {
int a = t_action(errorState, *tk); int a = t_action(errorState, *tk);
if (a > 0 && t_action(a, yytoken)) { if (a > 0 && t_action(a, yytoken)) {
const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk])); const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[*tk]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(Severity::Error, token_buffer[0].loc, msg));
yytoken = *tk; yytoken = *tk;
yylval = 0; yylval = 0;
...@@ -1799,7 +1799,7 @@ case 347: { ...@@ -1799,7 +1799,7 @@ case 347: {
int a = t_action(errorState, tk); int a = t_action(errorState, tk);
if (a > 0 && t_action(a, yytoken)) { if (a > 0 && t_action(a, yytoken)) {
const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk])); const QString msg = qApp->translate("QmlParser", "Expected token `%1'").arg(QLatin1String(spell[tk]));
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(Severity::Error, token_buffer[0].loc, msg));
yytoken = tk; yytoken = tk;
yylval = 0; yylval = 0;
...@@ -1812,7 +1812,7 @@ case 347: { ...@@ -1812,7 +1812,7 @@ case 347: {
} }
const QString msg = qApp->translate("QmlParser", "Syntax error"); const QString msg = qApp->translate("QmlParser", "Syntax error");
diagnostic_messages.append(DiagnosticMessage(DiagnosticMessage::Error, token_buffer[0].loc, msg)); diagnostic_messages.append(DiagnosticMessage(Severity::Error, token_buffer[0].loc, msg));
} }
return false; return false;
......
...@@ -162,7 +162,7 @@ public: ...@@ -162,7 +162,7 @@ public:
inline DiagnosticMessage diagnosticMessage() const inline DiagnosticMessage diagnosticMessage() const
{ {
foreach (const DiagnosticMessage &d, diagnostic_messages) { foreach (const DiagnosticMessage &d, diagnostic_messages) {
if (d.kind != DiagnosticMessage::Warning) if (d.kind != Severity::Warning)
return d; return d;
} }
......
...@@ -38,7 +38,8 @@ HEADERS += \ ...@@ -38,7 +38,8 @@ HEADERS += \
$$PWD/iscriptevaluator.h \ $$PWD/iscriptevaluator.h \
$$PWD/qmljssimplereader.h \ $$PWD/qmljssimplereader.h \
$$PWD/persistenttrie.h \ $$PWD/persistenttrie.h \
$$PWD/qmljsqrcparser.h $$PWD/qmljsqrcparser.h \
$$PWD/qmljsconstants.h
SOURCES += \ SOURCES += \
$$PWD/qmljsbind.cpp \ $$PWD/qmljsbind.cpp \
......
...@@ -28,6 +28,7 @@ QtcLibrary { ...@@ -28,6 +28,7 @@ QtcLibrary {
"qmljscheck.cpp", "qmljscheck.h", "qmljscheck.cpp", "qmljscheck.h",
"qmljscodeformatter.cpp", "qmljscodeformatter.h", "qmljscodeformatter.cpp", "qmljscodeformatter.h",
"qmljscompletioncontextfinder.cpp", "qmljscompletioncontextfinder.h", "qmljscompletioncontextfinder.cpp", "qmljscompletioncontextfinder.h",
"qmljsconstants.h",
"qmljscontext.cpp", "qmljscontext.h", "qmljscontext.cpp", "qmljscontext.h",
"qmljsdelta.cpp", "qmljsdelta.h", "qmljsdelta.cpp", "qmljsdelta.h",
"qmljsdocument.cpp", "qmljsdocument.h", "qmljsdocument.cpp", "qmljsdocument.h",
......
...@@ -204,17 +204,17 @@ bool Bind::visit(UiImport *ast) ...@@ -204,17 +204,17 @@ bool Bind::visit(UiImport *ast)
const QString importId = ast->importId.toString(); const QString importId = ast->importId.toString();
ImportInfo import = ImportInfo::moduleImport(toString(ast->importUri), version, ImportInfo import = ImportInfo::moduleImport(toString(ast->importUri), version,
importId, ast); importId, ast);
if (_doc->language() == Document::QmlLanguage) { if (_doc->language() == Language::Qml) {
const QString importStr = import.name() + importId; const QString importStr = import.name() + importId;
QmlLanguageBundles langBundles = ModelManagerInterface::instance()->extendedBundles(); QmlLanguageBundles langBundles = ModelManagerInterface::instance()->extendedBundles();
QmlBundle qq1 = langBundles.bundleForLanguage(Document::QmlQtQuick1Language); QmlBundle qq1 = langBundles.bundleForLanguage(Language::QmlQtQuick1);
QmlBundle qq2 = langBundles.bundleForLanguage(Document::QmlQtQuick2Language); QmlBundle qq2 = langBundles.bundleForLanguage(Language::QmlQtQuick2);
bool isQQ1 = qq1.supportedImports().contains(importStr); bool isQQ1 = qq1.supportedImports().contains(importStr);
bool isQQ2 = qq2.supportedImports().contains(importStr); bool isQQ2 = qq2.supportedImports().contains(importStr);
if (isQQ1 && ! isQQ2) if (isQQ1 && ! isQQ2)
_doc->setLanguage(Document::QmlQtQuick1Language); _doc->setLanguage(Language::QmlQtQuick1);
if (isQQ2 && ! isQQ1) if (isQQ2 && ! isQQ1)
_doc->setLanguage(Document::QmlQtQuick2Language); _doc->setLanguage(Language::QmlQtQuick2);
} }
_imports += import; _imports += import;
} else if (!ast->fileName.isEmpty()) { } else if (!ast->fileName.isEmpty()) {
......
...@@ -288,14 +288,14 @@ bool QmlBundle::readFrom(QString path, QStringList *errors) ...@@ -288,14 +288,14 @@ bool QmlBundle::readFrom(QString path, QStringList *errors)
return errs.isEmpty(); return errs.isEmpty();
} }
QmlBundle QmlLanguageBundles::bundleForLanguage(Document::Language l) const QmlBundle QmlLanguageBundles::bundleForLanguage(Language::Enum l) const
{ {
if (m_bundles.contains(l)) if (m_bundles.contains(l))
return m_bundles.value(l); return m_bundles.value(l);
return QmlBundle(); return QmlBundle();
} }
void QmlLanguageBundles::mergeBundleForLanguage(Document::Language l, const QmlBundle &bundle) void QmlLanguageBundles::mergeBundleForLanguage(Language::Enum l, const QmlBundle &bundle)
{ {
if (bundle.isEmpty()) if (bundle.isEmpty())
return; return;
...@@ -305,14 +305,14 @@ void QmlLanguageBundles::mergeBundleForLanguage(Document::Language l, const QmlB ...@@ -305,14 +305,14 @@ void QmlLanguageBundles::mergeBundleForLanguage(Document::Language l, const QmlB
m_bundles.insert(l,bundle); m_bundles.insert(l,bundle);
} }
QList<Document::Language> QmlLanguageBundles::languages() const QList<Language::Enum> QmlLanguageBundles::languages() const
{ {
return m_bundles.keys(); return m_bundles.keys();
} }
void QmlLanguageBundles::mergeLanguageBundles(const QmlLanguageBundles &o) void QmlLanguageBundles::mergeLanguageBundles(const QmlLanguageBundles &o)
{ {
foreach (Document::Language l, o.languages()) foreach (Language::Enum l, o.languages())
mergeBundleForLanguage(l, o.bundleForLanguage(l)); mergeBundleForLanguage(l, o.bundleForLanguage(l));
} }
......
...@@ -102,12 +102,12 @@ private: ...@@ -102,12 +102,12 @@ private:
class QMLJS_EXPORT QmlLanguageBundles class QMLJS_EXPORT QmlLanguageBundles
{ {
public: public:
QmlBundle bundleForLanguage(Document::Language l) const; QmlBundle bundleForLanguage(Language::Enum l) const;
void mergeBundleForLanguage(Document::Language l, const QmlBundle &bundle); void mergeBundleForLanguage(Language::Enum l, const QmlBundle &bundle);
QList<Document::Language> languages() const; QList<Language::Enum> languages() const;
void mergeLanguageBundles(const QmlLanguageBundles &); void mergeLanguageBundles(const QmlLanguageBundles &);
private: private:
QHash<Document::Language,QmlBundle> m_bundles; QHash<Language::Enum,QmlBundle> m_bundles;
}; };
} // namespace QmlJS } // namespace QmlJS
......
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef QMLJSCONSTANTS_H
#define QMLJSCONSTANTS_H
namespace QmlJS {
namespace ImportType {
enum Enum {
Invalid,
ImplicitDirectory,
Library,
File,
Directory,
QrcFile,
QrcDirectory,
ImplicitQrcDirectory,
UnknownFile // refers a file/directory that wasn't found
};
}
namespace Severity {
enum Enum
{
Hint, // cosmetic or convention
MaybeWarning, // possibly a warning, insufficient information
Warning, // could cause unintended behavior
MaybeError, // possibly an error, insufficient information
Error // definitely an error
};
}
namespace Language {
enum Enum
{
Unknown = 0,
JavaScript = 1,
Json = 2,
Qml = 3,
QmlQtQuick1 = 4,
QmlQtQuick2 = 5,
QmlQbs = 6,
QmlProject = 7,
QmlTypeInfo = 8
};
}
} // namespace QmlJS
#endif // QMLJSCONSTANTS_H
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "qmljsdocument.h" #include "qmljsdocument.h"
#include "qmljsbind.h" #include "qmljsbind.h"
#include "qmljsconstants.h"
#include <qmljs/parser/qmljslexer_p.h> #include <qmljs/parser/qmljslexer_p.h>
#include <qmljs/parser/qmljsparser_p.h> #include <qmljs/parser/qmljsparser_p.h>
...@@ -81,56 +82,56 @@ using namespace QmlJS::AST; ...@@ -81,56 +82,56 @@ using namespace QmlJS::AST;
*/ */
bool Document::isQmlLikeLanguage(Document::Language language) bool Document::isQmlLikeLanguage(Language::Enum language)
{ {
switch (language) { switch (language) {
case QmlLanguage: case Language::Qml:
case QmlQtQuick1Language: case Language::QmlQtQuick1:
case QmlQtQuick2Language: case Language::QmlQtQuick2:
case QmlQbsLanguage: case Language::QmlQbs:
case QmlProjectLanguage: case Language::QmlProject:
case QmlTypeInfoLanguage: case Language::QmlTypeInfo:
return true; return true;
default: default:
return false; return false;
} }
} }
bool Document::isFullySupportedLanguage(Document::Language language) bool Document::isFullySupportedLanguage(Language::Enum language)
{ {
switch (language) { switch (language) {
case JavaScriptLanguage: case Language::JavaScript:
case JsonLanguage: case Language::Json:
case QmlLanguage: case Language::Qml:
case QmlQtQuick1Language: case Language::QmlQtQuick1:
case QmlQtQuick2Language: case Language::QmlQtQuick2:
return true; return true;
case UnknownLanguage: case Language::Unknown:
case QmlQbsLanguage: case Language::QmlQbs:
case QmlProjectLanguage: case Language::QmlProject:
case QmlTypeInfoLanguage: case Language::QmlTypeInfo:
break; break;
} }
return false; return false;
} }
bool Document::isQmlLikeOrJsLanguage(Document::Language language) bool Document::isQmlLikeOrJsLanguage(Language::Enum language)
{ {
switch (language) { switch (language) {
case QmlLanguage: case Language::Qml:
case QmlQtQuick1Language: case Language::QmlQtQuick1:
case QmlQtQuick2Language: case Language::QmlQtQuick2:
case QmlQbsLanguage: case Language::QmlQbs:
case QmlProjectLanguage: case Language::QmlProject:
case QmlTypeInfoLanguage: case Language::QmlTypeInfo:
case JavaScriptLanguage: case Language::JavaScript:
return true; return true;
default: default:
return false; return false;
} }
} }
Document::Document(const QString &fileName, Language language) Document::Document(const QString &fileName, Language::Enum language)
: _engine(0) : _engine(0)
, _ast(0) , _ast(0)
, _bind(0) , _bind(0)
...@@ -163,24 +164,24 @@ Document::~Document() ...@@ -163,24 +164,24 @@ Document::~Document()
delete _engine; delete _engine;
} }
Document::MutablePtr Document::create(const QString &fileName, Language language) Document::MutablePtr Document::create(const QString &fileName, Language::Enum language)
{ {
Document::MutablePtr doc(new Document(fileName, language)); Document::MutablePtr doc(new Document(fileName, language));
doc->_ptr = doc; doc->_ptr = doc;
return doc; return doc;
} }
Document::Language Document::guessLanguageFromSuffix(const QString &fileName) Language::Enum Document::guessLanguageFromSuffix(const QString &fileName)
{ {
if (fileName.endsWith(QLatin1String(".qml"), Qt::CaseInsensitive)) if (fileName.endsWith(QLatin1String(".qml"), Qt::CaseInsensitive))
return QmlLanguage; return Language::Qml;
if (fileName.endsWith(QLatin1String(".qbs"), Qt::CaseInsensitive)) if (fileName.endsWith(QLatin1String(".qbs"), Qt::CaseInsensitive))
return QmlQbsLanguage; return Language::QmlQbs;
if (fileName.endsWith(QLatin1String(".js"), Qt::CaseInsensitive)) if (fileName.endsWith(QLatin1String(".js"), Qt::CaseInsensitive))
return JavaScriptLanguage; return Language::JavaScript;
if (fileName.endsWith(QLatin1String(".json"), Qt::CaseInsensitive)) if (fileName.endsWith(QLatin1String(".json"), Qt::CaseInsensitive))
return JsonLanguage; return Language::Json;
return UnknownLanguage; return Language::Unknown;
} }
Document::Ptr Document::ptr() const Document::Ptr Document::ptr() const
...@@ -193,12 +194,12 @@ bool Document::isQmlDocument() const ...@@ -193,12 +194,12 @@ bool Document::isQmlDocument() const
return isQmlLikeLanguage(_language); return isQmlLikeLanguage(_language);
} }
Document::Language Document::language() const Language::Enum Document::language() const
{ {
return _language; return _language;
} }
void Document::setLanguage(Document::Language l) void Document::setLanguage(Language::Enum l)
{ {
_language = l; _language = l;
} }
...@@ -428,7 +429,7 @@ void Snapshot::remove(const QString &fileName) ...@@ -428,7 +429,7 @@ void Snapshot::remove(const QString &fileName)
Document::MutablePtr Snapshot::documentFromSource( Document::MutablePtr Snapshot::documentFromSource(
const QString &code, const QString &fileName, const QString &code, const QString &fileName,
Document::Language language) const Language::Enum language) const
{ {
Document::MutablePtr newDoc = Document::create(fileName, language); Document::MutablePtr newDoc = Document::create(fileName, language);
......
...@@ -50,36 +50,23 @@ public: ...@@ -50,36 +50,23 @@ public:
typedef QSharedPointer<const Document> Ptr; typedef QSharedPointer<const Document> Ptr;
typedef QSharedPointer<Document> MutablePtr; typedef QSharedPointer<Document> MutablePtr;
enum Language static bool isQmlLikeLanguage(Language::Enum languge);
{ static bool isFullySupportedLanguage(Language::Enum language);
UnknownLanguage = 0, static bool isQmlLikeOrJsLanguage(Language::Enum language);
JavaScriptLanguage = 1,
JsonLanguage = 2,
QmlLanguage = 3,
QmlQtQuick1Language = 4,
QmlQtQuick2Language = 5,
QmlQbsLanguage = 6,
QmlProjectLanguage = 7,
QmlTypeInfoLanguage = 8
};
static bool isQmlLikeLanguage(Language languge);
static bool isFullySupportedLanguage(Language language);
static bool isQmlLikeOrJsLanguage(Language language);
protected: protected:
Document(const QString &fileName, Language language); Document(const QString &fileName, Language::Enum language);
public: public:
~Document(); ~Document();
static MutablePtr create(const QString &fileName, Language language); static MutablePtr create(const QString &fileName, Language::Enum language);
static Language guessLanguageFromSuffix(const QString &fileName); static Language::Enum guessLanguageFromSuffix(const QString &fileName);
Document::Ptr ptr() const; Document::Ptr ptr() const;
bool isQmlDocument() const; bool isQmlDocument() const;
Language language() const; Language::Enum language() const;
void setLanguage(Language l); void setLanguage(Language::Enum l);
AST::UiProgram *qmlProgram() const; AST::UiProgram *qmlProgram() const;
AST::Program *jsProgram() const; AST::Program *jsProgram() const;
...@@ -124,7 +111,7 @@ private: ...@@ -124,7 +111,7 @@ private:
QString _source; QString _source;
QWeakPointer<Document> _ptr; QWeakPointer<Document> _ptr;
int _editorRevision; int _editorRevision;
Language _language; Language::Enum _language;
bool _parsedCorrectly; bool _parsedCorrectly;
// for documentFromSource // for documentFromSource
...@@ -237,7 +224,7 @@ public: ...@@ -237,7 +224,7 @@ public:
Document::MutablePtr documentFromSource(const QString &code, Document::MutablePtr documentFromSource(const QString &code,
const QString &fileName, const QString &fileName,
Document::Language language) const; Language::Enum language) const;
}; };
} // namespace QmlJS } // namespace QmlJS
......
...@@ -2074,7 +2074,7 @@ bool ASTSignal::getSourceLocation(QString *fileName, int *line, int *column) con ...@@ -2074,7 +2074,7 @@ bool ASTSignal::getSourceLocation(QString *fileName, int *line, int *column) con
ImportInfo::ImportInfo() ImportInfo::ImportInfo()
: _type(InvalidImport) : _type(ImportType::Invalid)
, _ast(0) , _ast(0)
{ {
} }
...@@ -2089,7 +2089,7 @@ ImportInfo ImportInfo::moduleImport(QString uri, ComponentVersion version, ...@@ -2089,7 +2089,7 @@ ImportInfo ImportInfo::moduleImport(QString uri, ComponentVersion version,
}