mongosh/repl/mod.rs
1//! REPL (Read-Eval-Print Loop) module root for mongosh
2//!
3//! This module is split into several submodules responsible for different
4//! aspects of the interactive shell:
5//!
6//! - `cursor_state` : pagination cursor state
7//! - `shared_state` : shared mutable state between REPL and execution context
8//! - `engine` : `ReplEngine`, the main interactive loop and editor
9//! - `completer` : Completion provider for reedline
10//! - `highlighter` : Syntax highlighting for reedline
11//! - `hinter` : Inline hints for reedline
12//! - `validator` : Line validation for reedline
13//! - `completion` : Intelligent completion system for MongoDB shell and SQL
14//!
15//! External code should typically depend on `ReplEngine` and `SharedState`.
16//! More specialized types (e.g. completer, highlighter, validator)
17//! are re‑exported for convenience but are mostly internal details of the
18//! REPL implementation.
19
20mod completer;
21pub mod completion;
22mod cursor_state;
23mod engine;
24mod highlighter;
25mod hinter;
26mod prompt;
27mod shared_state;
28mod validator;
29
30pub use cursor_state::CursorState;
31pub use engine::ReplEngine;
32pub use shared_state::SharedState;
33
34#[cfg(test)]
35mod tests;