diff options
| author | Sophie Forrest <git@sophieforrest.com> | 2024-08-30 23:35:45 +1200 |
|---|---|---|
| committer | Sophie Forrest <git@sophieforrest.com> | 2024-08-30 23:35:45 +1200 |
| commit | 3c163eabc78ddbd26bb250ef5ad6da28cd61adc6 (patch) | |
| tree | 58e17534e1db18813554d4fb6e67020f898b655d /src/lib.rs | |
| parent | 17b78f8cb127817b93f7e6ced7e55d8748806a80 (diff) | |
feat: split engine into crates
Diffstat (limited to '')
| -rw-r--r-- | crates/brainf_rs/src/lib.rs (renamed from src/lib.rs) | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib.rs b/crates/brainf_rs/src/lib.rs index 71c5a99..f5c8987 100644 --- a/src/lib.rs +++ b/crates/brainf_rs/src/lib.rs @@ -83,13 +83,12 @@ extern crate test; mod engine; pub mod executor; -pub mod lexer; pub mod parser; #[cfg(feature = "utilities")] pub mod utility; +pub use brainf_lexer::{lex, Token}; pub use executor::{U16 as ExecutorU16, U32 as ExecutorU32, U8 as ExecutorU8}; -pub use lexer::{lex, OperatorCode}; use miette::Diagnostic; pub use parser::{parse, Instruction}; use thiserror::Error; @@ -101,6 +100,10 @@ pub enum Error { #[error(transparent)] Io(#[from] std::io::Error), + /// Error occurred while lexing the input. + #[error(transparent)] + Lexer(#[from] brainf_lexer::Error), + /// An error that occurred while parsing Brainfuck code. #[diagnostic(transparent)] #[error(transparent)] |