Skip to content

Commit

Permalink
handles dos-style carriage return
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippRados committed Apr 6, 2024
1 parent 37a8413 commit b08fc6d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wrecc_compiler/src/preprocessor/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ pub struct Scanner {
}
impl Scanner {
pub fn new(source: String) -> Scanner {
// replace windows style carriage return
let source = source.replace("\r\n", "\n");

Scanner {
column: 1,
line: 1,
Expand Down

0 comments on commit b08fc6d

Please sign in to comment.