@ -723,7 +723,7 @@ where
match class_element_name {
match class_element_name {
ClassElementName ::PropertyName ( property_name ) if r#static = > {
ClassElementName ::PropertyName ( property_name ) if r#static = > {
if property_name . prop_name ( ) = = Some ( Sym ::PROTOTYPE ) {
if property_name . literal ( ) = = Some ( Sym ::PROTOTYPE ) {
return Err ( Error ::general (
return Err ( Error ::general (
"class may not have static method definitions named 'prototype'" ,
"class may not have static method definitions named 'prototype'" ,
name_position ,
name_position ,
@ -780,7 +780,7 @@ where
cursor . set_strict_mode ( strict ) ;
cursor . set_strict_mode ( strict ) ;
match class_element_name {
match class_element_name {
ClassElementName ::PropertyName ( property_name ) if r#static = > {
ClassElementName ::PropertyName ( property_name ) if r#static = > {
if property_name . prop_name ( ) = = Some ( Sym ::PROTOTYPE ) {
if property_name . literal ( ) = = Some ( Sym ::PROTOTYPE ) {
return Err ( Error ::general (
return Err ( Error ::general (
"class may not have static method definitions named 'prototype'" ,
"class may not have static method definitions named 'prototype'" ,
name_position ,
name_position ,
@ -825,7 +825,7 @@ where
match class_element_name {
match class_element_name {
ClassElementName ::PropertyName ( property_name ) if r#static = > {
ClassElementName ::PropertyName ( property_name ) if r#static = > {
if property_name . prop_name ( ) = = Some ( Sym ::PROTOTYPE ) {
if property_name . literal ( ) = = Some ( Sym ::PROTOTYPE ) {
return Err ( Error ::general (
return Err ( Error ::general (
"class may not have static method definitions named 'prototype'" ,
"class may not have static method definitions named 'prototype'" ,
name_position ,
name_position ,
@ -957,14 +957,12 @@ where
body ,
body ,
) ) ;
) ) ;
if r#static {
if r#static {
if let Some ( name ) = name . prop_name ( ) {
if name . literal ( ) = = Some ( Sym ::PROTOTYPE ) {
if name = = Sym ::PROTOTYPE {
return Err ( Error ::general (
return Err ( Error ::general (
"class may not have static method definitions named 'prototype'" ,
"class may not have static method definitions named 'prototype'" ,
name_position ,
name_position ,
) ) ;
) ) ;
}
}
}
function ::ClassElement ::StaticMethodDefinition ( name , method )
function ::ClassElement ::StaticMethodDefinition ( name , method )
} else {
} else {
function ::ClassElement ::MethodDefinition ( name , method )
function ::ClassElement ::MethodDefinition ( name , method )
@ -1081,14 +1079,12 @@ where
cursor . set_strict_mode ( strict ) ;
cursor . set_strict_mode ( strict ) ;
let method = MethodDefinition ::Set ( Function ::new ( None , params , body ) ) ;
let method = MethodDefinition ::Set ( Function ::new ( None , params , body ) ) ;
if r#static {
if r#static {
if let Some ( name ) = name . prop_name ( ) {
if name . literal ( ) = = Some ( Sym ::PROTOTYPE ) {
if name = = Sym ::PROTOTYPE {
return Err ( Error ::general (
return Err ( Error ::general (
"class may not have static method definitions named 'prototype'" ,
"class may not have static method definitions named 'prototype'" ,
name_position ,
name_position ,
) ) ;
) ) ;
}
}
}
function ::ClassElement ::StaticMethodDefinition ( name , method )
function ::ClassElement ::StaticMethodDefinition ( name , method )
} else {
} else {
function ::ClassElement ::MethodDefinition ( name , method )
function ::ClassElement ::MethodDefinition ( name , method )
@ -1253,14 +1249,12 @@ where
}
}
}
}
TokenKind ::Punctuator ( Punctuator ::OpenParen ) = > {
TokenKind ::Punctuator ( Punctuator ::OpenParen ) = > {
if let Some ( name ) = name . prop_name ( ) {
if r#static & & name . literal ( ) = = Some ( Sym ::PROTOTYPE ) {
if r#static & & name = = Sym ::PROTOTYPE {
return Err ( Error ::general (
return Err ( Error ::general (
"class may not have static method definitions named 'prototype'" ,
"class may not have static method definitions named 'prototype'" ,
name_position ,
name_position ,
) ) ;
) ) ;
}
}
}
let strict = cursor . strict_mode ( ) ;
let strict = cursor . strict_mode ( ) ;
cursor . set_strict_mode ( true ) ;
cursor . set_strict_mode ( true ) ;
let params =
let params =