From b73706aab107de3640f3579fb7fc811548f6f0b7 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Wed, 21 Nov 2018 00:31:20 +0000 Subject: [PATCH] change js file --- src/bin/bin.rs | 2 +- tests/js/defineVar.js | 2 -- tests/js/test.js | 3 +++ 3 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 tests/js/defineVar.js create mode 100644 tests/js/test.js diff --git a/src/bin/bin.rs b/src/bin/bin.rs index f591da2948..d628694f1e 100644 --- a/src/bin/bin.rs +++ b/src/bin/bin.rs @@ -5,7 +5,7 @@ use boa::syntax::parser::Parser; use std::fs::read_to_string; pub fn main() { - let buffer = read_to_string("tests/js/defineVar.js").unwrap(); + let buffer = read_to_string("tests/js/test.js").unwrap(); let mut lexer = Lexer::new(&buffer); lexer.lex().unwrap(); let tokens = lexer.tokens; diff --git a/tests/js/defineVar.js b/tests/js/defineVar.js deleted file mode 100644 index 7b7bf1b0e3..0000000000 --- a/tests/js/defineVar.js +++ /dev/null @@ -1,2 +0,0 @@ -var b = [1, 2, 3]; -b[1]; diff --git a/tests/js/test.js b/tests/js/test.js new file mode 100644 index 0000000000..edec5cfce0 --- /dev/null +++ b/tests/js/test.js @@ -0,0 +1,3 @@ +var a = 1; +var b = 2; +b + a; \ No newline at end of file