adze_feature_policy_core/
lib.rs1#![forbid(unsafe_op_in_unsafe_fn)]
7#![deny(missing_docs)]
8#![cfg_attr(feature = "strict_api", deny(unreachable_pub))]
9#![cfg_attr(not(feature = "strict_api"), warn(unreachable_pub))]
10#![cfg_attr(feature = "strict_docs", deny(missing_docs))]
11#![cfg_attr(not(feature = "strict_docs"), allow(missing_docs))]
12
13pub use adze_parser_backend_core::ParserBackend;
14pub use adze_parser_feature_profile_core::ParserFeatureProfile;
15
16#[cfg(test)]
17mod tests {
18 use super::*;
19
20 #[test]
21 fn facade_reexports_profile_and_backend() {
22 let profile = ParserFeatureProfile::current();
23 let backend = profile.resolve_backend(false);
24 assert!(matches!(
25 backend,
26 ParserBackend::TreeSitter | ParserBackend::PureRust | ParserBackend::GLR
27 ));
28 }
29
30 #[test]
31 fn display_values_are_stable() {
32 assert_eq!(
33 ParserBackend::TreeSitter.to_string(),
34 "tree-sitter C runtime"
35 );
36 assert_eq!(ParserBackend::PureRust.to_string(), "pure-Rust LR parser");
37 assert_eq!(ParserBackend::GLR.to_string(), "pure-Rust GLR parser");
38 }
39}