mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	Merge delegate calls
				
					
				
			This commit is contained in:
		
							parent
							
								
									452a7a867e
								
							
						
					
					
						commit
						65ab317a3b
					
				
					 6 changed files with 12 additions and 20 deletions
				
			
		|  | @ -34,9 +34,8 @@ module Ameba::AST | ||||||
|     # The actual AST node that represents a current scope. |     # The actual AST node that represents a current scope. | ||||||
|     getter node : Crystal::ASTNode |     getter node : Crystal::ASTNode | ||||||
| 
 | 
 | ||||||
|     delegate to_s, to: node |     delegate location, end_location, to_s, | ||||||
|     delegate location, to: node |       to: @node | ||||||
|     delegate end_location, to: node |  | ||||||
| 
 | 
 | ||||||
|     def_equals_and_hash node, location |     def_equals_and_hash node, location | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -19,9 +19,8 @@ module Ameba::AST | ||||||
|     # Variable of this argument (may be the same node) |     # Variable of this argument (may be the same node) | ||||||
|     getter variable : Variable |     getter variable : Variable | ||||||
| 
 | 
 | ||||||
|     delegate location, to: @node |     delegate location, end_location, to_s, | ||||||
|     delegate end_location, to: @node |       to: @node | ||||||
|     delegate to_s, to: @node |  | ||||||
| 
 | 
 | ||||||
|     # Creates a new argument. |     # Creates a new argument. | ||||||
|     # |     # | ||||||
|  |  | ||||||
|  | @ -19,9 +19,8 @@ module Ameba::AST | ||||||
|     # A scope assignment belongs to |     # A scope assignment belongs to | ||||||
|     getter scope : Scope |     getter scope : Scope | ||||||
| 
 | 
 | ||||||
|     delegate to_s, to: @node |     delegate location, end_location, to_s, | ||||||
|     delegate location, to: @node |       to: @node | ||||||
|     delegate end_location, to: @node |  | ||||||
| 
 | 
 | ||||||
|     # Creates a new assignment. |     # Creates a new assignment. | ||||||
|     # |     # | ||||||
|  |  | ||||||
|  | @ -2,10 +2,8 @@ module Ameba::AST | ||||||
|   class InstanceVariable |   class InstanceVariable | ||||||
|     getter node : Crystal::InstanceVar |     getter node : Crystal::InstanceVar | ||||||
| 
 | 
 | ||||||
|     delegate location, to: @node |     delegate location, end_location, name, to_s, | ||||||
|     delegate end_location, to: @node |       to: @node | ||||||
|     delegate name, to: @node |  | ||||||
|     delegate to_s, to: @node |  | ||||||
| 
 | 
 | ||||||
|     def initialize(@node) |     def initialize(@node) | ||||||
|     end |     end | ||||||
|  |  | ||||||
|  | @ -2,9 +2,8 @@ module Ameba::AST | ||||||
|   class TypeDecVariable |   class TypeDecVariable | ||||||
|     getter node : Crystal::TypeDeclaration |     getter node : Crystal::TypeDeclaration | ||||||
| 
 | 
 | ||||||
|     delegate location, to: @node |     delegate location, end_location, to_s, | ||||||
|     delegate end_location, to: @node |       to: @node | ||||||
|     delegate to_s, to: @node |  | ||||||
| 
 | 
 | ||||||
|     def initialize(@node) |     def initialize(@node) | ||||||
|     end |     end | ||||||
|  |  | ||||||
|  | @ -17,10 +17,8 @@ module Ameba::AST | ||||||
|     # Node of the first assignment which can be available before any reference. |     # Node of the first assignment which can be available before any reference. | ||||||
|     getter assign_before_reference : Crystal::ASTNode? |     getter assign_before_reference : Crystal::ASTNode? | ||||||
| 
 | 
 | ||||||
|     delegate location, to: @node |     delegate location, end_location, name, to_s, | ||||||
|     delegate end_location, to: @node |       to: @node | ||||||
|     delegate name, to: @node |  | ||||||
|     delegate to_s, to: @node |  | ||||||
| 
 | 
 | ||||||
|     # Creates a new variable(in the scope). |     # Creates a new variable(in the scope). | ||||||
|     # |     # | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue