1mod autocmd;
15mod buffer;
16mod error;
17mod extmark;
18mod ffi;
19mod global;
20pub(crate) mod iterator;
21pub mod opts;
22pub(crate) mod serde_utils;
23mod tabpage;
24mod trait_utils;
25pub mod types;
26pub(crate) mod utils;
27mod vimscript;
28mod win_config;
29mod window;
30
31pub use autocmd::*;
32pub use buffer::*;
33pub use error::Error;
34use error::Result;
35pub use extmark::*;
36pub use global::*;
37pub use tabpage::*;
38pub use trait_utils::*;
39pub use vimscript::*;
40pub use win_config::*;
41pub use window::*;
42
43const INTERNAL_CALL_MASK: u64 = 1u64 << (std::mem::size_of::<u64>() * 8 - 1);
45
46const VIML_INTERNAL_CALL: u64 = INTERNAL_CALL_MASK;
48
49const LUA_INTERNAL_CALL: u64 = VIML_INTERNAL_CALL + 1;
51
52macro_rules! choose {
53 ($err:expr, ()) => {
54 if $err.is_err() {
55 Err($err.into())
56 } else {
57 Ok(())
58 }
59 };
60
61 ($err:expr, $other:expr) => {
62 if $err.is_err() {
63 Err($err.into())
64 } else {
65 $other
66 }
67 };
68}
69
70pub(crate) use choose;