A modern, interpreted, statically typed scripting language, built from the ground-up using Rust
.
This is a pre-1.0.0 release! Expect bugs, crashes, and more!
- Bullet-proof
null
safety - Eloquent error handling
- Rich standard library
- Package system
- Powerful tools for testing
- Extendability with custom runtimes
The goals above are what we are striving for in the long-run, however, there is still much to do in the early stages of this project.
- Tokenizer
- AST Parser
- Runtime
- Records
- Options
- Results
- Compile-time type checking
- Multi-file support
- External package support
- Inheritance
- Documentation system
- Generics
- Improved compiler and runtime errors (accurate line and column numbers)
- 3 todos left!
- 100% doc coverage
- LSP server
- Tree-sitter parser
-
lantern test
command
There's still a long ways to go, so don't expect this to reach version 1.0.0
anytime soon!
(You can always contribute by making a pull request wink wink)
- Install
Rust
if you haven't already. Installation instructions can be found here. - Clone this repository and navigate to its root folder by running the following in your terminal:
git clone 'https://github.com/DatAsianBoi123/lantern-lang.git' && cd lantern-lang
- Install the CLI tool by running
cargo install --path cli
in the root folder. This may take a while!
Congratulations! You have now installed Lantern
.
Run lantern -h
for info about running scripts, and try running some scripts in the /scripts
directory.
Refer to the wiki to get started writing Lantern
code.
A vim syntax file can also be found in /syntax/la.vim
.
This project is broken up into multiple different crates, each with its own functionality.
lang
contains structs and enums that essentially bridgeLantern
data withRust
. For example, this crate includes aLanternValue
enum that represents a lantern value such as astr
ornum
.parse
handles parsing ofLantern
code. Right now, this crate only performs lexical analysis and syntax analysis.runtime
contains functionality to execute a list of statements generated by theparse
crate.builtin
contains builtin top-level functions and variables that are a part of thestd
library, such asprint
,stringify
, andinput
. Note that builtin records are not found in this crate, rather, are found inlang
.macros
contains procedural macros that assist in making nativeLantern
functions.lantern
is the main crate that exports all the crates above.cli
is the main cli used when installing this crate, executable usinglantern
.