Look up variables

This commit is contained in:
Patrick Lühne 2020-05-04 16:55:21 +02:00
parent f8918628fa
commit 1b4c400bfb
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
2 changed files with 1 additions and 4 deletions

View File

@ -375,7 +375,6 @@ where
let declaration = self.declarations.find_or_create_predicate_declaration(predicate_name,
arguments.len());
return Ok(crate::Formula::predicate(declaration, arguments));
}

View File

@ -434,9 +434,7 @@ where
crate::parse::error::Location::new(0, Some(0))))
}
// TODO: implement look-up
let declaration = crate::VariableDeclaration::new(identifier.to_string());
let declaration = std::rc::Rc::new(declaration);
let declaration = self.variable_declaration_stack.find_or_create(identifier);
return Ok(crate::Term::variable(declaration));
},
_ if is_function_name(identifier) =>