diff --git a/src/source.rs b/src/source.rs index 45db40c..6df2096 100644 --- a/src/source.rs +++ b/src/source.rs @@ -74,6 +74,13 @@ pub struct Source = String> { len: usize, } +impl> Source { + /// Get the full text of this source file. + pub fn text(&self) -> &str { + self.text.as_ref() + } +} + impl> From for Source { /// Generate a [`Source`] from the given [`str`]. ///