Class: SyntaxTree::TLambda

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree.rb

Overview

TLambda represents the beginning of a lambda literal.

-> { value }

In the example above the TLambda represents the -> operator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ TLambda

Returns a new instance of TLambda.



11891
11892
11893
11894
# File 'lib/syntax_tree.rb', line 11891

def initialize(value:, location:)
  @value = value
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

[Location] the location of this node



11889
11890
11891
# File 'lib/syntax_tree.rb', line 11889

def location
  @location
end

#valueObject (readonly)

[String] the beginning of the lambda literal



11886
11887
11888
# File 'lib/syntax_tree.rb', line 11886

def value
  @value
end