mirror of https://github.com/boa-dev/boa.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
484 B
20 lines
484 B
use crate::syntax::{ |
|
ast::node::{FormalParameterList, GeneratorDecl}, |
|
parser::tests::check_parser, |
|
}; |
|
use boa_interner::Interner; |
|
|
|
#[test] |
|
fn generator_function_declaration() { |
|
let mut interner = Interner::default(); |
|
check_parser( |
|
"function* gen() {}", |
|
vec![GeneratorDecl::new( |
|
interner.get_or_intern_static("gen"), |
|
FormalParameterList::default(), |
|
vec![], |
|
) |
|
.into()], |
|
&mut interner, |
|
); |
|
}
|
|
|