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.
|
||||
getter node : Crystal::ASTNode
|
||||
|
||||
delegate to_s, to: node
|
||||
delegate location, to: node
|
||||
delegate end_location, to: node
|
||||
delegate location, end_location, to_s,
|
||||
to: @node
|
||||
|
||||
def_equals_and_hash node, location
|
||||
|
||||
|
|
|
@ -19,9 +19,8 @@ module Ameba::AST
|
|||
# Variable of this argument (may be the same node)
|
||||
getter variable : Variable
|
||||
|
||||
delegate location, to: @node
|
||||
delegate end_location, to: @node
|
||||
delegate to_s, to: @node
|
||||
delegate location, end_location, to_s,
|
||||
to: @node
|
||||
|
||||
# Creates a new argument.
|
||||
#
|
||||
|
|
|
@ -19,9 +19,8 @@ module Ameba::AST
|
|||
# A scope assignment belongs to
|
||||
getter scope : Scope
|
||||
|
||||
delegate to_s, to: @node
|
||||
delegate location, to: @node
|
||||
delegate end_location, to: @node
|
||||
delegate location, end_location, to_s,
|
||||
to: @node
|
||||
|
||||
# Creates a new assignment.
|
||||
#
|
||||
|
|
|
@ -2,10 +2,8 @@ module Ameba::AST
|
|||
class InstanceVariable
|
||||
getter node : Crystal::InstanceVar
|
||||
|
||||
delegate location, to: @node
|
||||
delegate end_location, to: @node
|
||||
delegate name, to: @node
|
||||
delegate to_s, to: @node
|
||||
delegate location, end_location, name, to_s,
|
||||
to: @node
|
||||
|
||||
def initialize(@node)
|
||||
end
|
||||
|
|
|
@ -2,9 +2,8 @@ module Ameba::AST
|
|||
class TypeDecVariable
|
||||
getter node : Crystal::TypeDeclaration
|
||||
|
||||
delegate location, to: @node
|
||||
delegate end_location, to: @node
|
||||
delegate to_s, to: @node
|
||||
delegate location, end_location, to_s,
|
||||
to: @node
|
||||
|
||||
def initialize(@node)
|
||||
end
|
||||
|
|
|
@ -17,10 +17,8 @@ module Ameba::AST
|
|||
# Node of the first assignment which can be available before any reference.
|
||||
getter assign_before_reference : Crystal::ASTNode?
|
||||
|
||||
delegate location, to: @node
|
||||
delegate end_location, to: @node
|
||||
delegate name, to: @node
|
||||
delegate to_s, to: @node
|
||||
delegate location, end_location, name, to_s,
|
||||
to: @node
|
||||
|
||||
# Creates a new variable(in the scope).
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue