@@ -665,14 +665,10 @@ impl Syntax {
665665 layer.depth == depth && // TODO: track parent id instead
666666 layer.config.language == config.language && layer.ranges == ranges
667667 })
668− .map(|(id, _layer)| {
669− log::info!("match! {:?}", id);
670− id
671− });
668+ .map(|(id, _layer)| id);
672669
673670 // ...or insert a new one.
674671 let layer_id = layer.unwrap_or_else(|| {
675− log::info!("miss! {:?}", ranges);
676672 self.layers.insert(LanguageLayer {
677673 tree: None,
678674 config,
@@ -714,7 +710,6 @@ impl Syntax {
714710 .iter()
715711 .filter_map(|(_, layer)| {
716712 // TODO: if range doesn't overlap layer range, skip it
717− // we can calculate intersection and use it later for set_byte_range
718713
719714 // Reuse a cursor from the pool if available.
720715 let mut cursor = PARSER.with(|ts_parser| {
@@ -729,7 +724,6 @@ impl Syntax {
729724 unsafe { mem::transmute::<_, &'static mut QueryCursor>(&mut cursor) };
730725
731726 // if reusing cursors & no range this resets to whole range
732− // TODO: handle intersect (range & layer.range)
733727 cursor_ref.set_byte_range(range.clone().unwrap_or(0..usize::MAX));
734728
735729 let mut captures = cursor_ref