Skip to content

Commit ff68a96

Browse files
committed
🔧 update to Swift 5
1 parent c040fd1 commit ff68a96

File tree

8 files changed

+32
-30
lines changed

8 files changed

+32
-30
lines changed

PascalInterpreter/PascalInterpreter.xcodeproj/project.pbxproj

+12-22
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@
225225
buildConfigurationList = F300A0AF1FDDB63F00E5894D /* Build configuration list for PBXNativeTarget "PascalInterpreter" */;
226226
buildPhases = (
227227
F3B1C9101FDECB660047C9FA /* Swiftlint */,
228-
F3B1C9111FDECC4A0047C9FA /* Swiftformat */,
229228
F300A0961FDDB63F00E5894D /* Sources */,
230229
F300A0971FDDB63F00E5894D /* Frameworks */,
231230
F300A0981FDDB63F00E5894D /* Headers */,
@@ -265,17 +264,17 @@
265264
isa = PBXProject;
266265
attributes = {
267266
LastSwiftUpdateCheck = 0920;
268-
LastUpgradeCheck = 0920;
267+
LastUpgradeCheck = 1020;
269268
ORGANIZATIONNAME = "Igor Kulman";
270269
TargetAttributes = {
271270
F300A09A1FDDB63F00E5894D = {
272271
CreatedOnToolsVersion = 9.2;
273-
LastSwiftMigration = 0920;
272+
LastSwiftMigration = 1020;
274273
ProvisioningStyle = Automatic;
275274
};
276275
F300A0A31FDDB63F00E5894D = {
277276
CreatedOnToolsVersion = 9.2;
278-
LastSwiftMigration = 0920;
277+
LastSwiftMigration = 1020;
279278
ProvisioningStyle = Automatic;
280279
};
281280
};
@@ -286,6 +285,7 @@
286285
hasScannedForEncodings = 0;
287286
knownRegions = (
288287
en,
288+
Base,
289289
);
290290
mainGroup = F300A0911FDDB63F00E5894D;
291291
productRefGroup = F300A09C1FDDB63F00E5894D /* Products */;
@@ -330,20 +330,6 @@
330330
shellPath = /bin/sh;
331331
shellScript = "if which swiftlint >/dev/null; then\nswiftlint autocorrect\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
332332
};
333-
F3B1C9111FDECC4A0047C9FA /* Swiftformat */ = {
334-
isa = PBXShellScriptBuildPhase;
335-
buildActionMask = 2147483647;
336-
files = (
337-
);
338-
inputPaths = (
339-
);
340-
name = Swiftformat;
341-
outputPaths = (
342-
);
343-
runOnlyForDeploymentPostprocessing = 0;
344-
shellPath = /bin/sh;
345-
shellScript = "if which swiftformat >/dev/null; then\nswiftformat\nelse\necho \"warning: Swiftformat not installed, download from https://github.com/nicklockwood/SwiftFormat\"\nfi";
346-
};
347333
/* End PBXShellScriptBuildPhase section */
348334

349335
/* Begin PBXSourcesBuildPhase section */
@@ -411,13 +397,15 @@
411397
CLANG_WARN_BOOL_CONVERSION = YES;
412398
CLANG_WARN_COMMA = YES;
413399
CLANG_WARN_CONSTANT_CONVERSION = YES;
400+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
414401
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
415402
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
416403
CLANG_WARN_EMPTY_BODY = YES;
417404
CLANG_WARN_ENUM_CONVERSION = YES;
418405
CLANG_WARN_INFINITE_RECURSION = YES;
419406
CLANG_WARN_INT_CONVERSION = YES;
420407
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
408+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
421409
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
422410
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
423411
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -471,13 +459,15 @@
471459
CLANG_WARN_BOOL_CONVERSION = YES;
472460
CLANG_WARN_COMMA = YES;
473461
CLANG_WARN_CONSTANT_CONVERSION = YES;
462+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
474463
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
475464
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
476465
CLANG_WARN_EMPTY_BODY = YES;
477466
CLANG_WARN_ENUM_CONVERSION = YES;
478467
CLANG_WARN_INFINITE_RECURSION = YES;
479468
CLANG_WARN_INT_CONVERSION = YES;
480469
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
470+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
481471
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
482472
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
483473
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -529,7 +519,7 @@
529519
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
530520
SKIP_INSTALL = YES;
531521
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
532-
SWIFT_VERSION = 4.0;
522+
SWIFT_VERSION = 5.0;
533523
};
534524
name = Debug;
535525
};
@@ -552,7 +542,7 @@
552542
PRODUCT_BUNDLE_IDENTIFIER = sk.kulman.PascalInterpreter;
553543
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
554544
SKIP_INSTALL = YES;
555-
SWIFT_VERSION = 4.0;
545+
SWIFT_VERSION = 5.0;
556546
};
557547
name = Release;
558548
};
@@ -569,7 +559,7 @@
569559
PRODUCT_BUNDLE_IDENTIFIER = sk.kulman.PascalInterpreterTests;
570560
PRODUCT_NAME = "$(TARGET_NAME)";
571561
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
572-
SWIFT_VERSION = 4.0;
562+
SWIFT_VERSION = 5.0;
573563
};
574564
name = Debug;
575565
};
@@ -585,7 +575,7 @@
585575
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
586576
PRODUCT_BUNDLE_IDENTIFIER = sk.kulman.PascalInterpreterTests;
587577
PRODUCT_NAME = "$(TARGET_NAME)";
588-
SWIFT_VERSION = 4.0;
578+
SWIFT_VERSION = 5.0;
589579
};
590580
name = Release;
591581
};

