diff --git a/doc/src/conditional-compilation.md b/doc/src/conditional-compilation.md new file mode 100644 index 0000000..bc77904 --- /dev/null +++ b/doc/src/conditional-compilation.md @@ -0,0 +1,9 @@ +LALRPOP support conditional compilation of public non-terminal declarations via `#[cfg(feature = "FEATUERE")]` attributes. +If run in a build script LALRPOP will automatically pickup the features from `cargo` and use those. Alternatively an explicit set of features can be set using the `Configuration` type. + +```rust +#[cfg(feature = "FEATURE")] +pub MyRule : () = { + ... +}; +```