Add internal parsing events with marks, scalar styles, collection styles, alias events, and anchor/tag metadata. Add golden parser event tests for current block parser behavior. Closes #2
26 lines
539 B
Swift
26 lines
539 B
Swift
extension PureYAML.Parsing {
|
|
struct Mark: Equatable, CustomStringConvertible {
|
|
var line: Int
|
|
var column: Int
|
|
var index: Int
|
|
|
|
init(
|
|
line: Int,
|
|
column: Int,
|
|
index: Int,
|
|
) {
|
|
self.line = line
|
|
self.column = column
|
|
self.index = index
|
|
}
|
|
|
|
static var start: Self {
|
|
Self(line: 1, column: 1, index: 0)
|
|
}
|
|
|
|
var description: String {
|
|
"\(line):\(column)@\(index)"
|
|
}
|
|
}
|
|
}
|