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
//! # Koto
//!
//! Pulls together the compiler and runtime for the Koto programming language.
//!
//! Programs can be compiled and executed with the [Koto] struct.
//!
//! ## Example
//!
//! ```
//! use koto::prelude::*;
//!
//! let mut koto = Koto::default();
//! match koto.compile("1 + 2") {
//! Ok(chunk) => match koto.run(chunk) {
//! Ok(result) => match result {
//! KValue::Number(n) => println!("{n}"), // 3.0
//! other => panic!("Unexpected result type: {}", other.type_as_string()),
//! },
//! Err(runtime_error) => {
//! panic!("Runtime error: {runtime_error}");
//! }
//! },
//! Err(compiler_error) => {
//! panic!("Compiler error: {compiler_error}");
//! }
//! }
//! ```
pub use koto_bytecode as bytecode;
pub use koto_parser as parser;
pub use koto_runtime as runtime;
pub use ;
pub use koto_serde as serde;
pub use crate;
pub use crate;