pub fn lex_separators(reader: &mut impl Reader, lexer: &mut impl Lexer) {
    let mut found_newline = false;
    while let ReaderResult::Match(source) = reader.strip_match(&*SEPARATOR_RE) {
        let lexeme = match source.as_str() {
            r"..." | r"…" => ellipsis(source),
            r"." => period(source),
            r"," => comma(source),
            r":" => colon(source),
            "\r\n" | "\n" | "\r" => {
                // Indentation should be parsed after a newline, so stop.
                found_newline = true;
                lexer.set_at_indentable(true);
                newline(source)
            }
            _ => unreachable!(),
        };
        lexer.add(lexeme);
        if found_newline {
            break;
        }
    }
}
/// Lex any number of parentheses, braces and brackets, and add the lexemes to the Lexer.
Lex any number of parentheses, braces and brackets, and add the lexemes to the Lexer.
Lex any number of parentheses braces and brackets and add the lexemes to the Lexer .
pub fn lex_separators(reader: &mut impl Reader, lexer: &mut impl Lexer) {
    let mut found_newline = false;
    while let ReaderResult::Match(source) = reader.strip_match(&*SEPARATOR_RE) {
        let lexeme = match source.as_str() {
            r"..." | r"…" => ellipsis(source),
            r"." => period(source),
            r"," => comma(source),
            r":" => colon(source),
            "\r\n" | "\n" | "\r" => {
                // Indentation should be parsed after a newline, so stop.
                found_newline = true;
                lexer.set_at_indentable(true);
                newline(source)
            }
            _ => unreachable!(),
        };
        lexer.add(lexeme);
        if found_newline {
            break;
        }
    }
}
pub fn lex_separators ( reader : & mut impl Reader , lexer : & mut impl Lexer ) { let mut found_newline = false ; while let ReaderResult :: Match ( source ) = reader . strip_match ( & * SEPARATOR_RE ) { let lexeme = match source . as_str ( ) { r"..." | r"…" =  e lipsis(s o urce), r"." => period ( source ) , r"," => comma ( source ) , r":" => colon ( source ) , " \r \n " | " \n " | " \r " => { // Indentation should be parsed after a newline, so stop. found_newline = true ; lexer . set_at_indentable ( true ) ; newline ( source ) } _ => unreachable ! ( ) , } ; lexer . add ( lexeme ) ; if found_newline { break ; } } }
Lex any number of parentheses, braces and brackets, and add the lexemes to the Lexer.
Lex any number of parentheses braces and brackets and add the lexemes to the Lexer .
reader
&mut impl Reader
lexer
&mut impl Lexer
reader
&mut impl Reader
lexer
&mut impl Lexer