@ -1,4 +1,4 @@
use crate ::parser ::tests ::{ check_invalid , check_parser } ;
use crate ::parser ::tests ::{ check_invalid , check_script_ parser } ;
use boa_ast ::{
use boa_ast ::{
declaration ::{ LexicalDeclaration , Variable } ,
declaration ::{ LexicalDeclaration , Variable } ,
expression ::{
expression ::{
@ -19,7 +19,7 @@ use boa_macros::utf16;
#[ test ]
#[ test ]
fn check_numeric_operations ( ) {
fn check_numeric_operations ( ) {
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a + b" ,
"a + b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Add . into ( ) ,
ArithmeticOp ::Add . into ( ) ,
@ -31,7 +31,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a+1" ,
"a+1" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Add . into ( ) ,
ArithmeticOp ::Add . into ( ) ,
@ -43,7 +43,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a - b" ,
"a - b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Sub . into ( ) ,
ArithmeticOp ::Sub . into ( ) ,
@ -55,7 +55,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a-1" ,
"a-1" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Sub . into ( ) ,
ArithmeticOp ::Sub . into ( ) ,
@ -67,7 +67,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a / b" ,
"a / b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Div . into ( ) ,
ArithmeticOp ::Div . into ( ) ,
@ -79,7 +79,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a/2" ,
"a/2" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Div . into ( ) ,
ArithmeticOp ::Div . into ( ) ,
@ -91,7 +91,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"let myRegex = /=/;" ,
"let myRegex = /=/;" ,
vec! [ Declaration ::Lexical ( LexicalDeclaration ::Let (
vec! [ Declaration ::Lexical ( LexicalDeclaration ::Let (
vec! [ Variable ::from_identifier (
vec! [ Variable ::from_identifier (
@ -118,7 +118,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"fn(/=/);" ,
"fn(/=/);" ,
vec! [ Statement ::Expression ( Expression ::from ( Call ::new (
vec! [ Statement ::Expression ( Expression ::from ( Call ::new (
Identifier ::new ( interner . get_or_intern_static ( "fn" , utf16 ! ( "fn" ) ) ) . into ( ) ,
Identifier ::new ( interner . get_or_intern_static ( "fn" , utf16 ! ( "fn" ) ) ) . into ( ) ,
@ -138,7 +138,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"fn(a / b);" ,
"fn(a / b);" ,
vec! [ Statement ::Expression ( Expression ::from ( Call ::new (
vec! [ Statement ::Expression ( Expression ::from ( Call ::new (
Identifier ::new ( interner . get_or_intern_static ( "fn" , utf16 ! ( "fn" ) ) ) . into ( ) ,
Identifier ::new ( interner . get_or_intern_static ( "fn" , utf16 ! ( "fn" ) ) ) . into ( ) ,
@ -154,7 +154,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"fn(a) / b;" ,
"fn(a) / b;" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Div . into ( ) ,
ArithmeticOp ::Div . into ( ) ,
@ -171,7 +171,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a * b" ,
"a * b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Mul . into ( ) ,
ArithmeticOp ::Mul . into ( ) ,
@ -183,7 +183,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a*2" ,
"a*2" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Mul . into ( ) ,
ArithmeticOp ::Mul . into ( ) ,
@ -195,7 +195,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a ** b" ,
"a ** b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Exp . into ( ) ,
ArithmeticOp ::Exp . into ( ) ,
@ -207,7 +207,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a**2" ,
"a**2" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Exp . into ( ) ,
ArithmeticOp ::Exp . into ( ) ,
@ -219,7 +219,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a % b" ,
"a % b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Mod . into ( ) ,
ArithmeticOp ::Mod . into ( ) ,
@ -231,7 +231,7 @@ fn check_numeric_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a%2" ,
"a%2" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Mod . into ( ) ,
ArithmeticOp ::Mod . into ( ) ,
@ -247,7 +247,7 @@ fn check_numeric_operations() {
#[ test ]
#[ test ]
fn check_complex_numeric_operations ( ) {
fn check_complex_numeric_operations ( ) {
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a + d*(b-3)+1" ,
"a + d*(b-3)+1" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
ArithmeticOp ::Add . into ( ) ,
ArithmeticOp ::Add . into ( ) ,
@ -278,7 +278,7 @@ fn check_complex_numeric_operations() {
#[ test ]
#[ test ]
fn check_bitwise_operations ( ) {
fn check_bitwise_operations ( ) {
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a & b" ,
"a & b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::And . into ( ) ,
BitwiseOp ::And . into ( ) ,
@ -290,7 +290,7 @@ fn check_bitwise_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a&b" ,
"a&b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::And . into ( ) ,
BitwiseOp ::And . into ( ) ,
@ -302,7 +302,7 @@ fn check_bitwise_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a | b" ,
"a | b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::Or . into ( ) ,
BitwiseOp ::Or . into ( ) ,
@ -314,7 +314,7 @@ fn check_bitwise_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a|b" ,
"a|b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::Or . into ( ) ,
BitwiseOp ::Or . into ( ) ,
@ -326,7 +326,7 @@ fn check_bitwise_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a ^ b" ,
"a ^ b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::Xor . into ( ) ,
BitwiseOp ::Xor . into ( ) ,
@ -338,7 +338,7 @@ fn check_bitwise_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a^b" ,
"a^b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::Xor . into ( ) ,
BitwiseOp ::Xor . into ( ) ,
@ -350,7 +350,7 @@ fn check_bitwise_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a << b" ,
"a << b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::Shl . into ( ) ,
BitwiseOp ::Shl . into ( ) ,
@ -362,7 +362,7 @@ fn check_bitwise_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a<<b" ,
"a<<b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::Shl . into ( ) ,
BitwiseOp ::Shl . into ( ) ,
@ -374,7 +374,7 @@ fn check_bitwise_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a >> b" ,
"a >> b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::Shr . into ( ) ,
BitwiseOp ::Shr . into ( ) ,
@ -386,7 +386,7 @@ fn check_bitwise_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a>>b" ,
"a>>b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
BitwiseOp ::Shr . into ( ) ,
BitwiseOp ::Shr . into ( ) ,
@ -402,7 +402,7 @@ fn check_bitwise_operations() {
#[ test ]
#[ test ]
fn check_assign_operations ( ) {
fn check_assign_operations ( ) {
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a += b" ,
"a += b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Add ,
AssignOp ::Add ,
@ -414,7 +414,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a -= b" ,
"a -= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Sub ,
AssignOp ::Sub ,
@ -426,7 +426,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a *= b" ,
"a *= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Mul ,
AssignOp ::Mul ,
@ -438,7 +438,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a **= b" ,
"a **= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Exp ,
AssignOp ::Exp ,
@ -450,7 +450,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a /= b" ,
"a /= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Div ,
AssignOp ::Div ,
@ -462,7 +462,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a %= b" ,
"a %= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Mod ,
AssignOp ::Mod ,
@ -474,7 +474,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a &= b" ,
"a &= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::And ,
AssignOp ::And ,
@ -486,7 +486,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a |= b" ,
"a |= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Or ,
AssignOp ::Or ,
@ -498,7 +498,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a ^= b" ,
"a ^= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Xor ,
AssignOp ::Xor ,
@ -510,7 +510,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a <<= b" ,
"a <<= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Shl ,
AssignOp ::Shl ,
@ -522,7 +522,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a >>= b" ,
"a >>= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Shr ,
AssignOp ::Shr ,
@ -534,7 +534,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a >>>= b" ,
"a >>>= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Ushr ,
AssignOp ::Ushr ,
@ -546,7 +546,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a %= 10 / 2" ,
"a %= 10 / 2" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Mod ,
AssignOp ::Mod ,
@ -563,7 +563,7 @@ fn check_assign_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a ??= b" ,
"a ??= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
vec! [ Statement ::Expression ( Expression ::from ( Assign ::new (
AssignOp ::Coalesce ,
AssignOp ::Coalesce ,
@ -578,7 +578,7 @@ fn check_assign_operations() {
#[ test ]
#[ test ]
fn check_relational_operations ( ) {
fn check_relational_operations ( ) {
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a < b" ,
"a < b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
RelationalOp ::LessThan . into ( ) ,
RelationalOp ::LessThan . into ( ) ,
@ -590,7 +590,7 @@ fn check_relational_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a > b" ,
"a > b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
RelationalOp ::GreaterThan . into ( ) ,
RelationalOp ::GreaterThan . into ( ) ,
@ -602,7 +602,7 @@ fn check_relational_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a <= b" ,
"a <= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
RelationalOp ::LessThanOrEqual . into ( ) ,
RelationalOp ::LessThanOrEqual . into ( ) ,
@ -614,7 +614,7 @@ fn check_relational_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a >= b" ,
"a >= b" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
RelationalOp ::GreaterThanOrEqual . into ( ) ,
RelationalOp ::GreaterThanOrEqual . into ( ) ,
@ -626,7 +626,7 @@ fn check_relational_operations() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"p in o" ,
"p in o" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
RelationalOp ::In . into ( ) ,
RelationalOp ::In . into ( ) ,
@ -641,7 +641,7 @@ fn check_relational_operations() {
#[ test ]
#[ test ]
fn check_logical_expressions ( ) {
fn check_logical_expressions ( ) {
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a && b || c && d || e" ,
"a && b || c && d || e" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
LogicalOp ::Or . into ( ) ,
LogicalOp ::Or . into ( ) ,
@ -668,7 +668,7 @@ fn check_logical_expressions() {
) ;
) ;
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
"a ?? b ?? c" ,
"a ?? b ?? c" ,
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
vec! [ Statement ::Expression ( Expression ::from ( Binary ::new (
LogicalOp ::Coalesce . into ( ) ,
LogicalOp ::Coalesce . into ( ) ,
@ -693,7 +693,7 @@ fn check_logical_expressions() {
macro_rules! check_non_reserved_identifier {
macro_rules! check_non_reserved_identifier {
( $keyword :literal ) = > { {
( $keyword :literal ) = > { {
let interner = & mut Interner ::default ( ) ;
let interner = & mut Interner ::default ( ) ;
check_parser (
check_script_ parser (
format! ( "({})" , $keyword ) . as_str ( ) ,
format! ( "({})" , $keyword ) . as_str ( ) ,
vec! [ Statement ::Expression ( Expression ::from ( Identifier ::new (
vec! [ Statement ::Expression ( Expression ::from ( Identifier ::new (
interner . get_or_intern_static ( $keyword , utf16 ! ( $keyword ) ) ,
interner . get_or_intern_static ( $keyword , utf16 ! ( $keyword ) ) ,