1
0
dust/dust-lang/src/lib.rs

49 lines
1.3 KiB
Rust
Raw Normal View History

2024-08-05 04:54:12 +00:00
//! The Dust programming language.
//!
2024-08-13 22:27:03 +00:00
//! To get started, you can use the `run` function to run a Dust program.
//!
//! ```rust
//! use dust_lang::{run, Value};
//!
//! let program = "
2024-08-23 21:27:11 +00:00
//! let foo = 21
//! let bar = 2
2024-08-13 22:27:03 +00:00
//! foo * bar
//! ";
//!
//! let the_answer = run(program).unwrap();
//!
//! assert_eq!(the_answer, Some(Value::integer(42)));
//! ```
2024-08-05 03:11:04 +00:00
pub mod analyzer;
2024-08-16 09:24:55 +00:00
pub mod ast;
pub mod built_in_function;
2024-08-20 06:25:22 +00:00
pub mod constructor;
2024-08-10 00:52:13 +00:00
pub mod context;
2024-08-20 15:07:13 +00:00
pub mod core_library;
2024-08-09 00:58:56 +00:00
pub mod dust_error;
pub mod evaluation;
2024-03-25 04:16:55 +00:00
pub mod identifier;
2024-08-11 21:24:05 +00:00
pub mod lexer;
pub mod parser;
2024-08-04 00:23:52 +00:00
pub mod token;
pub mod r#type;
2024-02-26 21:27:01 +00:00
pub mod value;
2024-08-05 02:15:31 +00:00
pub mod vm;
2024-02-23 12:40:01 +00:00
pub use analyzer::{analyze, AnalysisError, Analyzer};
2024-08-23 20:47:57 +00:00
pub use ast::{AbstractSyntaxTree, AstError, Expression, Node, Span, Statement};
pub use built_in_function::{BuiltInFunction, BuiltInFunctionError};
2024-09-02 08:27:11 +00:00
pub use constructor::{ConstructError, Constructor};
2024-08-20 15:07:13 +00:00
pub use context::{Context, ContextData, ContextError};
2024-08-20 15:40:37 +00:00
pub use core_library::core_library;
2024-08-09 01:47:49 +00:00
pub use dust_error::DustError;
pub use evaluation::{Evaluation, TypeEvaluation};
2024-08-04 00:23:52 +00:00
pub use identifier::Identifier;
2024-08-11 21:24:05 +00:00
pub use lexer::{lex, LexError, Lexer};
pub use parser::{parse, ParseError, Parser};
2024-08-17 08:06:13 +00:00
pub use r#type::*;
2024-08-12 14:08:34 +00:00
pub use token::{Token, TokenKind, TokenOwned};
2024-08-17 08:06:13 +00:00
pub use value::*;
2024-08-30 22:06:58 +00:00
pub use vm::{run, RuntimeError, Vm};