d
Этот коммит содержится в:
@@ -1,6 +1,5 @@
|
||||
protocol Context {
|
||||
var itemsCount: Float { get }
|
||||
|
||||
var itemsCount: Float { get }
|
||||
}
|
||||
|
||||
class Position {
|
||||
|
||||
5
toSwift
5
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;
|
||||
}
|
||||
|
||||
8
будущее
8
будущее
@@ -1,7 +1,11 @@
|
||||
06.06: 19:20-
|
||||
|
||||
|
||||
* починить ^M
|
||||
* это было лишнее \n в функции replace
|
||||
* конвертировать interface в protocol
|
||||
|
||||
НАДО:
|
||||
* починить ^M
|
||||
* конвертировать interface в protocol
|
||||
* генерить interface в Swift
|
||||
* генерить class в Swift
|
||||
* нет struct, к сожалению
|
||||
|
||||
Ссылка в новой задаче
Block a user