Class: LibRubyParser::Nodes::For

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

Overview

Represents a for loop

Instance Attribute Summary collapse

Instance Attribute Details

#begin_lLoc (readonly)

Location of the do keyword

for a in b do; end
           ~~

Note: this do is optional, and so begin_l can be None.

Returns:



1549
1550
1551
# File 'lib/lib-ruby-parser/nodes.rb', line 1549

def begin_l
  @begin_l
end

#bodyNode? (readonly)

Body of the loop. None if there's no body

Returns:



1520
1521
1522
# File 'lib/lib-ruby-parser/nodes.rb', line 1520

def body
  @body
end

#end_lLoc (readonly)

Location of the end keyword

for a in b; end
            ~~~

Returns:



1558
1559
1560
# File 'lib/lib-ruby-parser/nodes.rb', line 1558

def end_l
  @end_l
end

#expression_lLoc (readonly)

Location of the full expression

for a in b; end
~~~~~~~~~~~~~~~

Returns:



1567
1568
1569
# File 'lib/lib-ruby-parser/nodes.rb', line 1567

def expression_l
  @expression_l
end

#iterateeNode (readonly)

Collection that is for iteration. Lvar("b") in for a in b; end

Returns:



1516
1517
1518
# File 'lib/lib-ruby-parser/nodes.rb', line 1516

def iteratee
  @iteratee
end

#iteratorNode (readonly)

Variable that is used in loop, Lvasgn("a") in for a in b; end

Returns:



1512
1513
1514
# File 'lib/lib-ruby-parser/nodes.rb', line 1512

def iterator
  @iterator
end

#keyword_lLoc (readonly)

Location of the for keyword

for a in b; end
~~~

Returns:



1529
1530
1531
# File 'lib/lib-ruby-parser/nodes.rb', line 1529

def keyword_l
  @keyword_l
end

#operator_lLoc (readonly)

Location of the in keyword

for a in b; end
      ~~

Returns:



1538
1539
1540
# File 'lib/lib-ruby-parser/nodes.rb', line 1538

def operator_l
  @operator_l
end