Class: LibRubyParser::Nodes::EmptyElse

Inherits:
LibRubyParser::Node show all
Defined in:
lib/lib-ruby-parser/nodes.rb

Overview

Represents a special empty else that is a part of the pattern matching.

Usually empty else (e.g. part of the if statement) doesn't mean anything, however in pattern matching it prevents raising a NoPatternError.

Throwing away this else may affect your code.

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the else keyword

case foo; in 1; else; end
                ~~~~

Returns:



1331
1332
1333
# File 'lib/lib-ruby-parser/nodes.rb', line 1331

def expression_l
  @expression_l
end