Skip to content

Commit 07636d9

Browse files
committed
Use u32 for SourceLocation
1 parent 60f4951 commit 07636d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tokenizer.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ impl<'a> Tokenizer<'a> {
309309
location.column = 1;
310310
}
311311
debug_assert!(position <= target);
312-
location.column += target - position;
312+
location.column += (target - position) as u32;
313313
self.last_known_source_location.set((SourcePosition(target), location));
314314
location
315315
}
@@ -383,10 +383,10 @@ pub struct SourcePosition(usize);
383383
#[derive(PartialEq, Eq, Debug, Clone, Copy)]
384384
pub struct SourceLocation {
385385
/// The line number, starting at 1 for the first line.
386-
pub line: usize,
386+
pub line: u32,
387387

388388
/// The column number within a line, starting at 1 for first the character of the line.
389-
pub column: usize,
389+
pub column: u32,
390390
}
391391

392392

0 commit comments

Comments
 (0)