mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-18 18:45:23 +00:00
Add with_col_offset and with_row_offset to Location
This commit is contained in:
parent
b6647b0171
commit
72185fecd5
4 changed files with 44 additions and 8 deletions
|
@ -213,7 +213,7 @@ pub(crate) fn parse_error_from_lalrpop(
|
|||
let expected = (expected.len() == 1).then(|| expected[0].clone());
|
||||
ParseError {
|
||||
error: ParseErrorType::UnrecognizedToken(token.1, expected),
|
||||
location: Location::new(token.0.row(), token.0.column() + 1),
|
||||
location: token.0.with_col_offset(1),
|
||||
source_path,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue