fn skip_noise(&mut self) -> DiagResult2<()> {
        loop {
            match (self.peek[0].0, self.peek[1].0) {
                // Single-line comment inserted by preprocessor.
                (CatTokenKind::Symbol('/'), CatTokenKind::Symbol('/')) => {
                    self.bump()?;
                    self.bump()?;
                    loop {
                        match self.peek[0].0 {
                            CatTokenKind::Eof => break,
                            CatTokenKind::Newline => {
                                self.bump()?;
                                break;
                            }
                            _ => self.bump()?,
                        }
                    }
                }
                // Multi-line comment inserted by preprocessor.
                (CatTokenKind::Symbol('/'), CatTokenKind::Symbol('*')) => {
                    self.bump()?;
                    self.bump()?;
                    loop {
                        match (self.peek[0].0, self.peek[1].0) {
                            (CatTokenKind::Eof, _) => break,
                            (CatTokenKind::Symbol('*'), CatTokenKind::Symbol('/')) => {
                                self.bump()?;
                                self.bump()?;
                                break;
                            }
                            _ => self.bump()?,
                        }
                    }
                }
                // SystemVerilog Attributes
                (CatTokenKind::Symbol('('), CatTokenKind::Symbol('*'))
                    if self.peek[2].0 != CatTokenKind::Symbol(')') =>
                {
                    self.bump()?;
                    self.bump()?;
                    loop {
                        match (self.peek[0].0, self.peek[1].0) {
                            (CatTokenKind::Eof, _) => break,
                            (CatTokenKind::Symbol('*'), CatTokenKind::Symbol(')')) => {
                                self.bump()?;
                                self.bump()?;
                                break;
                            }
                            _ => self.bump()?,
                        }
                    }
                }
                _ => (),
            }
            match self.peek[0].0 {
                CatTokenKind::Whitespace | CatTokenKind::Newline | CatTokenKind::Comment => {
                    self.bump()?
                }
                _ => return Ok(()),
            }
        }
    }
/// Skips all input tokens that are excluded from the language's syntax,
/// i.e. whitespace, newlines, and comments. Note that during lexical
/// analysis whitespace may still play a vital role, espceially when parsing
/// number literals or string constants.
Skips all input tokens that are excluded from the language's syntax,
i.e. whitespace, newlines, and comments. Note that during lexical
analysis whitespace may still play a vital role, espceially when parsing
number literals or string constants.
Skips all input tokens that are excluded from the language ' s syntax i . e . whitespace newlines and comments . Note that during lexical analysis whitespace may still play a vital role espceially when parsing number literals or string constants .
fn skip_noise(&mut self) -> DiagResult2<()> {
        loop {
            match (self.peek[0].0, self.peek[1].0) {
                // Single-line comment inserted by preprocessor.
                (CatTokenKind::Symbol('/'), CatTokenKind::Symbol('/')) => {
                    self.bump()?;
                    self.bump()?;
                    loop {
                        match self.peek[0].0 {
                            CatTokenKind::Eof => break,
                            CatTokenKind::Newline => {
                                self.bump()?;
                                break;
                            }
                            _ => self.bump()?,
                        }
                    }
                }
                // Multi-line comment inserted by preprocessor.
                (CatTokenKind::Symbol('/'), CatTokenKind::Symbol('*')) => {
                    self.bump()?;
                    self.bump()?;
                    loop {
                        match (self.peek[0].0, self.peek[1].0) {
                            (CatTokenKind::Eof, _) => break,
                            (CatTokenKind::Symbol('*'), CatTokenKind::Symbol('/')) => {
                                self.bump()?;
                                self.bump()?;
                                break;
                            }
                            _ => self.bump()?,
                        }
                    }
                }
                // SystemVerilog Attributes
                (CatTokenKind::Symbol('('), CatTokenKind::Symbol('*'))
                    if self.peek[2].0 != CatTokenKind::Symbol(')') =>
                {
                    self.bump()?;
                    self.bump()?;
                    loop {
                        match (self.peek[0].0, self.peek[1].0) {
                            (CatTokenKind::Eof, _) => break,
                            (CatTokenKind::Symbol('*'), CatTokenKind::Symbol(')')) => {
                                self.bump()?;
                                self.bump()?;
                                break;
                            }
                            _ => self.bump()?,
                        }
                    }
                }
                _ => (),
            }
            match self.peek[0].0 {
                CatTokenKind::Whitespace | CatTokenKind::Newline | CatTokenKind::Comment => {
                    self.bump()?
                }
                _ => return Ok(()),
            }
        }
    }
fn skip_noise ( & mut self ) -> DiagResult2 < ( ) > { loop { match ( self . peek [ 0 ] . 0 , self . peek [ 1 ] . 0 ) { // Single-line comment inserted by preprocessor. ( CatTokenKind :: Symbol ( '/' ) , CatTokenKind :: Symbol ( '/' ) ) => { self . bump ( ) ? ; self . bump ( ) ? ; loop { match self . peek [ 0 ] . 0 { CatTokenKind :: Eof => break , CatTokenKind :: Newline => { self . bump ( ) ? ; break ; } _ => self . bump ( ) ? , } } } // Multi-line comment inserted by preprocessor. ( CatTokenKind :: Symbol ( '/' ) , CatTokenKind :: Symbol ( '*' ) ) => { self . bump ( ) ? ; self . bump ( ) ? ; loop { match ( self . peek [ 0 ] . 0 , self . peek [ 1 ] . 0 ) { ( CatTokenKind :: Eof , _ ) => break , ( CatTokenKind :: Symbol ( '*' ) , CatTokenKind :: Symbol ( '/' ) ) => { self . bump ( ) ? ; self . bump ( ) ? ; break ; } _ => self . bump ( ) ? , } } } // SystemVerilog Attributes ( CatTokenKind :: Symbol ( '(' ) , CatTokenKind :: Symbol ( '*' ) ) if self . peek [ 2 ] . 0 != CatTokenKind :: Symbol ( ')' ) => { self . bump ( ) ? ; self . bump ( ) ? ; loop { match ( self . peek [ 0 ] . 0 , self . peek [ 1 ] . 0 ) { ( CatTokenKind :: Eof , _ ) => break , ( CatTokenKind :: Symbol ( '*' ) , CatTokenKind :: Symbol ( ')' ) ) => { self . bump ( ) ? ; self . bump ( ) ? ; break ; } _ => self . bump ( ) ? , } } } _ => ( ) , } match self . peek [ 0 ] . 0 { CatTokenKind :: Whitespace | CatTokenKind :: Newline | CatTokenKind :: Comment => { self . bump ( ) ? } _ => return Ok ( ( ) ) , } } }
Skips all input tokens that are excluded from the language's syntax,
i.e.
Skips all input tokens that are excluded from the language ' s syntax i . e .
&mut self
&mut self