pub fn lex(name: &str, input: &str) -> Receiver<Token> {
    let sanitized = sanitize_input(input);
    let (tx, rx) = mpsc::sync_channel(1);
    let thread_name = name.to_string();

    thread::spawn(move || {
        let mut lexer = Lexer::new(thread_name, &*sanitized, tx);
        // inform the compiler what the type of state _really_ is
        let mut state: fn(&mut Lexer) -> Option<StateFn> = lex_start;
        while let Some(next) = state(&mut lexer) {
            let StateFn(state_fn) = next;
            state = state_fn;
        }
    });
    rx
}
/// Initiates the lexical analysis of the given input text.
///
/// The lex function initializes the lexer to analyze the given Scheme
/// input text, returning the channel receiver from which tokens are
/// received.
///
Initiates the lexical analysis of the given input text.
The lex function initializes the lexer to analyze the given Scheme
input text, returning the channel receiver from which tokens are
received.
Initiates the lexical analysis of the given input text . The lex function initializes the lexer to analyze the given Scheme input text returning the channel receiver from which tokens are received .
pub fn lex(name: &str, input: &str) -> Receiver<Token> {
    let sanitized = sanitize_input(input);
    let (tx, rx) = mpsc::sync_channel(1);
    let thread_name = name.to_string();
    thread::spawn(move || {
        let mut lexer = Lexer::new(thread_name, &*sanitized, tx);
        // inform the compiler what the type of state _really_ is
        let mut state: fn(&mut Lexer) -> Option<StateFn> = lex_start;
        while let Some(next) = state(&mut lexer) {
            let StateFn(state_fn) = next;
            state = state_fn;
        }
    });
    rx
}
pub fn lex ( name : & str , input : & str ) -> Receiver < Token > { let sanitized = sanitize_input ( input ) ; let ( tx , rx ) = mpsc :: sync_channel ( 1 ) ; let thread_name = name . to_string ( ) ; thread :: spawn ( move | | { let mut lexer = Lexer :: new ( thread_name , & * sanitized , tx ) ; // inform the compiler what the type of state _really_ is let mut state : fn ( & mut Lexer ) -> Option < StateFn > = lex_start ; while let Some ( next ) = state ( & mut lexer ) { let StateFn ( state_fn ) = next ; state = state_fn ; } } ) ; rx }
Initiates the lexical analysis of the given input text.
Initiates the lexical analysis of the given input text .
name
&str
input
&str