blob: 5c217fc864f4ded3b07c0d77ecc20c78b8985809 [file] [log] [blame]
swissChili7a6f5eb2021-04-13 16:46:02 -07001#include "lisp.h"
swissChilif3e7f182021-04-20 13:57:22 -07002#include "compiler.h"
swissChili7a6f5eb2021-04-13 16:46:02 -07003
4int main (int argc, char **argv)
5{
swissChilibed80922021-04-13 21:58:05 -07006 if ( argc < 2 )
7 {
8 puts ("pass the string you want to parse as the first argument please");
9 return 1;
10 }
11
12 struct istream *is = new_stristream_nt (argv[ 1 ]);
swissChili7a6f5eb2021-04-13 16:46:02 -070013
swissChili8fc5e2f2021-04-22 13:45:10 -070014 struct environment env = compile_all (is);
15 value_t (*lisp_main) () = find_function(&env, "main")->def0;
16 lisp_main ();
swissChili7a6f5eb2021-04-13 16:46:02 -070017
swissChili8fc5e2f2021-04-22 13:45:10 -070018// del_stristream (is);
swissChili7a6f5eb2021-04-13 16:46:02 -070019}