Skip to content

Commit

Permalink
Not a valid directive, re issue #615
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Oct 31, 2024
1 parent 20e1406 commit 6037cd4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,12 @@ static bool directives(parser *p, cell *d)
if (d->arity != 1)
return false;

if (is_list(c)) {
printf("WARNING: directive to load '%s' not allowed\n", C_STR(p, c+1));
p->error = true;
return false;
}

d->val_off = new_atom(p->pl, "$directive");
CLR_OP(d);

Expand Down Expand Up @@ -691,6 +697,7 @@ static bool directives(parser *p, cell *d)
}

if (!strcmp(dirname, "det") && (c->arity == 1)) {
printf("WARNING: %s\n", dirname);
return true;
}

Expand Down

0 comments on commit 6037cd4

Please sign in to comment.