File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
crates/djls-template-ast/src Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ impl LineOffsets {
5656
5757 pub fn position_to_line_col ( & self , offset : u32 ) -> ( u32 , u32 ) {
5858 eprintln ! ( "LineOffsets: Converting position {} to line/col. Offsets: {:?}" , offset, self . 0 ) ;
59-
59+
6060 // Find which line contains this offset by looking for the first line start
6161 // that's greater than our position
6262 let line = match self . 0 . binary_search ( & offset) {
@@ -76,10 +76,10 @@ impl LineOffsets {
7676 }
7777 }
7878 } ;
79-
79+
8080 // Calculate column as offset from line start
8181 let col = offset - self . 0 [ line] ;
82-
82+
8383 eprintln ! ( "LineOffsets: Found line {} starting at offset {}" , line, self . 0 [ line] ) ;
8484 eprintln ! ( "LineOffsets: Calculated col {} as {} - {}" , col, offset, self . 0 [ line] ) ;
8585 ( line as u32 , col)
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ impl Lexer {
6161 '\n' => {
6262 self . consume ( ) ?;
6363 let token = TokenType :: Newline ;
64- eprintln ! ( "Lexer: Found newline at position {}, incrementing line from {} to {}" ,
64+ eprintln ! ( "Lexer: Found newline at position {}, incrementing line from {} to {}" ,
6565 self . start, self . line, self . line + 1 ) ;
6666 self . line += 1 ;
6767 token
You can’t perform that action at this time.
0 commit comments