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

  • Abstract syntax tree
  • Preprocess and parse C source file into an abstract syntax tree
  • Convert byte offsets into line numbers
  • Debug printer for abstract syntax tree
  • Source text location tracking
  • Recursive abstract syntax tree traversal