sqruff-lib-core 0.19.0
“Core library that underpins the sqruff library.”
Contains an unbounded block loopRust test marker or harness
SHA-25648ec5ba65376ae9ba3e3dda153668dcb6452a7212ee7b4c9d48e053eb4f0f3fa
MaleculeH(Db₂)Md₂(InPa)
Evidence
767:13… m = SyntaxKind;
768
769 fn next(&mut self) -> Option<Self::Item> {
770 loop {
771 let slice = self.set.0.get_mut(self.index as usize)?;
772 let bit = slice.trailing_zeros() as u16;
773
774 …
776:54… LICE_BITS + bit;
777 return Some(unsafe { std::mem::transmute::<u16, SyntaxKind>(value) });
778 }
779
⋯6 lines
1use std::iter::zip;
2use std::ops::{Deref, DerefMut};
3
4use ahash::AHashSet;
5
6use crate::dialects::syntax::{SyntaxKind, SyntaxSet};
7use crate::errors::SQLParseError;
8use crate::helpers::ToMatchable;
9use crate::parser::context::ParseContext;
10use crate::parser::match_algorithms::{
11 resolve_bracket, skip_start_index_forward_to_code, skip_stop_index_backward_to_code,
12 trim_to_terminator,
13};
14use crate::parser::match_result::{MatchResult, Matched, Span};
15use crate::parser::matchable::{
16 next_matchable_cache_key, Matchable, MatchableCacheKey, MatchableTrait,
17};
18use crate::parser::segments::base::ErasedSegment;
19use crate::parser::types::ParseMode;
20
21fn flush_metas(
22 tpre_nc_idx: u32,
23 post_nc_idx: u32,
24 meta_buffer: Vec<SyntaxKind>, …
597:22… | "block_end" | "block_start" | "block_mid"
598 )
599 }
600}
601
602#[cfg(test)]
603mod tests {
604 use super::*;
605
606 #[test]
607 fn test_indices_of_newlines() {
608 vec![
609 ("", vec![]),
610 ("foo", vec![]),
611 ("foo\nbar …
36:24…
37 .map(|x| x.as_ref().to_string())
38 .collect()
39}
40
41#[cfg(test)]
42mod tests {
43 #[test]
44 fn dialect_readout_is_alphabetically_sorted() {
45 let readout = super::dialect_readout();
⋯7 lines
Showing the top 5 files — 4 more files (46 regions) not shown.
No evidence locations were recorded for this file. Raw result