list contains implemented

This commit is contained in:
Ava Apples Affine 2023-03-20 22:03:10 -07:00
parent da0709c4db
commit b638918a89
Signed by: affine
GPG key ID: 3A4645B8CF806069
7 changed files with 36 additions and 9 deletions

View file

@ -120,6 +120,7 @@ pub fn run_callback(ast: &Seg, syms: &mut SymTable) -> Result<Ctr, String> {
if let Ok(s) = current_dir() {
prefixes.push(String::from(s.to_str().unwrap()));
}
prefixes.push(String::from("/"));
if let Ctr::String(ref filename) = *ast.car {
for prefix in prefixes {
let candidate = Path::new(&prefix.clone()).join(filename);