Look up predicates
This commit is contained in:
parent
56885dc290
commit
555f983285
@ -82,7 +82,8 @@ where
|
|||||||
D: crate::FindOrCreateFunctionDeclaration + crate::FindOrCreatePredicateDeclaration,
|
D: crate::FindOrCreateFunctionDeclaration + crate::FindOrCreatePredicateDeclaration,
|
||||||
{
|
{
|
||||||
pub fn new(input: &'i str, declarations: &'d D,
|
pub fn new(input: &'i str, declarations: &'d D,
|
||||||
variable_declaration_stack: &'v crate::VariableDeclarationStackLayer<'p>) -> Self
|
variable_declaration_stack: &'v crate::VariableDeclarationStackLayer<'p>)
|
||||||
|
-> Self
|
||||||
{
|
{
|
||||||
Self
|
Self
|
||||||
{
|
{
|
||||||
@ -366,10 +367,8 @@ where
|
|||||||
crate::parse::error::Location::new(0, Some(0))))
|
crate::parse::error::Location::new(0, Some(0))))
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: implement look-up
|
let declaration = self.declarations.find_or_create_predicate_declaration(predicate_name,
|
||||||
let declaration =
|
arguments.len());
|
||||||
crate::PredicateDeclaration::new(predicate_name.to_string(), arguments.len());
|
|
||||||
let declaration = std::rc::Rc::new(declaration);
|
|
||||||
|
|
||||||
return Ok(crate::Formula::predicate(declaration, arguments));
|
return Ok(crate::Formula::predicate(declaration, arguments));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user