Class: Sexpir::Assign

Inherits:
Ast
  • Object
show all
Defined in:
lib/sexpir/ast.rb,
lib/sexpir/ast_sexp.rb

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.



62
63
64
# File 'lib/sexpir/ast.rb', line 62

def lhs
  @lhs
end

#rhsObject

Returns the value of attribute rhs.



62
63
64
# File 'lib/sexpir/ast.rb', line 62

def rhs
  @rhs
end

Instance Method Details

#sexpObject



106
107
108
# File 'lib/sexpir/ast_sexp.rb', line 106

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