add the initialization directive

This commit is contained in:
Mark Thom
2019-10-01 16:51:22 -06:00
parent 1ec831b2e2
commit abc7498a42
8 changed files with 92 additions and 46 deletions

View File

@@ -174,6 +174,7 @@ pub enum Declaration {
Dynamic(ClauseName, usize), // name, arity
EndOfFile,
Hook(CompileTimeHook, PredicateClause, VecDeque<TopLevel>),
ModuleInitialization(Vec<QueryTerm>, VecDeque<TopLevel>), // goal
Module(ModuleDecl),
NonCountedBacktracking(ClauseName, usize), // name, arity
Op(OpDecl),
@@ -328,7 +329,7 @@ pub struct Module {
pub user_term_expansions: (Predicate, VecDeque<TopLevel>), // term expansions inherited from the user scope.
pub user_goal_expansions: (Predicate, VecDeque<TopLevel>), // same for goal_expansions.
pub inserted_expansions: bool, // has the module been successfully inserted into toplevel??
}
}
#[derive(Clone, PartialEq, Eq)]
pub enum Number {