@@ -11,11 +11,11 @@ use core::cmp::Ordering;
1111const MAX_INDENT_DEPTH : usize = 100 ;
1212const MAX_FSTRING_DEPTH : usize = 200 ;
1313
14- // Scanner state: source bytes, position, pending queue, indent stack, f-string context.
14+ // Scanner state; source bytes, position, pending queue, indent stack, f-string context.
1515pub ( super ) struct Scanner < ' a > {
1616 pub src : & ' a [ u8 ] ,
1717 pub pos : usize ,
18- pub pending : Vec < ( TokenType , usize , usize , usize ) > , // Pending stack: Tokens to emit in LIFO order.
18+ pub pending : Vec < ( TokenType , usize , usize , usize ) > , // Pending stack; Tokens to emit in LIFO order.
1919 pub indent_stack : Vec < usize > ,
2020 pub nesting : u32 ,
2121 pub line : usize ,
@@ -116,7 +116,7 @@ impl<'a> Scanner<'a> {
116116 } else { base }
117117 }
118118
119- /* Handles single-quote, double-quote and triple- quoted strings with escape awareness. */
119+ /* Handles single-quote, double-quote and triple quoted strings with escape awareness. */
120120
121121 fn scan_string ( & mut self , quote : u8 ) {
122122 if self . at ( 0 ) == Some ( quote) && self . at ( 1 ) == Some ( quote) {
@@ -376,7 +376,7 @@ impl<'a> Scanner<'a> {
376376 return self . pending . pop ( ) ;
377377 }
378378
379- // Multi-char operators: 3-char
379+ // Multi-char operators: 3 characters
380380 if self . pos + 2 < self . src . len ( ) {
381381 let kind = match & self . src [ self . pos ..self . pos + 3 ] {
382382 b"**=" => Some ( TokenType :: DoubleStarEqual ) ,
@@ -391,7 +391,7 @@ impl<'a> Scanner<'a> {
391391 }
392392 }
393393
394- // Multi-char operators: 2-char
394+ // Multi-char operators: 2 characters
395395 if self . pos + 1 < self . src . len ( ) {
396396 let kind = match & self . src [ self . pos ..self . pos + 2 ] {
397397 b"!=" => Some ( TokenType :: NotEqual ) , b"%=" => Some ( TokenType :: PercentEqual ) ,
@@ -412,7 +412,7 @@ impl<'a> Scanner<'a> {
412412 }
413413 }
414414
415- // Single-char : table dispatch
415+ // Single character : table dispatch
416416 self . pos += 1 ;
417417 let idx = if b < 128 { SINGLE_TOK [ b as usize ] } else { 0 } ;
418418 let kind = SINGLE_MAP [ idx as usize ] ;
0 commit comments