[bugs:#2211] Ruby - folding not work for elsif/else part
Status: open
Group: Bug
Created: Fri Oct 02, 2020 06:37 PM UTC by Arkadiusz MIchalski
Last Updated: Fri Oct 02, 2020 06:37 PM UTC
Owner: nobody
Looks like folding for if statemet is not support for elsif/else part.
Code to reproduce:
if expr1 === _tmp || expr2 === _tmp stmt1 elsif expr3 === _tmp || expr4 === _tmp stmt2 else stmt3 end class Myclass def initialize(x,y) if x y elsif y x end end end
Proper behaviour you can check in Visual Studio Code or online compiler:
https://www.tutorialspoint.com/execute_ruby_online.php
Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
Same is for case statement:
def describe(inhabitant) case inhabitant when "sophie" puts 'gender: female' puts 'height: 145' when "paul" puts 'gender: male' puts 'height: 145' when "dawn" puts 'gender: female' puts 'height: 170' when "brian" puts 'gender: male' puts 'height: 180' else puts 'species: Trachemys scripta elegans' puts 'height: 6' end end
Whether to fold else clauses is a matter of opinion. Some lexers, including cpp offer '...fold.at.else' options to control this.
Not folding else clauses is not a bug.
[bugs:#2211] Ruby - folding not work for elsif/else part
Status: open-rejected
Group: Bug
Labels: lexer ruby
Created: Fri Oct 02, 2020 06:37 PM UTC by Arkadiusz MIchalski
Last Updated: Fri Oct 02, 2020 06:47 PM UTC
Owner: nobody
Ok thanks for the clarification.
[bugs:#2211] Ruby - folding not work for elsif/else part
Status: open-rejected
Group: Bug
Labels: lexer ruby
Created: Fri Oct 02, 2020 06:37 PM UTC by Arkadiusz MIchalski
Last Updated: Fri Oct 02, 2020 08:56 PM UTC
Owner: nobody
[bugs:#2211] Ruby - folding not work for elsif/else part
Status: closed-rejected
Group: Bug
Labels: lexer ruby
Created: Fri Oct 02, 2020 06:37 PM UTC by Arkadiusz MIchalski
Last Updated: Fri Oct 02, 2020 09:19 PM UTC
Owner: nobody