mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 21:30:58 +00:00 
			
		
		
		
	LibJS: Fix computed property ending token in binding pattern parsing
The syntax is supposed to be '[expression]', not '[expression['.
This commit is contained in:
		
							parent
							
								
									b5b84029ab
								
							
						
					
					
						commit
						7dae25eceb
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-18 09:15:45 +09:00 
				
			
			Author: https://github.com/alimpfard
Commit: 7dae25eceb
Pull-request: https://github.com/SerenityOS/serenity/pull/8641
Reviewed-by: https://github.com/IdanHo
Reviewed-by: https://github.com/davidot
			
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -1635,7 +1635,7 @@ RefPtr<BindingPattern> Parser::parse_binding_pattern() | |||
|             } else if (match(TokenType::BracketOpen)) { | ||||
|                 consume(); | ||||
|                 name = parse_expression(0); | ||||
|                 consume(TokenType::BracketOpen); | ||||
|                 consume(TokenType::BracketClose); | ||||
|             } else { | ||||
|                 syntax_error("Expected identifier or computed property name"); | ||||
|                 return {}; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ali Mohammad Pur
						Ali Mohammad Pur