Skip to content

JavaScript lexer/parser/interpreter in Rust ๐Ÿฆ€

License

Notifications You must be signed in to change notification settings

jakemarsden/JakeScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
Sep 12, 2022
Sep 12, 2022
Nov 2, 2022
Oct 31, 2022
Nov 5, 2022
Jul 13, 2021
Sep 2, 2022
Aug 12, 2021
Mar 18, 2022
Oct 31, 2022

Repository files navigation

JakeScript

CI License

A work-in-progress JavaScript lexer, parser, and interpreter. Written in Rust ๐Ÿฆ€ for fun and learning.

Usage

cargo build --release --workspace

./target/release/jakescript-cli  --eval                      <source-path>  # Evaluate a file
./target/release/jakescript-cli  --lex                       <source-path>  # Lex (tokenise) a file
./target/release/jakescript-cli  --parse  [--json | --yaml]  <source-path>  # Parse a file and output as JSON or YAML
./target/release/jakescript-cli  --repl                                     # Enter an interactive REPL

Crates

  • ๐Ÿ•ฎ jakescript The core of the project. Contains code for the lexer, parser, interpreter, and most of the tests.
  • โ–ท jakescript-cli Command line interface with a REPL. Can also run the lexer, parser, and interpreter on a file.

Tests

Run all tests:

cargo test --workspace

Run the main integration test on its own, which evaluates each JavaScript file in the tests-js directory:

cargo test --package jakescript --test js_tests -- --nocapture

About

JavaScript lexer/parser/interpreter in Rust ๐Ÿฆ€

Topics

Resources

License

Stars

Watchers

Forks