diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-06 14:19:35 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-14 17:45:33 +0000 |
commit | e9f41fdf19749dda82c8005515c9941b757750c5 (patch) | |
tree | f015b35d04be96283ce5a7157445458339502963 /src/qml/compiler/qv4compilerscanfunctions.cpp | |
parent | bae423474b51fd0651aaea7cb18071a2206109b1 (diff) |
Implement initial support for import namespaces
The import via
import * as foo from "./bar.js"
allows accessing all exports via the special namespace object. This is
conceptually quite similar to the existing import of .js files in
QtQuick.
Change-Id: Ia6d79342f0884a89dfe4dc07316570ca7789cac0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilerscanfunctions.cpp')
-rw-r--r-- | src/qml/compiler/qv4compilerscanfunctions.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp index 8f16f9a362..f47643826f 100644 --- a/src/qml/compiler/qv4compilerscanfunctions.cpp +++ b/src/qml/compiler/qv4compilerscanfunctions.cpp @@ -251,9 +251,6 @@ bool ScanFunctions::visit(ImportDeclaration *declaration) entry.importName = QStringLiteral("*"); entry.localName = import->nameSpaceImport->importedBinding.toString(); _context->importEntries << entry; - - _cg->throwSyntaxError(import->nameSpaceImport->importedBindingToken, QStringLiteral("* imports are currently not supported.")); - return false; } if (import->namedImports) { |