PascalInterpreter/PascalInterpreter/Utils.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func treeString<T>(_ node: T, using nodeInfo: (T) -> (String, T?, T?)) -> String
119119
// * right sub line with extra leading blanks removed.
120120
let mergedSubLines = zip(mergeOffsets.enumerated(), indentedLeftLines)
121121
.map { ($0.0, $0.1, $1 + String(repeating: " ", count: max(0, $0.1))) }
122-
.map { $2 + String(rightSubLines[$0].characters.dropFirst(max(0, -$1))) }
122+
.map { $2 + String(rightSubLines[$0].dropFirst(max(0, -$1))) }
123123

124124
// Assemble final result combining
125125
// * node value string

PascalInterpreter/PascalInterpreterTests/InterpreterTests.swift

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Copyright © 2017 Igor Kulman. All rights reserved.
77
//
88

9-
import Foundation
109
import Foundation
1110
@testable import PascalInterpreter
1211
import XCTest

PascalInterpreter/PascalInterpreterTests/SemanticAnalyzerTests.swift

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Copyright © 2017 Igor Kulman. All rights reserved.
77
//
88

9-
import Foundation
109
import Foundation
1110
@testable import PascalInterpreter
1211
import XCTest

PascalInterpreter/PascalInterpreterTests/XCTestCase+FatalError.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension XCTestCase {
2727

2828
DispatchQueue.global(qos: .userInitiated).async(execute: testcase)
2929

30-
waitForExpectations(timeout: 2) { _ in
30+
waitForExpectations(timeout: 5) { _ in
3131
XCTAssertEqual(assertionMessage, expectedMessage)
3232

3333
FatalErrorUtil.restoreFatalError()

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pascal interpreter written in Swift
22
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3-
[![Swift Version](https://img.shields.io/badge/Swift-4-F16D39.svg?style=flat)](https://developer.apple.com/swift)
3+
[![Swift Version](https://img.shields.io/badge/Swift-5-F16D39.svg?style=flat)](https://developer.apple.com/swift)
44
[![Twitter](https://img.shields.io/badge/[email protected])](http://twitter.com/igorkulman)
55

66
Simple Swift interpreter for the Pascal language inspired by the [Let’s Build A Simple Interpreter](https://ruslanspivak.com/lsbasi-part1/) article series.

SPI/SPI.xcodeproj/project.pbxproj

+9-3
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,12 @@
202202
isa = PBXProject;
203203
attributes = {
204204
LastSwiftUpdateCheck = 0920;
205-
LastUpgradeCheck = 0920;
205+
LastUpgradeCheck = 1020;
206206
ORGANIZATIONNAME = "Igor Kulman";
207207
TargetAttributes = {
208208
F3D90DD41FE68E4C00FA79B3 = {
209209
CreatedOnToolsVersion = 9.2;
210+
LastSwiftMigration = 1020;
210211
ProvisioningStyle = Automatic;
211212
};
212213
};
@@ -217,6 +218,7 @@
217218
hasScannedForEncodings = 0;
218219
knownRegions = (
219220
en,
221+
Base,
220222
);
221223
mainGroup = F3D90DCC1FE68E4C00FA79B3;
222224
productRefGroup = F3D90DD61FE68E4C00FA79B3 /* Products */;
@@ -274,13 +276,15 @@
274276
CLANG_WARN_BOOL_CONVERSION = YES;
275277
CLANG_WARN_COMMA = YES;
276278
CLANG_WARN_CONSTANT_CONVERSION = YES;
279+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
277280
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
278281
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
279282
CLANG_WARN_EMPTY_BODY = YES;
280283
CLANG_WARN_ENUM_CONVERSION = YES;
281284
CLANG_WARN_INFINITE_RECURSION = YES;
282285
CLANG_WARN_INT_CONVERSION = YES;
283286
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
287+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
284288
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
285289
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
286290
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -331,13 +335,15 @@
331335
CLANG_WARN_BOOL_CONVERSION = YES;
332336
CLANG_WARN_COMMA = YES;
333337
CLANG_WARN_CONSTANT_CONVERSION = YES;
338+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
334339
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
335340
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
336341
CLANG_WARN_EMPTY_BODY = YES;
337342
CLANG_WARN_ENUM_CONVERSION = YES;
338343
CLANG_WARN_INFINITE_RECURSION = YES;
339344
CLANG_WARN_INT_CONVERSION = YES;
340345
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
346+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
341347
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
342348
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
343349
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -372,7 +378,7 @@
372378
CODE_SIGN_STYLE = Automatic;
373379
DEVELOPMENT_TEAM = S6EJ3ZVM4G;
374380
PRODUCT_NAME = "$(TARGET_NAME)";
375-
SWIFT_VERSION = 4.0;
381+
SWIFT_VERSION = 5.0;
376382
};
377383
name = Debug;
378384
};
@@ -382,7 +388,7 @@
382388
CODE_SIGN_STYLE = Automatic;
383389
DEVELOPMENT_TEAM = S6EJ3ZVM4G;
384390
PRODUCT_NAME = "$(TARGET_NAME)";
385-
SWIFT_VERSION = 4.0;
391+
SWIFT_VERSION = 5.0;
386392
};
387393
name = Release;
388394
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)