Skip to content

Commit c963d15

Browse files
committed
Introduce XCBeautifier
1 parent 928abea commit c963d15

File tree

1 file changed

+25
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)