use super::StructuralIndex;
#[allow(dead_code)] pub fn classify_scalar(input: &[u8]) -> StructuralIndex {
let num_chunks = (input.len() + 63) / 64;
let mut lt_bits = vec![0u64; num_chunks];
let mut gt_bits = vec![0u64; num_chunks];
let mut in_quote: u8 = 0;
for (i, &byte) in input.iter().enumerate() {
let chunk = i / 64;
let bit = i % 64;
if in_quote != 0 {
if byte == in_quote {
in_quote = 0;
}
continue;
}
match byte {
b'<' => lt_bits[chunk] |= 1u64 << bit,
b'>' => gt_bits[chunk] |= 1u64 << bit,
b'"' | b'\'' => in_quote = byte,
_ => {}
}
}
StructuralIndex { lt_bits, gt_bits, len: input.len() }
}