A toy dynamic programming language written in Ruby
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

binary.rb 284B

1234567891011121314
  1. class AST::Binary
  2. attr_reader :operation, :left, :right
  3. def initialize(operation, left, right)
  4. @operation = operation
  5. @left = left
  6. @right = right
  7. end
  8. def ==(other)
  9. other.operation == @operation && other.left == @left &&
  10. other.right == @right
  11. end
  12. end