2024-08-05 04:54:12 +00:00
|
|
|
//! The Dust programming language.
|
|
|
|
//!
|
|
|
|
//! Dust is a statically typed, interpreted programming language.
|
|
|
|
//!
|
|
|
|
//! The [interpreter] module contains the `Interpreter` struct, which is used to lex, parse and/or
|
|
|
|
//! interpret Dust code. The `interpret` function is a convenience function that creates a new
|
|
|
|
//! `Interpreter` and runs the given source code.
|
2024-08-05 03:11:04 +00:00
|
|
|
pub mod abstract_tree;
|
|
|
|
pub mod analyzer;
|
2024-03-25 04:16:55 +00:00
|
|
|
pub mod identifier;
|
2024-08-04 00:23:52 +00:00
|
|
|
pub mod lex;
|
|
|
|
pub mod parse;
|
|
|
|
pub mod token;
|
2024-08-02 20:33:40 +00:00
|
|
|
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
|
|
|
|
2024-08-07 22:24:25 +00:00
|
|
|
pub use abstract_tree::{AbstractSyntaxTree, BuiltInFunction, Node, Statement};
|
2024-08-05 04:40:51 +00:00
|
|
|
pub use analyzer::{analyze, Analyzer, AnalyzerError};
|
2024-08-04 00:23:52 +00:00
|
|
|
pub use identifier::Identifier;
|
2024-08-05 02:15:31 +00:00
|
|
|
pub use lex::{lex, LexError, Lexer};
|
|
|
|
pub use parse::{parse, ParseError, Parser};
|
2024-08-02 20:33:40 +00:00
|
|
|
pub use r#type::Type;
|
2024-08-07 22:24:25 +00:00
|
|
|
pub use token::Token;
|
2024-08-05 02:15:31 +00:00
|
|
|
pub use value::{Value, ValueError};
|
2024-08-05 04:40:51 +00:00
|
|
|
pub use vm::{run, Vm, VmError};
|
2024-08-04 00:23:52 +00:00
|
|
|
|
|
|
|
pub type Span = (usize, usize);
|