diff options
author | Peter Mikkelsen <peter@pmikkelsen.com> | 2021-06-30 14:04:15 +0000 |
---|---|---|
committer | Peter Mikkelsen <peter@pmikkelsen.com> | 2021-06-30 14:04:15 +0000 |
commit | ee4298a2cfbbd9e015cfc775d9d714a9f5035846 (patch) | |
tree | 8d6f4b139abf1a645e9e4fe0fba811f64b03839f /main.c | |
parent | 79d1fe1cf2eb6748e2c12ffe9c36a678655302b1 (diff) |
Add a basic repl
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -29,11 +29,15 @@ main(int argc, char *argv[]) int fd = open(parsetestfile, OREAD); if(fd < 0) exits("open"); - Term *prog = parse(fd); + Term *database = parse(fd, 0); Term *goal; - for(goal = initgoals; goal != nil; goal = goal->next) - evalquery(prog, goal); + for(goal = initgoals; goal != nil; goal = goal->next){ + Binding *bindings = nil; + evalquery(database, goal, &bindings); + } + + repl(database); } exits(nil); |