pub fn lex_grouping(reader: &mut impl Reader, lexer: &mut impl Lexer) {
    while let ReaderResult::Match(source) = reader.strip_match(&*GROUPING_RE) {
        lexer.add(match source.as_str() {
            "(" => parenthesis_open(source),
            ")" => parenthesis_close(source),
            "[" => bracket_open(source),
            "]" => bracket_close(source),
            "{" => unlexable(source), //TODO @mark
            "}" => unlexable(source), //TODO @mark
            _ => unreachable!(),
        });
    }
}
/// 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_grouping(reader: &mut impl Reader, lexer: &mut impl Lexer) {
    while let ReaderResult::Match(source) = reader.strip_match(&*GROUPING_RE) {
        lexer.add(match source.as_str() {
            "(" => parenthesis_open(source),
            ")" => parenthesis_close(source),
            "[" => bracket_open(source),
            "]" => bracket_close(source),
            "{" => unlexable(source), //TODO @mark
            "}" => unlexable(source), //TODO @mark
            _ => unreachable!(),
        });
    }
}
pub fn lex_grouping ( reader : & mut impl Reader , lexer : & mut impl Lexer ) { while let ReaderResult :: Match ( source ) = reader . strip_match ( & * GROUPING_RE ) { lexer . add ( match source . as_str ( ) { " " => parenthesis_open ( source ) , " " => parenthesis_close ( source ) , " " => bracket_open ( source ) , " " => bracket_close ( source ) , " " => unlexable ( source ) , //TODO @mark " " => unlexable ( source ) , //TODO @mark _ => unreachable ! ( ) , } ) ; } }
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