A fork of Crisp for HARP
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 

32 wiersze
426 B

#! /usr/bin/env crystal run
require "./readline"
require "./reader"
require "./printer"
# Note:
# Employed downcase names because Crystal prohibits uppercase names for methods
def read(str)
read_str str
end
def eval(x)
x
end
def print(result)
pr_str(result, true)
end
def rep(str)
print(eval(read(str)))
end
while line = my_readline("user> ")
begin
puts rep(line)
rescue e
STDERR.puts e
end
end