From be7cfc85d08c545abfac08098b7b33b4bd71f37e Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 27 Oct 2024 19:04:55 +0100 Subject: Split out four new crates (#5302) --- crates/typst-syntax/src/source.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/typst-syntax/src/source.rs') diff --git a/crates/typst-syntax/src/source.rs b/crates/typst-syntax/src/source.rs index a2ccb5bb..3454a265 100644 --- a/crates/typst-syntax/src/source.rs +++ b/crates/typst-syntax/src/source.rs @@ -32,6 +32,7 @@ struct Repr { impl Source { /// Create a new source file. pub fn new(id: FileId, text: String) -> Self { + let _scope = typst_timing::TimingScope::new("create source"); let mut root = parse(&text); root.numberize(id, Span::FULL).unwrap(); Self(Arc::new(Repr { @@ -75,6 +76,7 @@ impl Source { /// /// Returns the range in the new source that was ultimately reparsed. pub fn replace(&mut self, new: &str) -> Range { + let _scope = typst_timing::TimingScope::new("replace source"); let old = self.text(); let mut prefix = -- cgit v1.2.3