From e9f41fdf19749dda82c8005515c9941b757750c5 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 6 Aug 2018 14:19:35 +0200 Subject: 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 --- src/qml/compiler/qv4compilerscanfunctions.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/qml/compiler/qv4compilerscanfunctions.cpp') 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) { -- cgit v1.2.1