Class: SyntaxTree::TLamBeg

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

Overview

TLamBeg represents the beginning of the body of a lambda literal using braces.

-> { value }

In the example above the TLamBeg represents the { operator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json

Constructor Details

#initialize(value:, location:) ⇒ TLamBeg

Returns a new instance of TLamBeg.



10133
10134
10135
10136
# File 'lib/syntax_tree/node.rb', line 10133

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

Instance Attribute Details

#locationObject (readonly)

[Location] the location of this node



10131
10132
10133
# File 'lib/syntax_tree/node.rb', line 10131

def location
  @location
end

#valueObject (readonly)

[String] the beginning of the body of the lambda literal



10128
10129
10130
# File 'lib/syntax_tree/node.rb', line 10128

def value
  @value
end