improve matching on partial strings as lists
This commit is contained in:
@@ -133,8 +133,8 @@ fn compile_decl(wam: &mut Machine, compiler: &mut ListingCompiler, decl: Declara
|
||||
let mut indices = default_index_store!(wam.indices.atom_tbl.clone());
|
||||
let wam_indices = &mut wam.indices;
|
||||
|
||||
compiler.process_decl(decl, &mut wam.code_repo, wam_indices, &mut indices, flags)?;
|
||||
|
||||
compiler.process_decl(decl, &mut wam.code_repo, wam_indices, &mut indices, flags)?;
|
||||
|
||||
Ok(indices)
|
||||
}
|
||||
|
||||
|
||||
@@ -1496,7 +1496,8 @@ impl MachineState {
|
||||
|
||||
let offset = match addr {
|
||||
Addr::HeapCell(_) | Addr::StackCell(..) | Addr::AttrVar(..) => v,
|
||||
Addr::Con(Constant::String(_)) if !self.flags.double_quotes.is_atom() => l,
|
||||
Addr::Con(Constant::String(ref s)) if !self.flags.double_quotes.is_atom() =>
|
||||
if s.is_empty() && !s.is_expandable() { c } else { l },
|
||||
Addr::Con(_) => c,
|
||||
Addr::Lis(_) => l,
|
||||
Addr::Str(_) => s,
|
||||
|
||||
Reference in New Issue
Block a user