class SyntaxTree::TLambda
TLambda
represents the beginning of a lambda literal.
-> { value }
In
the example above the TLambda
represents the ->
operator.
Attributes
value[R]
- String
-
the beginning of the lambda literal
Public Class Methods
new(value:, location:)
click to toggle source
# File lib/syntax_tree/node.rb, line 10745 def initialize(value:, location:) @value = value @location = location end
Public Instance Methods
===(other)
click to toggle source
# File lib/syntax_tree/node.rb, line 10771 def ===(other) other.is_a?(TLambda) && value === other.value end
accept(visitor)
click to toggle source
# File lib/syntax_tree/node.rb, line 10750 def accept(visitor) visitor.visit_tlambda(self) end
child_nodes()
click to toggle source
# File lib/syntax_tree/node.rb, line 10754 def child_nodes [] end
Also aliased as: deconstruct
copy(value: nil, location: nil)
click to toggle source
# File lib/syntax_tree/node.rb, line 10758 def copy(value: nil, location: nil) TLambda.new( value: value || self.value, location: location || self.location ) end
deconstruct_keys(_keys)
click to toggle source
# File lib/syntax_tree/node.rb, line 10767 def deconstruct_keys(_keys) { value: value, location: location } end