Class: SyntaxTree::TLambda
- Inherits:
-
Object
- Object
- SyntaxTree::TLambda
- 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
-
#location ⇒ Object
readonly
- Location
-
the location of this node.
-
#value ⇒ Object
readonly
- String
-
the beginning of the lambda literal.
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ TLambda
constructor
A new instance of TLambda.
Constructor Details
#initialize(value:, location:) ⇒ TLambda
Returns a new instance of TLambda.
11679 11680 11681 11682 |
# File 'lib/syntax_tree.rb', line 11679 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
11677 11678 11679 |
# File 'lib/syntax_tree.rb', line 11677 def location @location end |
#value ⇒ Object (readonly)
- String
-
the beginning of the lambda literal
11674 11675 11676 |
# File 'lib/syntax_tree.rb', line 11674 def value @value end |