QQmlJS::LLVMOutputType fileType = QQmlJS::LLVMOutputObject;
#endif // QMLJS_WITH_LLVM
bool enableDebugging = false;
+ bool runAsQml = false;
if (!args.isEmpty()) {
if (args.first() == QLatin1String("-d") || args.first() == QLatin1String("--debug")) {
args.removeFirst();
}
+ if (args.first() == QLatin1String("--qml")) {
+ runAsQml = true;
+ args.removeFirst();
+ }
+
#ifdef QMLJS_WITH_LLVM
if (args.first() == QLatin1String("--compile")) {
mode = use_llvm_compiler;
try {
QV4::Script script(ctx, code, fn);
+ script.parseAsBinding = runAsQml;
script.parse();
QV4::Value result = script.run();
if (!result.isUndefined()) {