Class: LibRubyParser::Nodes::And

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

Overview

Represents ‘foo && bar` (or `foo and bar`) statement.

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

“‘text a && b ~~~~~~ “`

Returns:



72
73
74
# File 'lib/lib-ruby-parser/nodes.rb', line 72

def expression_l
  @expression_l
end

#lhsNode (readonly)

Left hand statament of the ‘&&` operation.

‘Lvar(“foo”)` node for `foo && bar`

Returns:



48
49
50
# File 'lib/lib-ruby-parser/nodes.rb', line 48

def lhs
  @lhs
end

#operator_lLoc (readonly)

Location of the ‘&&` (or and) operator

“‘text a && b

~~

“‘

Returns:



63
64
65
# File 'lib/lib-ruby-parser/nodes.rb', line 63

def operator_l
  @operator_l
end

#rhsNode (readonly)

Right hand statement of the ‘&&` operation.

‘Lvar(“bar”)` node for `foo && bar`

Returns:



54
55
56
# File 'lib/lib-ruby-parser/nodes.rb', line 54

def rhs
  @rhs
end