d
This commit is contained in:
6
toSwift
6
toSwift
@@ -45,6 +45,7 @@ function convert(line) {
|
||||
|
||||
var isProtocol = false;
|
||||
|
||||
// interface -> protocol
|
||||
function protocolReplace(line) {
|
||||
if (line.includes("protocol")) {
|
||||
isProtocol = true;
|
||||
@@ -63,6 +64,7 @@ function protocolReplace(line) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// a: Number -> var a: Float { get }
|
||||
function protocolReplaceVariable(line) {
|
||||
let parts = line.split(": ");
|
||||
if (parts.length == 2) {
|
||||
@@ -75,9 +77,7 @@ function protocolReplaceVariable(line) {
|
||||
return line;
|
||||
}
|
||||
|
||||
// func memoryItemPositions(c: Context) -> Position[] {
|
||||
// var pos: Position[] = []
|
||||
|
||||
// Type[] -> [Type]
|
||||
function typeArrayReplace(line) {
|
||||
let parts = line.split(" ");
|
||||
for (var i in parts) {
|
||||
|
||||
Reference in New Issue
Block a user