Class: Sexpir::Binary

Inherits:
Expression show all
Defined in:
lib/sexpir/ast_sexp.rb,
lib/sexpir/ast.rb

Overview

Instance Attribute Summary collapse

Attributes inherited from Ast

#node

Instance Method Summary collapse

Methods inherited from Ast

#accept

Instance Attribute Details

#lhsObject

Returns the value of attribute lhs.



99
100
101
# File 'lib/sexpir/ast.rb', line 99

def lhs
  @lhs
end

#opObject

Returns the value of attribute op.



99
100
101
# File 'lib/sexpir/ast.rb', line 99

def op
  @op
end

#rhsObject

Returns the value of attribute rhs.



99
100
101
# File 'lib/sexpir/ast.rb', line 99

def rhs
  @rhs
end

Instance Method Details

#sexpObject



186
187
188
# File 'lib/sexpir/ast_sexp.rb', line 186

def sexp
  "(#{op} #{lhs.sexp} #{rhs.sexp})"
end