fn eat_number_body_into(
        &mut self,
        into: &mut String,
        span: &mut Span,
        allow_alphabetic: bool,
    ) -> DiagResult2<()> {
        loop {
            match self.peek[0] {
                (CatTokenKind::Digits, sp) | (CatTokenKind::Text, sp) => {
                    if self.peek[0].0 == CatTokenKind::Text && !allow_alphabetic {
                        break;
                    }
                    into.push_str(&sp.extract());
                    span.expand(sp);
                }
                (CatTokenKind::Symbol('_'), _) => (),
                (CatTokenKind::Symbol('?'), sp) => {
                    into.push('?');
                    span.expand(sp);
                }
                _ => break,
            }
            self.bump()?;
        }
        Ok(())
    }
/// Eats all text, digits, and underscore tokens, accumulating them (except
/// for the underscores) in a String.
Eats all text, digits, and underscore tokens, accumulating them (except
for the underscores) in a String.
Eats all text digits and underscore tokens accumulating them ( except for the underscores ) in a String .
fn eat_number_body_into(
        &mut self,
        into: &mut String,
        span: &mut Span,
        allow_alphabetic: bool,
    ) -> DiagResult2<()> {
        loop {
            match self.peek[0] {
                (CatTokenKind::Digits, sp) | (CatTokenKind::Text, sp) => {
                    if self.peek[0].0 == CatTokenKind::Text && !allow_alphabetic {
                        break;
                    }
                    into.push_str(&sp.extract());
                    span.expand(sp);
                }
                (CatTokenKind::Symbol('_'), _) => (),
                (CatTokenKind::Symbol('?'), sp) => {
                    into.push('?');
                    span.expand(sp);
                }
                _ => break,
            }
            self.bump()?;
        }
        Ok(())
    }
fn eat_number_body_into ( & mut self , into : & mut String , span : & mut Span , allow_alphabetic : bool , ) -> DiagResult2 < ( ) > { loop { match self . peek [ 0 ] { ( CatTokenKind :: Digits , sp ) | ( CatTokenKind :: Text , sp ) => { if self . peek [ 0 ] . 0 == CatTokenKind :: Text && ! allow_alphabetic { break ; } into . push_str ( & sp . extract ( ) ) ; span . expand ( sp ) ; } ( CatTokenKind :: Symbol ( '_' ) , _ ) => ( ) , ( CatTokenKind :: Symbol ( '?' ) , sp ) => { into . push ( '?' ) ; span . expand ( sp ) ; } _ => break , } self . bump ( ) ? ; } Ok ( ( ) ) }
Eats all text, digits, and underscore tokens, accumulating them (except
for the underscores) in a String.
Eats all text digits and underscore tokens accumulating them ( except for the underscores ) in a String .
&mut self
into
&mut String
span
&mut Span
allow_alphabetic
bool
&mut self
into
&mut String
span
&mut Span
allow_alphabetic
bool