Starting from `lookahead`, are we looking at a number?
(&self)
| 187 | |
| 188 | // Starting from `lookahead`, are we looking at a number? |
| 189 | fn looking_at_numeric(&self) -> bool { |
| 190 | if let Some(c) = self.lookahead { |
| 191 | match c { |
| 192 | '0'..='9' => return true, |
| 193 | '-' => return true, |
| 194 | '+' => return true, |
| 195 | '.' => return true, |
| 196 | _ => {} |
| 197 | } |
| 198 | if self.looking_at("NaN") || self.looking_at("Inf") || self.looking_at("sNaN") { |
| 199 | return true; |
| 200 | } |
| 201 | } |
| 202 | false |
| 203 | } |
| 204 | |
| 205 | // Scan a single-char token. |
| 206 | fn scan_char(&mut self, tok: Token<'a>) -> Result<LocatedToken<'a>, LocatedError> { |