From e99eac8af8799a1ae594b6a0816f35d9023fef4f Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Wed, 21 Nov 2018 00:28:13 +0000 Subject: [PATCH] readme updates --- README.md | 6 ++++++ src/bin/bin.rs | 1 - tests/js/defineVar.js | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 737049209b..d2d40a747f 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,9 @@ This is an experimental Javascript lexer, parser and Just-in-Time compiler writt This project is an attempted rewrite of Bebbington's js.rs and will look very, very similar to it for a while. As that repo has not been touched in a long time a lot of the Rust is out-of-date so a lot of things are probably in error by today's standards + +#### Usage +* Checkout this project +* Build `cargo build` +* `cargo run` +* You can make changes to tests/js/defineVar.js and build again \ No newline at end of file diff --git a/src/bin/bin.rs b/src/bin/bin.rs index 7cc8b29acc..f591da2948 100644 --- a/src/bin/bin.rs +++ b/src/bin/bin.rs @@ -12,7 +12,6 @@ pub fn main() { // Setup executor let expr = Parser::new(tokens).parse_all().unwrap(); - println!("{}", expr); let mut engine: Interpreter = Executor::new(); let result = engine.run(&expr); diff --git a/tests/js/defineVar.js b/tests/js/defineVar.js index 013c764f26..7b7bf1b0e3 100644 --- a/tests/js/defineVar.js +++ b/tests/js/defineVar.js @@ -1,2 +1,2 @@ -var b = 'Jason'; -typeof b; +var b = [1, 2, 3]; +b[1];