boa_engine 0.16.0

Boa is a Javascript lexer, parser and Just-in-Time compiler written in Rust. Currently, it has support for some of the language.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::syntax::{
    ast::{node::Throw, Const},
    parser::tests::check_parser,
};
use boa_interner::Interner;

#[test]
fn check_throw_parsing() {
    let mut interner = Interner::default();
    check_parser(
        "throw 'error';",
        vec![Throw::new(Const::from(interner.get_or_intern_static("error"))).into()],
        interner,
    );
}