Chervil is a toy Lisp interpreter written in Ruby
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

number.rb 223B

1234567891011121314151617
  1. module Chervil::AST
  2. class Number
  3. attr_reader :value
  4. def initialize(value)
  5. @value = value
  6. end
  7. def evaluate(env)
  8. @value
  9. end
  10. def ==(other)
  11. @value == other.value
  12. end
  13. end
  14. end