summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/parser.c b/parser.c
index 773a0a2..04b2b68 100644
--- a/parser.c
+++ b/parser.c
@@ -70,7 +70,7 @@ parse(int fd, Biobuf *bio, int querymode)
parsein = bio;
nexttoken();
- currentmod = usermodule;
+ currentmod = getmodule(L"user");
Term *result = prologtext(querymode);
if(querymode && result){
@@ -101,12 +101,7 @@ prologtext(int querymode)
if(t->tag == CompoundTerm && runestrcmp(t->text, L":-") == 0 && t->arity == 1){
Term *body = t->children;
- if(runestrcmp(body->text, L"module") == 0 && body->arity == 2){
- handlemoduledirective(body->children);
- t->next = prologtext(querymode);
- return t;
- }
- else if(runestrcmp(body->text, L"op") == 0 && body->arity == 3)
+ if(runestrcmp(body->text, L"op") == 0 && body->arity == 3)
handleopdirective(body->children);
t = prologtext(querymode);
@@ -579,20 +574,6 @@ syntaxerror_parser(char *where)
}
void
-handlemoduledirective(Term *args)
-{
- Term *modulename = args;
- Term *publiclist = modulename->next;
- USED(publiclist);
-
- if(modulename->tag != AtomTerm){
- print("Module name should be an atom in: %S\n", prettyprint(modulename, 0, 0, 0, currentmod));
- return;
- }
- currentmod = addemptymodule(modulename->text);
-}
-
-void
handleopdirective(Term *args)
{
Term *levelt = args;