compiler: Add Ability to Annotate Preprocessed Source
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
@@ -75,6 +75,20 @@ public struct FormatterPlain: Formattable {
|
||||
|
||||
}
|
||||
|
||||
public struct FormatterDelimited: Formattable {
|
||||
let start: String
|
||||
let end: String
|
||||
|
||||
public init(_ start: String, _ end: String) {
|
||||
self.start = start
|
||||
self.end = end
|
||||
}
|
||||
|
||||
public func formatWithStyle(_ value: String, _ style: Style) -> String {
|
||||
return self.start + value + self.end
|
||||
}
|
||||
}
|
||||
|
||||
public struct FormatterAnsi: Formattable {
|
||||
|
||||
public init() {}
|
||||
|
||||
Reference in New Issue
Block a user