Skip to content

Commit 1ca58e0

Browse files
committed
Dispatch on_tlambda and on_tlambeg
1 parent a7ab3a4 commit 1ca58e0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/prism/translation/ripper.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ module Translation
3737
# * on_semicolon
3838
# * on_sp
3939
# * on_symbeg
40-
# * on_tlambda
41-
# * on_tlambeg
4240
# * on_tstring_beg
4341
# * on_tstring_end
4442
#
@@ -2243,6 +2241,9 @@ def visit_keyword_rest_parameter_node(node)
22432241

22442242
# -> {}
22452243
def visit_lambda_node(node)
2244+
bounds(node.operator_loc)
2245+
on_tlambda(node.operator)
2246+
22462247
parameters =
22472248
if node.parameters.is_a?(BlockParametersNode)
22482249
# Ripper does not track block-locals within lambdas, so we skip
@@ -2267,6 +2268,11 @@ def visit_lambda_node(node)
22672268
end
22682269

22692270
braces = node.opening == "{"
2271+
if braces
2272+
bounds(node.opening_loc)
2273+
on_tlambeg(node.opening)
2274+
end
2275+
22702276
body =
22712277
case node.body
22722278
when nil

0 commit comments

Comments
 (0)