This commit is contained in:
Jeff 2024-02-15 10:37:10 -05:00
parent e7f5d66297
commit 91e94a5adc

View File

@ -172,12 +172,7 @@ impl Interpreter {
Ok(self.parse(source)?.root_node().to_sexp()) Ok(self.parse(source)?.root_node().to_sexp())
} }
/// Return formatted Dust code generated from the current abstract tree, or /// Return a formatted version of the source.
/// None if no source code has been run successfully.
///
/// You should call [validate][Interpreter::validate] before calling this
/// function. You can only create formatted source from a valid abstract
/// tree.
pub fn format(&mut self, source: &str) -> Result<String, Error> { pub fn format(&mut self, source: &str) -> Result<String, Error> {
let mut formatted_output = String::new(); let mut formatted_output = String::new();