Skip to content

Commit 786a2c9

Browse files
committed
Accept TL schema comments and fail generation on parse errors
1 parent cf5b1e7 commit 786a2c9

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎build-system/SwiftTL/Sources/SwiftTL/DescriptionParsing.swift‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ enum DescriptionParser {
2020
private static let skipContains: [String] = ["{X:Type}"]
2121

2222
private static func shouldSkipLine(_ line: String) -> Bool {
23+
line.trimmingCharacters(in: .whitespaces).hasPrefix("//") ||
2324
skipPrefixes.contains { line.hasPrefix($0) } ||
2425
skipContains.contains { line.contains($0) }
2526
}

‎build-system/SwiftTL/Sources/SwiftTL/main.swift‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,5 @@ do {
104104
}
105105
} catch let e {
106106
print("\(e)")
107+
exit(1)
107108
}

0 commit comments

Comments
 (0)