Fix StrNode#last_line and StrNode#line_count for heredocs#40
Fix StrNode#last_line and StrNode#line_count for heredocs#40fatkodima wants to merge 1 commit intorubocop:masterfrom
StrNode#last_line and StrNode#line_count for heredocs#40Conversation
|
Heredocs are complicated. The notion of 'source' of a heredoc is strange as the source is disconnected. It's important to realize how disconnected it is... foo(<<~RUBY, other, arguments(:here), not(related_to_here_doc))
inside heredoc
RUBYI don't think that including |
|
Yeah, agreed. |
|
Feel free to ping me if there would be any interest in this. |
|
Thanks for the ping, sorry I didn't answer before. I'm 👍 on |
|
We can consider |
1e5b738 to
ca5886e
Compare
StrNode#last_line and StrNode#line_count for heredocs
|
On master branch, for heredocs: |
Parser's heredoc format:
Right now, heredocs are not handled correctly, imo. Every updated method in this PR in the original implementation only deals with
expressionpart. And so returns incorrect values (look at tests for expected behavior).Rubocop needs a couple of changes (2-3 very small) due to new behavior to let the CI pass. But this gem depends on
rubocop, andrubocopdepends on this gem, so I need and advise on how to proceed and in what order.