orql 0.1.0

A toy SQL parser for a subset of the Oracle dialect.
Documentation
//! Defines custom formatter and display traits. Used to provide

/// Represents the necessary operations to format an AST node.
///
/// Used to share the rendering implementation between various output formats.
pub trait Formatter {
    fn write_str(&mut self, s: &str) -> std::fmt::Result;
    fn write_char(&mut self, c: char) -> std::fmt::Result;
}

impl<'a> Formatter for std::fmt::Formatter<'a> {
    fn write_str(&mut self, s: &str) -> std::fmt::Result {
        std::fmt::Formatter::write_str(self, s)
    }

    fn write_char(&mut self, c: char) -> std::fmt::Result {
        std::fmt::Write::write_char(self, c)
    }
}

/// Formats a value via [Formatter]. Used to share the formatting
/// implementations across different output formats.
pub trait Display {
    fn fmt(&self, f: &mut impl Formatter) -> std::fmt::Result;
}