Class: LibRubyParser::Nodes::And
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::And
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents ‘foo && bar` (or `foo and bar`) statement.
Instance Attribute Summary collapse
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#lhs ⇒ Node
readonly
Left hand statament of the ‘&&` operation.
-
#operator_l ⇒ Loc
readonly
Location of the ‘&&` (or
and) operator. -
#rhs ⇒ Node
readonly
Right hand statement of the ‘&&` operation.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the full expression
“‘text a && b ~~~~~~ “`
72 73 74 |
# File 'lib/lib-ruby-parser/nodes.rb', line 72 def expression_l @expression_l end |
#lhs ⇒ Node (readonly)
Left hand statament of the ‘&&` operation.
‘Lvar(“foo”)` node for `foo && bar`
48 49 50 |
# File 'lib/lib-ruby-parser/nodes.rb', line 48 def lhs @lhs end |
#operator_l ⇒ Loc (readonly)
Location of the ‘&&` (or and) operator
“‘text a && b
~~
“‘
63 64 65 |
# File 'lib/lib-ruby-parser/nodes.rb', line 63 def operator_l @operator_l end |
#rhs ⇒ Node (readonly)
Right hand statement of the ‘&&` operation.
‘Lvar(“bar”)` node for `foo && bar`
54 55 56 |
# File 'lib/lib-ruby-parser/nodes.rb', line 54 def rhs @rhs end |