Skip to content

Commit 092bb2d

Browse files
authored
Introduce XCBeautifier (#250)
1 parent 928abea commit 092bb2d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import Foundation
2+
3+
public struct XCBeautifier {
4+
private let parser: Parser
5+
6+
public init(
7+
colored: Bool,
8+
renderer: Renderer,
9+
preserveUnbeautifiedLines: Bool,
10+
additionalLines: @escaping () -> String?
11+
) {
12+
parser = Parser(
13+
colored: colored,
14+
renderer: renderer,
15+
preserveUnbeautifiedLines: preserveUnbeautifiedLines,
16+
additionalLines: additionalLines
17+
)
18+
}
19+
20+
public func format(line: String) -> String? {
21+
parser.parse(line: line)
22+
}
23+
}

0 commit comments

Comments
 (0)