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.

identifier.rb 243B

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