From c9b72aaa84bdd5f67283889a907c8416a853b73c Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 20 May 2022 10:04:49 +0200 Subject: More highlighting API --- src/source.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/source.rs') diff --git a/src/source.rs b/src/source.rs index deeaef4b..7973a2ee 100644 --- a/src/source.rs +++ b/src/source.rs @@ -12,7 +12,7 @@ use crate::diag::TypResult; use crate::loading::{FileHash, Loader}; use crate::parse::{is_newline, parse, reparse}; use crate::syntax::ast::Markup; -use crate::syntax::{self, Category, GreenNode, RedNode, Span}; +use crate::syntax::{GreenNode, RedNode, Span}; use crate::util::{PathExt, StrExt}; #[cfg(feature = "codespan-reporting")] @@ -269,14 +269,6 @@ impl SourceFile { reparse(&mut self.root, &self.src, replace, with.len()) } - /// Provide highlighting categories for the given range of the source file. - pub fn highlight(&self, range: Range, mut f: F) - where - F: FnMut(Range, Category), - { - syntax::highlight(self.red().as_ref(), range, &mut f) - } - /// Get the length of the file in bytes. pub fn len_bytes(&self) -> usize { self.src.len() -- cgit v1.2.3