Class: LibRubyParser::Nodes::KwBegin

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

Overview

Represents an explicit begin; end block.

The reason why it's different is that

begin; foo; end while cond

is a post-while loop (same with post-until loop)

Instance Attribute Summary collapse

Instance Attribute Details

#begin_lLoc? (readonly)

Location of the begin keyword

begin; foo; end
~~~~~

Returns:



2315
2316
2317
# File 'lib/lib-ruby-parser/nodes.rb', line 2315

def begin_l
  @begin_l
end

#end_lLoc? (readonly)

Location of the end keyword

begin; foo; end
            ~~~

Returns:



2324
2325
2326
# File 'lib/lib-ruby-parser/nodes.rb', line 2324

def end_l
  @end_l
end

#expression_lLoc (readonly)

Location of the full expression

begin; foo; bar
~~~~~~~~~~~~~~~

Returns:



2333
2334
2335
# File 'lib/lib-ruby-parser/nodes.rb', line 2333

def expression_l
  @expression_l
end

#statements::Array<Node> (readonly)

A list of statements

Returns:



2306
2307
2308
# File 'lib/lib-ruby-parser/nodes.rb', line 2306

def statements
  @statements
end