From 290b255e6eb401133e6be462785f4a2876f91654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 6 Jun 2023 19:27:16 +0300 Subject: [PATCH] d --- shared/Swift/memoryItemPositions.swift | 3 +-- toSwift | 5 +++-- будущее | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/shared/Swift/memoryItemPositions.swift b/shared/Swift/memoryItemPositions.swift index 8c4ed05..a988cb3 100644 --- a/shared/Swift/memoryItemPositions.swift +++ b/shared/Swift/memoryItemPositions.swift @@ -1,6 +1,5 @@ protocol Context { - var itemsCount: Float { get } - + var itemsCount: Float { get } } class Position { diff --git a/toSwift b/toSwift index 30be650..9bcc98b 100755 --- a/toSwift +++ b/toSwift @@ -51,7 +51,7 @@ function protocolReplace(line) { if (line == "}") { isProtocol = false; } - console.log("ИГР protocolR isP/line:", isProtocol, line); + console.log("ИГР protocolR-1 isP/line:", isProtocol, line); if (!isProtocol) { return line; } @@ -60,6 +60,7 @@ function protocolReplace(line) { if (isProtocol) { result = protocolReplaceVariable(result); } + console.log("ИГР protocolR-2 isP/line:", isProtocol, line); return result; } @@ -71,7 +72,7 @@ function protocolReplaceVariable(line) { let spaceLength = parts[0].length - name.length; let spaces = " ".repeat(spaceLength); //console.log("Variable. name/spaceL/parts:", name, spaceLength, parts); - return `${spaces}var ${name}: ${type} { get }\n`; + return `${spaces}var ${name}: ${type} { get }`; } return line; } diff --git a/будущее b/будущее index 5bce9a3..6066d28 100644 --- a/будущее +++ b/будущее @@ -1,7 +1,11 @@ +06.06: 19:20- + -НАДО: * починить ^M + * это было лишнее \n в функции replace * конвертировать interface в protocol + +НАДО: * генерить interface в Swift * генерить class в Swift * нет struct, к сожалению