Class: LibRubyParser::Nodes::Preexe

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

Overview

Represents BEGIN { ... } statement

Instance Attribute Summary collapse

Instance Attribute Details

#begin_lLoc (readonly)

Location of the open parenthesis

BEGIN { 42 }
      ~

Returns:



3320
3321
3322
# File 'lib/lib-ruby-parser/nodes.rb', line 3320

def begin_l
  @begin_l
end

#bodyNode? (readonly)

Body of the block

Returns:



3302
3303
3304
# File 'lib/lib-ruby-parser/nodes.rb', line 3302

def body
  @body
end

#end_lLoc (readonly)

Location of the closing parenthesis

BEGIN { 42 }
           ~

Returns:



3329
3330
3331
# File 'lib/lib-ruby-parser/nodes.rb', line 3329

def end_l
  @end_l
end

#expression_lLoc (readonly)

Location of the full expression

BEGIN { 42 }
~~~~~~~~~~~~

Returns:



3338
3339
3340
# File 'lib/lib-ruby-parser/nodes.rb', line 3338

def expression_l
  @expression_l
end

#keyword_lLoc (readonly)

Location of the BEGIN keyword

BEGIN { 42 }
~~~~~

Returns:



3311
3312
3313
# File 'lib/lib-ruby-parser/nodes.rb', line 3311

def keyword_l
  @keyword_l
end