Crate cmacro

source ·
Expand description

A library for parsing C macros.

This crate allows parsing C macros and converting them to Rust code.

Both function-like macros (e.g. #define FUNC(a, b, c) a + b * c) as well as variable-like macros (e.g. #define VAR 4 + 7 * 82) are supported.

See FnMacro and VarMacro on how to parse macros.

Re-exports

  • pub use ast::*;

Modules

  • This module contains all types needed for parsing a macro to an abstract syntax tree.

Structs

Enums

Traits

Functions