mirror of https://github.com/boa-dev/boa.git
Jason Williams
6 years ago
2 changed files with 24 additions and 21 deletions
@ -1,6 +1,12 @@
|
||||
extern crate js; |
||||
use js::syntax::lexer::Lexer; |
||||
use std::fs::read_to_string; |
||||
use std::fs::File; |
||||
use std::io::BufReader; |
||||
|
||||
pub fn main() { |
||||
let buffer = read_to_string("test.js").unwrap(); |
||||
println!("{}", buffer); |
||||
} |
||||
let mut f = File::open("test.js").expect("file not found"); |
||||
let mut reader = BufReader::new(f); |
||||
let mut lexer = Lexer::new(reader); |
||||
lexer.lex() |
||||
} |
||||
|
Loading…
Reference in new issue