Crate lang_c

Source
Expand description

C language parser and abstract syntax tree

use lang_c::driver::{Config, parse};

fn main() {
    let config = Config::default();
    println!("{:?}", parse(&config, "example.c"));
}

Modulesยง

ast
Abstract syntax tree
driver
Preprocess and parse C source file into an abstract syntax tree
loc
Convert byte offsets into line numbers
print
Debug printer for abstract syntax tree
span
Source text location tracking
visit
Recursive abstract syntax tree traversal