diff --git a/source/server/format.hexa b/source/server/format.hexa index f55a291..ec1c679 100644 --- a/source/server/format.hexa +++ b/source/server/format.hexa @@ -13,6 +13,7 @@ // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . +/// Formatting preserves user personal style fun autoFormatWholeFile(file: String): String { let project = new Project() let content = Buffer.from(file) @@ -95,7 +96,6 @@ fun autoFormatWholeFile(file: String): String { if // TODO #if - // TODO @dec // TODO (\nargs\n) // TODO if\nconds\n{} lastToken == Token.Eof or @@ -109,6 +109,7 @@ fun autoFormatWholeFile(file: String): String { token == Token.CallOpen and ( lastToken != Token.KIf and + lastToken != Token.KNew and lastToken != Token.Assign ) ) or @@ -124,6 +125,9 @@ fun autoFormatWholeFile(file: String): String { ) or token == Token.IndexClose or + // `@at` + (token == Token.Identifier and lastToken == Token.At) or + token == Token.KNot or token == Token.Comma or token == Token.Colon