Roald87 / TcBlack

Opnionated code formatter for TwinCAT.
MIT License
103 stars 11 forks source link

VAR CONSTANT, VAR PERSISTENT and VAR RETAIN not recognized #80

Open Roald87 opened 3 years ago

Roald87 commented 3 years ago

The following code is formatted as follows

// in
FUNCTION_BLOCK POU
VAR PERSISTENT
    var1 : INT;
END_VAR
VAR CONSTANT
    number : INT := 5;
END_VAR
VAR RETAIN
    y : REAL;
END_VAR

// out
FUNCTION_BLOCK POU
VAR PERSISTENT
var1 : INT;
END_VAR
VAR CONSTANT
number : INT := 5;
END_VAR
VAR RETAIN
y : REAL;
END_VAR

It should not remove the indentation. Probably caused by the space which seperates RETAIN, PERSISTENT and CONSTANT.