mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:12:43 +00:00 
			
		
		
		
	LibJS: Implement void operator
This commit is contained in:
		
							parent
							
								
									beda751d33
								
							
						
					
					
						commit
						d30db07048
					
				
					 4 changed files with 34 additions and 1 deletions
				
			
		|  | @ -391,7 +391,11 @@ Value UnaryExpression::execute(Interpreter& interpreter) const | |||
|             return js_string(interpreter, "object"); | ||||
|         case Value::Type::Boolean: | ||||
|             return js_string(interpreter, "boolean"); | ||||
|         default: | ||||
|             ASSERT_NOT_REACHED(); | ||||
|         } | ||||
|     case UnaryOp::Void: | ||||
|         return js_undefined(); | ||||
|     } | ||||
| 
 | ||||
|     ASSERT_NOT_REACHED(); | ||||
|  | @ -539,6 +543,9 @@ void UnaryExpression::dump(int indent) const | |||
|     case UnaryOp::Typeof: | ||||
|         op_string = "typeof "; | ||||
|         break; | ||||
|     case UnaryOp::Void: | ||||
|         op_string = "void "; | ||||
|         break; | ||||
|     } | ||||
| 
 | ||||
|     print_indent(indent); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Linus Groh
						Linus Groh