john-science / slowloris

A DIY-LISP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need a 'print'

john-science opened this issue · comments

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

Do I want one or both of these functionalities?

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

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)