Class: Rubinius::AST::And
Direct Known Subclasses
Instance Attribute Summary collapse
-
#left ⇒ Object
Returns the value of attribute left.
-
#right ⇒ Object
Returns the value of attribute right.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, left, right) ⇒ And
constructor
A new instance of And.
- #sexp_name ⇒ Object
- #to_sexp ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk
Constructor Details
#initialize(line, left, right) ⇒ And
Returns a new instance of And.
8 9 10 11 12 |
# File 'lib/compiler/ast/operators.rb', line 8 def initialize(line, left, right) @line = line @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object
Returns the value of attribute left.
6 7 8 |
# File 'lib/compiler/ast/operators.rb', line 6 def left @left end |
#right ⇒ Object
Returns the value of attribute right.
6 7 8 |
# File 'lib/compiler/ast/operators.rb', line 6 def right @right end |
Instance Method Details
#sexp_name ⇒ Object
14 15 16 |
# File 'lib/compiler/ast/operators.rb', line 14 def sexp_name :and end |
#to_sexp ⇒ Object
18 19 20 |
# File 'lib/compiler/ast/operators.rb', line 18 def to_sexp [sexp_name, @left.to_sexp, @right.to_sexp] end |