Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] Refactoring of Mark and Span, and bug fix #183

Merged
merged 12 commits into from
Jun 25, 2024
2 changes: 2 additions & 0 deletions src/YAML.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ using StringEncodings
include("versions.jl")
include("queue.jl")
include("buffered_input.jl")
include("mark.jl")
include("span.jl")
include("tokens.jl")
include("scanner.jl")
include("events.jl")
Expand Down
10 changes: 10 additions & 0 deletions src/mark.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Position within the document being parsed
struct Mark
index::UInt64
line::UInt64
column::UInt64
end

function show(io::IO, mark::Mark)
@printf(io, "line %d, column %d", mark.line, mark.column)
end
Loading
Loading