forked from qt-creator/qt-creator
qml | Fix let/const variables formatting
Change-Id: Ia2a4ee482e84a6c24abea7ea6fe05925eee11d1d Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
committed by
selatnick
parent
5f26fe6298
commit
69cd74f25d
@@ -914,7 +914,8 @@ protected:
|
|||||||
|
|
||||||
bool visit(VariableStatement *ast) override
|
bool visit(VariableStatement *ast) override
|
||||||
{
|
{
|
||||||
out("var ", ast->declarationKindToken);
|
out(ast->declarationKindToken);
|
||||||
|
out(" ");
|
||||||
accept(ast->declarations);
|
accept(ast->declarations);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
var x
|
var x
|
||||||
var y = 12
|
var y = 12
|
||||||
|
|
||||||
|
var a_var = 1
|
||||||
|
let a_let = 2
|
||||||
|
const a_const = 3
|
||||||
|
|
||||||
function foo(a, b) {
|
function foo(a, b) {
|
||||||
x = 15
|
x = 15
|
||||||
x += 4
|
x += 4
|
||||||
|
Reference in New Issue
Block a user