Skip to content

Commit

Permalink
Merge pull request #10997 from straight-shoota/fix/yaml-pull_parser-l…
Browse files Browse the repository at this point in the history
…ocation
  • Loading branch information
straight-shoota authored Aug 1, 2021
2 parents 780a81f + cdb93b9 commit 4673e76
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/yaml/pull_parser.cr
Original file line number Diff line number Diff line change
Expand Up @@ -260,24 +260,24 @@ class YAML::PullParser

# Note: YAML starts counting from 0, we want to count from 1

def location
def location : {Int32, Int32}
{start_line, start_column}
end

def start_line : Int
@event.start_mark.line + 1
def start_line : Int32
@event.start_mark.line.to_i32 + 1
end

def start_column : Int
@event.start_mark.column + 1
def start_column : Int32
@event.start_mark.column.to_i32 + 1
end

def end_line : Int
@event.end_mark.line + 1
def end_line : Int32
@event.end_mark.line.to_i32 + 1
end

def end_column : Int
@event.end_mark.column + 1
def end_column : Int32
@event.end_mark.column.to_i32 + 1
end

private def problem_line_number
Expand Down

0 comments on commit 4673e76

Please sign in to comment.