aboutsummaryrefslogtreecommitdiff
path: root/syntax/doc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/doc.rs')
-rw-r--r--syntax/doc.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/syntax/doc.rs b/syntax/doc.rs
index 60bb4da1..cd764fac 100644
--- a/syntax/doc.rs
+++ b/syntax/doc.rs
@@ -17,6 +17,10 @@ impl Doc {
self.fragments.push(lit);
}
+ pub fn is_empty(&self) -> bool {
+ self.fragments.is_empty()
+ }
+
pub fn to_string(&self) -> String {
let mut doc = String::new();
for lit in &self.fragments {