Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby heredoc in method arguments break braces syntax #62812

Closed
amerov opened this issue Nov 8, 2018 · 6 comments
Closed

Ruby heredoc in method arguments break braces syntax #62812

amerov opened this issue Nov 8, 2018 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug grammar Syntax highlighting grammar

Comments

@amerov
Copy link

amerov commented Nov 8, 2018

  • VSCode Version: 1.28.2
    screenshot from 2018-11-09 02-15-58
@vscodebot
Copy link

vscodebot bot commented Nov 8, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@alexr00
Copy link
Member

alexr00 commented Nov 9, 2018

After the heredoc starts, shouldn't it all be heredoc until the ending LOG? In this case the closing parenthesis is highlighted correctly. @rebornix am I understanding this correctly?

@rebornix
Copy link
Member

@alexr00 the heredoc content starts from the line following the heredoc identifier (LOG in our case) and we can use the heredoc identifier as a variable in that line, so log(<<-LOG) is a valid function call and <<-LOG is referring to the content after this line (and also ends with LOG). https://docs.ruby-lang.org/en/2.5.0/syntax/literals_rdoc.html

For short, ) is not part of the multiline string, our grammar is kind of wrong.

@rebornix rebornix added bug Issue identified by VS Code Team member as probable bug grammar Syntax highlighting grammar labels Nov 19, 2018
@rebornix rebornix removed their assignment Nov 19, 2018
@alexr00
Copy link
Member

alexr00 commented Nov 20, 2018

Thanks for checking!

@alexr00
Copy link
Member

alexr00 commented Nov 20, 2018

Since this is an issue with the grammar I've moved it to the grammar owners: textmate/ruby.tmbundle#124

@alexr00 alexr00 closed this as completed Nov 20, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug grammar Syntax highlighting grammar
Projects
None yet
Development

No branches or pull requests

3 participants