A toy dynamic programming language written in Ruby
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

boolean.rb 209B

123456789101112131415
  1. class AST::Boolean
  2. attr_reader :value
  3. def initialize(value)
  4. @value = value
  5. end
  6. def ==(other)
  7. other.is_a?(AST::Boolean) && other.value == @value
  8. end
  9. def execute(env)
  10. @value
  11. end
  12. end