oxur_repl/
lib.rs

1//! Oxur REPL
2//!
3//! Provides a Read-Eval-Print-Loop with three-tier execution:
4//! - Tier 1: Direct interpretation for simple expressions
5//! - Tier 2: Cached compiled functions
6//! - Tier 3: JIT compilation for complex code
7
8pub mod client;
9pub mod protocol;
10pub mod server;
11
12pub use client::ReplClient;
13pub use protocol::{ReplRequest, ReplResponse};
14pub use server::ReplServer;
15
16/// Result type for REPL operations
17pub type Result<T> = std::result::Result<T, Error>;
18
19/// Error types for REPL
20#[derive(Debug, thiserror::Error)]
21pub enum Error {
22    #[error("Evaluation error: {0}")]
23    Eval(String),
24
25    #[error("Protocol error: {0}")]
26    Protocol(String),
27
28    #[error("Language error: {0}")]
29    Language(#[from] oxur_lang::Error),
30
31    #[error("Compilation error: {0}")]
32    Compile(#[from] oxur_comp::Error),
33}