Retain ".pragma library" when reformatting JavaScript files

For ".pragma library" there is a special flag in QmlJS::Directives.
We just need to actually set the flag and query it when re-emitting the
code.

Change-Id: Ia3455fda18aba3219b02ecf092bb28987a6ccef5
Fixes: QTCREATORBUG-22326
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Ulf Hermann
2019-10-10 10:39:44 +02:00
parent c4aa6d71d9
commit 3d21c7fdc3
3 changed files with 14 additions and 1 deletions

View File

@@ -265,6 +265,11 @@ public:
addLocation(line, column);
}
void pragmaLibrary() override
{
isLibrary = true;
}
virtual QList<SourceLocation> locations() { return _locations; }
const QString documentPath;