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.
123456789101112 |
- module Chervil
- RSpec.describe AST::Definition do
- it 'evaluates' do
- env = Env.new
- AST::Definition.new(
- AST::Identifier.new("x"),
- AST::Number.new(5.0)
- ).evaluate(env)
- expect(env.get("x")).to eq(AST::Number.new(5.0))
- end
- end
- end
|