2023-05-02 14:22:21 +00:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
|
|
|
|
|
|
|
import QtQuick
|
|
|
|
|
|
|
|
Item {
|
2023-05-03 09:17:37 +00:00
|
|
|
// for now only numeric literal and string literal is supported
|
2023-05-02 14:22:21 +00:00
|
|
|
function f() {
|
|
|
|
let sum = 0, helloWorld = "hello"
|
2023-05-03 09:17:37 +00:00
|
|
|
const a = 3;
|
|
|
|
const b = "patron";
|
|
|
|
var aa = helloWorld, bb = aa;
|
2023-05-04 12:43:25 +00:00
|
|
|
|
|
|
|
const bool1 = true;
|
|
|
|
let bool2 = false;
|
|
|
|
var nullVar = null;
|
2023-05-02 14:22:21 +00:00
|
|
|
return sum;
|
|
|
|
}
|
|
|
|
}
|