mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	 e751dcea43
			
		
	
	
		e751dcea43
		
	
	
	
	
		
			
			And also make sure private identifiers are correctly checked when synthesizing a binding pattern.
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			838 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			838 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| test("slash token resolution in lexer", () => {
 | |
|     expect(`{ blah.blah; }\n/foo/`).toEval();
 | |
|     expect("``/foo/").not.toEval();
 | |
|     expect("1/foo/").not.toEval();
 | |
|     expect("1/foo").toEval();
 | |
| 
 | |
|     expect("{} /foo/").toEval();
 | |
|     expect("{} /=/").toEval();
 | |
|     expect("{} /=a/").toEval();
 | |
|     expect("{} /* */ /=a/").toEval();
 | |
|     expect("{} /* /a/ */ /=a/").toEval();
 | |
| 
 | |
|     expect("(function () {} / 1)").toEval();
 | |
|     expect("(function () {} / 1)").toEval();
 | |
| 
 | |
|     expect("+a++ / 1").toEval();
 | |
|     expect("+a-- / 1").toEval();
 | |
|     expect("a.in / b").toEval();
 | |
|     expect("a.instanceof / b").toEval();
 | |
|     expect("class A { #name; d = a.#name / b; }").toEval();
 | |
| 
 | |
|     // FIXME: Even more 'reserved' words are valid however the cases below do still need to pass.
 | |
|     //expect("a.void / b").toEval();
 | |
|     expect("void / b/").toEval();
 | |
| });
 |