postgresql-cst-parser 0.2.0

An unofficial PostgreSQL CST parser written in Pure Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::io::Read;

fn main() {
    let mut sql = String::new();
    std::io::stdin().read_to_string(&mut sql).unwrap();

    match postgresql_cst_parser::parse(&sql) {
        Ok(tree) => println!("{tree:#?}"),
        Err(e) => eprintln!("{e:#?}"),
    }
}