1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! A safe, native sized Forth.
//!
//! # Features
//!
//! * `std`: Add support for standard input and output.
//! * `repl`: Build the REPL.
//! * `unsafe`: Enable unchecked stack access optimizations.
//! ```rust
//! use ferth::Ferth;
//! use ferth::host::NullHost;
//!
//! let mut fe = Ferth::new([0u8; 65536], NullHost).unwrap();
//! fe.evaluate("
//! : square ( n -- n ) dup * ;
//! 2 dup square dup square dup square
//! ").unwrap();
//! assert_eq!(fe.stack().count(), 4);
//! assert_eq!(fe.stack().collect::<Vec<_>>(), vec![2, 4, 16, 256]);
//! ```
pub use ;
pub use Ferth;
pub use Config;
/// The size of a cell in bytes.
pub const SIZE: usize = ;
/// Boolean true. A cell with all bits set ([`usize::MAX`]).
pub const TRUE: usize = usizeMAX;
/// Boolean false. A cell with no bits set (`0`).
pub const FALSE: usize = 0;
/// SPACE.
const BL: usize = 0x20;