mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:12:44 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			695 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			695 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2023, Dan Klishch <danilklishch@gmail.com>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include "Compiler/GenericASTPass.h"
 | |
| 
 | |
| namespace JSSpecCompiler {
 | |
| 
 | |
| // ReferenceResolvingPass collects all variable names declared in the function and replaces
 | |
| // UnresolvedReference nodes with either SlotName, Variable, or FunctionPointer nodes.
 | |
| class ReferenceResolvingPass : public GenericASTPass {
 | |
| public:
 | |
|     inline static constexpr StringView name = "reference-resolving"sv;
 | |
| 
 | |
|     using GenericASTPass::GenericASTPass;
 | |
| 
 | |
| protected:
 | |
|     void process_function() override;
 | |
|     RecursionDecision on_entry(Tree tree) override;
 | |
|     void on_leave(Tree tree) override;
 | |
| };
 | |
| 
 | |
| }
 | 
