diff options
Diffstat (limited to 'libbindgen/src/codegen/helpers.rs')
-rw-r--r-- | libbindgen/src/codegen/helpers.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libbindgen/src/codegen/helpers.rs b/libbindgen/src/codegen/helpers.rs index 8c3d3cea..7284ab80 100644 --- a/libbindgen/src/codegen/helpers.rs +++ b/libbindgen/src/codegen/helpers.rs @@ -133,6 +133,10 @@ pub mod ast_ty { } } + pub fn bool_expr(val: bool) -> P<ast::Expr> { + aster::AstBuilder::new().expr().bool(val) + } + pub fn byte_array_expr(bytes: &[u8]) -> P<ast::Expr> { let mut vec = Vec::with_capacity(bytes.len() + 1); for byte in bytes { |