A simple macro-based language inspired by Rust and Python.
This crate can be used either directly as an interpreter binary or embedded in another program.
Parsing is still a little weird but just add parentheses! :^)
To run the REPL simply use
cargo run. To see examples of possible code
constructs look at the scripts in
test/. You can run scripts by providing
the name as an argument as follows:
cargo run -- scriptname. You can also
run modules with
cargo run -- modname. This is the same as running
cargo run -- modname/main.um. One such module is
This crate can be added to your dependencies by adding the following to your
[dependencies] umbra_lang = "0.19"
To use the library, call the desired
run*() functions (documented below). For
let env = Env::prelude(); let (vars, val) = run_path("script.um", &env, true);
- readline - Default, enables use of rustyline for input in
- compile - Enables the ability to serialize ASTs and deserialize them for execution. This is generally untested and currently not any faster than normal.
Prints to the current Thread’s local error out.
Prints to the current Thread’s local output.
A collection of interpreter flags and script arguments.
The environment that scripts use to store and access variables.
Denotes a specific position within a script.
A reference to a
A collection of all data required for final script execution.
The context for a running
A piece of the tokenized script.
The parsed representation of a script expression.
A function that is either called natively via Rust or run via an
An error that occured during argument handling, parsing, script execution, or for control flow or other purposes.
Function arguments for various types of functions.
A representation of a kind of
A representation of any valid value in a script.
Splits, tokenizes, parses, and constructs a Runnable from
Compiles the script then executes it in the given environment.
Start an interactive interpreter session (REPL) in the given environment.
Loads a script from
A pair of updated environment vars and the evaluated value.