fn lex_dot(l: &mut Lexer) -> Option<StateFn> {
    if let Some(ch) = l.peek() {
        // a dot followed by dot subsequent is an identifier
        if is_dot_subsequent(ch) || is_delimiter(ch) {
            l.rewind();
            return Some(StateFn(lex_identifier));
        }
        // everything else must be a number
        l.rewind();
        return Some(StateFn(lex_number));
    }
    // and if we ran out of tokens, it is the '.' special symbol
    l.emit(TokenType::Dot);
    Some(StateFn(lex_identifier))
}
/// `lex_dot` decides what should be done with the dot (.) that the
/// lexer just encountered (could be an identifier or a number).
`lex_dot` decides what should be done with the dot (.) that the
lexer just encountered (could be an identifier or a number).
` lex_dot ` decides what should be done with the dot ( . ) that the lexer just encountered ( could be an identifier or a number ) .
fn lex_dot(l: &mut Lexer) -> Option<StateFn> {
    if let Some(ch) = l.peek() {
        // a dot followed by dot subsequent is an identifier
        if is_dot_subsequent(ch) || is_delimiter(ch) {
            l.rewind();
            return Some(StateFn(lex_identifier));
        }
        // everything else must be a number
        l.rewind();
        return Some(StateFn(lex_number));
    }
    // and if we ran out of tokens, it is the '.' special symbol
    l.emit(TokenType::Dot);
    Some(StateFn(lex_identifier))
}
fn lex_dot ( l : & mut Lexer ) -> Option < StateFn > { if let Some ( ch ) = l . peek ( ) { // a dot followed by dot subsequent is an identifier if is_dot_subsequent ( ch ) || is_delimiter ( ch ) { l . rewind ( ) ; return Some ( StateFn ( lex_identifier ) ) ; } // everything else must be a number l . rewind ( ) ; return Some ( StateFn ( lex_number ) ) ; } // and if we ran out of tokens, it is the '.' special symbol l . emit ( TokenType :: Dot ) ; Some ( StateFn ( lex_identifier ) ) }
`lex_dot` decides what should be done with the dot (.)
` lex_dot ` decides what should be done with the dot ( . )
l
&mut Lexer