john-science / slowloris

A DIY-LISP.
5 stars 3 forks source link

Need a 'print' #30

Closed john-science closed 10 years ago

john-science commented 10 years ago

Can I just use the inverse parse that is already in the library?

john-science commented 10 years ago

Do I want one or both of these functionalities?

(print "Hi, John!") (print "Hi, John!" (+ 71 9378))

john-science commented 10 years ago

Here is some example implementation code:

    elif ast[0] == 'print':
        return eval_print(ast, env)

def eval_print(ast, env):
    assert_exp_length(ast, 3)

    print(ast[1])

    return evaluate(ast[2], env)