diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2025-12-15 21:46:17 +0100 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2025-12-30 16:02:39 +0100 |
| commit | c970d2941d56a862bb9bb3b808cb588c2982f436 (patch) | |
| tree | 11d706a9fcf13c88baa6e0b182f394f0b678f385 /parse.y | |
| parent | cd66d15858a06406d1de854f3e9690d3557a9864 (diff) | |
[Bug #21784] Fix the Proc#source_location start_column for stabby lambdas
* Consistent with plain `blocks` and `for` blocks and methods
where the source_location covers their entire definition.
* Matches the documentation which mentions
"where the definition starts/ends".
* Partially reverts d357d50f0a74409446f4cccec78593373f5adf2f
which was a workaround to be compatible with parse.y.
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5149,7 +5149,7 @@ lambda : tLAMBDA[lpar] CMDARG_POP(); $args = args_with_numbered(p, $args, max_numparam, it_id); { - YYLTYPE loc = code_loc_gen(&@args, &@body); + YYLTYPE loc = code_loc_gen(&@lpar, &@body); $$ = NEW_LAMBDA($args, $body->node, &loc, &@lpar, &$body->opening_loc, &$body->closing_loc); nd_set_line(RNODE_LAMBDA($$)->nd_body, @body.end_pos.lineno); nd_set_line($$, @args.end_pos.lineno); |
